max_jenkins

11-14-2002, 10:24 AM

Hi--

so I have my 3d line equation of the form:

P = P1 + k(P2-P1) where Pn is <x, y, z>.

A line can be defined just through the points P1, P2, so how do I solve for k and P in the equation?

Forget the point-in-line test for the moment. Given a known P1, P2, what do I set P equal to to solve for k? can P just be equal to P1 or P2? If this is the case, don't i get different results for k depending on whether or not P = P1 or P2?

Like, if we have P = P1 + k(P2-P1),

can I then say P1 = P1 +k(P2-P1)?

rearranging, that seems like it just becomes P1 - P1/(P2-P1) = k = 0.

alternatively, if i put P = P2, i get the equation P2 = P1 + k(P2-P1), which is equal to (P2-P1)/(P2-P1) = k = 1.

So given that I can define my line with _only_ P1 and P2, what value should i substitute for P to solve for K?

Thanks a lot

Max

so I have my 3d line equation of the form:

P = P1 + k(P2-P1) where Pn is <x, y, z>.

A line can be defined just through the points P1, P2, so how do I solve for k and P in the equation?

Forget the point-in-line test for the moment. Given a known P1, P2, what do I set P equal to to solve for k? can P just be equal to P1 or P2? If this is the case, don't i get different results for k depending on whether or not P = P1 or P2?

Like, if we have P = P1 + k(P2-P1),

can I then say P1 = P1 +k(P2-P1)?

rearranging, that seems like it just becomes P1 - P1/(P2-P1) = k = 0.

alternatively, if i put P = P2, i get the equation P2 = P1 + k(P2-P1), which is equal to (P2-P1)/(P2-P1) = k = 1.

So given that I can define my line with _only_ P1 and P2, what value should i substitute for P to solve for K?

Thanks a lot

Max