mirror()


The mirror() command is a transformation. This means the mirror command acts on an object ( child ). To start we will add a cube.

cube();

Above the cube add the mirrror command Notice that the transformation does not have a semi-colon.

mirror([1,0,0])
cube();

Press F5 and you will see that the cube has flipped around the X axis, you will also notice that the first cube you had is now gone. The mirror modifier is a “Transformation” it transforms the child. It does not add geometry.

The mirror transformation requires a Vector. The vector determines which axis the child object is mirrored.

If you add a second cube you will see that it is not affected byt the mirror() modifier.

mirror([1,0,0])
cube();
cube();

You can mirror on multiple axis at the same time.

mirror([1,1,0])
cube();

Finally mirror all three. Arguably, not a mirror 🙁

mirror([1,1,1])
cube();

Mirror always works around 0,0,0 If a translate() has been applied the translate will be included in the mirror(). The mirror() transforms all the children.

One Reply to “mirror()”

  1. Dumars Graham

    [1,1,1] is a vector normal to the plane that sliices through the origin at an angle. You see the result of placing a flat mirror coincident with that plane.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: