# intersection between a vector and a plane

• Feb 2nd 2010, 03:55 PM
eduardo
intersection between a vector and a plane
Hi forum!
My name is Eduardo and Iīm from Portugal. Currently Iīm doing a project in which I need to calculate the intersection point of a vector with a plane.

The equation of the plane is Z=0, and the vector is a column with 3 elements (something like
R=[ 1
2
3] )

I googled a little bit and I found this site:
Ray-Plane Intersection

This seems to be what Iīm looking for. However, my doubt arises at the first the step needed to parametrize the vector!
The site says:

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

I searched the net and I understood that R0 is a point at the origin, and Rd is a point on the vector, but how can I atribute values to X0 , Y0, Z0, Xd, Yd, Zd ? How can I invent them??????(Shake)

Unfortunately Iīm not keen on maths and Iīm facing this doubt despite my effort. Iīm sure that you can help me (Wink). Do you?

Best regards (Hi)
• Feb 3rd 2010, 04:03 AM
eduardo
Nobody?(Crying)
Well I searched a little more in order to solve my doubt, but so far I havenīt got any answer, but I did a little progress...
Now my problem is on the vector parametrization. I have a vector representing the gaze direction of a user, and I want to parametrize it!
The vector is similar to this [ 1 2 3]. How can I put it in this form:

r(t)=[rx0 ry0 rz0]+t[rxd ryd rzd] , where [rx0 ry0 rz0] is the origin and [rxd ryd rzd] is a point of the vector...

Hope you can help me... I really need this to continue my work...
cheers

Eduardo
• Feb 3rd 2010, 04:23 AM
HallsofIvy
The problem is that a vector has no specific "starting point". A vector is defined by its length, which isn't relevant here, and a direction. We can "move" a vector to have any starting point we wish.

That means that a given vector can intersect a plane at any point. If we have vector <A, B, C>, then $x= x_0+ At$, $y= y_0+ Bt$, $z= Ct$ defines a line in the same direction as the vector for any [tex](x_0,y_9,z_0) and that line intersects the plane z= 0 at [tex](x_0, y_0, 0). Your problem, as stated, has no answer.

If the problem is to determine where the line with direction vector <A, B, C> and containing point [tex](x_0,y_0,z_0) intersects z= 0, write the line as $x= x_0+ At, y= y_0+ Bt, z= z_0+ Ct$. Set $z= z_0+ Ct= 0$ and solve for t: $z= -z_0/C$. Now use that z to find x and y: the line intersects the plane in $(x_0- (AT)/C, y_0- (Bt/C), 0)$.
• Feb 3rd 2010, 08:12 AM
eduardo
HallsofIvy!
Perfect! I understood your explanation! However what values should I give to x0, y0 and z0? Youīve said that a vector has its origin anywhere... so itīs correct to give to x0 y0 and z0 random values???(Worried)

Sorry but Iīm really newbie in this issue and without this step i canīt move ahead...
Best rgds and thanks again!
Eduardo
• Feb 3rd 2010, 08:29 AM
eduardo
My vector is a gaze vector of a person. Itīs origin is in the personīs eye, and the intersection plane is the screen pc.
The person is seated in front of the pc and i want to determine the point of intersection of his gaze line with the screen.
I managed a little bit and I get the gaze vector. Say that our gaze vector is G=[ 1 2 3].
Now, imagine that the person is distant 20 cm from the screen. Furthermore, Iīm considering that the screen is flat and it lies on the xy plane, so it has this plane equation: Z=0.
Well, my doubt is in the definition of the containing pointīs coordinates: x0 y0 and z0.
As the user is 20 cm distant from the screen and as we are assuming that the origin of the axes also lies in the screen :
xo=0;y0=0;z=20

Is my assumption correct? Otherwise whatīs the right way to do this?

Sorry to bore you with this, but itīs really important for my work.

Thanks!
Eduardo