laylight tour
0/25
4/4

Cells and instances · 4 of 4

Rotate, mirror, offset

Three modifiers can follow the target of a placement, for shapes and instances alike:

ModifierEffect
offset (dx, dy)shifts the result
rotate 90degturns it counter-clockwise about the anchor being placed
mirrorflips it about its own x axis (y becomes −y)

Whatever order they are written in, they apply in a fixed one: first mirror, then rotate about the anchor, then the anchor moves to the target, and finally the offset is added.

place Flag at (10um, 0) rotate 90deg
place Flag at (20um, 0) mirror

A target point can carry a direction as a third value: (10um, 0, 90deg). Anything placed there turns by that angle, as if it were placed with rotate 90deg — this is how the ports of the next chapter line components up.

Exercise

Place the four flags of Flags, 15 µm apart: the first as it is, the second rotated by 90°, the third mirrored, and the fourth rotated by 180° and mirrored.

loading compiler…

Edit the code, watch the layout, then press Submit to check your solution against the exercise.

Compiling…