Class PlaneCurve

    • Constructor Detail

      • PlaneCurve

        public PlaneCurve()
    • Method Detail

      • getPointCount

        public int getPointCount()
        Returns the number of points in the Point array for this curve (including any null values). If the point array has not yet been created, because the curve has not yet been drawn, then the return value is zero.
      • getPoint

        public Point2D getPoint(int index)
        Get one of the points in the point array that defines this curve.
        index - the index of the point in the point array. The value must be in the range from 0 to one less than the value returned by getPointCount(), or an error of type NullPointerException or ArrayIndexOutOfBoundsError will occur.
        the point at the specified index in the point array. This can be null if the specified position in the array holds a null value.
      • fillRandomSquare

        public Point2D[] fillRandomSquare(int numPoints)
        public Point2D[] fillRandomSquare() puts numPoints random points into a square of edge length 2.
      • initializeMovingSquare

        public Point2D[] initializeMovingSquare(int numPoints)
        initializeMovingSquare(numPoints) Initializes the array MovingSquare[] and its elements only once for each new call of a curve exhibit. Avoids garbage collection while the dotted square moves along a curve.

SCaVis 2.2 © jWork.ORG