A good answer might be:

    drawStar( width/2, height/2, min/4 );  // draw star in center

Geometry

Now consider the method that draws the star:

drawStar( int x, int y, int size )

Each line (of the six) starts at the center, (x, y), and ends at a point on the circle of radius size. The X distance from the center of a point on a circle is size*cos( theta ). The Y distance from the center of a point on a circle is size*sin( theta ).

All you need to do is find the six values for theta and the six endpoints are yours.


 

QUESTION 7:

How many radians are there in a circle?