Graphics3D[
Table[
GeometricTransformation[
Cuboid[{1, 0, 0}, {.01, .2, .1}],
{RotationMatrix[a, {0, 0, .05}], {.001 Cos[a], .001 Sin[a], a}}],
{a, -Pi, 2 Pi, .2}],
Boxed -> False]
I followed this Documentation Center page about rotating cuboids along a space curve to make the above code (which creates the stairs for spiral staircase). I don't want to just follow it, though, I would like to understand everything I am typing in. After researching the primitives, I know that Cuboid[{a,b,c},{d,e,f}]
creates a cuboid with corner {a, b, c}
and opposing corner {d, e, f}
.
But other than that, I'm not all sure what else is going on. I can guess at what is going on, but that does not make me feel confident in my Mathematica usage.
Specific questions:
- What does
Table
do? When reading about it, I cannot make sense of why I need it in my code. Graphics3D
creates a 3D image based upon the primitives and directives entered. Is this correct? What else should I know about this?- To make sure I understand primitives and directives clearly:
Table
is a primitive forGraphics3D
.GeometricTransformation
is a primitive forTable
.Cuboid
andRotationMatrix
are primitives forGeometricTransformation
.Boxed
is a directive forGraphics3D
. And things like{a, b, c}
are parameters for equations or primitives. Is this correct? Sorry, this may read like a riddle. - Final questions: What exactly does
GeometricTransformation
do? Is it basically saying "I'd like to rotate something (a cuboid) about an axis and in the shape of a helix?" Where are the vectors/matrices coming to play in this? This is where I read about it, but it does not help me much in understanding what I am doing.
GeometricTransformation
andTable
transposed, as in the example in the docs. Look at the 4th (last) synopsis at the top of the doc page:GeometricTransformation[g, {t1, t2,...}]
. (In the documentation example,Table
makes the list of transformations{t1, t2,...}
.) $\endgroup$