MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Graphics3D exported to pdf

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77444] Re: Graphics3D exported to pdf
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Sat, 9 Jun 2007 05:26:39 -0400 (EDT)
  • Organization: University of Bergen
  • References: <f4b7ea$35t$1@smc.vnet.net>

Gianluca Gorni wrote:
> Hello!
> 
> I am meeting some problems when exporting 3D graphics
> to pdf format, problems that are new to Mathematica 6.
> 
> $Version is "6.0 for Mac OS X PowerPC (32-bit) (April 20, 2007)"
> 
> Take for example two simple 3D squares, one black and one
> partially transparent:
> 
> myGraph =
>   Graphics3D[{{Black, Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0,  
> 1, 0}}],
>      Opacity[.5], Polygon[{{1, 0, 0}, {2, 0, 0}, {2, 1, 0}, {1, 1,  
> 0}}]}},
>    Boxed -> False, BoxRatios -> {8, 4, 1}]
> 
> The display in the FrontEnd is fine. Let us export to pdf:
> 
> Export["~/Desktop/myGraph.pdf", myGraph]
> 
> Looking at the plot with AdobeViewer, or with Apple's Preview,
> I clearly see thin white lines crossing both the squares.
> If I change the preview settings to "not antialiasing of text and  
> line art", strangely enough, the white lines on the black square disappear,
> but the white lines on the transparent square turn black and more  
> visible.
> 
> When exporting Plot3D output to pdf, the white lines are so many
> and so dense that the whole picture looks "dirty".
> 
> I wish that the pdf output did not show those junctions.
> 
> I have found a workaround: select the picture by clicking on it,
> go to File>PrintSelection menu, and print to pdf. The result is
> a high resolution *bitmap* pdf that closely matches what the FrontEnd
> displays. One annoyance is that the picture is on a full-page pdf,
> that I have to crop manually.
> 
> Do we have to give up on vector pdf's for 3D graphics?
> Any thoughts?
> 
> Happy computing,
> Gianluca

It may not be possible to solve this problem

Consider the attached PostScript file.  The two squares are perfectly 
aligned, yet when the drawing is converted to PDF and displayed in Adobe 
Reader, the white line is still there.

Most probably it will not be visible on a _printed_ drawing.

But I do not know why is it necessary to break those two squares in your 
example into so many little polygons.

Szabolcs

------------>8--------------

%!PS-Adobe-2.0

/draw-square {
	newpath
	0 0 moveto
	100 0 rlineto
	0 100 rlineto
	-100 0 rlineto
	closepath
	fill
} def

200 100 translate
40 rotate
draw-square
100 0 translate
draw-square

showpage


  • Prev by Date: Re: 6.0 Standard Packages?, New Style Documentation?
  • Next by Date: Re: v6: still no multiple undo?
  • Previous by thread: Graphics3D exported to pdf
  • Next by thread: NIntegrate with change of variables