@physletName|Ripple
@code|ripple.Ripple.class
@archive|Ripple4_.jar,STools4.jar
@appletSize|300|300
@embedParam|b|ShowControls|false|show controls:
@embedParam|i|FPS|10|animation frames per second:
@embedParam|i|PixPerUnit|10|pixels per unit:
@embedParam|d|wavelength|2.0|on-screen grid unit:
@embedParam|b|ShowIntensity|false|show intensity:
@embedParam|s|Caption|Ripple Tank|caption:
addObject|id
#FF707D
>>> tt >>>
A point source.
>>> tt >>>
Add source
s|name|source|HIDDEN
$
.|d|x|0|x:
.|d|y|0|y:
.|d|amp|1.0|amp:
.|d|phase|0|phase:
.|i|r||radius:
addObject|id
#FF707D
>>> tt >>>
A static shape.
You can use the ID to change a shape's properties with an appropriate command.
>>> tt >>> Add shape s|flag|circle;rectangle;box;shell;cursor|shape: $ .|d|x|1.0|x: .|d|y|0.5|y: .|i|w||width: .|i|h||heigth: .|i|r||radius: addObject|id #FF707D >>> tt >>> Display a text string at position x,y >>> tt >>> Add text s|name|text|HIDDEN $ .|d|x|0|x: .|d|y|0|y: .|s|text|some text|text: addObject|id #FF707D >>> tt >>> A arrow with horizontal, h, and vertical, v, components. >>> tt >>> Add arrow s|name|arrow|HIDDEN $ .|d|x|0.0|x: .|d|y|0.0|y: .|d|h|1.0|h: .|d|v|1.0|v: .|d|s||s: addObject|id #FF707D >>> tt >>> An image file. >>> tt >>> Add image s|name|image|HIDDEN $ .|d|x|3.0|x: .|d|y|0.5|y: .|s|file|smile.gif|file: addObject|id #FF707D >>> tt >>> Create a constraint. The constraint id can be used with any object to limit the area within which the objected can be dragged. (See assign constraint.) >>> tt >>> Add constraint s|name|constraint|HIDDEN $ .|d|xmin|-1.0|xmin: .|d|xmax|1.0|xmax: .|d|ymin|-1.0|ymin: .|d|ymax|1.0|ymax: setConstraint| #FFFF70 >>> tt >>> Restrict the possible movements of an object to a region that is specified as a "constraint" in a separate command. >>> tt >>> Assign constraint o|id||This object: o|constraintid||is restricted by this constraint (as defined above): setDragable| #FFFF99 >>> tt >>> Make an object dragable or not dragable. Objects are dragable by default. >>> tt >>> make dragable o|id||This object: b|drag|true|is dragable: setVisibility| #FFFF99 >>> tt >>> Makes an object visible of invisible. The object is not destroyed; it is hidden and can be made visible at any time. >>> tt >>> Visibility o|id||This object: b|show|true|is visible: setRGB| #FFFF99 >>> tt >>> Set the color of an object using a mixture of red (r), green (g), and blue (b). Primary colors are in the range 0...255. >>> tt >>> Color o|id||This object: i|r|255|has color components r: i|g|0|g: i|b|0|b: deleteAll| #FFFFFF >>> tt >>> Delete all sources and geometric shapes. >>> tt >>> deleteAll setDefault| #CCFFCC >>> tt >>> Remove all objects and set default conditions. This method is usually called at the beginning of a script. >>> tt >>> setDefault forward| #FFCCC >>> tt >>> Start the animation clock. >>> tt >>> forward pause| #FFCCC >>> tt >>> Pause the animation clock. >>> tt >>> pause