Miss Elaine Eos wrote:
> I have a triangle that represents a bit of terrain mesh -- that is, the
> triangle is NOT vertically aligned. It's made of points A, B, C, each
> point having an XYZ (so there's Ax, Ay, Az...) I have a 4th point (P),
> that I've already determined has X/Z coordinates inside the triangle --
> that is, if I set everything's Y to 0, T(ABC) contains P. I can get the
> distance2d between points, and I know that what I want to do to get the
> Y coordinate of P is some sort of averaging, but I can't seem to quite
> figure out what values to average, how.
It's not clear to me from your description what you're looking for.
_Altitude_ is probably not the right word based on your description, but
your description isn't precise enough to know what you want. Are you
just saying you want the y-coordinate of your fourth point P to be the
average of the y-coordinates of points A, B, and C? If so, just average
them: p_y = (a_y + b_y + c_y)/3.
If you mean something else, you're going to have to define it more
clearly.
--
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
It is much safer to obey than to rule.
-- Thomas a Kempis


|