Rotating and Scaling about centroid.

855 Views Asked by At

rotating

$x' = x\cos(\text{angle}) - y\sin(\text{angle})$

$y' = x\sin(\text{angle}) + y\cos(\text{angle})$

Scaling

$x' = x\cdot sx$

$y' = y\cdot sy$

but all formulas will doing about origin point. If i want to do about Centroid point.

(I have $(Cx,Cy)$ ). What the formulas will be.

Sorry, about english, I will practice more.

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

$$ x' = C_x + (x - C_x) \cos(\theta) - (y - C_x) \sin(\theta)\\ y' = C_y + (x - C_x) \sin(\theta) + (y - C_x) \cos(\theta) $$