Ask Your Question
0

3d contour lines

asked 2016-04-21 00:08:01 +0200

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

edit retag flag offensive close merge delete

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 ( 2016-04-21 11:12:23 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-04-21 20:27:55 +0200

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)
edit flag offensive delete link more

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: 2016-04-21 00:08:01 +0200

Seen: 512 times

Last updated: Apr 21 '16