Ask Your Question
0

add a plane defined by two vectors

asked 11 years ago

Roman Luštrik gravatar image

updated 11 years ago

I have a set of three vectors

p1 = vector([1,-0.5,0]) # eigenvector of eigenvalue 2
p2 = vector([0,0,1]) # eigenvector of eigenvalue 2
c = vector([1,-1,0]) # eigenvector of eigenvalue 3
plot(p1, color = "red") + plot(p2, color = "red") + plot(c)

Vectors p1 and p2 form a plane since they come from the same eigenvalue. How would I add a plane defined by these two vectors?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 11 years ago

calc314 gravatar image

You can use the polygon command as follows:

p1 = vector([1,-0.5,0]) # eigenvector of eigenvalue 2
p2 = vector([0,0,1]) # eigenvector of eigenvalue 2
c = vector([1,-1,0]) # eigenvector of eigenvalue 3
q=plot(p1, color = "red") + plot(p2, color = "red") + plot(c)
q+=polygon([[0,0,0],p1,p1+p2,p2],opacity=0.5,color="red")
show(q)
Preview: (hide)
link

Comments

After asking this question, I came across this post (http://ask.sagemath.org/question/1503/save-3d-plot-as-vector-format) and lo and behold, `polygon` saves the day after all.

Roman Luštrik gravatar imageRoman Luštrik ( 11 years ago )

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: 11 years ago

Seen: 697 times

Last updated: Sep 13 '13