Re: Intersection of surfaces
- To: mathgroup at smc.vnet.net
- Subject: [mg88651] Re: Intersection of surfaces
- From: "ahallam at iastate.edu" <ahallam at iastate.edu>
- Date: Sun, 11 May 2008 15:15:16 -0400 (EDT)
- References: <fvs2jg$en2$1@smc.vnet.net> <fvudl0$eak$1@smc.vnet.net>
On May 8, 3:29 am, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de> wrote: > Hi, > > TUBE = {.6 Cos[V], 2 U + 3, .6 Sin[V] + 2}; > tube = ParametricPlot3D[TUBE, {U, -1.2, .2}, {V, 0, 2 Pi}, > PlotPoints -> {10, 25}]; > BOWL = {p Cos[q], p^2/2, p Sin[q]}; > bowl = ParametricPlot3D[BOWL, {p, 1, 2.75}, {q, 0, 2 Pi}, > PlotPoints -> {20, 35}]; > > and > > eqn = Eliminate[{TUBE == {x, y, z} // Thread, > BOWL == {x, y, z} // Thread} // Flatten, {p, q, U}]; > > and > sol = Solve[eqn, {x, y, z}]; > > gives > > {{y -> 0.02 (100.+ 9. Cos[V]^2 + 60. Sin[V] + 9. Sin[V]^2), > x -> 0.6 Cos[V], z -> 0.2 (10.+ 3. Sin[V])}} > > and > > ll = ParametricPlot3D[{x, y, z} /. sol[[1]], {V, 0, 2 Pi}]; > > Show[bowl, tube, > ll /. l_Line :> {AbsoluteThickness[4], RGBColor[1, 0, 0], l}] > > show that the result is right. > > Regards > Jens > > Narasimham wrote: > > How to find the space curve formed by intersecting 3D patches in > > simple cases like: > > > TUBE = {.6 Cos[V], 2 U + 3, .6 Sin[V] + 2}; > > tube = ParametricPlot3D[TUBE, {U, -1.2, .2}, {V, 0, 2 Pi}, PlotPoints - > >> {10, 25}] > > BOWL = {p Cos[q], p^2/2, p Sin[q]}; > > bowl = ParametricPlot3D [ BOWL, {p, 1, 2.75}, {q, 0, 2 Pi}, PlotPoints > > -> {20, 35}] > > Show[bowl, tube] > > > or in slightly more complicated surface cases like: > > > terr = ParametricPlot3D[{Cos[u + 1] Cos[v + 2.1], 0.6 + u^2/3,Exp[-v/ > > 4] }, {v, -3, 3}, {u, -3, 3}, PlotPoints -> {45, 30}] > > Show[terr, tube] > > > How to solve for x,y and z from {0.6 Cos[V] == p Cos[q], 3 + 2 U == > > p^2/2, 2 + 0.6 Sin[V] == p Sin[q]} obtaining t as a function of (U,V,p > > and q) so as to be able to Show with > > > ParametricPlot3D[{x[t], y[t], z[t]},{t,tmin,tmax}]? > > > Regards > > Narasimham So saw this post and found if useful for something I was doing. But as I looked at the suggested code, I was not sure why thread and flatten were used in this particular case. So I deleted them one at a time and still got the same answer. What is the difference then between. TUBE = {.6 Cos[V], 2 U + 3, .6 Sin[V] + 2}; tube = ParametricPlot3D[TUBE, {U, -1.2, .2}, {V, 0, 2 Pi}, PlotPoints -> {10, 25}]; BOWL = {p Cos[q], p^2/2, p Sin[q]}; bowl = ParametricPlot3D[BOWL, {p, 1, 2.75}, {q, 0, 2 Pi}, PlotPoints -> {20, 35}]; eqn = Eliminate[{TUBE == {x, y, z} // Thread, BOWL == {x, y, z} // Thread} // Flatten, {p, q, U}] eqn1 = Eliminate[{TUBE == {x, y, z}, BOWL == {x, y, z}} // Flatten, {p, q, U}] eqn2 = Eliminate[{TUBE == {x, y, z}, BOWL == {x, y, z}}, {p, q, U}] sol = Solve[eqn, {x, y, z}] sol1 = Solve[eqn1, {x, y, z}] sol2 = Solve[eqn2, {x, y, z}] ll = ParametricPlot3D[{x, y, z} /. sol[[1]], {V, 0, 2 Pi}]; l11 = ParametricPlot3D[{x, y, z} /. sol1[[1]], {V, 0, 2 Pi}]; l12 = ParametricPlot3D[{x, y, z} /. sol2[[1]], {V, 0, 2 Pi}]; Show[bowl, tube, ll /. l_Line :> {AbsoluteThickness[4], RGBColor[1, 0, 0], l}] Show[bowl, tube, l11 /. l_Line :> {AbsoluteThickness[4], RGBColor[1, 0, 0], l}] Show[bowl, tube, l12 /. l_Line :> {AbsoluteThickness[4], RGBColor[1, 0, 0], l}]