Saturday, September 28, 2024
Google search engine
HomeData Modelling & AIPython Program for Finding the vertex, focus and directrix of a parabola

Python Program for Finding the vertex, focus and directrix of a parabola

A set of points on a plain surface that forms a curve such that any point on that curve is equidistant from the focus is a parabola.
Vertex of a parabola is the coordinate from which it takes the sharpest turn whereas a is the straight line used to generate the curve.

22

The standard form of a parabola equation is y=ax^2+bx+c. Given the values of a, b and c; our task is to find the coordinates of vertex, focus and the equation of the directrix.

Example –

Input : 5 3 2
Output : Vertex:(-0.3, 1.55)
         Focus: (-0.3, 1.6)
         Directrix: y=-198
Consult the formula below for explanation.

Feeling lost in the world of random DSA topics, wasting time without progress? It’s time for a change! Join our DSA course, where we’ll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 neveropen!

RELATED ARTICLES

Most Popular

Recent Comments