MathGroup Archive 2007

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

Search the Archive

Re: Clipping Live3DGraphics


chuck009 wrote:
> My understanding is that Live3DGrahics won't clip the plot to the plot range.  Sometimes it's nice to be able to do this.  The following code will clip a Graphics3D object to the specified inequality passed to ClipGraphics3D.
> 
> For example, suppose I create:
> 
> plot1=Graphics3D[Plot[Exp[x^2+y^2],{x,0,3},{x,0,3}],PlotRange->{{0,1},{0,1},{0,1}},AspectRatio->1,BoxRatios->{1,1,1}];
> 
> If I pass plot1 to Live3DGraphics, it will plot everything.  Suppose though I only wish to view the clipped plot with Abs[z]<=1.  I enter:
> 
> clipped=Fold[ClipGraphics3D,plot1,{z<=1,z>=-1}];
> 
> then pass clipped to the Live applet.  
> 
> Is there an easier way to do this?
> 

If you only need to clip to the PlotRange (and do not care about more 
general clipping regions), then another solution is to use 
PolygonIntersections -> False

Example:

<< Graphics`Polyhedra`

g = Show[Stellate@Polyhedron[Icosahedron], PlotRange -> {-1, 1}]

h = Show[g, PolygonIntersections -> False]

Now you can use h with LiveGraphics3D.

You can use this option to break up intersecting polygons too!

Szabolcs

P.S. You may find this article interesting:
http://www.mathematica-journal.com/issue/v8i4/features/helzer/index.html


  • Prev by Date: Re: Mathematica V6. ComplexMap
  • Next by Date: Re: Fun with Manipulate
  • Previous by thread: Clipping Live3DGraphics
  • Next by thread: Re: Clipping Live3DGraphics