Lite Applets - Forms and Javascript

Frank Wattenberg, Bart Stewart, and Suzanne Alejandre

In this section we look at how the Image_and_Cursor applet can be used together with HTML forms and Javascript to create highly interactive modules -- in particular, to create modules in which students can check their work by seeing the results rather than by looking up answers in the back of the book. The best way for you to start is by working through the instructions in the student-ready module, Describe the Squirt . If you want to cut to the chase without working through the problem, try pasting the following answers into the form on that page:

  • Low end of the domain: 0

  • High end of the domain: 423

  • The function f(x): -0.00504238 * x^2 + 2.34528 * x - 69.4962

The following three brief documents explain how this module was created.

Complete documentation for the Image_and_Cursor applet is contained in the User's Manual. This applet is very flexible. Included among its features are controls for:

  • Appearance of the applet, including the colors of all the displayed elements and their placement

  • The initial position of the cross hairs

  • Which elements are displayed

  • What marks are used when the user marks a point and whether the marks are connected by line segments

  • Whether to add a curve to the image in any of the forms y = f(x), x = x(t) and y = y(t), and r = f(theta), with further controls for the number of segments used to draw the curve, the domain of the independent variable, and the color and thickness of the curve

  • Choice of listed output in any one of three different formats for use in a spreadsheet, Maple, or Mathematica

  • Choice of whether to produce polar coordinates as well as Cartesian coordinates for marked points

  • Location of the origin for polar coordinates (if used)

Because most parameters have the most commonly used options set as default values, most curriculum developers will need to specify only a few parameters. For complete documentation see the User's Manual.

We continue in the next section with another module that uses this applet to study the shell of a chambered nautilus.