Ask Your Question
0

problem to draw plane equation 4x + 5y - 2z = 18

asked 2016-01-29 01:28:05 +0200

yann gravatar image

I try to illustrate the result of a problem which consist of finding the intersect point between a line and a plane. Solution is supposed to be point P(-4,8,3). Line and point seems to be displayed correctly but not the plane which correspond to the equation: 4x + 5y -2z = 18. I tried several options without success. Could anyone pinpoint the error in my code?

t, x, y, z = var('t x y z')
f(t) = 2 + 3*t
g(t) = -4*t
h(t) = 5 + t
line = parametric_plot3d((f(t), g(t), h(t)), (t, -3, 3), color="blue")
plan = implicit_plot3d(4*x + 5*y -2*z - 18, (y,-10,10),(z,-10,10),(x,-10,10), color="blue", opacity=0.5)
X = arrow3d((0, 0, 0), (1,0,0), color="black")
Y = arrow3d((0, 0, 0), (0,1,0), color="black")
Z = arrow3d((0, 0, 0), (0,0,1), color="black")
P = point((-4,8,3), size=5, color="red")
X + Y + Z + P + line + plan
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-29 12:18:03 +0200

ndomes gravatar image

You changed the x, y, z order in the implicit_plot statement.

With

 plan = implicit_plot3d(4*x + 5*y -2*z - 18, (x,-10,10),(y,-10,10),(z,-10,10), color="blue", opacity=0.5)

you will get the expected plot. I suppose your y - z - x order causes a swap of axes.

edit flag offensive delete link more

Comments

Thank you so much ndomes. You nailed it!

yann gravatar imageyann ( 2016-01-29 14:13:47 +0200 )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

2 followers

Stats

Asked: 2016-01-29 01:28:05 +0200

Seen: 132 times

Last updated: Jan 29 '16