Re: Graphics3D[] objects clipping & PlotRange
- To: mathgroup at smc.vnet.net
- Subject: [mg21111] Re: Graphics3D[] objects clipping & PlotRange
- From: Martin Kraus <Martin.Kraus at informatik.uni-stuttgart.de>
- Date: Fri, 17 Dec 1999 01:21:10 -0500 (EST)
- Organization: Institut fuer Informatik, Universitaet Stuttgart
- References: <831jm7$di7@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Robert Prus wrote: > > Hi, > > Is there a method of clipping Graphics3D[] objects except of using PlotRange > option? > > g1=ParametricPlot3D[{u,v,Sin[u]Sin[v]},{u,-Pi,Pi},{v,-Pi,Pi}] > g2=Show[g1,PlotRange->{{-Pi/2,Pi/2},{-Pi/2,Pi/2},{-1,1}}] > g3=Show[g2,PlotRange->All] > > I need a method of creating g2 which gives me Graphics3D[] objects clipped > to the specified box. > > Any help? > > RP > > -------------------- > Robert Prus, robert at fuw.edu.pl > Institute of Theoretical Physics, Warsaw University > Hoza 69, 00-681 Warsaw, Poland A quick and dirty way is to abuse the option PolygonIntersections: g1 = ParametricPlot3D[{u, v, Sin[u]Sin[v]}, {u, -Pi, Pi}, {v, -Pi, Pi}] g2 = Show[g1, PlotRange -> {{-Pi/2, Pi/2}, {-Pi/2, Pi/2}, {-1, 1}}, PolygonIntersections -> False] g3 = Show[g2, PlotRange -> {{-Pi, Pi}, {-Pi, Pi}, {-1, 1}}] Hope that helps Martin Kraus