Intersection of a line with a function in parametric form

48 Views Asked by At

I have a line defined as:

$ax + by + c=0$

and a parabola in parametric form, ie: $x = x(t), y = y(t)$, where $x(t)$ and $y(t)$ are quadratic.

To find their intersection(s), I solve the system:

$a\cdot x(t) + b\cdot y(t) + c = 0 $

That's straight forward enough, but what if I first need to rotate the parabola by some $\theta$? I'm having trouble getting that into parametric form, ie $x = x_\theta(t), y = y_\theta(t)$.

The context is an application that needs to predict collisions of rolling balls (the parabolic motion part) with static linear shapes (eg: edges of a bounding rectangle).

2

There are 2 best solutions below

3
On BEST ANSWER

It is just a rotation in the plane. $X(t)=Uz$, $z=(x(t),y(t))$; $U$ is the rotation matrix.

0
On

The answer, of course, is:

$x_\theta(t) = x(t)cos(\theta) - y(t)sin(\theta)$
$y_\theta(t) = x(t)sin(\theta) + y(t)cos(\theta)$

Thank you Toni!