Question

I'm required to calculate the intersection point of a light ray and a plane, I'm given the following- normal vector to the plane, a point on the plane, my light source point in space and thats it. now I know that in order to calculate the intersection point I need the directional vector V from the light source towards the intersection point but I have no idea how I can find it since usually in order to find the directional vector I would calculate V = (intersectionPoint - sourcePoint) but this time I dont have the intersection point... (to make it more understandable , I have - P0, N, Q0, trying to get V and P.

enter image description here

thanks in advance !

Was it helpful?

Solution

I assume that the ray is perpendicular to the plane, otherwise your question does not make much sense. If this is the case, then V = +/- N.

The points P which lay in the plane all satisfy the equation:

< P, N> = <Q0, N>

Where <,> denotes the dot product.

On the other hand, a point on the ray satisfy the equation:

P = P0 + t N

For some real value of t.

Combining the two you get for t:

t = < N , Q0 - P0 > / < N, N >

The sign of t determines V:

V = sign(t) N

You get the intersection point P by reusing the ray equation:

P = P0 + t N

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top