arch after arch
Now how would I go about doing this.
I'm trying to randomly rotate the position of each arc 90 degrees from the previous arch. Trying to make it look like something similar to the image below.
( clearlistener() delete objects local radiusA = 10.0 local steps = 4 local knotsPerArch = 6 local rotAngle = 180.0 / knotsPerArch local startPos = [0,0,0] local sp = splineShape wirecolor:yellow local posArr = #() fn shuffleIndexes count = --unique Random order ( list = #() list.count = count for k = 1 to count do ( i = random 1 k list[k] = list[i] list[i] = k ) return list ) addnewSpline sp addKnot sp 1 #corner #curve sp.pos --first knot created at origin for s = 1 to steps do ( format "Arch: %\n" s ids = shuffleIndexes 3 for k = 2 to knotsPerArch+1 do --skip first knot which is always created at origin ( calcX = radiusA * cos((k-1) * rotAngle) calcY = radiusA * sin((k-1)* rotAngle) pos = [0,calcX,calcY] + startPos --include nodes matrix newPos = [pos[ids],pos[ids],pos[ids]] append posArr pos point pos:newPos size:2 wirecolor:(red/(s as float)) ) startPos += [0,(radiusA*2),0] ) )