MathGroup Archive 2010

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

Search the Archive

Re: intersecting surfaces

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107208] Re: [mg107151] intersecting surfaces
  • From: "David Park" <djmpark at comcast.net>
  • Date: Fri, 5 Feb 2010 03:24:52 -0500 (EST)
  • References: <2112561.1265283295770.JavaMail.root@n11>

Cone equations:

cone1 = ((x - 1)^2 + y^2) Cos[\[Pi]/4]^2 - (z Sin[\[Pi]/4])^2 == 0; 
cone2 = (x^2 + y^2) Cos[\[Pi]/6]^2 - (z Sin[\[Pi]/6])^2 == 0; 

Solve for x and y:

xysols = Solve[{cone1, cone2}, {x, y}]  

Parameterize the intersections:

intersection1[z_] = {x, y, z} /. First[xysols]  
intersection2[z_] = {x, y, z} /. Last[xysols]  

Plot the cones and the intersections:

Needs["Presentations`Master`"]  

Draw3DItems[
 {(* The two cones *)
  Opacity[.5],
  ContourDraw3D[cone1 // Evaluate, {x, -5, 6}, {y, -5, 5}, {z, -5, 5},
   ContourStyle -> Orange,
   Mesh -> False],
  ContourDraw3D[cone2 // Evaluate, {x, -5, 6}, {y, -5, 5}, {z, -5, 5},
   ContourStyle -> Green,
   Mesh -> False],
  (* The intersections *)
  Opacity[1], Black, AbsoluteThickness[2],
  ParametricDraw3D[intersection1[z], {z, -3, 3}],
  ParametricDraw3D[intersection2[z], {z, -3, 3}]},
 NeutralLighting[0, .5, .1],
 NiceRotation,
 Boxed -> False]  

Each intersection solution is split between the upper and lower cones.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: cire g [mailto:eric.phys at gmail.com] 

Hello Guys,
How to set CountourPlot3D to plot the intersection of two surfaces.
For example I would like to see the curve of the intersection of these 
cones:
ContourPlot3D[{((x - 1)^2 + (y)^2) Cos[Pi/4]^2 - ((z
       ) Sin[Pi/4])^2 == 0 ,
  0 == (x^2 + y^2) Cos[Pi/6]^2 - (z Sin[Pi/6])^2}, {x, -5, 6}, {y, -5,
   5}, {z, -5, 5}]
Best regards,
eric




  • Prev by Date: Re: Bug? Analytical integration of cosines gets the sign wrong
  • Next by Date: Extra Data and Data structures
  • Previous by thread: Re: intersecting surfaces
  • Next by thread: NonlinearModelFit vector valued functions