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.


Variable Index

 o centerline
The parametrized curve giving the centerline of the squiggle.
 o curve
The parametrized curve whose graph is the squiggle.
 o from
The starting point of the squiggle in user coordinates.
 o height
The height of the squiggle (maximum distance from the straight line segment joining the ends) in usr coordinates.
 o nobumps
The number of half periods of sin in the squiggle.
 o normal
The pseudonormal direction to the centerline curve.
 o to
The end point of the squiggle in user coordinates.

Constructor Index

 o fSquiggle()
 o fSquiggle(double, double, double, double)
Creates a squiggly line with initial point (x1,y1) and final point (x2,y2), both in user coordinates.
 o 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.
 o fSquiggle(double[], double[])
Creates a squiggly line with initial point from[] and final point to[], both in user coordinates.
 o fSquiggle(double[], double[], double, int)
Creates a squiggly line with initial point from[] and final point to[], both in user coordinates.
 o 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.
 o 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.

Method Index

 o configure(String, double)
 o configure(String, double[])
 o configure(String, String)
 o drawgfx(Figure, Hashtable, V2V)
 o drawps(Figure, Hashtable, V2V)
 o endEdit()
 o endEditAndDelete()
 o 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.
 o mouseClicked(MouseEvent)
 o mouseDragged(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mouseMoved(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o startEdit(figEdit)
 o toString()

Variables

 o from
 public double from[]
The starting point of the squiggle in user coordinates.

 o to
 public double to[]
The end point of the squiggle in user coordinates.

 o height
 public double height
The height of the squiggle (maximum distance from the straight line segment joining the ends) in usr coordinates.

 o nobumps
 public int nobumps
The number of half periods of sin in the squiggle.

 o curve
 public fCurve curve
The parametrized curve whose graph is the squiggle.

 o centerline
 public S2V centerline
The parametrized curve giving the centerline of the squiggle.

See Also:
fSquiggle
 o normal
 public S2V normal
The pseudonormal direction to the centerline curve.

See Also:
fSquiggle

Constructors

 o fSquiggle
 public fSquiggle()
 o fSquiggle
 public fSquiggle(double from[],
                  double to[])
Creates a squiggly line with initial point from[] and final point to[], both in user coordinates.

 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

Methods

 o 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.

 o drawgfx
 public void drawgfx(Figure fig,
                     Hashtable env,
                     V2V usr2pxl)
 o drawps
 public String drawps(Figure fig,
                      Hashtable env,
                      V2V usr2ps)
 o startEdit
 public void startEdit(figEdit applet)
 o endEdit
 public void endEdit()
 o endEditAndDelete
 public void endEditAndDelete()
 o mouseClicked
 public void mouseClicked(MouseEvent evt)
 o mousePressed
 public void mousePressed(MouseEvent evt)
 o mouseDragged
 public void mouseDragged(MouseEvent evt)
 o mouseReleased
 public void mouseReleased(MouseEvent evt)
 o mouseEntered
 public void mouseEntered(MouseEvent evt)
 o mouseExited
 public void mouseExited(MouseEvent evt)
 o mouseMoved
 public void mouseMoved(MouseEvent evt)
 o configure
 public void configure(String name,
                       String Value)
 o configure
 public void configure(String name,
                       double Value)
 o configure
 public void configure(String name,
                       double Value[])
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index