Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Algorithms > Re: Altitude of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 17 Topic 581 of 680
Post > Topic >>

Re: Altitude of a point in a triangle

by Tom Plunket <gamedev@[EMAIL PROTECTED] > Sep 24, 2006 at 12:54 PM

Erik Max Francis wrote:

> > Huh, I don't see how it accomplishes that.  It seems to me that you're
> > solving for a point that is along the line defined by p + sn where s
is
> > a scalar scale value, and appears to completely disregard the
"vertical"
> > vector which is what you're actually trying to compute.
> 
> No, the solution I specified solves for the intersection between a line 
> parallel to the y axis which contains the point and the plane of the 
> triangle.  Which is exactly the interpolated point on the triangle.

Upon pondering and the bit-flip (between posting my last post and it
showing up on the server, yay) of realizing 'doh "dot 0" means on the
plane' I see what you're getting at.  I'm left wondering if the
confusion of one who does this for a living might be amplified for
someone who doesn't.

So yeah, choose your Y so the point lies on the plane.  Simple enough
and absolutely not what came to mind upon reading the "how-to"
initially.  Strangely enough the solutions we provided are algebraically
equivalent; they were simply provided with different means of looking at
the problem.

MissElaine: the algebraic solution then is:

P is some point on the plane, one of the verts of your triangle
V is your starting point above the plane
N is the normal of your plane

height = Py - (( ((Vx-Px)/Nx) + ((Vz-Pz)/Nz) ) / Ny)

....I think.  Y'might want to work through the problem yourself to
validate.  ;)

-tom!

--
 




 17 Posts in Topic:
Altitude of a point in a triangle
Miss Elaine Eos <Misc@  2006-09-14 17:10:54 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-14 13:24:04 
Re: Altitude of a point in a triangle
Miss Elaine Eos <Misc@  2006-09-14 23:04:33 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-14 17:01:36 
Re: Altitude of a point in a triangle
"Alfie [UK]" &l  2006-09-15 02:04:43 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-15 13:49:39 
Re: Altitude of a point in a triangle
Miss Elaine Eos <Misc@  2006-09-15 01:12:41 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-15 13:49:09 
Re: Altitude of a point in a triangle
Tom Plunket <gamedev@[  2006-09-21 16:26:51 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-22 15:22:10 
Re: Altitude of a point in a triangle
Tom Plunket <gamedev@[  2006-09-23 19:12:17 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-23 19:22:19 
Re: Altitude of a point in a triangle
Tom Plunket <gamedev@[  2006-09-24 12:54:02 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-24 21:33:53 
Re: Altitude of a point in a triangle
Tom Plunket <gamedev@[  2006-09-25 14:28:47 
Re: Altitude of a point in a triangle
Erik Max Francis <max@  2006-09-25 15:58:10 
Re: Altitude of a point in a triangle
Miss Elaine Eos <Misc@  2006-09-15 01:04:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 8:48:50 CDT 2008.