|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
edu.davidson.tools.SApplet
eField4.EField
EField is part of the Davidson College Physlets project. EField plots electric fields given a potential function and/or point charges. Both fixed charges and moving test charges can be specified using "add" methods.
The following embedding parameters are defined:
Parameter | Value | Data Type | Description |
---|---|---|---|
FPS | 10 | double | Frames per second during animation. |
dt | 0.1 | double | Animation time step per frame. |
ShowControls | true | boolean | Show VCR buttons at bottom of applet. |
ShowContours | true | boolean | Show equipotential contours. |
ShowPoles | true | boolean | Show fixed charges. |
ShowLabels | true | boolean | Add labels to contour lines. |
ShowFieldLines | false | boolean | Draw field lines. Computationally EXPENSIVE |
ShowFieldVectors | true | boolean | Draw direction arrows to represent field. |
PointChargeMode | true | boolean | Select between point charge and line charge mode. Use 1/(r*r) dependence for fixed charge if true. Use 1/r dependence if false. |
PixPerUnit | 10 | double | Conversion from pixel units to world units. |
GridUnit | 1.0 | double | The grid spacing. A value of 0 will suppress the grid. |
Potential | 0 | string | The potential function, U(x,y). |
Range | -1,1,-1,1 | string | Approximate x and y coordinate range. X range takes precedence to insure 1:1 aspect ratio. MUST be a string: "-1,1,-1,1" |
GridSize | 64 | (Not Implemented.) |
Various objects in EField implement the data source interface. This interface, SDataSource, enables inter-applet data passing between Physlets.
Object | Identifier | Variables |
---|---|---|
Fixed Charges. | The id is returned when an object is created using an add
method. id=addCharge(double x, double y, double m) |
t, x, y, vx, vy, ax, ay, fx, fy, p, m, q Note: p is the potential and q is the magnitude of the charge. |
All shapes: circle, rectangle, box, etc. | The id is returned when an object is created using an add method. | t, x, y, vx, vy, ax, ay |
clock | id=getClockID() | t |
Methods to access the animation clock can be found in the superclass documentation, SApplet.
Field Summary |
Fields inherited from class edu.davidson.tools.SApplet |
destroyed |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
int |
addBox(double x,
double y,
int width,
int height)
Adds a box. |
int |
addCharge(double x,
double y,
double q)
Add a fixed charge. |
int |
addCircle(double x,
double y,
int radius)
Adds a filled circle. |
int |
addImage(java.lang.String file,
double x,
double y)
Adds an image to the animation. |
int |
addLineAnchor(int id,
double x,
double y)
Adds a line from a point(x,y) to an object on the screen. |
int |
addObject(java.lang.String name,
java.lang.String parList)
Create an object and add it to the Physlet. |
int |
addPolyShape(int n,
java.lang.String hStr,
java.lang.String vStr,
double x,
double y)
Adds a polygon to the animation. |
int |
addRectangle(double x,
double y,
int width,
int height)
Add a filled rectangle. |
int |
addRelPolyShape(int n,
java.lang.String hStr,
java.lang.String vStr,
double x,
double y)
Add a polygon to the animation. |
int |
addShell(double x,
double y,
int radius)
Adds a spherical shell. |
int |
addSpringAnchor(int id,
double x,
double y)
Adds a spring from a point(x,y) to an object on the screen. |
int |
addTestCharge(double x,
double y,
double vx,
double vy)
Adds a test charge. |
void |
clearSeries(int s)
Clear the data from a graph series. |
void |
deleteCharges()
Deletes the fixed charges. |
void |
deleteDataConnection(int id)
Break the data connection identified by the id. |
void |
deleteDataConnections()
Break all data connections. |
void |
deleteObject(int id)
Delete an object from the applet. |
void |
deleteSeries(int s)
Delete a series from the graph |
void |
deleteTestCharges()
Deletes the test charges. |
void |
forward()
Resume the simulation with a positive time step. |
int |
getCollisionID()
Gets the id for collisions. |
int |
getGraphID()
Gets the series ID for the graph object. |
int |
getSeriesID(int sid)
Gets the series ID, that is the hashcode, from a series number. |
double |
getTime()
Gets the y velocity of an object. |
double |
getVX(int id)
Gets the x velocity of an object. |
double |
getVY(int id)
Gets the y velocity of an object. |
double |
getX(int id)
Gets the x position of an object. |
double |
getXPos(int id)
Bug-fix to get the x of an object on Netscape and Sun. |
double |
getY(int id)
Gets the y position of an object. |
double |
getYPos(int id)
Bug-fix to get the y of an object on Netscape and Sun. |
int |
makeDataConnection(int sourceID,
int listenerID,
int seriesID,
java.lang.String xStr,
java.lang.String yStr)
Make a data connection between a data source, i.e. a charge, and a data listener. |
void |
pause()
Pause the simulation |
void |
reset()
Reset the initial conditions at time t=0. |
void |
reverse()
Resume the simulation with a negative time step. |
boolean |
set(int id,
java.lang.String name,
java.lang.String parList)
Change the properies of an object. |
boolean |
setAnimationSlave(int masterID,
int slaveID)
Force an object to follow another object on the screen. |
void |
setAutoRefresh(boolean ar)
Repaint whenevers the system parameters are changed. |
void |
setBz(double bz)
Sets the z component of the magnetic field. |
void |
setCaption(java.lang.String c)
Sets the caption. |
void |
setChargeLabel(java.lang.String l)
Sets the charge label. |
boolean |
setChargeMagnitude(int id,
double mag)
Sets the magnitude for a charge. |
void |
setChargeRGB(int r,
int g,
int b)
Sets the color for new charges. |
void |
setChargeTrail(int t)
Sets the animation the default trail length. |
void |
setCollisionMessage(java.lang.String msg)
Display a message in the yellow message box. |
boolean |
setConstrainR(int id,
double r,
double x,
double y)
Constrain the motion of the test charges to a circular path. |
boolean |
setConstraintStr(int id,
java.lang.String str,
double xmin,
double xmax)
Constrain the motion of the test charges to a path given my F(x). |
boolean |
setConstrainX(int id,
double x,
double xmin,
double xmax)
Constrain the motion of the test charges to a path of constant x. |
boolean |
setConstrainY(int id,
double y,
double ymin,
double ymax)
Constrain the motion of the test charges to a path of constant y. |
boolean |
setDamping(int id,
double d)
Sets the color for an object. |
void |
setDampOnMousePressed(boolean damp)
Sets the velocity of an object to zero if it is being dragged. |
void |
setDefault()
Sets the default conditions. |
boolean |
setDisplayOffset(int id,
int xOff,
int yOff)
Offset the object's position on the screen from its default drawing position. |
void |
setDrag(boolean drag)
Sets drag for all subsequently created charges. |
boolean |
setDragable(int id,
boolean drag)
Make the object with the given id dragable. |
void |
setFieldResolution(int r)
Sets the field resolution determines how the spacing of the field vectors on the grid. |
boolean |
setFont(int id,
java.lang.String family,
int style,
int size)
change the object's font for any text that is displayed. |
boolean |
setFootPrints(int id,
int n)
Sets the trail to leave footprints as the charge moves. |
boolean |
setFormat(int id,
java.lang.String fstr)
Change the object's format for the display of numeric data. |
boolean |
setGhost(int id,
boolean ghost)
Have the charge draw ghost images as it moves. |
void |
setGridSize(int n)
Sets the grid size for the evaluation of the potential energy. |
void |
setHideCharge(boolean hc)
Hide all charges. |
boolean |
setLabel(int id,
java.lang.String label)
Make the object label. |
boolean |
setMass(int id,
double m)
Sets the mass of an object. |
void |
setMaxTime(double max,
java.lang.String msg)
Stop the simulation at a predetermined time and display a message for the user. |
boolean |
setObjectFont(int id,
java.lang.String family,
int style,
int size)
Sets the object's font if the object has text that can be displayed. |
boolean |
setOnScreenSize(int id,
int size)
Sets the size for an object. |
void |
setPointChargeMode(boolean pcm)
Sets point charge to produce 1/(r*r) field. |
void |
setPotential(java.lang.String ps,
double xmin,
double xmax,
double ymin,
double ymax)
Sets the potential function. |
boolean |
setRGB(int id,
int r,
int g,
int b)
Sets the color for an object. |
void |
setSeriesRGB(int id,
int r,
int g,
int b)
Sets the series line and marker color. |
void |
setSeriesStyle(int id,
boolean conPts,
int m)
Sets the series style for the graoh object. |
void |
setShowCharge(boolean sc)
Display all fixed charges on the screen. |
void |
setShowConstraintPath(int id,
boolean sc)
Show a the constraint function that test particles must follow. |
void |
setShowContours(boolean sc)
Show the contour lines. |
void |
setShowCoordOnDrag(boolean sc)
Show the coordinates on a mouse drag. |
void |
setShowEOnDrag(boolean se)
Show the field at the mouse postion on a mouse drag. |
void |
setShowEquipotentialOnClick(boolean sp)
Draw equipotential starting at the mouse click. |
void |
setShowEquipotentialOnDoubleClick(boolean sp)
Draw equipotential starting at the mouse double click. |
boolean |
setShowFComponents(int id,
boolean sc)
Enable the charge force vector to show components when it is drawn. |
void |
setShowFieldLineOnClick(boolean sfl)
Draw a field line starting at the mouse click. |
void |
setShowFieldLineOnDoubleClick(boolean sfl)
Draw a field line starting at the mouse double click. |
void |
setShowFieldLines(boolean sfl)
Show the field lines. |
void |
setShowFieldVectors(boolean sfv)
Show the direction field vectors. |
boolean |
setShowFOnDrag(int id,
boolean sfm)
Enable the charge to show the force magnitude in the message box. |
void |
setShowForce(boolean sf)
Show the default to show the force vector on all subsequently created test charges. |
boolean |
setShowFVector(int id,
boolean sf)
Enable the charge to show the net force vector when it is drawn. |
void |
setShowLabels(boolean sl)
Show the contour labels. |
void |
setShowTime(boolean st)
Show the simulation time. |
boolean |
setShowVComponents(int id,
boolean svc)
Enable the charge velocity vector to show components when it is drawn. |
void |
setShowVelocity(boolean sv)
Show the default to show the velocity vector on newly created test charges. |
void |
setShowVOnDrag(boolean sv)
Show the potential at the mouse postion on a mouse drag. |
boolean |
setShowVVector(int id,
boolean sv)
Enable the charge to show the net velocity vector when it is drawn. |
int |
setSketchMode(boolean sketch)
Enable sketching with the mouse. |
boolean |
setSpeed(int id,
double speed)
Change the speed of a test charge. |
boolean |
setSticky(int id,
boolean isSticky)
Make the object stickey so that collisions stop the animation. |
void |
setTimeContinuous()
Let the simulation continue forever. |
void |
setTimeCycle(double max)
Cycle the simulation |
void |
setTimeOneShot(double max,
java.lang.String msg)
Run the simulaiton one time. |
void |
setTimeVisibility(boolean visible)
Enable the time display in the applet window. |
void |
setTolerance(double t)
Sets the tolerance for the animation calculations. |
boolean |
setTrail(int id,
int pts)
Sets the trail behind a charge. |
boolean |
setTrajectory(int id,
java.lang.String xStr,
java.lang.String yStr)
Sets the trajectory of a pole. |
boolean |
setVisibility(int id,
boolean show)
Show the visibility of the object. |
boolean |
setX(int id,
double x)
Sets the x position of an object. |
boolean |
setXPos(int id,
double x)
|
void |
setXRange(double xmin,
double xmax)
Sets the scale using the horizontal axis. |
boolean |
setXY(int id,
double x,
double y)
Sets the position of an object. |
boolean |
setY(int id,
double y)
Sets the y position of an object. |
boolean |
setYPos(int id,
double y)
|
void |
setYRange(double ymin,
double ymax)
|
void |
setZColorScale(double colorScale)
Sets the color scale on the vector field. |
void |
stepBack()
|
void |
stepForward()
|
void |
stepTimeBack()
Step the simulation one negative time step. |
void |
stepTimeForward()
Step the simulation one positive time step. |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public int getGraphID()
public int getCollisionID()
public int getSeriesID(int sid)
public void setSeriesStyle(int id, boolean conPts, int m)
id
- The series id.conPts
- Connect the points?m
- Marker style. (m=1 is cross; m=2 is square, m=3 is
circle)public void deleteSeries(int s)
public void clearSeries(int s)
public double getX(int id)
id
- The id of the object.public double getY(int id)
id
- The id of the object.public double getVX(int id)
id
- The id of the object.public double getVY(int id)
id
- The id of the object.public double getTime()
public int addObject(java.lang.String name, java.lang.String parList)
addObject ("circle", "x = 0, y = -1.0, r = 10");
name
- the type of object to be created.parList
- a list of parameters to be set
public int addTestCharge(double x, double y, double vx, double vy)
x
- The x position.y
- The xy position.vx
- The x velocity.vy
- The y velocity.
public int addCharge(double x, double y, double q)
x
- The x position.y
- The y position.q
- The magnitude of the charge.
public int addRectangle(double x, double y, int width, int height)
x
- The x position.y
- The y position.width
- The width of the rectangle in pixels.height
- The height of the rectangle in pixels.
public int addBox(double x, double y, int width, int height)
x
- The x position.y
- The y position.width
- The width of the box in pixels.height
- The height of the box in pixels.
public int addLineAnchor(int id, double x, double y)
x
- The x position.y
- The y position.
public int addImage(java.lang.String file, double x, double y)
file
- Location of image relative to the document
containing the HTML page.public int addSpringAnchor(int id, double x, double y)
x
- The x position.y
- The y position.
public int addCircle(double x, double y, int radius)
x
- The x position.y
- The y position.
public int addShell(double x, double y, int radius)
x
- The x position.y
- The y position.
public int addPolyShape(int n, java.lang.String hStr, java.lang.String vStr, double x, double y)
n
- The number of vertices in the polygon.hStr
- A comma separated list of the x postions of the
vertices in pixel units. MUST BE A STRING.vStr
- A comma separated list of the y postions of the
vertices in pixel units. MUST BE A STRING.x
- The x position of the base.y
- The y position of the base.
EField.addRectangle(double, double, int, int)
public int addRelPolyShape(int n, java.lang.String hStr, java.lang.String vStr, double x, double y)
n
- The number of vertices in the polygon.hStr
- A comma separated list of the x postions of the
relative vertices in pixel units. MUST BE A STRING.vStr
- A comma separated list of the y postions of the
relative vertices in pixel units. MUST BE A STRING.x
- The x position of the base.y
- The y position of the base.
EField.addRectangle(double, double, int, int)
public void deleteObject(int id)
id
- the object identifier
public void deleteTestCharges()
public void deleteCharges()
public boolean setDamping(int id, double d)
id
- The ID of the object.d
- The damping coeficient in the rate equation.
F_damp=-damping*velocity.
public void setDefault()
setDefault
in class SApplet
public void setXRange(double xmin, double xmax)
xmin
- Minimuum value on x axis.xmax
- Maximum value on x axis.public void setYRange(double ymin, double ymax)
public void setZColorScale(double colorScale)
colorScale
- public double getXPos(int id)
id
- The id of the object.
public double getYPos(int id)
id
- The id of the object.
public boolean setX(int id, double x)
id
- The ID of the object.x
- The x coordinate.public boolean setXPos(int id, double x)
public boolean setY(int id, double y)
id
- The ID of the object.y
- The y coordinate.public boolean setYPos(int id, double y)
public boolean setXY(int id, double x, double y)
id
- The ID of the object.x
- The x coordinate.y
- The y coordinate.public void setDrag(boolean drag)
drag
- Drag?public void setDampOnMousePressed(boolean damp)
damp
- the velocity?public boolean setDragable(int id, boolean drag)
id
- The id of the object.drag
- Dragable?
public boolean setVisibility(int id, boolean show)
public boolean setFont(int id, java.lang.String family, int style, int size)
id
- The id of the object.family
- The font family: Helvetica, Times.style
- The style, 0=plain, 1=bold.size
- The size of the font;
public boolean setObjectFont(int id, java.lang.String family, int style, int size)
id
- The id of the object.family
- The font family: Helvetica, Times.style
- The style, 0=plain, 1=bold.size
- The size of the font;
public boolean setFormat(int id, java.lang.String fstr)
id
- The id of the object.fstr
- the format string.
public boolean setFootPrints(int id, int n)
id
- The id of the object.n
- The number of points to skip between trail
footprints or ghost images.
public void setHideCharge(boolean hc)
hc
- HidCharge parameter.public boolean setLabel(int id, java.lang.String label)
id
- The id of the object.label
- The label string.
public void setCollisionMessage(java.lang.String msg)
msg
- Message to display after the animation stops.public void setShowFieldLines(boolean sfl)
sfl
- Show field line.public void setShowFieldVectors(boolean sfv)
sfv
- Show field line vectors.public void setShowContours(boolean sc)
sc
- Show contours.public void setPointChargeMode(boolean pcm)
pcm
- Sets point charge modepublic void setShowLabels(boolean sl)
sl
- Show contour labels?public void setAutoRefresh(boolean ar)
setAutoRefresh
in class SApplet
ar
- public boolean setAnimationSlave(int masterID, int slaveID)
masterID
- The id of the master object.slaveID
- The id of the slave object.
public boolean set(int id, java.lang.String name, java.lang.String parList)
set(id, "sale", "xmin=0, xmax=2, autoscalx=false");
id
- the identifier of the objectname
- the type of property to be created.parList
- a list of parameters
public void setBz(double bz)
bz
- The magnetic field in the z directon.public void setCaption(java.lang.String c)
c
- The caption string.public void setChargeLabel(java.lang.String l)
l
- All subsequent charges will show this label in the
middle of the charge.public boolean setChargeMagnitude(int id, double mag)
id
- The ID of the object.mag
- The magnitude.public void setChargeRGB(int r, int g, int b)
r
- red.g
- green.b
- blue.public boolean setMass(int id, double m)
id
- The id of the object.m
- The new mass.
public boolean setConstraintStr(int id, java.lang.String str, double xmin, double xmax)
str
- The function string F(x).xmin
- The minimum value of the range.xmax
- The maximum value of the range.
public boolean setConstrainX(int id, double x, double xmin, double xmax)
x
- The x value.xmin
- The minimum value of the range.xmax
- The maximum value of the range.
public boolean setConstrainR(int id, double r, double x, double y)
r
- The r value.x
- The x coordinate of the centery
- The y coordinate of the center
public boolean setConstrainY(int id, double y, double ymin, double ymax)
y
- The y value.ymin
- The minimum value of the range.ymax
- The maximum value of the range.
public boolean setDisplayOffset(int id, int xOff, int yOff)
id
- The id of the object.
public void setChargeTrail(int t)
t
- The default trail points to draw in the animation
behind a moving charge.public boolean setRGB(int id, int r, int g, int b)
id
- The ID of the object.r
- red.g
- green.b
- blue.
public void setSeriesRGB(int id, int r, int g, int b)
id
- The series id.r
- red.g
- green.b
- blue.public boolean setOnScreenSize(int id, int size)
id
- The ID of the object.
public int makeDataConnection(int sourceID, int listenerID, int seriesID, java.lang.String xStr, java.lang.String yStr)
makeDataConnection
in class SApplet
sourceID
- The source ID.listenerID
- The listener ID.seriesID
- The listener ID series.xStr
- The ordinate to be passed to the data listener.yStr
- The abscissa to be passed to the data listener.
public void deleteDataConnection(int id)
deleteDataConnection
in class SApplet
id
- The data connection id.public void deleteDataConnections()
deleteDataConnections
in class SApplet
public void setShowTime(boolean st)
st
- Show the time?public void setShowCoordOnDrag(boolean sc)
sc
- Show the coordinates.public void setShowVOnDrag(boolean sv)
sv
- Show the voltage?public void setShowEOnDrag(boolean se)
se
- Show the field.public void setShowEquipotentialOnClick(boolean sp)
public void setShowEquipotentialOnDoubleClick(boolean sp)
public void setShowFieldLineOnClick(boolean sfl)
sfl
- Enable field line on click.public void setShowFieldLineOnDoubleClick(boolean sfl)
sfl
- Enable field line on double click.public void setShowConstraintPath(int id, boolean sc)
sc
- Show the path?public boolean setShowFComponents(int id, boolean sc)
id
- The ID of the charge.sc
- Show the vector?
public boolean setShowFOnDrag(int id, boolean sfm)
id
- The ID of the charge.sfm
- Show the force magnitude?public boolean setShowFVector(int id, boolean sf)
id
- The ID of the charge.sf
- Show the vector?
public void setFieldResolution(int r)
r
- the resolutionpublic void setGridSize(int n)
n
- the size of the gridpublic boolean setGhost(int id, boolean ghost)
id
- The id of the object.ghost
- Draw ghost?
public void setShowForce(boolean sf)
sf
- Show the force?public void setShowVelocity(boolean sv)
sv
- Show the velocity?public boolean setShowVComponents(int id, boolean svc)
id
- The ID of the charge.svc
- Show the vector components?
public boolean setShowVVector(int id, boolean sv)
id
- The ID of the charge.sv
- Show the velocity vector?public int setSketchMode(boolean sketch)
sketch
- true will sketch
public boolean setSticky(int id, boolean isSticky)
id
- The id of the object.
public boolean setSpeed(int id, double speed)
id
- The ID of the charge.speed
- Show new speed.
public void setShowCharge(boolean sc)
sc
- Show the charges on the screen.public boolean setTrail(int id, int pts)
id
- The ID of the object.pts
- Trail length.
public void setTimeVisibility(boolean visible)
public void setTimeContinuous()
setTimeContinuous
in class SApplet
public void setTimeCycle(double max)
setTimeCycle
in class SApplet
max
- Reset the simulation to t=0 when t>=max and
repeat the simulation.public void setTimeOneShot(double max, java.lang.String msg)
setTimeOneShot
in class SApplet
max
- Reset the simulation to t=0 when t>=max and stop the simulation.msg
- public void setTolerance(double t)
public boolean setTrajectory(int id, java.lang.String xStr, java.lang.String yStr)
id
- The ID of the pole.xStr
- The function x(t).yStr
- The function y(t).
public void setPotential(java.lang.String ps, double xmin, double xmax, double ymin, double ymax)
ps
- The potential function, f(x,y).xmin
- x minimumxmax
- x maximumymin
- approximate y minimumymax
- approximate y maximumpublic void setMaxTime(double max, java.lang.String msg)
max
- Stop the simulation when t=max and continue
simulation.msg
- Display a user message.public void pause()
pause
in class SApplet
public void forward()
forward
in class SApplet
public void reverse()
reverse
in class SApplet
public void stepTimeForward()
stepTimeForward
in class SApplet
public void stepForward()
public void stepTimeBack()
stepTimeBack
in class SApplet
public void stepBack()
public void reset()
reset
in class SApplet
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |