vmm.planecurve.parametric
Class SineCurve
java.lang.Object
vmm.core.Exhibit
vmm.planecurve.PlaneCurve
vmm.planecurve.parametric.PlaneCurveParametric
vmm.planecurve.parametric.DecoratedCurve
vmm.planecurve.parametric.SineCurve
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
public class SineCurve
- extends DecoratedCurve
Defines a sine curve as a parametric plane curve. The amplitude, frequency,
and phase of the curve are parameters that can be set by the user. By default,
the curve has amplitude 1, frequency 1, and phase 0 and is defined on the
intervale [0,2pi].
Method Summary |
protected void |
drawNeededStuff(java.awt.Graphics2D g,
View view,
Transform limits,
double t)
|
double |
xValue(double t)
Define the x-coordinate function x(t) = t for the parametric curve. |
double |
yValue(double t)
Define the y-coordinate function y(t) = a*sin(f*(t-p)), where a is the amplitude, f is the
frequency, and p is the phase. |
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, 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 |
SineCurve
public SineCurve()
xValue
public double xValue(double t)
- Define the x-coordinate function x(t) = t for the parametric curve.
- Specified by:
xValue
in class PlaneCurveParametric
yValue
public double yValue(double t)
- Define the y-coordinate function y(t) = a*sin(f*(t-p)), where a is the amplitude, f is the
frequency, and p is the phase.
- Specified by:
yValue
in class PlaneCurveParametric
drawNeededStuff
protected void drawNeededStuff(java.awt.Graphics2D g,
View view,
Transform limits,
double t)
- Specified by:
drawNeededStuff
in class DecoratedCurve