Rotating, scaling, and slanting
A rotation means rotating a coordinate, node, or path around another coordinate or an axis. We will look at this first.
The following options can be used to rotate coordinates and paths:
rotate
is a value in degrees that rotates a coordinate or the coordinate system of a path around the origin. When used as an option for a node, the node’s center is considered the origin of the rotation.rotate around
takes an angle in degrees and a coordinate. This rotates around the given coordinate by that angle.
The following command draws a filled triangle that is rotated around the origin by 45 degrees:
\fill[orange, rotate=45] (0,1) -- (3,1) -- (2,2) --cycle;
You can compare it with the original triangle, filled with the color gray in the following figure:
Figure 11.1 – Rotating a triangle around the origin
This command also rotates the triangle by 45 degrees, but around the coordinate (0...