# add a plane defined by two vectors

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 close merge delete

Sort by » oldest newest most voted

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)

more

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.

( 2013-09-13 23:26:09 -0600 )edit