OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [cgmo-webcgm] ISSUE: rotation/scale center points incorrect


Benoit,
 
you are right. Scaling always happens around the origin of the coordinate system using the 2 x 2 matrix in the upperleft of the shown 3 x 3 matrix.
 
To scale (or rotate, reflect etc) around a specific center, you have to concatenate matrices:
 
translate (-cx, -cy)
scale (sx, sy)         (or rotate(alpha) )
translate (cx, cy)
 
Dieter


From: Bezaire, Benoit [mailto:bbezaire@ptc.com]
Sent: Donnerstag, 13. Dezember 2007 08:24
To: cgmo-webcgm@lists.oasis-open.org
Subject: [cgmo-webcgm] ISSUE: rotation/scale center points incorrect

Hi,
 
The latest proposal for the transform interface has (I believe) incorrect center points calculations.
 
The current rotation matrix:
 
[ cos(a) -sin(a) cx
  sin(a)  cos(a) cy
   0       0      1 ]
 
where a is the angle and (cx,cy) is the center point. This does not rotate a point around (cx,cy).
 
Same goes for scale matrix.
 
Benoit.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]