meta data for this page
  •  

This is an old revision of the document!


Scale

Shapes can be scaled by any factor, enlarging (increasing) or shrinking (diminishing) shapes by the factors about X, Y, and Z axis. The result of scaling is a similar shape (in the geometric sense) to the original.

Learn about the scaling shapes at Wikipedia.org

Defaults:

  • factors : [1.0, 1.0, 1.0]
let myshape = sphere({radius: 5})
let newshape = scale([2, 4, 6], myshape)

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

let myshape = sphere({radius: 5})
let newshape = scaleX(2, myshape)
newshape = scaleY(4, newshape)
newshape = scaleZ(6, newshape)