General Pivot Point Rotation or Rotation about Fixed Point:
For it first of all rotate function is used. Sequences of steps are given below for rotating an object about origin.
- Translate object to origin from its original position as shown in fig (b)
- Rotate the object about the origin as shown in fig (c).
- Translate the object to its original position from origin. It is called as reverse translation as shown in fig (d).
The matrix multiplication of above 3 steps is given below
Scaling relative to fixed point:
For this following steps are performed:
Step1: The object is kept at desired location as shown in fig (a)
Step2: The object is translated so that its center coincides with origin as shown in fig (b)
Step3: Scaling of object by keeping object at origin is done as shown in fig (c)
Step4: Again translation is done. This translation is called as reverse translation.
0 Comments