In order to implement native gradient skew, I have to use an affine
transformation.  This motivated me to look for affine transformations
already implemented in PLplot, and as expected we have tons of them as well
as the capability to communicate coordinate transformations to many external
libraries (and also the SVG specification for the svg device driver) via
affine transformations.  However, nowhere in PLplot could I find elementary
affine transform utilities so I have just implemented those in plaffine.c
(revision 10685).  Those utilities build without issues, and I intend to
start using these utilities where appropriate in PLplot in the interest of
understanding exactly what elementary transformations go into any affine
transformation matrix that is determined (e.g., in calc_diori) and in the
interests of speed (it is much faster to multiply affine transformation
matrices and apply the transformation once with the product matrix rather
than to repeat the transformation for each individual affine matrix as is
currently done in difilt and sdifilt).

In the interest of clarity and standardization, if you are reviewing or
creating any piece of core or driver code from now on that uses coordinate
transformations, please consider using the affine utilities.  Note, the
utilities adopt the SVG specification convention that the axes are affected
by the translation, scaling, rotation, x-skew, and y-skew.  However, all our
affine transformations are the inverses of the equivalent SVG ones because
their (post-multiplied product) affine matrix operates on the new
coordinates to obtain the old coordinates while our (pre-multiplied product)
affine matrix operates on the old coordinates to obtain the new ones.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to