org.vormplus.shapeLib.polygons
Class Pentadecagon

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

public class Pentadecagon
extends RegularPolygon

Creates a Pentadecagon object, a regular polygon with 15 sides. This class extends the RegularPolygon class. References ----------------- http://en.wikipedia.org/wiki/Pentadecagon

Author:
Jan Vantomme

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

Pentadecagon

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

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

setRadius

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

Parameters:
r - Radius for the Pentadecagon.

render

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


area

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

Returns:
float: Area of the Pentadecagon.

perimeter

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

Returns:
float: Perimeter of the Pentadecagon.

internalAngle

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

Returns:
float: Internal angle of the Pentadecagon.

externalAngle

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

Returns:
float: External angle of the Pentadecagon.