The equation of any conic section (parabola, ellipse, or hyperbola)
can be placed in the form
Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0
.
The coeffiecient B determines the rotation of the major axis between pi and pi/2. Simpler equations have a B value of zero, but if B is not zero the equation can be reformed by the rotation of axis. This process involves changing the other coefficients and drawing the shape of the new parabola on a rotated axis.
It can be determined that to set B equal to zero
that the angle of axis will be
theta = arctan( B / (A-C) ) / 2
,
and if A minus C equals zero, then the result is pi/2.
The other coefficients are changed to:
A' = A cos^2(theta) + B cos(theta) sin(theta) + C sin^2(theta) C' = A sin^2(theta) - B cos(theta) sin(theta) + C cos^2(theta) D' = D cos(theta) + E sin(theta) E' = - D sin(theta) + E cos(theta) F' = F