meta data for this page


Shapes can be translated (moved) to another location. In other words, every point in the shape is moved by a fixed distance as given by the offset. The offset can be positive or negative.

Learn about translation at


  • offset : [0, 0, 0]
const myshape = sphere([radius: 5})
const newshape = translate([3, 7, -10], myshape)

In addition, there are simple versions of the same function for translating about a single axis.

const myshape = sphere([radius: 5})
let newshape = translateX(3, myshape)
newshape = translateY(7, newshape)
newshape = translateZ(-10, newshape)