question: public Shape greatCircleLineShape ( ) { GeneralPath path = null ; if ( llpts != null && llpts . length >= 4 && llpts . length % 2 == 0 ) { double y1 = llpts [ 0 ] ; double x1 = llpts [ 1 ] ; path = new GeneralPath ( GeneralPath . WIND_EVEN_ODD , llpts . length / 2 ) ; boolean firstCoords = true ; for ( int i = 2 ; i < llpts . length ; i += 2 ) { double y2 = llpts [ i ] ; double x2 = llpts [ i + 1 ] ; double radDist = GreatCircle . sphericalDistance ( y1 , x1 , y2 , x2 ) ; int nsegs = ( int ) ( ProjMath . radToDeg ( radDist ) * segsPerDeg ) ; if ( nsegs == 0 ) { nsegs = 1 ; } double [ ] coords = GreatCircle . greatCircle ( y1 , x1 , y2 , x2 , nsegs , false ) ; if ( returnDegrees ) { ProjMath . arrayRadToDeg ( coords ) ; } for ( int j = 0 ; j <= coords . length - 1 ; j += 2 ) { if ( firstCoords ) { path . moveTo ( coords [ j + 1 ] , coords [ j ] ) ; firstCoords = false ; } else { path . lineTo ( coords [ j + 1 ] , coords [ j ] ) ; } } x1 = x2 ; y1 = y2 ; } if ( returnDegrees ) { path . lineTo ( ProjMath . radToDeg ( x1 ) , ProjMath . radToDeg ( y1 ) ) ; } else { path . lineTo ( x1 , y1 ) ; } } return path ; }
target:  Create a java.awt.Shape object of coordinates connected by great circle lines.