3d contour plotting in sage

i like this post (click again to cancel)
1
i dont like this post (click again to cancel)

It seems there isn't a function in sagemath which can plot contours of a function $f(x, y, z)$ as transparent layers in 3d space like in mayavi.

Is there an alternate way to achieve the same effect in sage?

asked Jun 16 '12

ebs gravatar image ebs
129 1 10 15

updated Jun 16 '12

i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel) ebs has selected this answer as correct

You might be able to get implicit_plot3d to do it. Maybe something like the following would work for you.

var('x,y,z')
f(x,y,z)=x^2+y^2+z^2/4
p=Graphics()
for k in [1,2,3,4]:
    p+=implicit_plot3d(f(x,y,z)==k,(x,-2,2),(y,-2,2),(z,-5,5),opacity=0.4)
p
link

posted Jun 16 '12

calc314 gravatar image calc314
1820 3 19 51
1

I usually use something similar for level surfaces. Note that with the upcoming Jmol upgrade you can plot them first, and adjust their color and opacity to your liking interactively later.

kcrisman (Jun 16 '12)

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Tags:

Stats:

Asked: Jun 16 '12

Seen: 114 times

Last updated: Jun 16 '12

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.