Hello, I am trying to study combined point transformation.

I tried to rotate and then scale a point about origin in a cad package. Here, the sequence does not make any difference. Whether you do scaling first or rotation, the results are correct.

Then I set to get the mathematical representations of this. And here is what I have:

---

To transform the point P to P’ such that distance from origin is increased by S times and the angle the line joining point with origin is increased by t.

Sequence 1: Rotation followed by scaling:

Rotation:

x’’2 = x1 * cos(t) – y1 * sin(t)

y’’2 = x1 * sin(t) + y1 * cos(t)

Scaling

x2 = Sx * x’’2

y2 = Sy * y’’2

x2 = Sx * (x1 * cos(t) – y1 * sin(t))

y2 = Sy * (x1 * sin(t) + y1 * cos(t))

Sequence 2: Scaling followed by rotation:

Scaling

X’’2 = Sx * x1

Y’’2 = Sy * y1

Rotation:

x2 = x’’2 * cos(t) – y’’2 * sin(t)

y2 = x’’2 * sin(t) + y’’2 * cos(t)

x2 = Sx * x1 * cos(t) – Sy * y1 * sin(t)

y2 = Sx * x1 * sin(t) + Sy * y1 * cos(t)

----

The results are affected by sequence of transformations. Is this correct or have I made a mistake somewhere? If this is correct then what is the source of discrepancy?. If this is correct then can I come to the conclusion that scaling should always be applied before translation? Or non-uniform scaling should be avoided as far as possible?

I could not find any convincing solution solution in the couple of books that I have nor on the web.

Please help me.

=====