Ask Your Question
0

add a plane defined by two vectors

asked 2013-09-13 16:30:40 +0100

Roman Luštrik gravatar image

updated 2013-09-13 16:31:10 +0100

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?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-09-13 22:32:34 +0100

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

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 ( 2013-09-14 06:26:09 +0100 )edit

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-09-13 16:30:40 +0100

Seen: 666 times

Last updated: Sep 13 '13