@physletName|QTime
@code|qTime.QTime.class
@archive|QTime4_.jar,STools4.jar
@appletSize|400|300
@scriptHeader|setAutoRefresh(false);setEnergyOffset(false);
@scriptFooter|setAutoRefresh(true);
@embedParam|b|ShowControls|false|show controls:
@embedParam|d|minX|-10|xmin:
@embedParam|d|maxX|10|xmax:
@embedParam|i|FPS|10|animation frames per second:
@embedParam|i|numPts|512|calculated points:
@embedParam|d|dt|0.02|time step per frame:
@embedParam|s|caption||Caption:
@embedParam|s|potential|0|initial potential:
@embedParam|s|real|0|initial real part:
@embedParam|s|imaginary|0|initial imaginary part:
getWavefunctionID|wave
#FF707D
>>> tt >>>
Get a handle (name) for the wavefunction object.
Creates a variable that can be used in data connections to send data e.g. to a DataGraph applet.
>>> tt >>>
Get wave object
setReal|
#FFDA92
>>> tt >>>
Set real part of the wave function as a function of x and t.
>>> tt >>>
Set wave Re
s|f|cos(2*pi*x)*exp(-2*sqr(x+6))|Re(x,t):
setImaginary|
#FFDA92
>>> tt >>>
Set imaginary part of the wave function as a function of x and t.
>>> tt >>>
Set wave Im
s|f|sin(2*pi*x)*exp(-2*sqr(x+6))|Im(x,t):
setPotential|
#FFDA92
>>> tt >>>
a function of x for the potential in which the wave propagates
>>> tt >>>
Set potential
s|f|20*(step(1+x)-step(x-1))|V(x,t):
pause|
#FFFF70
>>> tt >>>
Freeze the animation.
Creating a new script "Pause" with just this command will result in an appropriate button.
>>> tt >>>
Pause
forward|
#FFFF70
>>> tt >>>
Start clock. Resume after "pause".
Creating a new script "Forward" with just this command will result in an appropriate button.
>>> tt >>>
Forward
stepForward|
#FFFF70
>>> tt >>>
Forward the animation one time step dt.
Creating a new script "Forward" with just this command will result in an appropriate button.
>>> tt >>>
Step forward
stepTimeBack|
#FFFF70
>>> tt >>>
Step the time backward by dt.
Creating a new script "Back" with just this command will result in an appropriate button.
>>> tt >>>
Step backward
reset|
#FFFF70
>>> tt >>>
Reset the clock to time=0.
>>> tt >>>
Reset
setCaption|
#CCFFCC
>>> tt >>>
Set a title that will be displayed in the QTime applet
>>> tt >>>
Title
s|s||text:
setShowAxes|
#CCFFCC
>>> tt >>>
Show or hide the the X and Y axes on the graph.
>>> tt >>>
Show axes
f|show|false|axes are visible:
setShowPotential|
#CCFFCC
>>> tt >>>
Show or hide the potential.
>>> tt >>>
Show_Potential
b|show|false|potential is visible:
setYMinMax|
#B3EFFF
>>> tt >>>
Set the range of the y axis.
>>> tt >>>
Y range
d|min|-10|ymin:
d|max|10|ymax:
setYAutoscaleOn|
#B3EFFF
>>> tt >>>
The y range will zoom automatically to display all values.
>>> tt >>>
Autoscale on
setYAutoscaleOff|
#B3EFFF
>>> tt >>>
Use fixed y range.
>>> tt >>>
Autoscale off
@physletName|DataGraph
@code|dataGraph.DataGraph.class
@archive|DataGraph4_.jar,STools4.jar
@appletSize|400|200
@scriptHeader|setAutoRefresh(false);
@scriptFooter|setAutoRefresh(true);
@embedParam|b|ShowControls|false|show controls:
@embedParam|b|AutoScaleX|false|AutoScaleX:
@embedParam|b|AutoScaleY|false|AutoScaleY:
getGraphID|graph
#FF707D
>>> tt >>>
This command gives you a handle (ID) for the graph in this applet in a variable called "graph.."
>>> tt >>>
Get graph
addObject|id
#FFDA92
>>> tt >>>
Add a graph of an analytic function.
f - String of the function. Usually f(x) or f(x,t).
var - String the independent variable
Functions can be explicit functions of time. The function will animate if the clock is running.
xmin - minimum value for the independent variable
xmax - maximum value for the independent variable
A function will use the graph's current xmin and xmax values if the following are not specified.
n - int the number of evaluation points
>>> tt >>>
function
s|name|function|HIDDEN
$
.|s|f|0.3|function:
.|s|var|x|independent var:
.|d|xmin||
xmin:
.|d|xmax||xmax:
.|i|n|100|points:
setRGB|
#FFDA92
>>> tt >>>
Set the color of the object.
>>> tt >>>
color
o|id||id:
i|r|1|r:
i|g|1|g:
i|b|1|b:
setMinMaxX|
#FFFF99
>>> tt >>>
Set the x axis minimum and maximum values. No effect if AutoscaleX is true.
>>> tt >>>
x range
d|xmin|-10|xmin:
d|xmax|10|xmax:
setMinMaxY|
#FFFF99
>>> tt >>>
Set the y axis minimum and maximum values. No effect if autoscale is true.
>>> tt >>>
y range
d|ymin|-10|ymin:
d|ymax|10|ymax:
setAutoscaleX|
#FFFF99
>>> tt >>>
Default: X axis extends automatically when values get out of range.
Set AutoscaleY to false to fix the initial range limits.
>>> tt >>>
Autoscale x
b|autoOn|true|Autoscale on:
setAutoscaleY|
#FFFF99
>>> tt >>>
Default: Y axis extends automatically when values get out of range.
Set AutoscaleY to false to fix the initial range limits.
>>> tt >>>
Autoscale y
b|autoOn|true|Autoscale on:
clearAllSeries|
#CCFFCC
>>> tt >>>
Clear all data from the graph.
>>> tt >>>
clear
setSeriesRGB|
#CCFFCC
>>> tt >>>
Set the series line and marker color.
>>> tt >>>
series color
i|id|1|series number:
i|r|1|r:
i|g|1|g:
i|b|1|b:
setSeriesStyle|
#CCFFCC
>>> tt >>>
Set the series style.
points can be connected or not.
marker: 0 for no marker, 1 for crosses, 2 for squares (default), 3 for circles
>>> tt >>>
series style
i|id|1|series number:
b|conPts|true|connect points:
i|m|1|marker:
setAutoReplaceData|
#CCFFCC
>>> tt >>>
Disables the clearSeries function so that new data will replace a dataset when the addData method is called.
>>> tt >>>
AutoReplaceData
i|id|1|series number:
b|auto|true|auto:
setTitle|
#B3EFFF
>>> tt >>>
Set title.
>>> tt >>>
Title
s|title||text:
setLabelX|
#B3EFFF
>>> tt >>>
Set label of x axis.
>>> tt >>>
x label
s|xlabel||text:
setLabelY|
#B3EFFF
>>> tt >>>
Set label of y axis.
>>> tt >>>
Y label
s|ylabel||text:
setShowAxes|
#B3EFFF
>>> tt >>>
Show or hide the the X and Y axes on the graph.
>>> tt >>>
show axes
b|show|true|show:
setStripChart|
#B3EFFF
>>> tt >>>
Set strip chart mode (moving window of a given width) paced by the specified series.
>>> tt >>>
setStripChart
i|sid|1|series:
i|numPts|10|width (data points):
b|stripChart|true|enabled:
setAutoRefresh|
#E9D3FF
>>> tt >>>
Set the autoRefresh property. Automatic repaint if true.
>>> tt >>>
AutoRefresh
b|auto|true|Automatic repaint: