What rotation rules can be applied to stacked cubes to make a 3D spirograph? If you arrange building blocks for example toy cubes so that every next cube is tilted over its base by 30 degrees and rotated to it's right by 12 degrees, it would wind through space in a helical fashion.
What rules can be applied to pivot the blocks so that they create assymetrical spirograph structures? 
Examples of rules for n building blocks can be if(n=17) then rot(y)= n/17*10... any kind of rotation of the blocks relative to n. The structure is built by rotating blocks so it isn't a parametric structure which can place the blocks and then line them up.
ADDENDUM- Another view of the problem... All polygons from 3 to 100 sides, must have angles that add up to 360. if i can rotate some lines of the polygon outwards in 3D, to make polygons with n sides, like 800 sides, I want to know how to add together the angles so that they form a closed mobeous polygon similar to spirographs and so on. the cubes can be viewed as lines also. Perhaps i have to simplify all the subsequent angles into 3 point triangles.

 A: For a helix you did already, the positions of each block is given by:
$$ (x,y,z) = ( a \cos \theta, a \sin \theta,  c \cdot  \theta, )  $$ 
where $c$ is the pitch through which the spiral advances for 1 turn. Choose your $c$ depending on how fast you want to climb, $a$ on how big your helix base should be, and also choose a small enough $\theta $ increment. 
If $ \alpha $ is helix angle,
$$ \dfrac{\Delta z }{a\, \Delta \theta } =\tan \alpha = \dfrac ca$$
So all you have to do is rotate one block around axis of $x$ or $y$ by an amount $ \alpha$ to keep it slanted, keep it eccentric by distance $a$ from central axis and make multiple copies adding $ \Delta \theta$ and $ \Delta z $ together /at the same time / simultaneously for rotation and climbing respectively.
For non-helical structure you should know $ a \; priori$ by a design formula how it spreads in 3-D space or  by how much each pivot / joint should be rotated.
Nice picture. What software was used for visualizing it?
EDIT 1:
A minimal surface tubular model is shown where all its tubes cut at $90^0.$ I can give $(r, \theta, z)$ formula if you find it of any interest.You may need to rotate your blocks $(\theta)$ and push them up $(z)$ in the same way.


