Rotation of Object around it's centre of mass

Hi all I am new here!!

can anyone tell me how can i rotate the object around it's center of mass and not the origin of Cartesian co-ordinates(0,0)..

1. translate the object so its center of mass is at the origin
2. rotate it.
3. translate it back.

It's sounds good...

But if i do like this way i think i need to do more and more calculations,,which ultimately leads to reduce performance of my program..

is there way to rotate it without translating the object center of mass to it's origin??

It's sounds good...

But if i do like this way i think i need to do more and more calculations,,which ultimately leads to reduce performance of my program..

is there way to rotate it without translating the object center of mass to it's origin??

The method it's been suggested is very quick for a computer as it implies something like only 4 multiplications and 6 additions.

Any other method leads certainly to more complex equations.

Hi Quinzio,

$$\left\{\begin{matrix} {x}'= (x-x_M)cos \alpha - (y-y_M)sin \alpha+x_M \\ {y}'= (y-y_M)cos \alpha + (x-x_M)sin \alpha+y_M \end{matrix}\right.$$