vmm.planecurve.parametric
Class UserPlaneCurveParametricKappa

java.lang.Object
  extended by vmm.core.Exhibit
      extended by vmm.planecurve.PlaneCurve
          extended by vmm.planecurve.parametric.PlaneCurveParametric
              extended by vmm.planecurve.parametric.UserPlaneCurveParametricKappa
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable, UserExhibit

public class UserPlaneCurveParametricKappa
extends PlaneCurveParametric
implements UserExhibit

A plane curve c(s) = (x(s),y(s)) is defined by its curvature function kappa(s). kappa(s) is to be entered by the user. The Frenet equation c''(s) = kappa(s)*normal(s) gives c'(s) = (cos(alpha(s)), sin(alpha(s)) ), where alpha'(s) = kappa(s). Therefore c(s) is obtained by a double integration. We use a precomputed antiderivative alphs of kappa, stored in helpArray. This reduces the double integration to a single one - and this is fast enough so that these Frenet curves behave as if they were given by an explicit parametrization. If tmin =< 0 =< tmax then alpha(0) = 0.


Nested Class Summary
 
Nested classes/interfaces inherited from class vmm.planecurve.parametric.PlaneCurveParametric
PlaneCurveParametric.PlaneCurveParametricView
 
Nested classes/interfaces inherited from interface vmm.core.UserExhibit
UserExhibit.FunctionInfo, UserExhibit.Support
 
Field Summary
 
Fields inherited from class vmm.planecurve.parametric.PlaneCurveParametric
tmax, tmin, tResolution, tVals
 
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
UserPlaneCurveParametricKappa()
           
 
Method Summary
 UserExhibit.Support getUserExhibitSupport()
          This method should return a non-null object that is created and customized in the constructor of the class that implements UserExhbit.
 void parameterChanged(Parameter param, java.lang.Object oldValue, java.lang.Object newValue)
          This method will be called automatically when a parameter that has been added to this Exhibit is changed.
 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.
 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.
 double yValue(double t)
          Computes y(t) for a given value of t.
 
Methods inherited from class vmm.planecurve.parametric.PlaneCurveParametric
doDraw, getActionsForView, getCreateAnimation, getDefaultView, getT, getTResolution, makePoints, myCircle
 
Methods inherited from class vmm.planecurve.PlaneCurve
computeDrawData, fillRandomSquare, getPoint, getPointCount, initializeMovingSquare, moveSquare
 
Methods inherited from class vmm.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addParameter, addView, clearDecorations, computeDrawDataHook, doDrawHook, fireExhibitChangeEvent, forceRedraw, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultTransform, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, readExtraXML, removeChangeListener, removeDecoration, removeParameter, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface vmm.core.UserExhibit
getDefaultView, getDefaultWindow, getParameters, setDefaultWindow
 

Constructor Detail

UserPlaneCurveParametricKappa

public UserPlaneCurveParametricKappa()
Method Detail

parameterChanged

public void parameterChanged(Parameter param,
                             java.lang.Object oldValue,
                             java.lang.Object newValue)
Description copied from class: Exhibit
This method will be called automatically when a parameter that has been added to this Exhibit is changed. It should not ordinarily be called directly. Note that in fact, this method simply calls forceRedraw. This method is defined in the <@link Parameterizable} interface.

Specified by:
parameterChanged in interface Parameterizable
Overrides:
parameterChanged in class Exhibit
Parameters:
param - The Parmeter whose value has been set.
oldValue - The previous value of the parameter.
newValue - The new, current value of the parameter. This is not necessarily guaranteed to be different from the old value (although it is for parameters definedin the VMM core).
See Also:
Exhibit.forceRedraw()

xValue

public double xValue(double t)
Description copied from class: PlaneCurveParametric
Computes x(t) for a given value of t.

Specified by:
xValue in class PlaneCurveParametric

yValue

public double yValue(double t)
Description copied from class: PlaneCurveParametric
Computes y(t) for a given value of t.

Specified by:
yValue in class PlaneCurveParametric

xDerivativeValue

public double xDerivativeValue(double t)
Description copied from class: PlaneCurveParametric
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.

Overrides:
xDerivativeValue in class PlaneCurveParametric

yDerivativeValue

public double yDerivativeValue(double t)
Description copied from class: PlaneCurveParametric
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.

Overrides:
yDerivativeValue in class PlaneCurveParametric

x2ndDerivativeValue

public double x2ndDerivativeValue(double t)
Description copied from class: PlaneCurveParametric
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.

Overrides:
x2ndDerivativeValue in class PlaneCurveParametric

y2ndDerivativeValue

public double y2ndDerivativeValue(double t)
Description copied from class: PlaneCurveParametric
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.

Overrides:
y2ndDerivativeValue in class PlaneCurveParametric

getUserExhibitSupport

public UserExhibit.Support getUserExhibitSupport()
Description copied from interface: UserExhibit
This method should return a non-null object that is created and customized in the constructor of the class that implements UserExhbit.

Specified by:
getUserExhibitSupport in interface UserExhibit