# Vertical view plot3d

Is there any way to set the vertical view in plot3d? For example I want to plot sqrt(x^2+ y^2). I know how to set the x and y ranges but I only want the z axis to go from say 0 to 3. Zmin and zmax do not seem to do anything.

edit retag close merge delete

Sort by » oldest newest most voted

Since the surface is determined by the independent variables, you can limit their domains to limit the height of the surface:

var('x y z')
limit = sqrt(9/2)
plot3d(sqrt(x^2+ y^2), (x,-limit,limit), (y,-limit,limit))


Here's a live example.

And if you want to set limits for each variable independently, use implicit_plot3d:

var('x y z')
implicit_plot3d(sqrt(x^2+ y^2)-z, (x,-5,5), (y,-5,5), (z,0,3))


Another live example.

more

Thanks for your reply! However, not quite what I'm looking for. Unfortunately I now realize that I was not very clear in my question! Basically I want that figure to look exactly like what it's supposed to look like (i.e., a cone). I can see that the cone is there, but when I'm teaching this stuff to students who have never seen it before, they're going to look at that figure and say "that's not a cone" due to the top "curves". So, I want to actually have the independent variables generate larger values of Z than the values of Z that I show (basically, I want to chop the top part of that view so that it now actually does look like a standard cone). Is there a way to do this?

( 2017-02-11 18:10:34 +0200 )edit

( 2017-02-12 00:58:43 +0200 )edit