# Thread: intersection between a vector and a plane

1. ## 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??????

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

Best regards

2. Nobody?
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

3. 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)$.

4. 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???

Sorry but I´m really newbie in this issue and without this step i can´t move ahead...
Best rgds and thanks again!
Eduardo

5. Here is some additional info!
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