Class EDU.emporia.mathtools.PolygonalCurve
All Packages Class Hierarchy This Package Previous Next Index
Class EDU.emporia.mathtools.PolygonalCurve
Object
|
+----ParametricCurve
|
+----EDU.emporia.mathtools.PolygonalCurve
- public class PolygonalCurve
- extends ParametricCurve
This creates a parameterized polygonal curve whose graph is a series of
line segments between specified points
- Version:
- 1.0
- Author:
- Joe Yanik
- Since:
- 7/9/00
-
points
- The vector of points that define the polygonal curve
-
EDU.emporia.mathtools.PolygonalCurve()
- no-argument constructor
-
addPoint(Point2D.Double)
- Adds a point to be used to construct the polygon
-
addPoint(double, double)
- Adds a point to be used to construct the polygon
-
addPoints(Point2D.Double[])
- Adds an array of points to be used to define the polygon
-
clearPoints()
-
-
getPoint(double)
- Returns the point correponding to the specified index
-
getPoints()
- Gets the array of points that are being used to define the curve
-
removeAllPoints()
- Clears all the points out to go back to an empty curve.
-
removePoint(Point2D.Double)
- Removes the point from the list of points to be used
-
removePoint(double, double)
- Removes the point from the list of points to be used
points
public java.util.Vector points
- The vector of points that define the polygonal curve
PolygonalCurve
public PolygonalCurve()
- no-argument constructor
addPoint
public void addPoint(EDU.emporia.mathtools.Point2D.Double p)
- Adds a point to be used to construct the polygon
- Parameters:
- p - The point to be added
addPoint
public void addPoint(double x,
double y)
- Adds a point to be used to construct the polygon
- Parameters:
- x - The x-coordinate of the point
- y - The y-coordinate of the point
addPoints
public void addPoints(EDU.emporia.mathtools.Point2D.Double[] p)
- Adds an array of points to be used to define the polygon
- Parameters:
- p - The array of points
clearPoints
public void clearPoints()
getPoint
public EDU.emporia.mathtools.Point2D getPoint(double u)
- Returns the point correponding to the specified index
- Parameters:
- u - The index of the point.
- Returns:
- The point at that index. If the index is outside the bounds of the defined
point it returns a point both of whose coordinates are Double.NaN
- Overrides:
- getPoint in class ParametricCurve
getPoints
public EDU.emporia.mathtools.Point2D.Double[] getPoints()
- Gets the array of points that are being used to define the curve
removeAllPoints
public void removeAllPoints()
- Clears all the points out to go back to an empty curve.
removePoint
public void removePoint(EDU.emporia.mathtools.Point2D.Double p)
- Removes the point from the list of points to be used
- Parameters:
- p - The point to be removed
removePoint
public void removePoint(double x,
double y)
- Removes the point from the list of points to be used
- Parameters:
- x - The x-coordinate of the point to be used
- y - The y-coordinate of the point to be used
All Packages Class Hierarchy This Package Previous Next Index