meta data for this page
Mirror
Shapes can mirror (reflect) about the X, Y, or Z axis, and more specifically about any origin
.
Learn about reflection at MathIsFun.com
Defaults:
- origin : [0, 0, 0]
- normal : [0, 0, 1] (mirror about the Z axis)
const myshape = cube({size: [5, 20, 5]}) const newshape = mirror({origin: 3, 3, 3], normal: [1, 0, 1]}, myshape)
There are simple versions of this function to mirror a single axis about the origin.
const myshape = cube({size: [5, 20, 5]}) let newshape = mirrorX(myshape) newshape = mirrorY(newshape) newshape = mirrorZ(newshape)