org.opensourcephysics.sip.ch13
Class KochApp
java.lang.Object
org.opensourcephysics.controls.AbstractCalculation
org.opensourcephysics.sip.ch13.KochApp
- All Implemented Interfaces:
- Calculation, Drawable
public class KochApp
- extends AbstractCalculation
- implements Drawable
Draws a Koch curve.
Method Summary |
void |
calculate()
Does the calculation. |
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws a representation of an object in a drawing panel. |
void |
iterate(double x1,
double y1,
double x2,
double y2,
int n,
DrawingPanel panel,
java.awt.Graphics g)
|
static void |
main(java.lang.String[] args)
|
void |
reset()
Resets the program to its default state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KochApp
public KochApp()
calculate
public void calculate()
- Description copied from class:
AbstractCalculation
- Does the calculation.
- Specified by:
calculate
in interface Calculation
- Specified by:
calculate
in class AbstractCalculation
iterate
public void iterate(double x1,
double y1,
double x2,
double y2,
int n,
DrawingPanel panel,
java.awt.Graphics g)
draw
public void draw(DrawingPanel panel,
java.awt.Graphics g)
- Description copied from interface:
Drawable
- Draws a representation of an object in a drawing panel.
- Specified by:
draw
in interface Drawable
reset
public void reset()
- Description copied from class:
AbstractCalculation
- Resets the program to its default state.
Override this method to set the program's parameters.
- Overrides:
reset
in class AbstractCalculation
main
public static void main(java.lang.String[] args)