PlaneCurveParametric
vmm3d.planecurve.parametric

Class PlaneCurveParametric

    • Constructor Detail

      • PlaneCurveParametric

        public PlaneCurveParametric()
        Construct a plane curve with Parameters tmin, tmax, and tResolution. The curve will be defined by the functions xValue and yValue in a concrete subclass.
    • Method Detail

      • xValue

        public abstract double xValue(double t)
        Computes x(t) for a given value of t.
      • yValue

        public abstract double yValue(double t)
        Computes y(t) for a given value of t.
      • xDerivativeValue

        public double xDerivativeValue(double t)
        Computes x'(t) for a given value of t. The default version defined in this class computes an approximate value numerically, using values of the function itself at points near t.
      • yDerivativeValue

        public double yDerivativeValue(double t)
        Computes y'(t) for a given value of t. The default version defined in this class computes an approximate value numerically, using values of the function itself at points near t.
      • x2ndDerivativeValue

        public double x2ndDerivativeValue(double t)
        Computes x''(t) for a given value of t. The default version defined in this class computes an approximate value numerically, using values of the function itself at points near t.
      • y2ndDerivativeValue

        public double y2ndDerivativeValue(double t)
        Computes y''(t) for a given value of t. The default version defined in this class computes an approximate value numerically, using values of the function itself at points near t.
      • getTResolution

        public int getTResolution()
        Returns the number of intervals into which the curve is divided. Note that the number of points that are drawn on the curve is one more than the tResolution.
      • getT

        public double getT(int index)
        Return the t-value for one of the points on the curve. The number of points is getTResolution() + 1, and they are numbered from 0 to getTResolution(). If this method is called before the curve has been drawn, the return value will be Double.NaN. The return value is also Double.NaN if the specified index is not in the range 0 to getTResolution(), inclusive. The corresponding point on the curve can be obtained by calling xValue() and yValue()

        The value returned by this method is only valid after the curve has been drawn; if it is called before that time, the return value will be Double.NaN.

        Parameters:
        index - A position in the array of t-values that specifies which t-value shoud be returned.
        See Also:
        getTResolution(), xValue(double), yValue(double)
      • myCircle

        public Point2D[] myCircle(double mx,                 double my,                 double rad,                 int numPoints)
        parametrized circle to draw circle arcs in different colors.
      • doDraw

        public void doDraw(org.freehep.graphics2d.VectorGraphics g,          View view,          Transform transform)
        Draw the curve in a specified View. If the View belogs to the nested class PlaneCurveParametric.PlaneCurveParametricView (which is the default), then only a fraction of the curve might be drawn, as specified in the View; this feature is used in the creation animation for the curve.
        Parameters:
        g - The graphics context where the Exhibit is being drawn. It has already been cleared to the background color (assuming that drawing is being done in the usual way, as defined in the top-level View class).
        view - The View that is drawing the Exhibit; this object contains other information that might be of use, such as the Display, if any, associated with the View.
        transform - Contains information about the rectangular area in the xy-plane that is being drawn and about the rectangle of pixels in the graphics context where it is drawn. Note that at least for the top-level View class, transform.getX() and transform.getY() can be assumed to be zero.
        See Also:
        #render(Graphics2D, View, Transform, ArrayList), Exhibit.computeDrawData(View, boolean, Transform, Transform)
      • getCreateAnimation

        public Animation getCreateAnimation(View view)
        Returns an animation that shows the curve being drawn bit-by-bit.
        Overrides:
        getCreateAnimation in class Exhibit
        Parameters:
        view - The View where the creation animation will be shown. If this is null or if it is not an instance of PlaneCurveParametric.PlaneCurveParametricView, then the return value is null.
        Returns:
        A creation animation for the given View of this Exhibit. The return value can be null to indicate that no creation animation is to be run.
      • getActionsForView

        public ActionList getActionsForView(View view)
        Returns a list of actions that can be applied to a PlaneCurveParametric. This adds a separator and four actions that run various animations to the list obtained from super.getActionsForView(view).
        Overrides:
        getActionsForView in class Exhibit
        Parameters:
        view - The view for which the actions should apply. If this is null, then no new actions are added to those inherited from the superclass.

SCaVis 1.8 © jWork.org