JavaScript Examples

Enter the functions: x=f(t) and y=g(t)

Applet Interface

Animator may be embedded within your own web page with the following HTML tags:

<applet code="Animator.class" width=600 height=400>
<PARAM NAME="dt" VALUE=0.1>
<PARAM NAME="FPS" VALUE=20>
<PARAM NAME="gridUnit" VALUE=10>
<PARAM NAME="helpFile" VALUE="AnimatorHelp.html" >
<PARAM NAME="pixPerUnit" VALUE=10>
<PARAM NAME="showControls" VALUE=true>
<PARAM NAME="trail" VALUE=10>
<PARAM NAME="xFunc" VALUE="sin(t)" >
<PARAM NAME="yFunc" VALUE="cos(t)" >
</APPLET>

where dt is the time step and FPS is the frames per second. These parameters may need to be adjusted to produce smooth animation on less powerful computers. GridUnit specifies the grid spacing. If gridPerUnit is set to zero the grid will not be drawn. The ShowControls parameter is designed to reduce the screen size of the Applet. This parameter allows the HTML programmer to hide the buttons displayed at the bottom of the applet. JavaScript can be used to add objects to the applet. The trail parameter determines the number of points that make up the trail behind the shape.

Animator may be scripted using the following Java method calls:

Use the codebase tag if the Animator.class file is in a different directory than the HTML page that uses the applet. (See applet documentation from Sun.) As of version 1.15, Animator is a package named animator. It should be in a subdirectory called "animator." All Java packages used by Animator, such as the graph package which contains the parser class, must be in subdirectories at the same level as the animator package.

Animator20a.zip may be downloaded for noncommercial use by students and faculty at accredited not-for-profit educational institutions. The zip file being distribted is uncompresssed. You should keep copies of the uncompressed class files in the class directory so that browers that do not support the archive tag will be able to run the applet.

Animator was written using Java 1.01. It will be rewritten as a Java "Bean"using the newer (and better) Java event model avaliable in Java 1.1.