Making my way through the Drawing 3D primitives recipe from the Processing 2 Creative programming cookbook source code on GitHub. In this recipe I learned how:
- the box function can be used with one or three parameters to set different values for depth, width and height of the box.
- the sphereDetail function can be used to define a resolution higher or lower than the default sphere function
- to create a variable (angleY) that can rotate each 3D object around its Y-axis.
- the frameCount system variable can be used to rotate each 3D object by one degree per frame as the value of the variable is increased by one in each frame. This value is converted to radians, cause that’s the unit of measurement Processing uses. Might be easier to work with radians rather than convert to degrees all of the time. Maybe.