public static Point2D[] calculateGisModelEllipse(Point2D center, Point2D majorAxisVector, double axisRatio, double initAngle, double endAngle) {
		Point2D majorPoint = new Point2D.Double(center.getX()+majorAxisVector.getX(), center.getY()+majorAxisVector.getY());
	    double orientation  = Math.atan(majorAxisVector.getY()/majorAxisVector.getX());
	    double semiMajorAxisLength = center.distance(majorPoint);
		double semiMinorAxisLength = semiMajorAxisLength*axisRatio;
	    double eccentricity = Math.sqrt(1-((Math.pow(semiMinorAxisLength, 2))/(Math.pow(semiMajorAxisLength, 2))));
		int isa = (int)initAngle;
		int iea = (int)endAngle;
		double angulo;
		Point2D[] pts;
		if (initAngle <= endAngle) {
			pts = new Point2D[(iea-isa)+2];
			angulo = initAngle;
			double r = semiMinorAxisLength/Math.sqrt(1-((Math.pow(eccentricity, 2))*(Math.pow(Math.cos(angulo*Math.PI/(double)180.0), 2))));
		    double x = r*Math.cos(angulo*Math.PI/(double)180.0);
		    double y = r*Math.sin(angulo*Math.PI/(double)180.0);
		    double xrot = x*Math.cos(orientation) - y*Math.sin(orientation);
		    double yrot = x*Math.sin(orientation) + y*Math.cos(orientation);
			pts[0] = new Point2D.Double(center.getX() + xrot, center.getY() + yrot);
			for (int i=1; i<=(iea-isa)+1; i++) {
				angulo = (double)(isa+i);
				r = semiMinorAxisLength/Math.sqrt(1-((Math.pow(eccentricity, 2))*(Math.pow(Math.cos(angulo*Math.PI/(double)180.0), 2))));
			    x = r*Math.cos(angulo*Math.PI/(double)180.0);
			    y = r*Math.sin(angulo*Math.PI/(double)180.0);
			    xrot = x*Math.cos(orientation) - y*Math.sin(orientation);
			    yrot = x*Math.sin(orientation) + y*Math.cos(orientation);
			    pts[i] = new Point2D.Double(center.getX() + xrot, center.getY() + yrot);
			}
			angulo = endAngle;
			r = semiMinorAxisLength/Math.sqrt(1-((Math.pow(eccentricity, 2))*(Math.pow(Math.cos(angulo*Math.PI/(double)180.0), 2))));
		    x = r*Math.cos(angulo*Math.PI/(double)180.0);
		    y = r*Math.sin(angulo*Math.PI/(double)180.0);
		    xrot = x*Math.cos(orientation) - y*Math.sin(orientation);
		    yrot = x*Math.sin(orientation) + y*Math.cos(orientation);
		    pts[(iea-isa)+1] = new Point2D.Double(center.getX() + xrot, center.getY() + yrot);
		} else {
			pts = new Point2D[(360-isa)+iea+2];
			angulo = initAngle;
			double r = semiMinorAxisLength/Math.sqrt(1-((Math.pow(eccentricity, 2))*(Math.pow(Math.cos(angulo*Math.PI/(double)180.0), 2))));
		    double x = r*Math.cos(angulo*Math.PI/(double)180.0);
		    double y = r*Math.sin(angulo*Math.PI/(double)180.0);
		    double xrot = x*Math.cos(orientation) - y*Math.sin(orientation);
		    double yrot = x*Math.sin(orientation) + y*Math.cos(orientation);
		    pts[0] = new Point2D.Double(center.getX() + r*Math.cos(angulo*Math.PI/(double)180.0), center.getY() + r*Math.sin(angulo*Math.PI/(double)180.0));
			for (int i=1; i<=(360-isa); i++) {
				angulo = (double)(isa+i);
				r = semiMinorAxisLength/Math.sqrt(1-((Math.pow(eccentricity, 2))*(Math.pow(Math.cos(angulo*Math.PI/(double)180.0), 2))));
			    x = r*Math.cos(angulo*Math.PI/(double)180.0);
			    y = r*Math.sin(angulo*Math.PI/(double)180.0);
			    xrot = x*Math.cos(orientation) - y*Math.sin(orientation);
			    yrot = x*Math.sin(orientation) + y*Math.cos(orientation);
			    pts[i] = new Point2D.Double(center.getX() + xrot, center.getY() + yrot);
			}
			for (int i=(360-isa)+1; i<=(360-isa)+iea; i++) {
				angulo = (double)(i-(360-isa));
				r = semiMinorAxisLength/Math.sqrt(1-((Math.pow(eccentricity, 2))*(Math.pow(Math.cos(angulo*Math.PI/(double)180.0), 2))));
			    x = r*Math.cos(angulo*Math.PI/(double)180.0);
			    y = r*Math.sin(angulo*Math.PI/(double)180.0);
			    xrot = x*Math.cos(orientation) - y*Math.sin(orientation);
			    yrot = x*Math.sin(orientation) + y*Math.cos(orientation);
			    pts[i] = new Point2D.Double(center.getX() + xrot, center.getY() + yrot);
			}
			angulo = endAngle;
			r = semiMinorAxisLength/Math.sqrt(1-((Math.pow(eccentricity, 2))*(Math.pow(Math.cos(angulo*Math.PI/(double)180.0), 2))));
		    x = r*Math.cos(angulo*Math.PI/(double)180.0);
		    y = r*Math.sin(angulo*Math.PI/(double)180.0);
		    xrot = x*Math.cos(orientation) - y*Math.sin(orientation);
		    yrot = x*Math.sin(orientation) + y*Math.cos(orientation);
		    pts[(360-isa)+iea+1] = new Point2D.Double(center.getX() + xrot, center.getY() + yrot);
		}
		return pts;
	}
