       [no subject]

• To: mathgroup at yoda.physics.unc.edu
• From: twj
• Date: Fri, 7 Aug 92 13:47:17 CDT

```In reply to  E.A.Kumm (kumm at mitlns.mit.edu)

>I have two Mathematica questions for the assembled multitudes.
>     (1) I would like to take two quadric surfaces, e.g. two paraboloids
>         8-(x^2)-(y^2),(x^2)+3(y^2), graph the two together AND Then
>         graph the intersection on the xy plane "below" the two surfaces.
>         In general, how do we get the surfaces to "cast a shadow".
>     (2) Even if I calculate the intersection of the above myself,
>         (x^2)+2(y^2)=4, how can I get Mma to graph this.  In general,
>         how do we graph functions expressed implicitly?

Look at the Guide to Standard Packages.  There is an ImplicitPlot
package.   Alternatively you use ContourPlot

ContourPlot[  (x^2)+2(y^2), {x,-2,2}, {y,-2,2}, Contours -> {4.0}]

To project the intersection on the surface there is no built-in method
which does exactly what you want.   You can use the functions in
Graphics`Graphics3D` to project Graphics3D objects onto the
walls of the bounding box.

Alternatively with Mathematica V2.1 you can get the Graphics primitives
such as Polygons and Lines which make the ContourGraphics.  With this
lots of interesting things can be done....

p1 = Plot3D[ 8-(x^2)-(y^2), {x,-3,3}, {y,-3,3}]

p2 = Plot3D[ (x^2)+3(y^2), {x,-3,3}, {y,-3,3}]

conts =ContourPlot[  (x^2)+2(y^2), {x,-3,3}, {y,-3,3}, Contours -> {4.0}]

conts = Graphics[ conts]		(* Needs V2.1 to work !! *)

conts = Drop[ Part[ conts, 1], 1] ;

conts = conts //.
{ Polygon[ { a1___, {x_, y_}, a2___}] -> Polygon[ { a1, {x, y, 37.15}, a2}] ,
Line[ { a1___, {x_, y_}, a2___}] -> Line[ { a1, {x, y, 37.15}, a2}] } ;
(* This makes the primitives into 3D primitives *)

Show[ p1, p2, Graphics3D[ conts]]

This puts the intersection on the top of the bounding box.

Tom Wickham-Jones
WRI

```

• Prev by Date: Re: CrossProduct[ ]
• Next by Date: Timing of a simple table operation
• Previous by thread: Re: Dot[]->1
• Next by thread: Timing of a simple table operation