JavaScript Examples

Enter speed of the source

Applet Doppler

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

<applet code="Doppler.class" width=600 height=400>
<PARAM NAME="speed" VALUE=0.5>
<PARAM NAME="relativistic" VALUE=false>
<PARAM NAME="showControls" VALUE=true>
<PARAM NAME="helpFile" VALUE="DopplerHelp.html">

where speed is the source velocity and fps sets the drawing rate in the frames per second. These parameters may need to be adjusted to produce smooth animation on less powerful computers.

A right mouse click inside the Doppler applet will display the HTML file specified by the helpFile parameter. This feature can be used to provide student help and other online documentation.

Doppler may be scripted using the following Java method calls:

Use the codebase tag if the Doppler.class file is in a different directory than the HTML page that uses the applet. (See source for this page.) All Java packages used by Doppler, such as the gjt package which contains java graphics toolkit classes, must be in subdirectories below the Doppler.class file. may be downloaded for noncommercial use by students and faculty at accredited not-for-profit educational institutions. The zip file being distribted is uncompresssed. It can be used with the new Netscape Archive tag. (See source code for this page.) The archive tag allows Netscape to download all the necessary files with a single HTTP request to the server. It is much faster than the standard download method which requires a HTTP request for each file. You should, however, 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.

Doppler 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.