Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
0

Sketch affine variety in R^3

asked 12 years ago

Neda gravatar image

updated 12 years ago

calc314 gravatar image

Hello I want to sketch this affine variety in R3: V((x2)(x21),y(x2y),(z+1)(x21)). 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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

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)
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: 12 years ago

Seen: 994 times

Last updated: Apr 05 '13