STRIPE_WIDTH = STRIPE_WIDTH or 0.5 -- initialization -- if the command stripes has already created some stripes, the following function -- can swap two stripes, given their indeces function STswap( a, b ) n, x, z = stripes() if n < 2 or a == nil or b == nil or a > n or a < 1 or b > n or b < 1 or a == b then return end xa = x[a]; za = z[a] x[a] = x[b]; z[a] = z[b] x[b] = xa; z[b] = za stripes( n, x, z, STRIPE_WIDTH ) amp() end -- this list of arguments of the next function contain as many indexes -- as the number of existing slices function STorder(...) NumSlices, x, z = stripes() if NumSlices ~= arg.n or NumSlices < 2 then return end newX = {} newZ = {} for i,old in ipairs(arg) do newX[i] = x[old] newZ[i] = z[old] end newX.M = x.M newZ.M = z.M stripes( n, newX, newZ, STRIPE_WIDTH ) amp() end