Ask Your Question
1

Plotting planes

asked 2014-11-09 13:26:00 +0100

sageplot gravatar image

updated 2015-01-14 10:15:24 +0100

FrédéricC gravatar image

Hi, how can I plot these planes? http://oi59.tinypic.com/11se51t.jpg

I'd especially like to know how to plot the second plane. Thanks.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

answered 2014-11-09 18:58:17 +0100

vdelecroix gravatar image

Hi,

For the first example, you can use parametric_plot3d

sage: v0 = vector([1,0,1])
sage: v1 = vector([-2,1,3])
sage: v2 = vector([0,-1,1])
sage: s,t = var('s,t')
sage: parametric_plot3d(v0 + s*v1 + t*v2, (s,-2,2), (t,-2,2))

And for the second one you can use implicit_plot3d

sage: x,y,z = var('x,y,z')
sage: v = vector([-1,2,1])
sage: X = vector([x,y,z])
sage: implicit_plot3d(X.dot_product(v) == 1, (x,-2,2), (y,-2,2), (z,-2,2))

Vincent

edit flag offensive delete link more

Comments

Thanks, this helped me also plotting a line (form: vector()+t*vector()) where the planes interact between each other.

sageplot gravatar imagesageplot ( 2014-11-10 10:49:11 +0100 )edit
1

answered 2014-11-11 14:44:12 +0100

Volker Braun gravatar image

Yet another solution is to define the planes as (non-compact) polyhedra:

sage: P_prime = Polyhedron(eqns=[(1, -1,2,1)])
sage: P_prime.Hrepresentation() 
(An equation (1, -2, -1) x - 1 == 0,)
sage: P_prime.Vrepresentation()
(A line in the direction (0, 1, -2),
 A line in the direction (1, 0, 1),
 A vertex at (0, 0, -1))
sage: P_prime.plot()
edit flag offensive delete link more
0

answered 2014-11-09 14:17:16 +0100

FrédéricC gravatar image

updated 2014-11-09 14:17:59 +0100

This is possible using hyperplane arrangements, for example:

sage: H.<x,y,z> = HyperplaneArrangements(QQ)
sage: ha = H(x, y, x - 1, y - 1, x + y - z)
sage: ha.plot()

Note that you will have to work out the equations of your hyperplanes.

edit flag offensive delete link more

Comments

I thought I can just enter what is given (in the picture) without any conversation-calculation?

sageplot gravatar imagesageplot ( 2014-11-09 16:38:45 +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: 2014-11-09 13:26:00 +0100

Seen: 1,196 times

Last updated: Nov 11 '14