Ask Your Question
0

3d contour lines

asked 8 years ago

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hi every one, is there a way to plot 3d contour line on a 3d function? here is my work

in progress https://cloud.sagemath.com/projects/b...

the lines are 2d, but i would like the to be on the surface. i cant find the right command

Preview: (hide)

Comments

@thetha The document you provide on SageMathCloud is not public. To make it public, in the "Files" view of your project, click the box left of the filename, click the rightmost "Share...", copy the public access link, then click the dark blue icon "Make item public". Then share with us the public access link.

slelievre gravatar imageslelievre ( 8 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

calc314 gravatar image

I do not think there is a specific command. Here is a potential work around:

var('x y z')
f = z==3*(1-x)^2*exp(-(x^2) - (y+1)^2) - 10*(x/5 - x^3 - y^5)*exp(-x^2-y^2)- 1/3*exp(-(x+1)^2 - y^2) 
levels=srange(-4,4,0.5)
p=Graphics()
for zlevel in levels:
    p+=implicit_plot3d(f.subs(z==zlevel), (x,-4,4),(y,-4,4),(z,zlevel-0.05,zlevel+0.05),thickness=3)
show(p)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 8 years ago

Seen: 925 times

Last updated: Apr 21 '16