Back

Polymorphic Shapes

This project is more like abstract art than a functional program. 50 unique random shapes are generated, they are classified either as circles, rectangles, or polygons. The rectangles are just simple four sided shapes with a random width and height, but the way polygons are generated is unique. In order to keep every shape restrained between two sizes the polygons actually have a radius, points are placed at random distances from the center of the unmade polygon between 0 and the radius while incrementing the angle by two-PI devided by the predetermined number of points. The circles work the same way as the polygons except that the radius is outlined in the draw method and the distance points are placed from the radius remains constant.

Here is a download link for the .JAR file.
Here is a download link for the project file, including the source code