Miss Elaine Eos wrote:
> Ooop, this was the part I'm missing. Ok, I've got my normal for the
> triangle, "normal". And my point, "xPoint" (your "n" and "x") -- so, my
> distance is...
>
> double distance = (pointX - p) * dotProduct (unitize(normal))
>
> ...right? What's p?
P (position vector p) is any point on the plane. That means any one of
your points A, B, or C (position vectors a, b, or c).
The dot product is an operation between two vectors, so if it's a
standalone function, that would be
dotProduct(x - a, unitize(n)),
or if it's a method on a vector, it would be
(x - a).dotProduct(unitize(n)).
--
Erik Max Francis && max@[EMAIL PROTECTED]
&& http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
And I'd rather be damned if I don't.
-- Robert S. MacNamara


|