org.vormplus.shapeLib.polygons
Class Hendecagon

java.lang.Object
  extended by org.vormplus.shapeLib.BasicShape
      extended by org.vormplus.shapeLib.polygons.RegularPolygon
          extended by org.vormplus.shapeLib.polygons.Hendecagon

public class Hendecagon
extends RegularPolygon

Creates a Hendecagon object, a regular polygon with 11 sides. This class extends the BasicShape class. References ----------------- http://en.wikipedia.org/wiki/Hendecagon http://www.mathopenref.com/undecagon.html

Author:
Jan Vantomme

Field Summary
 float radius
           
 processing.core.PVector[] vertices
           
 
Constructor Summary
Hendecagon(processing.core.PApplet _p)
          Creates a Hendecagon object with a radius of 50.
 
Method Summary
 float area()
          Returns the area of the Hendecagon.
 float externalAngle()
          Returns the external angle of the Hendecagon.
 float internalAngle()
          Returns the internal angle of the Hendecagon.
 float perimeter()
          Returns the perimeter of the Hendecagon.
 void render()
          Renders the Hendecagon to the screen.
 Hendecagon setRadius(float r)
          Sets the radius for the Hendecagon.
 
Methods inherited from class org.vormplus.shapeLib.polygons.RegularPolygon
area, externalAngle, internalAngle, perimeter, render
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

radius

public float radius

vertices

public processing.core.PVector[] vertices
Constructor Detail

Hendecagon

public Hendecagon(processing.core.PApplet _p)
Creates a Hendecagon object with a radius of 50.

Parameters:
_p - Reference to the PApplet object. Normally use 'this'
Method Detail

setRadius

public Hendecagon setRadius(float r)
Sets the radius for the Hendecagon.

Parameters:
r - Radius for the Hendecagon.

render

public void render()
Renders the Hendecagon to the screen.


area

public float area()
Returns the area of the Hendecagon.

Returns:
float: Area of the Hendecagon.

perimeter

public float perimeter()
Returns the perimeter of the Hendecagon.

Returns:
float: Perimeter of the Hendecagon.

internalAngle

public float internalAngle()
Returns the internal angle of the Hendecagon.

Returns:
float: Internal angle of the Hendecagon.

externalAngle

public float externalAngle()
Returns the external angle of the Hendecagon.

Returns:
float: External angle of the Hendecagon.