public static Point2D [ ] calculateGisModelEllipse ( Point2D center , Point2D majorAxisVector , double axisRatio , double initAngle , double endAngle ) { Point2D majorPoint = new Point2D . Double ( center . getX ( ) + majorAxisVector . getX ( ) , center . getY ( ) + majorAxisVector . getY ( ) ) ; double orientation = Math . atan ( majorAxisVector . getY ( ) / majorAxisVector . getX ( ) ) ; double semiMajorAxisLength = center . distance ( majorPoint ) ; double semiMinorAxisLength = semiMajorAxisLength * axisRatio ; double eccentricity = Math . sqrt ( 1 - ( ( Math . pow ( semiMinorAxisLength , 2 ) ) / ( Math . pow ( semiMajorAxisLength , 2 ) ) ) ) ; int isa = ( int ) initAngle ; int iea = ( int ) endAngle ; double angulo ; Point2D [ ] pts ; if ( initAngle <= endAngle ) { pts = new Point2D [ ( iea - isa ) + 2 ] ; angulo = initAngle ; double r = semiMinorAxisLength / Math . sqrt ( 1 - ( ( Math . pow ( eccentricity , 2 ) ) * ( Math . pow ( Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , 2 ) ) ) ) ; double x = r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) ; double y = r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ; double xrot = x * Math . cos ( orientation ) - y * Math . sin ( orientation ) ; double yrot = x * Math . sin ( orientation ) + y * Math . cos ( orientation ) ; pts [ 0 ] = new Point2D . Double ( center . getX ( ) + xrot , center . getY ( ) + yrot ) ; for ( int i = 1 ; i <= ( iea - isa ) + 1 ; i ++ ) { angulo = ( double ) ( isa + i ) ; r = semiMinorAxisLength / Math . sqrt ( 1 - ( ( Math . pow ( eccentricity , 2 ) ) * ( Math . pow ( Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , 2 ) ) ) ) ; x = r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) ; y = r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ; xrot = x * Math . cos ( orientation ) - y * Math . sin ( orientation ) ; yrot = x * Math . sin ( orientation ) + y * Math . cos ( orientation ) ; pts [ i ] = new Point2D . Double ( center . getX ( ) + xrot , center . getY ( ) + yrot ) ; } angulo = endAngle ; r = semiMinorAxisLength / Math . sqrt ( 1 - ( ( Math . pow ( eccentricity , 2 ) ) * ( Math . pow ( Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , 2 ) ) ) ) ; x = r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) ; y = r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ; xrot = x * Math . cos ( orientation ) - y * Math . sin ( orientation ) ; yrot = x * Math . sin ( orientation ) + y * Math . cos ( orientation ) ; pts [ ( iea - isa ) + 1 ] = new Point2D . Double ( center . getX ( ) + xrot , center . getY ( ) + yrot ) ; } else { pts = new Point2D [ ( 360 - isa ) + iea + 2 ] ; angulo = initAngle ; double r = semiMinorAxisLength / Math . sqrt ( 1 - ( ( Math . pow ( eccentricity , 2 ) ) * ( Math . pow ( Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , 2 ) ) ) ) ; double x = r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) ; double y = r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ; double xrot = x * Math . cos ( orientation ) - y * Math . sin ( orientation ) ; double yrot = x * Math . sin ( orientation ) + y * Math . cos ( orientation ) ; pts [ 0 ] = new Point2D . Double ( center . getX ( ) + r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , center . getY ( ) + r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ) ; for ( int i = 1 ; i <= ( 360 - isa ) ; i ++ ) { angulo = ( double ) ( isa + i ) ; r = semiMinorAxisLength / Math . sqrt ( 1 - ( ( Math . pow ( eccentricity , 2 ) ) * ( Math . pow ( Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , 2 ) ) ) ) ; x = r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) ; y = r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ; xrot = x * Math . cos ( orientation ) - y * Math . sin ( orientation ) ; yrot = x * Math . sin ( orientation ) + y * Math . cos ( orientation ) ; pts [ i ] = new Point2D . Double ( center . getX ( ) + xrot , center . getY ( ) + yrot ) ; } for ( int i = ( 360 - isa ) + 1 ; i <= ( 360 - isa ) + iea ; i ++ ) { angulo = ( double ) ( i - ( 360 - isa ) ) ; r = semiMinorAxisLength / Math . sqrt ( 1 - ( ( Math . pow ( eccentricity , 2 ) ) * ( Math . pow ( Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , 2 ) ) ) ) ; x = r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) ; y = r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ; xrot = x * Math . cos ( orientation ) - y * Math . sin ( orientation ) ; yrot = x * Math . sin ( orientation ) + y * Math . cos ( orientation ) ; pts [ i ] = new Point2D . Double ( center . getX ( ) + xrot , center . getY ( ) + yrot ) ; } angulo = endAngle ; r = semiMinorAxisLength / Math . sqrt ( 1 - ( ( Math . pow ( eccentricity , 2 ) ) * ( Math . pow ( Math . cos ( angulo * Math . PI / ( double ) 180.0 ) , 2 ) ) ) ) ; x = r * Math . cos ( angulo * Math . PI / ( double ) 180.0 ) ; y = r * Math . sin ( angulo * Math . PI / ( double ) 180.0 ) ; xrot = x * Math . cos ( orientation ) - y * Math . sin ( orientation ) ; yrot = x * Math . sin ( orientation ) + y * Math . cos ( orientation ) ; pts [ ( 360 - isa ) + iea + 1 ] = new Point2D . Double ( center . getX ( ) + xrot , center . getY ( ) + yrot ) ; } return pts ; }
This method calculates an array of Point2D that represents a ellipse. The distance
between it points is 1 angular unit

@param center Point2D that represents the center of the ellipse
@param majorAxisVector Point2D that represents the vector for the major axis
@param axisRatio double value that represents the axis ratio
@param initAngle double value that represents the start angle of the ellipse arc
@param endAngle double value that represents the end angle of the ellipse arc
@return Point2D[] An array of Point2D that represents the shape of the ellipse