Boost logo

Geometry :

Subject: [ggl] question regarding rotate_transformer strategy
From: Simonson, Lucanus J (lucanus.j.simonson)
Date: 2011-11-07 15:18:16


-----Original Message-----
From: ggl-bounces_at_[hidden] [mailto:ggl-bounces_at_[hidden]] On Behalf Of Jeff Trull
Sent: Sunday, November 06, 2011 2:39 PM
>I was tracking down a rotation issue and I noticed that the 2D
>rotation matrix (around Z) is defined as:
>
>cos(angle), sin(angle), 0,
>-sin(angle), cos(angle), 0,
>0, 0, 1)
>
>But in other sources I have seen it defined as:
>
>cos(angle), -sin(angle), 0,
>sin(angle), cos(angle), 0,
>0, 0, 1)

Your math seems spot on and using the right hand rule to define the direction of positive rotation would be most intuitive from a math perspective. I would guess that the OGD standard defines the direction of positive rotation to be clockwise. The documentation should probably provide what the assumed direction of positive rotation is. The current doxygen description leaves this detail out: "Rotate rotates a geometry of specified angle about a fixed point (e.g. origin)."

Regards,
Luke


Geometry list run by mateusz at loskot.net