question: public Star ( int points , float rotation , float insideness ) { float x = 0 ; float y = 0 ; float radius = 0.5f ; points = points < 3 ? 3 : points ; rotation = rotation + ( float ) ( Math . PI / 2.0 ) ; boolean flat = insideness >= 1.0f ; setControlPointSize ( flat ? points : 2 * points ) ; final float pi2 = 2 * ( float ) Math . PI ; float insideRadius = radius * insideness ; Point2D . Float pt ; for ( int p = 0 ; p < points ; ++ p ) { double vertex = p ; double angle = vertex * pi2 / points + rotation ; pt = new Point2D . Float ( ( float ) ( x + Math . cos ( angle ) * radius ) , ( float ) ( y + Math . sin ( angle ) * radius ) ) ; pushPoint ( pt ) ; if ( ! flat ) { double angle2 = ( vertex + 0.5 ) * pi2 / points + rotation ; pt = new Point2D . Float ( ( float ) ( x + Math . cos ( angle2 ) * insideRadius ) , ( float ) ( y + Math . sin ( angle2 ) * insideRadius ) ) ; pushPoint ( pt ) ; } } }
target:  Create a Star, or a regular polygon if insideness is 1.0f.