Re: Plot Truncation in RealTime3D
- To: mathgroup at smc.vnet.net
- Subject: [mg65448] Re: Plot Truncation in RealTime3D
- From: Peter Pein <petsie at dordos.net>
- Date: Sun, 2 Apr 2006 05:00:07 -0400 (EDT)
- References: <e08lb0$4gm$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Narasimham schrieb: > a) How to make ParametricPlot3D to plot in the required PlotRange for > top half surface only? > b) How to omit/hide circumferential circles or parameter lines of al > in Show[pos,neg] ? TIA > > <<RealTime3D` > pos=ParametricPlot3D[ {Cosh[th] Cos[th+al], th, Cosh[th]Sin[th+al]}, > {th,-1.2, 1.2 }, {al,0, 2 Pi} ,PlotRange-> { { -2,2},{2,0},{0,2} } ]; > neg=ParametricPlot3D[ {Cosh[th] Cos[th+al], th, -Cosh[th]Sin[th+al]}, > {th,-1.2, 1.2 }, {al,0, 2 Pi} ,PlotRange-> { { -2,2},{2,0},{0,2} } ]; > Show[pos,neg] ; > <<Default3D` > Well, I guess you want In[1]:= clipLine[pts_Line] := Module[{p2 = Sort[pts[[1]], #1[[3]] > #2[[3]] & ]}, If[p2[[1,3]] < 0, Unevaluated[Sequence[]], If[p2[[2,3]] < 0, p2[[2]] = p2[[1]] + (p2[[1,3]]*Subtract @@ p2)/(p2[[2,3]] - p2[[1,3]])]; Line[p2]]] In[2]:= {pos, neg} = Block[{$DisplayFunction = #1 & }, (Table[ParametricPlot3D[{Cosh[th]*Cos[th + al], th, #1*Cosh[th]*Sin[th + al]}, {th, -1.2, 1.2}], {al, 0, 2*Pi, Pi/12}] & ) /@ {1, -1} /. l_Line :> clipLine[l]]; In[3]:= << "RealTime3D`" In[4]:= Show[pos, neg]