# Thread:

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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 9, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9535961747169495, "perplexity_flag": "head"}