org.vormplus.shapeLib.polygons
Class Tetradecagon

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

public class Tetradecagon
extends RegularPolygon

Creates a Tetradecagon object, a regular polygon with 14 sides. This class extends the BasicShape class. References ----------------- http://en.wikipedia.org/wiki/Tetradecagon

Author:
Jan Vantomme

Field Summary
 float radius
           
 processing.core.PVector[] vertices
           
 
Constructor Summary
Tetradecagon(processing.core.PApplet _p)
          Creates a Tetradecagon object with a radius of 50.
 
Method Summary
 float area()
          Returns the area of the Tetradecagon.
 float externalAngle()
          Returns the external angle of the Tetradecagon.
 float internalAngle()
          Returns the internal angle of the Tetradecagon.
 float perimeter()
          Returns the perimeter of the Tetradecagon.
 void render()
          Renders the Tetradecagon to the screen.
 Tetradecagon setRadius(float r)
          Sets the radius for the Tetradecagon.
 
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

Tetradecagon

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

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

setRadius

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

Parameters:
r - Radius for the Tetradecagon.

render

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


area

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

Returns:
float: Area of the Tetradecagon.

perimeter

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

Returns:
float: Perimeter of the Tetradecagon.

internalAngle

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

Returns:
float: Internal angle of the Tetradecagon.

externalAngle

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

Returns:
float: External angle of the Tetradecagon.