

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object vmm.core.Exhibit vmm.planecurve.PlaneCurve vmm.planecurve.parametric.PlaneCurveParametric
public abstract class PlaneCurveParametric
A curve in the plane that is defined by differentiable functions x(t) and y(t).
Nested Class Summary  

static class 
PlaneCurveParametric.PlaneCurveParametricView
Defines the default View of a PlaneCurveParametric. 
Field Summary  

protected RealParam 
tmax
The maximum value of t for points on the curve. 
protected RealParam 
tmin
The minimum valur of t for points on the curve. 
protected IntegerParam 
tResolution
The number of tvalues for points on the curve. 
protected double[] 
tVals
The tvalues used to compute the points (x(t),y(t)) on the curve. 
Fields inherited from class vmm.planecurve.PlaneCurve 

movingSquare, points, randomSquare 
Fields inherited from class vmm.core.Exhibit 

decorations, exhibitNeedsRedraw, isMorphing, morphingView, parameters, previousTransform 
Constructor Summary  

PlaneCurveParametric()
Construct a plane curve with Parameters tmin, tmax, and tResolution. 
Method Summary  

void 
doDraw(java.awt.Graphics2D g,
View view,
Transform transform)
Draw the curve in a specified View. 
ActionList 
getActionsForView(View view)
Returns a list of actions that can be applied to a PlaneCurveParametric. 
Animation 
getCreateAnimation(View view)
Returns an animation that shows the curve being drawn bitbybit. 
View 
getDefaultView()
Returns a new instance of the nested class PlaneCurveParametric.PlaneCurveParametricView . 
double 
getT(int index)
Return the tvalue for one of the points on the curve. 
int 
getTResolution()
Returns the number of intervals into which the curve is divided. 
protected void 
makePoints()
Calcululates the array of points for this curve using the functions xValue(double) and
yValue(double) to compute the points at equally spaced tvalues between tmin and tmax . 
java.awt.geom.Point2D[] 
myCircle(double mx,
double my,
double rad,
int numPoints)
parametrized circle to draw circle arcs in different colors. 
double 
x2ndDerivativeValue(double t)
Computes x''(t) for a given value of t. 
double 
xDerivativeValue(double t)
Computes x'(t) for a given value of t. 
abstract double 
xValue(double t)
Computes x(t) for a given value of t. 
double 
y2ndDerivativeValue(double t)
Computes y''(t) for a given value of t. 
double 
yDerivativeValue(double t)
Computes y'(t) for a given value of t. 
abstract double 
yValue(double t)
Computes y(t) for a given value of t. 
Methods inherited from class vmm.planecurve.PlaneCurve 

computeDrawData, fillRandomSquare, getPoint, getPointCount, initializeMovingSquare, moveSquare 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 

protected IntegerParam tResolution
tmin
and tmax
. This interval is divided into
tResolution subintervals, giving tResolution+1 points.
protected RealParam tmin
protected RealParam tmax
protected double[] tVals
Constructor Detail 

public PlaneCurveParametric()
xValue
and yValue
in a concrete subclass.
Method Detail 

public abstract double xValue(double t)
public abstract double yValue(double t)
public double xDerivativeValue(double t)
public double yDerivativeValue(double t)
public double x2ndDerivativeValue(double t)
public double y2ndDerivativeValue(double t)
public int getTResolution()
public double getT(int index)
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.
index
 A position in the array of tvalues that specifies which tvalue shoud
be returned.getTResolution()
,
xValue(double)
,
yValue(double)
public java.awt.geom.Point2D[] myCircle(double mx, double my, double rad, int numPoints)
protected void makePoints()
xValue(double)
and
yValue(double)
to compute the points at equally spaced tvalues between tmin
and tmax
.
The number of points is one plus the value of tResolution
.
makePoints
in class PlaneCurve
public void doDraw(java.awt.Graphics2D g, View view, Transform transform)
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.
doDraw
in class PlaneCurve
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
toplevel 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
xyplane that is being drawn and about the rectangle of pixels in the graphics
context where it is drawn. Note that at least for the toplevel View class,
transform.getX() and transform.getY() can be assumed to be zero.Exhibit.render(Graphics2D, View, Transform, ArrayList)
,
Exhibit.computeDrawData(View, boolean, Transform, Transform)
public Animation getCreateAnimation(View view)
getCreateAnimation
in class Exhibit
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.
public View getDefaultView()
PlaneCurveParametric.PlaneCurveParametricView
.
getDefaultView
in class Exhibit
public ActionList getActionsForView(View view)
getActionsForView
in class Exhibit
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.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 