Next: Returning Elements and Information for Ellipses, Previous: Affine Transformations for Ellipses, Up: Ellipse Reference
const
function: bool is_elliptical (void)Returns
true
if theEllipse
is elliptical, otherwisefalse
.Certain transformations, such as shearing and scaling, can cause
Ellipses
to become non-elliptical.
const
function: bool is_quadratic (void
)Returns
true
, because the equation for an ellipse in the x-y plane with its center at the origin is the quadratic equation x^2/a^2 + y^2/b^2 = 1 where a is half the horizontal axis and b is half the vertical axis.Ellipse e(origin, 5, 2, 90); e.draw(); Point P(e.angle_point(-35)); cout << ((P.get_x() * P.get_x()) / (e.get_axis_h()/2 * e.get_axis_h()/2)) + ((P.get_y() * P.get_y()) / (e.get_axis_v()/2 * e.get_axis_v()/2)); -| 1
![]()
Fig. 163.