0
$\begingroup$

I have a parabola defined in terms $3$ points i.e $(x_1, y_1), (x_2, y_2), (x_3, y_3)$, consider $(x_1, y_1)$ be start point, $(x_2,y_2)$ be the vertex and $(x_3, y_3)$ be the end point and also provided starting angle and ending angle. Also, I have line segment defined in terms of two points $(m_1, n_1)$ and $(m_2, n_2)$.

I want to get the final equation that provides the intersection points of the line segment and a parabola.

consider this reference image: https://i.stack.imgur.com/AZs5G.jpg

$\endgroup$
  • $\begingroup$ First, find out the equations of the parabola and the line. Then just solve the intersection points. $\endgroup$ – Matti P. Apr 27 '18 at 7:39
  • $\begingroup$ can i get a pseudo code or a reference link if possible $\endgroup$ – paradox Apr 27 '18 at 7:51
  • $\begingroup$ I don't have a pseudo code, you can calculate the equation of the parabola with one matrix inverse. Assume that the equation is $ax^2 + bx +c = y$, plug in the known values for $x$ and $y$ and you get three equations with three unknowns $a$, $b$, and $c$. Solve with matrix inverse. $\endgroup$ – Matti P. Apr 27 '18 at 8:02
  • $\begingroup$ And the equation of the line should be easy to do. $\endgroup$ – Matti P. Apr 27 '18 at 8:02
  • $\begingroup$ @Matti, thanks, ill check it $\endgroup$ – paradox Apr 27 '18 at 8:50
0
$\begingroup$

Since it passes through $(x_1,y_1)$, parabola is of form $$f(x)=a(x-x_1)(x-b)+y_1$$ Then plug $(x_2,y_2),(x_3,y_3)$ in order to get values of $a$ and $b$. Then create equation of line using two point from and finally intersect both quations

$\endgroup$
  • $\begingroup$ ill look into it $\endgroup$ – paradox Apr 27 '18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.