views:

27

answers:

1

Hi, it seems to me that this is kind of a very easy question, but today I don't seem to find a reasonable answer by myself. I have two points, A and B in R^3 (3D) that belong to plane PI. I want to find a vector r in PI, perpendicular to the vector v = A - B. I know vector n, the normal of plane PI. Mathematically I can solve v.r = 0 and v x r = n, but the solution of this system in terms of r involves some divisions that I suspect could bring some numerical instabilities. Can you suggest me any numerical/computationally good solution for this problem?

Thanks in advance,

Federico

+7  A: 

Why not just compute the cross product V x N ?

Since the solution is in Pi, it is perpendicular to N, and V, so... ?

b0fh
Thanks a lot!!! that was the kind of simple answer I just needed since today I couldn't see it by myself.
Federico
you should mention that V x N and N x V are different vectors, they are collinear but opposite.
Andrey