Lofton,
I am OK with the scale function scaling
around the (0,0) point in NVDCs. If this is the intent then we do not need to add
a point to the scale function. It might make things simpler for users, but it
would not be required.
Regards,
Forrest
From: Lofton Henderson
[mailto:lofton@rockynet.com]
Sent: Sunday, January 25, 2009
5:40 PM
To: Forrest Carpenter; 'WebCGM'
Subject: RE: AW: [cgmo-webcgm]
scale transform
Forrest --
[... ALL -- see QUESTION at end...]
Thanks, Forrest. Among other things, your attention to scale() has
uncovered a big editing error in 5.7.6 (description of scale()).
More about the center-point question...
At 02:23 PM 1/25/2009 -0600, Forrest Carpenter wrote:
My interpretation of the scale function is
that it simply applies the x and y scale factors to all the coordinates in the
APS, this would scale around the (0,0) point in VDCs.
It is my belief that the scale function scales about (0,0) in *NVDC* (or it
should do so). Why? Well, more or less an accumulation of hints:
1.) any treatment of any coordinates in Ch.5 is about NVDC. Section
5.6.1 basically says that NVDC are the coordinates of the DOM.
2.) 5.6.2 continues this and then says, "Terminology: WebCGM
geometric transforms are defined in the two-dimensional NVDC coordinate space.
In principle, any rotate and scale operations can be represented by a 2x2
matrix M, which is multiplied by the 2x1 vector represenation for of a point p
to apply the transform. A translation by d=(dx,dy) is performed by adding d to
p."
3.) A few lines further down: "3. scale around the origin
(0,0) by factors sx and sy: M = [sx 0 0 sy 0 0]". Altho' that does not
explicitly say "NVDC origin (0,0)", on the other hand everything that
goes into the matrix is NVDC oriented, and the point P that you transform by
the matrix is NVDC. So it would lead me to suspect that the center-point
of the scale is NVDC.
4.) In 5.7.1.3, all units everywhere are NVDC, and the center-point of the
rotate() method is explicitly NVDC.
YIKES! .....
5.) In 5.7.6, did anyone ever read the definition of the scale() method?!
It is ALL wrong -- it is a copy-paste error of the stuff for the center-point
of the rotate() method!
Anyway ... given all these little bits (albeit no single one is conclusive), I
would say the center point of the scale is the NVDC Origin.
What does the scale function in SVG do?
http://www.w3.org/TR/SVGMobile12/coords.html#TransformAttribute
WebCGM transforms look like SVG transforms in parameterization -- center-point
for rotate, but not for scale. Beyond that, it may not be useful to look
at SVG descriptions, since they chose one explanatory model of transformations
(it transforms the coordinate system), and we chose the other -- equally
correct but different descriptively.
If the scale function scales around the
(0,0) point in NVDCs, then we do not need to add a point to the scale function
or a method to get the VDC (0,0) in NVDCs. If it scales around the (0,0) in
VDCs then we need to add a point to the scale function or a method to get the
VDC (0,0) in NVDCs but not both.
That is my interpretation.
QUESTION to ALL: does anyone *want* scale to be performed relative to the
VDC Origin rather than NVDC origin? Does everyone agree that it should be
NVDC Origin?
If "NVDC" wins, then we have nothing to do but insert a couple little
clarifications (and fix the big editorial botch in the 5.7.6 description of
scale().)
-Lofton.
From: Lofton Henderson
[mailto:lofton@rockynet.com]
Sent: Sunday, January 25, 2009
1:47 PM
To: 'Forrest Carpenter'; 'WebCGM'
Subject: Re: AW: [cgmo-webcgm]
scale transform
Forrest, All --
A comment and a QUESTION:
I have no problem with adding the scale reference point (or center point, or
scale-origin point, or however you wish to call it). For someone who
regularly needs to scale around a non-origin point, it is more convenient than
having to do translate-scale-translate every time. (Altho' script writers
can easily provide a utility function to do it.)
Before we make the change to the test, let's get everyone to agree about
it. (Adding the scale-center point.)
*** HOWEVER ... ***
Rereading Forrest's message, I am confused about one thing. We all agree
that the 'scale' function fixed point now is (0,0) in NVDC, right?
(Editorial comment: this should be stated explicitly in the 'scale'
method description -- everything else is explicit about NVDC, and the
center-point must be (0,0) since it is not settable now.)
It seems like Forrest wants to scale about the *VDC* (not NVDC) origin, but
there is no way in DOM to find the VDC-NVDC offset (so he can't set up
trn-scl-trn). Simply adding the NDVC center-point to scale() doesn't
solve that.
QUESTION: Do you want:
1.) scale center-point (NVDC)? (For convenience, since it is achievable
now by trn-scl-trn sequence.)
2.) or do you want the VDC-NVDC offset? (E.g., a new attribute on
WebCGMPicture [1].) (Adds new capability that is not presently
achievable.)
3.) or do you want both?
-Lofton.
[1] http://www.w3.org/TR/2008/WD-webcgm21-20080917/WebCGM21-DOM.html#L5070
At 07:41 PM 1/25/2009 +0100, Ulrich Läsche wrote:
Forrest,
We agree with your request. In our scale test we
earlier used VDC. Now, with rewriting the test, we should follow the
route that you proposed. The move-scale-move operation is odd in any
case.
Regards
Ulrich
-----Ursprüngliche
Nachricht-----
Von: Forrest Carpenter [mailto:forrest@sdicgm.com]
Gesendet: Saturday, January 24,
2009 12:26 AM
An: 'WebCGM'
Betreff: [cgmo-webcgm] scale
transform
All,
If it not too late, I think we need to add a point in NVDCs to the scale
function. In a use case, you might want to enlarge an APS around a point to show more detail while leaving
other parts of the drawing unchanged. The simplest method to do this in VDCs is
to do a translate such that the point
is at (0,0), do the scale transform and then a translate that would move the point back to it s original position. Using
NVDCs, you cannot do this unless you have a method of translating the (0,0) in
VDCs to NVDCs. Currently there is no DOM function that would enable a user to
compute the location in NVDCs of the (0,0) point in the CGM. To fix this we
could add a point to the scale function or add functions that would return the
location of (0,0) in NVDCs.
Regards,
Forrest