1
$\begingroup$

I am creating a Java game with collisions. I found myself stuck on the following problem.

I have got two known lines: $y$ and $i.$ $i$ is the inbound direction and $o$ the outbound direction, therefore both angles are the same. From $y$ and $i,$ I have calculated $\alpha.$ I also know the coordinates of the intersection point $(x,y).$ $y$ is not the horizontal axis. $y$ and $i$ can be any line of the format $y = ax + b.$

Could anyone help me out on getting the equation $y = ax + b$ for line $o$?

  • 0
    Draw a horizontal line through the intersection point of the lines. Call this line $\ell$. If the angle between $\ell$ and $y$ is $\theta$ (which you can find knowing the slope of $y$), then the angle between $\ell$ and $o$ is $\theta+\alpha$.2012-03-18

3 Answers 3