Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plotting a hyperbolic paraboloid (saddle)

788 views
Skip to first unread message

William S.

unread,
Jul 12, 2007, 5:48:04 AM7/12/07
to
Does anyone know how to plot a hyperbolic paraboloid?


dimitris

unread,
Jul 13, 2007, 6:03:07 AM7/13/07
to

William S. :

> Does anyone know how to plot a hyperbolic paraboloid?

See here

http://mathworld.wolfram.com/HyperbolicParaboloid.html

Two very examples follows now

In[3]:=
ParametricPlot3D[{u, v, u*v}, {u, -3, 3}, {v, -3, 3}]

In[4]:=
Plot3D[y^2/2 - x^2/3, {y, -2, 2}, {x, -3, 3}]

"Playing" with the options you can make them look
much more better.

Dimitris


dh

unread,
Jul 13, 2007, 6:11:15 AM7/13/07
to

Hi William

two examples:

Plot3D[x^2-y^2 ,{x,-1,1},{y,-1,1}]

or if you rotate x y:

Plot3D[x y ,{x,-1,1},{y,-1,1}]

hope this helps, Daniel

Murray Eisenberg

unread,
Jul 13, 2007, 6:12:16 AM7/13/07
to
You need to know two things:

(1) the equation z=f(x,y) of a hyperbolic paraboloid (try Googling that
-- probably the first hit you'll get is to MathWorld); and

(2) how to plot a real-valued function f(x,y) of two real variables in
Mathematica.

If you're using Mathematica 6, open the Documentation Center, go to the
section "Visualization and Graphics", click the link "Function
Visualization" there, and inspect the list of functions you'll see on
the guide page that opens; it should be obvious from the descriptions
(and even the names, perhaps) which one to use, and if you click that
name, it will give you a page about that function with lots of examples
(including, as an example of using a mesh, a hyperbolic paraboloid!).

If you're using Mathematica 5.2, open the Help Browser and in the list
in the first panel on the first tab (Built-in Functions), click
"Graphics and Sound". In the list that now appears in the second panel
you'll see an obviously relevant item, "3D Plots". Click that link. In
the third panel you'll see a list of three functions. Try the first of
those. Open the "Further Examples" at the bottom of the page about that
function.


William S. wrote:
> Does anyone know how to plot a hyperbolic paraboloid?
>
>

--
Murray Eisenberg mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

Jens-Peer Kuska

unread,
Jul 13, 2007, 6:26:46 AM7/13/07
to
Hi,

ContourPlot3D[
x^2 - y^2 + z^2 == 1, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]

???

Regards
Jens

Bob Hanlon

unread,
Jul 13, 2007, 6:42:02 AM7/13/07
to
$Version

6.0 for Mac OS X x86 (32-bit) (June 19, 2007)

ParametricPlot3D[{u, v, u*v}, {u, -1, 1}, {v, -1, 1}]

With[{a = 1, b = 1},
ContourPlot3D[
z == y^2/b^2 - x^2/a^2, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]]


Bob Hanlon

Christopher O. Young

unread,
Sep 14, 2011, 5:15:51 AM9/14/11
to

On 7/12/07 5:48 AM, in article f74tck$95v$1...@smc.vnet.net, "William S."
<wscha...@att.net> wrote:

> Does anyone know how to plot a hyperbolic paraboloid?


I thought it was time to get to understand 3D plotting basics in
Mathematica, so I tried three different ways of looking at the hyperbolic
paraboloid.

There's a picture at http://home.comcast.net/~cy56/SaddlePlots.png and a
Mathematica notebook at http://home.comcast.net/~cy56/SaddlePlots.nb

I think it's way too much of a struggle to get the axes to come out with the
same scales. I think this is something most students (and the rest of us)
would want to do most often. Couldn't there be a single option (maybe
"SameScaleAxes" or something similar?) to do this?

The contour plot version seems to be a little "wild" as I try to rotate it.
The size jumps around a lot.

I used "ColorFunctionScaling -> False" because I wanted to have custom
coloring running from red for negative values to green for positive values.

saddleContourPlot =
ContourPlot3D[
x * y == z,

{x, -2.5, 2.5},
{y, -2.5, 2.5},
{z, -4, 4},

PlotRange -> {{-2.5, 2.5}, {-2.5, 2.5}, {-4, 4}},
AspectRatio -> 8/5,

PlotPoints -> 50,
Mesh -> 7,
MeshFunctions -> {#3 &},
ContourStyle -> Opacity[0.5],
ColorFunctionScaling -> False,
ColorFunction -> (Hue[0.35 (#3 + 4)/8 ] &)
] /. Line[pts_, opts___] :> {Gray, Tube[pts, 0.02, opts]}


The last line above just makes the contour lines into tubes. I got it from
the Help for Tubes. I wish there were a simple way to just have the contour
lines show up as tubes, maybe by having a "TubeRadius" option.

The plot below shows how the saddle surface in the form z = x * y gives us a
diagram of a multiplication table, with columns above each x * y point to
show us the value of the product.

saddleStepPlot =
DiscretePlot3D[
x * y,

{x, -2, 2},
{y, -2, 2},

PlotRange -> {{-2.5, 2.5}, {-2.5, 2.5}, {-4, 4}},
AspectRatio -> 2,

(* SphericalRegion->True, *)

ExtentSize -> Full,
AxesLabel -> {"x", "y", "z"},
PlotStyle -> Opacity[0.5],
ColorFunctionScaling -> False,
ColorFunction -> (Hue[0.35 (#3 + 4)/8 ] &)
];


This plot looks the same as the contour plot version. It sames to be more
stable when I try to rotate it.

saddleParamPlot =
ParametricPlot3D[
{u, v, u*v},
{u, -2.5, 2.5}, {v, -2.5, 2.5},

RegionFunction ->
Function[{x, y,
z}, -2.5 <= x < 2.5 \[And] -2.5 <= y < 2.5 \[And] -4 <= z < 4],

MeshFunctions -> {#3 &},
Mesh -> 7,

AxesLabel -> {"x", "y", "z"},

PlotStyle -> Opacity[0.5],

ColorFunctionScaling -> False,
ColorFunction -> (Hue[0.35 (#3 + 4)/8 ] &),

SphericalRegion -> True
] /. Line[pts_, opts___] :> {Gray, Tube[pts, 0.03, opts]}

Showing all the plots side by side:

GraphicsGrid[
{
{
saddleContourPlot,
saddleStepPlot,
saddleParamPlot
}
}
]


-- Chris Young
cy...@comcast.net
IntuMath.org


0 new messages