What is a Physlet?

Physlets—“Physics applets”—are small, flexible Java applets that can be used in a wide variety of WWW applications. Many other Physics-related Java applets are being produced around the world—some of them very useful for education.  However, the class of applets we call “Physlets” has some attributes that make it valuable for the educational enterprise. 

The introduction of the Java programming language by Sun Microsystems makes it possible to add platform independent programs to the HTML stew. Java accomplishes this trick by specifying a relatively simple Virtual Machine, VM, which can be implement on any computer, i.e., Unix, Mac, or Windows. Although this VM does not provide as rich a set of tools as the native operating system, the virtual machine can have a user interface with buttons, a drawing canvas, and other graphical elements. There may be virtue in simplicity. Small platform independent programs are ideally suited for instructional purposes such as homework problems.  We call such applets Physlets. These Physlets can be embedded directly into HTML documents and can interact with the user using a scripting language such as JavaScript.

Since Physlets are scriptable, the physics is can be changed by the HTML author. They are designed to be embedded into physics problems. For example, the 100 Kbyte Animator Physlet we have written is used to move a shape inside the applet's bounding box along a predefined path, [x(t), y(t)]. Adding this Physlet to an HTML page is no different than adding an image. Creating a 10-pixel diameter ball that follows a parabolic trajectory requires the following two lines of script: 


Although animation can certainly be accomplished using more sophisticated programs such as Interactive Physics or possibly even quick time movies, two or thee lines of script connected to another problem can add additional shapes to the applet or change the trajectory into a sinusoidal oscillation. A VCR-like set of control buttons allows students to start, stop, and step the animation. The mouse can be used to read scaled coordinates. Presenting visual rather than textual representation of information necessary to do a problem changes the problem solving strategy. It also allows for different types of questions. What is the acceleration of the red ball? Are the laws of classical dynamics observed in the collision between the red and the blue balls? Which planet in the animation does not obey Kepler's laws? In problems such as these, the student must observe the motion and make appropriate measurements to obtain a solution.