Lost Line Directives in 3D Graphics
- To: mathgroup at smc.vnet.net
- Subject: [mg30121] Lost Line Directives in 3D Graphics
- From: "David Park" <djmp at earthlink.net>
- Date: Sun, 29 Jul 2001 21:26:14 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Dear MathGroup, Here is a case where it appears that Mathematica incorrectly renders the postscript code for Graphics3D. I wonder if other people obtain the same effect that I obtain. Needs["Graphics`Animation`"] grafs = {Line[{{0, 0, 0}, {2, 0, 0}}], RGBColor[1.`, 0.`, 0.`], AbsoluteThickness[ 4], {Line[{{0, 0, 0}, {0.999`, 0, 0}}], {Polygon[{{1.`, 0.`, 0.`}, {0.6666666666666667`, 0.`, 0.16666666666666666`}, {0.6666666666666667`, \ -0.14433756729740643`, -0.08333333333333333`}}], Polygon[{{1.`, 0.`, 0.`}, {0.6666666666666667`, -0.14433756729740643`, \ -0.08333333333333333`}, {0.6666666666666667`, 0.14433756729740643`, -0.08333333333333333`}}], Polygon[{{1.`, 0.`, 0.`}, {0.6666666666666667`, 0.14433756729740643`, -0.08333333333333333`}, \ {0.6666666666666667`, 0.`, 0.16666666666666666`}}]}}}; plot1 = Show[Graphics3D[grafs], PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}*2, ImageSize -> 500, Boxed -> False]; The plot consists of a long thin black line, and a shorter thick red line on top of it, with a three polygon cone at the end, but slightly detached from the short line. The line directives for the short line are lost, so that it also appears thin and black. But if we SpinShow the plot we see that in 4 out of 24 frames the line directives are not lost. I don't understand postscript rendering of graphics, but if we select the good frames and bad frames and use Shift-Ctrl-E to look at the postscript code, we can see that there is a definite difference between the frames. The good frames have some extra code, including Mabswid commands. SpinShow[plot1]; If the first line is moved just a little off the direction of the short line, then the problem does not occur. The second line has to be on top of the first line, and the polygons must also be present for the error to occur. grafs2 = {Line[{{0, 0, 0}, {2, 0, 0}}], RGBColor[1.`, 0.`, 0.`], AbsoluteThickness[4], {Line[{{0, 0, 0}, {0.999`, 0, 0}}]}}; plot2 = Show[Graphics3D[grafs2], PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}*2, ImageSize -> 500, Boxed -> False]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/