All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class figPac.fCoil

java.lang.Object
   |
   +----figPac.fCoil

public class fCoil
extends Object
implements fElement, S2V, fInteractive, MouseListener, MouseMotionListener
Each instance of the class fCoil represents a coil or inductor.


Variable Index

 o centerfrac
The fraction of the way along the wire of the center of the coil.
 o curve
The parametrized curve whose graph is the squiggle.
 o from
The starting point of the wire in user coordinates.
 o height
The height of the coil (maximum distance from the straight line segment joining the ends) in usr coordinates.
 o length
The length of the coil in usr coordinates.
 o nobumps
The number of half periods in the coil.
 o pitch
Controls the amount of backtracking in the coil.
 o to
The end point of the wire in user coordinates.

Constructor Index

 o fCoil()
 o fCoil(double, double, double, double)
Creates a coil line with initial point (x1,y1) and final point (x2,y2), both in user coordinates.
 o fCoil(double, double, double, double, double, double, double, int)
Creates a coil with initial point (x1,y1) and final point (x2,y2), both in user coordinates.
 o fCoil(double, double, double, double, double, int)
Creates a coil with initial point (x1,y1) and final point (x2,y2), both in user coordinates.
 o fCoil(double[], double[])
Creates a coil with initial point from[] and final point to[], both in user coordinates.
 o fCoil(double[], double[], double, double, double, int)
Creates a coil line with initial point from[] and final point to[], both in user coordinates.
 o fCoil(double[], double[], double, int)
Creates a coil line with initial point from[] and final point to[], both in user coordinates.

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 a straight line from (x0,y0) to (x1,y1) for t between -1 and 0, a straight line from (x2,y2) to (x3,y3) for t between tmax-1 and tmax and a coil ( t+pitch*(cos(t*PI)-1), height*sin(t*PI) ), first scaled horizontally and then rotated and translated to run from (x1,y1) to (x2,y2), for t between 0 and tmax-1.
 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 wire in user coordinates.

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

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

 o length
 public double length
The length of the coil in usr coordinates.

 o centerfrac
 public double centerfrac
The fraction of the way along the wire of the center of the coil.

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

 o pitch
 public double pitch
Controls the amount of backtracking in the coil.

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

Constructors

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

 o fCoil
 public fCoil(double x1,
              double y1,
              double x2,
              double y2)
Creates a coil line with initial point (x1,y1) and final point (x2,y2), both in user coordinates.

 o fCoil
 public fCoil(double from[],
              double to[],
              double height,
              int nobumps)
Creates a coil 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 fCoil
 public fCoil(double x1,
              double y1,
              double x2,
              double y2,
              double height,
              int nobumps)
Creates a coil 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 fCoil
 public fCoil(double from[],
              double to[],
              double length,
              double height,
              double centerfrac,
              int nobumps)
Creates a coil line with initial point from[] and final point to[], both in user coordinates. The length, height, centerfrac and number of bumps of the coil are given by the last four arguments.

Parameters:
from - The intial point of the wire containing the coil.
to - The final point of the wire containing the coil.
length - The length of the coil, in usr units.
height - The height of the coil (maximum distance from the straight line segment joining the ends) in usr coordinates.
centerfrac - The center of the coil is this fraction of the way along the wire.
nobumps - The number of half periods in the coil.
 o fCoil
 public fCoil(double x1,
              double y1,
              double x2,
              double y2,
              double length,
              double height,
              double centerfrac,
              int nobumps)
Creates a coil 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.

Parameters:
x1 - The x-coordinate of the intial point of the wire containing the coil.
y1 - The y-coordinate of the intial point of the wire containing the coil.
x2 - The x-coordinate of the final point of the wire containing the coil.
y2 - The y-coordinate of the final point of the wire containing the coil.
length - The length of the coil, in usr units.
height - The height of the coil (maximum distance from the straight line segment joining the ends) in usr coordinates.
centerfrac - The center of the coil is this fraction of the way along the wire.
nobumps - The number of half periods in the coil.

Methods

 o map
 public double[] map(double t)
Returns a straight line from (x0,y0) to (x1,y1) for t between -1 and 0, a straight line from (x2,y2) to (x3,y3) for t between tmax-1 and tmax and a coil ( t+pitch*(cos(t*PI)-1), height*sin(t*PI) ), first scaled horizontally and then rotated and translated to run from (x1,y1) to (x2,y2), for t between 0 and tmax-1.

 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