All Packages Class Hierarchy This Package Previous Next Index
Class figPac.fSquiggle
java.lang.Object
|
+----figPac.fSquiggle
- public class fSquiggle
- extends Object
- implements fElement, S2V, fInteractive, MouseListener, MouseMotionListener
Each instance of the class fSquiggle represents a squiggly line.
-
centerline
- The parametrized curve giving the centerline of the squiggle.
-
curve
- The parametrized curve whose graph is the squiggle.
-
from
- The starting point of the squiggle in user coordinates.
-
height
- The height of the squiggle (maximum distance from the straight line segment
joining the ends) in usr coordinates.
-
nobumps
- The number of half periods of sin in the squiggle.
-
normal
- The pseudonormal direction to the centerline curve.
-
to
- The end point of the squiggle in user coordinates.
-
fSquiggle()
-
-
fSquiggle(double, double, double, double)
- Creates a squiggly line with initial point (x1,y1)
and final point (x2,y2), both in user coordinates.
-
fSquiggle(double, double, double, double, double, int)
- Creates a squiggly line with initial point (x1,y1)
and final point (x2,y2), both in user coordinates.
-
fSquiggle(double[], double[])
- Creates a squiggly line with initial point from[]
and final point to[], both in user coordinates.
-
fSquiggle(double[], double[], double, int)
- Creates a squiggly line with initial point from[]
and final point to[], both in user coordinates.
-
fSquiggle(S2V, S2V, double, double, double, int)
- Creates the squiggly line with centerline and pseudonormal given by
the first two arguments, parameter range for the centerline and pseudonormal given
by the third and fourth arguments, height given by the fifth argument and number of bumps given
by the final argument.
-
fSquiggle(S2V, S2V, double, int)
- Creates the squiggly line with centerline and pseudonormal given by
the first two arguments, height given by the third argument and number of bumps given
by the final argument.
-
configure(String, double)
-
-
configure(String, double[])
-
-
configure(String, String)
-
-
drawgfx(Figure, Hashtable, V2V)
-
-
drawps(Figure, Hashtable, V2V)
-
-
endEdit()
-
-
endEditAndDelete()
-
-
map(double)
- Returns "centerline((1-t)*tmin+t*tmax) + height * Math.sin(Math.PI*nobumps*t) * normal((1-t)*tmin+t*tmax)", if the user
has supplied centerline and normal, and
"from + (to-from)*t + height * Math.sin(Math.PI*nobumps*t) * normal" otherwise.
-
mouseClicked(MouseEvent)
-
-
mouseDragged(MouseEvent)
-
-
mouseEntered(MouseEvent)
-
-
mouseExited(MouseEvent)
-
-
mouseMoved(MouseEvent)
-
-
mousePressed(MouseEvent)
-
-
mouseReleased(MouseEvent)
-
-
startEdit(figEdit)
-
-
toString()
-
from
public double from[]
- The starting point of the squiggle in user coordinates.
to
public double to[]
- The end point of the squiggle in user coordinates.
height
public double height
- The height of the squiggle (maximum distance from the straight line segment
joining the ends) in usr coordinates.
nobumps
public int nobumps
- The number of half periods of sin in the squiggle.
curve
public fCurve curve
- The parametrized curve whose graph is the squiggle.
centerline
public S2V centerline
- The parametrized curve giving the centerline of the squiggle.
- See Also:
- fSquiggle
normal
public S2V normal
- The pseudonormal direction to the centerline curve.
- See Also:
- fSquiggle
fSquiggle
public fSquiggle()
fSquiggle
public fSquiggle(double from[],
double to[])
- Creates a squiggly line with initial point from[]
and final point to[], both in user coordinates.
fSquiggle
public fSquiggle(double x1,
double y1,
double x2,
double y2)
- Creates a squiggly line with initial point (x1,y1)
and final point (x2,y2), both in user coordinates.
fSquiggle
public fSquiggle(double from[],
double to[],
double height,
int nobumps)
- Creates a squiggly line with initial point from[]
and final point to[], both in user coordinates. The height and number of bumps
are given by the last two arguments.
fSquiggle
public fSquiggle(double x1,
double y1,
double x2,
double y2,
double height,
int nobumps)
- Creates a squiggly line with initial point (x1,y1)
and final point (x2,y2), both in user coordinates. The height and number of bumps
are given by the last two arguments.
fSquiggle
public fSquiggle(S2V centerline,
S2V normal,
double height,
int nobumps)
- Creates the squiggly line with centerline and pseudonormal given by
the first two arguments, height given by the third argument and number of bumps given
by the final argument. The squiggly line consist of the curve
curve(t) = centerline(t) + height * Math.sin(Math.PI*nobumps*t) * normal(t) ;
with parameter value running from 0 to 1. Note that curve(t), centerline(t) and normal(t)
are all two component arrays.
fSquiggle
public fSquiggle(S2V centerline,
S2V normal,
double tmin,
double tmax,
double height,
int nobumps)
- Creates the squiggly line with centerline and pseudonormal given by
the first two arguments, parameter range for the centerline and pseudonormal given
by the third and fourth arguments, height given by the fifth argument and number of bumps given
by the final argument. The squiggly line consist of the curve
curve(t) = centerline((1-t)*tmin+t*tmax) + height * Math.sin(Math.PI*nobumps*t) * normal((1-t)*tmin+t*tmax) ;
with parameter value running from 0 to 1. Note that curve(t), centerline(t) and normal(t)
are all two component arrays.
map
public double[] map(double t)
- Returns "centerline((1-t)*tmin+t*tmax) + height * Math.sin(Math.PI*nobumps*t) * normal((1-t)*tmin+t*tmax)", if the user
has supplied centerline and normal, and
"from + (to-from)*t + height * Math.sin(Math.PI*nobumps*t) * normal" otherwise. In the
latter case, normal is a unit vector perpendicular to the vector joining from and to.
drawgfx
public void drawgfx(Figure fig,
Hashtable env,
V2V usr2pxl)
drawps
public String drawps(Figure fig,
Hashtable env,
V2V usr2ps)
startEdit
public void startEdit(figEdit applet)
endEdit
public void endEdit()
endEditAndDelete
public void endEditAndDelete()
mouseClicked
public void mouseClicked(MouseEvent evt)
mousePressed
public void mousePressed(MouseEvent evt)
mouseDragged
public void mouseDragged(MouseEvent evt)
mouseReleased
public void mouseReleased(MouseEvent evt)
mouseEntered
public void mouseEntered(MouseEvent evt)
mouseExited
public void mouseExited(MouseEvent evt)
mouseMoved
public void mouseMoved(MouseEvent evt)
configure
public void configure(String name,
String Value)
configure
public void configure(String name,
double Value)
configure
public void configure(String name,
double Value[])
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index