Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

HiddenInBSP

Line equation

This topic is 6312 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have two question: -how is represented the equation of a line in 3D? -how to find the equation of a line (in 3D) with 2 of her points? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I suppose that line equation in 3d is little diffrerent from 2d.
Say in 2D the line is y=ax+b right?
So, in 3D it should be an expression like a structure
y=ax+b
y=qz+c
x=tz+u
or something like that..

Share this post


Link to post
Share on other sites
in 3d a line is the intersection of two planes.
You can also define it by a vector and a point I think.

-* So many things to do, so little time to spend. *-

Share this post


Link to post
Share on other sites
OK, let''s try it in parametric vector form.
P1 and P2 are to points on the line, t is the parameter (a real number). Then any point X on the line satisfies the following equation:
X = P1 + t * (P2 - P1)

So here we''ve got a line equation in R3 (this form works in any dimension, whereas the form y = kx + d only works in 2D. In 3D you can write the plane equation in a similar form, but not the line equation).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!