Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Visible mesh edges in PDF output of 3D graphic
Replies: 5   Last Post: Mar 17, 2013 3:08 AM

 Messages: [ Previous | Next ]
 David Reiss Posts: 603 Registered: 2/24/06
Re: Visible mesh edges in PDF output of 3D graphic
Posted: Mar 15, 2013 1:46 AM

Whoops!

height = .5;
h = x^2 + y^2 + (z - height)^2 - 1;
g = z;

I will take a look at your approach. However, I do need to keep
scalability. Otherwise I cols simply export at PNG, or TIFF.

Thanks,
David

On Mar 14, 7:13 am, Peter Pein <pet...@dordos.net> wrote:
> Am 13.03.2013 09:18, schrieb David Reiss:
>
>
>
>
>
>
>
>
>

> > Consider the following plot:
>
> > graphicTest=
> > ContourPlot3D[{h==0,g==0},{x,-2,2},{y,-2,2},{z,-2,2},
> > MeshFunctions->{Function[{x,y,z,f},h-g]},
> > MeshStyle->{{Thick,Black,Opacity[1]}},
> > Mesh->{{0}},
> > ContourStyle->{
> > Directive[Orange,Opacity[.5],Specularity[White,30]],
> > Directive[Purple,Opacity[.3],Specularity[Green,30]]},
> > PlotPoints->30,
> > Boxed->False,
> > (*Axes->False,*)
> > BoxRatios->Automatic,
> > PlotRange->{All,All,{-2,2}}
> > ]

>
> > Then export it as a PDF and look at it in a PDF viewer (insert your
> > directory path at <<<your directory path here>>> to make this work):

>
> > Export["<<<your directory path here>>>/
> > testGraph.pdf",graphicTest,"PDF"]//SystemOpen

>
> > Look at the resulting PDF. You will see the lattice of the underlyin=
g
> > plot mesh visible. Is there any way to get rid of this? Note that=
I
> > expect to see the fasceted nature of the graphic, but the explicit
> > differently colored edges are not desired.

>
> Hi David,
>
> as you did not provide us with the definitions of g and h, I invented
> some toy expressions:
> {g, h} = Plus @@@
> Through[{Cos, 1 - 2 Sinc[#/2]^2 &}[Pi*{x, y, z}]];
>
> The plain export to PDF results in a 110 MB file with which the
> Adobe-Reader has got hard times (it crashes on my 12GB-box). GS-View
> works and I can see the many lines.
>
> If losing the scalability is acceptable,
>
> Export[ToFileName[{\$HomeDirectory, "Desktop"}, "test2.pdf"],
> Rasterize[graphicTest, ImageSize -> 1200], ImageResolution -> 300]
>
> might help (resulting in a 633 KB PDF file). I tried an export without
> explicit rasterization via the options "AllowRasterization"->True and
> ImageResolution -> 300 in the call to Export[], but it did not look as
> nice as the result of the above line. Maybe I misunderstood the meaning
> of this option :(
>
> hth,
> Peter

Date Subject Author
3/13/13 David Reiss
3/14/13 Peter Pein
3/15/13 David Reiss
3/15/13 JUN
3/16/13 David Reiss
3/17/13 bobbaillie@frii.com