From: Alan W. I. <ir...@be...> - 2007-09-19 02:38:22
|
On 2007-09-18 12:43-0700 Alan W. Irwin wrote: > Hi Hazen: > > Good news! > > As of revision 7874 (which includes my recent fix to the svg device driver > interpretation of rotation and shear angles as well as all your recent > plmtex3 and plptex3 fixes) all issues that I had found with plmtex3 and > plptex3 with example 28 are now fixed for all the devices that I tested > before. > > N.B. example 28 should not (yet) be propagated to additional languages because > there are a lot of additional changes I would like to make. Hi Hazen: I hoped we were done with plptex3, but we are not. The next round of changes (Revision 7875) in example 28 exposed two additional bugs which I will call the "rotation sign" bug and the "just = 0.5 sign" bug. There is also a character size issue shown by the "revolution" pattern (effective 3D character size depends on inclination and viewing angle) which I will discuss at the end. The first attached screenshot gives the gv result for ./x28c -dev pscairo -o test.ps If you look at the "rotation" series of 8 different shear angles in x28c.c, the shear vector is supposed to rotate through a total range in angle of 2 PI in a plane parallel to the YZ plane. The first four angles (0, PI/4, PI/2, 3PI/4) are fine, but the next four angles act as if PI had been subtracted from the rotation angle. I think this issue must be due to a sign bug in the way quadrant 3 and 4 (with shear angle from PI to 2PI) are handled. ./x28c -dev psc -o test.ps (note the default text=1) gives a virtually identical result (which is not attached) indicating this "rotation sign" bug must be in the PLplot core rather than in device interpretation of core results. The second attached screenshot gives the gv result for ./x28c -dev psc -o test.ps -drvopt text=0 i.e., for Hershey fonts. This shows the same "rotation sign" bug as above (this consistency is actually pretty gratifying since you have worked hard to make the extremely different Hershey font code path give consistent 3D inclination and shear results with the modern font code path). This screenshot also shows an additional "just=0.5" sign bug that displaces the "rotation" strings in the direction of increasing X. I can make the Hershey result agree with the modern font result if I specify just = -0.5 (!) for the plptex3 call so I assume this bug is due to some quadrant sign error in how just is interpreted for this particular inclination in the Hershey code path (but the first screenshot shows this bug does not occur in the modern font code path). Hazen, in principle, quadrant sign errors should be easy to fix so I tried to dig into the code to find the fix to the above two issues, but I soon got lost in the maze. Will you please give it a go when you have further time for PLplot? I presume these sign issues are active issues you want to clean up before 5.8.0-RC1. One final issue is the "revolution" pattern shown by both screen shots is in the form of a 3D ellipse (which projects to a 2D circle). It appears from this evidence that the overall 2D font size (both height and width of characters) appears not to be adjusted to account for the various inclinations as transformed to 2D via the 3D perspective plot transformation. As a result, the "revolution" pattern looks like a circle in 2D, but in 3D perspective you would interpret that 2D circle as an ellipse in 3D space (i.e., the effective 3D character size depends on inclination and viewing angle). Since plptex3 is supposed to be in (3D) world coordinates, I suspect it will be used by users to identify specific areas of 3D surfaces, and it will be an annoyance to have the effective 3D character size on that surface change with inclination and viewing angle. Hazen, it would be great if you could deal with this issue before the stable release, but if you prefer to put it off until post 5.8.0, that is fine as far as I am concerned. 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 __________________________ |