# Thread: 2D plane intersection point

1. ## 2D plane intersection point

Hello all,

i need help with the following question:

Given a 2d plane which has 4 distinct points, C, D, A, B. Points A and B define an infinite line. At time t=0 a player starts moving at a constant velocity from point C to point D, where he arrives at t=1. Determine, if the player hits the wall. If he does, find the corresponding time and position.

I started this problem by taking an infinite length line AB and from the given data , the distance of CD is V(v=velocity from C to D). But I am unable to understand about how to find the intersection of the two lines. I started by trying to find if C and lie on either side of AB or on AB but could not proceed much with this. Can someone plz help me out with problem.

Thanx a lot ,
Aarav

2. Originally Posted by arnav.akash9
Hello all,

i need help with the following question:

Given a 2d plane which has 4 distinct points, C, D, A, B. Points A and B define an infinite line. At time t=0 a player starts moving at a constant velocity from point C to point D, where he arrives at t=1. Determine, if the player hits the wall. If he does, find the corresponding time and position.
Are we to assume that the line AB is the "wall" you mention?

Given points $(x_1, y_1)$ and $(x_2, y_2)$, the equation of the line through them is $(x_2- x_1)(y- y_1)= (y_2- y_1)(x- x_1)$ or $y= \frac{y_2- y_1}{x_2- x_1)(x- x_1)+ y_1$.

Find the equations of the two lines in that form and set the "y"s equal:
The line through A and B is $y= \frac{y_B-y_A}{x_B-x_A}(x- x_A)+ y_A$ and the line through C and D is $y= \frac{y_D-y_C}{x_D-x_C)(x- xC)+ y_C$. Setting those two "y"s equal gives the linear equation $\frac{y_B-y_A}{x_B-x_A}(x- x_A)+ y_A= \frac{y_D-y_C}{x_D-x_C)(x- xC)+ y_C$ which you can solve for x.

Now, go back and write line CD in terms of t. Since the line passes through C at t= 0 and D at t= 1, it can be written as $x= (x_D- x_C)t+ x_C$, $y= (y_D-y_C)t+ y_C$.

Put the value you got for x or y into one of those equations and solve for t.

I started this problem by taking an infinite length line AB and from the given data , the distance of CD is V(v=velocity from C to D). But I am unable to understand about how to find the intersection of the two lines. I started by trying to find if C and lie on either side of AB or on AB but could not proceed much with this. Can someone plz help me out with problem.

Thanx a lot ,
Aarav