Draw Multi-Point Objects (stars?)
Graphics Library

Project #1

Create an interactive program to draw the multi-pointed shapes like the ones shown below in the examples. Notice that lines are drawn between two points.

Points are 200px from the origin (0,0) and spaced evenly around the origin. They are stored in order (clockwise or counter clockwise) in a list.

The examples show skipping 0,1,2, ... points when drawing the lines.

A possible program structure

Some things to think about

Project #2

Modify project #1

Increase the maximum number of points (30, 40, 50 ...).

Allowing the user to

  1. change the point to origin (0,0) distance.
    (define a max/min?)
  2. do not draw the line; draw the midpoint of each line.
    (draw a small circle?)
  3. select the color of the midpoints.
    (red, yellow , green, cyan, blue, magenta)

Menu driven? GUI driven?
What shape are you approximating?
Draw several midpoints in a row the same color, then randomly change the the color for the next set of midpoints?

Examples

3 points skip 0

5 points skip 0

7 points skip 0
5 points skip 1

7 points skip 1

8 points skip 1
6 points skip 2

7 points skip 2

16 points skip 4