1 | There is a DrawablePolygon constructor for regular n-gons |
2 | The basic idea is to repeatedly rotate an initial vertex by a fixed amount: this.addPoint( p ); for ( int i = 1; i < n; i++ ) { // rotate the previous point: p = p.rotate( theta ); this.addPoint( p ); } |