Shape (two parameters)

You are correct – place your shape sphere with translate(x, y, z)

As you have noticed, sphere() and box() work in the same way – the 3D primitives draw at 0,0,0 and are positioned with translate.

An interesting point of comparison to is image(). You can position it in 2D space with parameters, but to position it in 3D you use translate et cetera.

https://processing.org/reference/image_.html

The second shape is not relative to the first – both shapes are relative to the origin frame of reference you defined with translate. Because your first shape is at 0,0, the first appears relative to it, but if you give each coordinates it will be clear that they are independent.

2 Likes