Sign in to follow this  
dave

Can anyone help with this?

Recommended Posts

dave    2187
Hi, I need to code a ray-triangle intersection algorythm so i am first testing for intersection with a plane. I am looking at this . I can't for the life of me figure out where 't' comes into it about 6 lines down. There is also no explanation of what the expressions mean, so can anyone shed any light on this? ace

Share this post


Link to post
Share on other sites
ToohrVyk    1596
The math is clear and understandable (although a little bit ugly because it's HTML). The t is the parameter of a parametric vector representation of a ray (assuming t>0).

Any linear algebra book should cover the notations. Also, any introductory physics book is going to define everything you see there in the first chapter. I won't go into the detail of explaining all of them myself (since you didn't mention which you didn't understand and there are a lot).

Share this post


Link to post
Share on other sites
JohnBolton    1372
Here it is cleaned up:

Quote:

A ray is defined by: R0 = [X0, Y0, Z0] Rd = [Xd, Yd, Zd]

so R(t) = R0 + t * Rd , t > 0

R0 is the endpoint of the ray, Rd is the direction of the ray. R(t) is a point on the ray.

This is called the parametric form. In the parametric form, an additional variable (the parameter) is introduced (t in this case) and the other variables become dependent on the parameter. The purpose is to simplify the equation by having a single independent variable. Here are examples of the explicit, implicit, and parametric forms for a 2D line:

explicit: y = mx + b
implicit: m = (y - y0)/(x - x0)
parametric: y = y0 + myt, x = x0 + mxt
parametric (using vectors): L = L0 + Mt

The parametric forms can be used to avoid problems with the explicit or implicit forms. For example, the explicit and implicit forms above can't represent the line x = C, and the implicit form also fails whenever x == x0. The parametric form does not have these problems.

Share this post


Link to post
Share on other sites
gamechampionx    140
John pretty much covered it.

This form is similar to the equation of a line in 3-space, except if you restrict the parameter t to being >= 0, you allow the locus (path) of the line to only travel in one direction from the position vector RO, creating a ray rather than a line. Remember that there is no non-parametric equation of a line in 3-space.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this