Equation of parabola from its focus and directrix | Java program to find equation of a parbola using focus and directrix . ; Function to find equation of parabola . ; Driver Code
import java . util . * ; class solution { static void equation_parabola ( float x1 , float y1 , float a , float b , float c ) { float t = a * a + b * b ; float a1 = t - ( a * a ) ; float b1 = t - ( b * b ) ; float c1 = ( - 2 * t * x1 ) - ( 2 * c * a ) ; float d1 = ( - 2 * t * y1 ) - ( 2 * c * b ) ; float e1 = - 2 * a * b ; float f1 = ( - c * c ) + ( t * x1 * x1 ) + ( t * y1 * y1 ) ; System . out . println ( " equation ▁ of ▁ parabola ▁ is ▁ " + a1 + " ▁ x ^ 2 ▁ + ▁ " + b1 + " ▁ y ^ 2 ▁ + ▁ " + c1 + " ▁ x ▁ + ▁ " + d1 + " ▁ y ▁ + ▁ " + e1 + " ▁ xy ▁ + ▁ " + f1 + " ▁ = ▁ 0 . " ) ; } public static void main ( String arr [ ] ) { float x1 = 0 ; float y1 = 0 ; float a = 3 ; float b = - 4 ; float c = 2 ; equation_parabola ( x1 , y1 , a , b , c ) ; } }