public static Quadratic From3Coordinate2(IVector2 <double> A, IVector2 <double> B, IVector2 <double> C) { //Convert the 3 points to quadratic equations. var equation1 = new Quadratic(A.X, A.Y); var equation2 = new Quadratic(B.X, B.Y); var equation3 = new Quadratic(C.X, C.Y); //Cancel out "C" var equation4 = equation1.MakeSubject(equation1.C).Subtract(equation2.MakeSubject(equation1.C)); var equation5 = equation2.MakeSubject(equation2.C).Subtract(equation3.MakeSubject(equation3.C)); //Cancel out "B" var equation6 = equation4.MakeSubject(equation4.B).Subtract(equation5.MakeSubject(equation5.B)); //Solve for A then B then C var a = equation6.MakeSubject(equation6.A).Result; //Substitute into EQ 6 var b = (equation4.Result - equation4.A * a) / equation4.B; //Into EQ 4 var c = (A.Y) - (a * (A.X) * (A.X)) - (b * (A.X)); //Into EQ 1 //Create new Quadratic solver based on A, B and C. var output = new Quadratic { A = a, B = b, C = c }; return(output); }