vmm.planecurve.parametric
Class Hyperbola

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

public class Hyperbola
extends ConicSection

A hyperbola given by parametric equations (a*cosh(t),b*sinh(t)). This gives only one branch of the hyperbola. The second, symmetrical branch is also drawn, but only the first branch is used for animations and decorations.


Nested Class Summary
 
Nested classes/interfaces inherited from class vmm.planecurve.parametric.PlaneCurveParametric
PlaneCurveParametric.PlaneCurveParametricView
 
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
Hyperbola()
          Create a hyperboal given by parametric equations (a*cosh(t),b*singh(t)), for t between -2.3 and 2.3.
 
Method Summary
 void doDraw(java.awt.Graphics2D g, View view, Transform limits)
          Draw the hyperbola.
protected  void drawFociAndDirectrix(java.awt.Graphics2D g, View view, Transform limits, double t)
          This is overridden in the sub-classes to do the actual drawing of the extra decorations.
 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.ConicSection
getCreateAnimation, getMorphingAnimation
 
Methods inherited from class vmm.planecurve.parametric.PlaneCurveParametric
getActionsForView, 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, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, 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
 

Constructor Detail

Hyperbola

public Hyperbola()
Create a hyperboal given by parametric equations (a*cosh(t),b*singh(t)), for t between -2.3 and 2.3. The initial values of a and b are 1. a has animation start and end values both set to 1. b has animation start and end values of 1 and 1.5.

Method Detail

doDraw

public void doDraw(java.awt.Graphics2D g,
                   View view,
                   Transform limits)
Draw the hyperbola. This overrides the inherited version of this method to draw the second branch of the hyperbola as well as the first.

Overrides:
doDraw in class PlaneCurveParametric
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.
limits - 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:
Exhibit.render(Graphics2D, View, Transform, ArrayList), Exhibit.computeDrawData(View, boolean, Transform, Transform)

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

drawFociAndDirectrix

protected void drawFociAndDirectrix(java.awt.Graphics2D g,
                                    View view,
                                    Transform limits,
                                    double t)
Description copied from class: ConicSection
This is overridden in the sub-classes to do the actual drawing of the extra decorations.

Specified by:
drawFociAndDirectrix in class ConicSection