de.fhkl.zw.mkup.rattrap
Class CurveBender
java.lang.Object
de.fhkl.zw.mkup.rattrap.CurveBender
public class CurveBender
- extends java.lang.Object
This class is responsible for drawing curves for the visualization tool.
- Author:
- Stephan Nufer
Constructor Summary |
CurveBender()
|
CurveBender(java.awt.geom.Point2D.Double start,
java.awt.geom.Point2D.Double end)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CurveBender
public CurveBender(java.awt.geom.Point2D.Double start,
java.awt.geom.Point2D.Double end)
- Parameters:
Point2D.Double
- start: The starting point of the curve.Point2D.Double
- end: The ending point of the curve.
CurveBender
public CurveBender()
getb
public double getb()
- Returns:
- The gradient of the given points (start, end)
getorthopoint
public java.awt.geom.Point2D.Double getorthopoint()
- Returns:
- The point that is orthogonal to the given points. The function will alternate the location
of the orthogonal point by a random funtion.
getVorzeichen
public int getVorzeichen()
- Creates randomly an algebraic sign.
- Returns:
- 1 for positive, -1 for negative sign.
getSteigung2
public double getSteigung2()
getSteigung
public double getSteigung()
getMiddle
public java.awt.geom.Point2D.Double getMiddle()
- Returns:
- The middle between start and end.