question: public void filledEllipse ( double x , double y , double semiMajorAxis , double semiMinorAxis ) { if ( semiMajorAxis < 0 ) throw new IllegalArgumentException ( "ellipse semimajor axis can't be negative" ) ; if ( semiMinorAxis < 0 ) throw new IllegalArgumentException ( "ellipse semiminor axis can't be negative" ) ; double xs = scaleX ( x ) ; double ys = scaleY ( y ) ; double ws = factorX ( 2 * semiMajorAxis ) ; double hs = factorY ( 2 * semiMinorAxis ) ; if ( ws <= 1 && hs <= 1 ) pixel ( x , y ) ; else offscreen . fill ( new Ellipse2D . Double ( xs - ws / 2 , ys - hs / 2 , ws , hs ) ) ; draw ( ) ; }
target:  Draws an ellipse with given semimajor and semiminor axes, centered on (x, y).