Basic HTML version of Foils prepared 13 July 98

Foil 66 DrawablePolygon Constructor #4

From Java Academy II:Advanced Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo


1 The constructor for regular n-gons follows: public DrawablePolygon( int x, int y, int r, int n ) { this(); // invoke constructor #1 double theta = 2*Math.PI/n; DrawablePoint p = new DrawablePoint( 0, -r ); // rotate and add as in the previous foil... this.translate( x, y ); }

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998