Ask Your Question
0

Sketch affine variety in R^3

asked 2013-04-05 08:33:37 +0100

Neda gravatar image

updated 2013-04-05 09:39:09 +0100

calc314 gravatar image

Hello I want to sketch this affine variety in $R^3$: $V((x-2)(x^2-1) , y(x^2-y),(z+1)(x^2-1))$. Is this command

implicit_plot3d((x-2)(x^2-1) , y(x^2-y),(z+1)(x^2-1),[-2,2],[-2,2],[-2,2])

correct ? or I should try writing that command 3 times for each part?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-05 09:51:21 +0100

calc314 gravatar image

Here are two ways to code this. To begin, you should try:

var('x y z')    
p=implicit_plot3d((x-2)*(x^2-1),[x,-3,3],[y,-3,3],[z,-3,3],color='red',opacity=0.7)
p+=implicit_plot3d(y*(x^2-y),[x,-3,3],[y,-3,3],[z,-3,3],color='green',opacity=0.7)
p+=implicit_plot3d((z+1)*(x^2-1),[x,-3,3],[y,-3,3],[z,-3,3],color='blue',opacity=0.7)
show(p)

Another approach using the add command and a list comprehension is:

var('x y z')

V=[(x-2)*(x^2-1) , y*(x^2-y),(z+1)*(x^2-1)]
c=['red','green','blue']

p=add([implicit_plot3d(V[i],[x,-3,3],[y,-3,3],[z,-3,3],color=c[i],opacity=0.7) for i in [0..2]]) 

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: 2013-04-05 08:33:37 +0100

Seen: 877 times

Last updated: Apr 05 '13