In this section, we start to move the graphical shapes in the 3D space. The operations are translation, rotation, and scale. Each operation comes with two versions. They are: translate
, translateXYZ
, rotate
, rotateXYZ
, scale
, and scaleXYZ
. In this book, we focus on the use of translateXYZ
, rotateXYZ
, and scaleXYZ
. Readers can use the help menu to check the usage of translate
, rotate
, and scale
.
Create an empty patch and save it with name gem005.pd
in your folder. Put the gemwin
object, create
and destroy
messages, and the toggle box for rendering. In addition, put a gemhead
object with a cube
3D object.
Between the gemhead
and the cube
objects, insert a translateXYZ
object. The translateXYZ
operation moves the object along each of the three axes. The three number boxes control the magnitude of the movement:
Note that the cube changes position and renders with a perspective view:
For rotation, insert the rotateXYZ...