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
- From: "Weidenbrueck, Dieter" <dweidenbrueck@ptc.com>
- To: "Bezaire, Benoit" <bbezaire@ptc.com>,<cgmo-webcgm@lists.oasis-open.org>
- Date: Thu, 13 Dec 2007 08:36:36 -0500
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
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]