A
New Palette for Applets: Mathwright Microworlds!
Read
about Mathwright Microworlds in our recent article in the Mathematical
Association of America's Journal
of Online Mathematics and its Applications. You will need the free
Personal MathwrightWeb Control that you can download from our article
there, or just below.
Imagine
that you create a mathematical web page. You put careful thought into
its design, and you decorate it with instructional text, pictures, forms
and hyperlinks and whatever other gadgets that HTML provides, that you
find useful to tell your story. You then have a "hypertext"
mathematical story that has the additional important property that is
can be connected by hyperlinks to a vast collection of other mathematical
stories on the World Wide Web. One might say that this story is now
3-dimensional, by virtue of these
connections.
But
something is missing. Readers cannot do experiments or ask "what
if" questions. The demonstrations and arguments are as static as
they have always been in mathematics texts, perhaps more colorful, but
still static. A student may ask: "Well what does the graph of an
epicycloid look like?" But unless you have provided one, or a pointer
to a page that has one, they will not learn it here. HTML was not designed
to provide the support you want. There is no "epicycloid grapher"
and probably never will be in HTML. What you want is an additional
dimension (say, a 4th dimension) of interactivity.
So
you say, "I can provide this interactivity with a Java Applet!"
And you go to work. You have read that Java is a very powerful computer
language, and it will certainly be possible to do this. And you were
not misinformed. It is a powerful language. But here, you learn a sad
truth. It is a general-purpose language, not a mathematical language.
If you want it to accept (and understand) input from your readers like
x = 4(5cos(t)
- cos(5t))
y = 4(5sin(t) - sin(5t))
You
must do a fair amount of work to teach
it what such expressions mean. And if you want it to graph the curve,
you must teach it that also. This
"teaching" is, of course, also known as "programming."
But teaching a computer is far more time consuming than teaching a human
being. And if you happen to be teaching a few humans also, you may well
wonder where you will find the time to do both.
Aside from resorting to a "supercalculator" like Maple or
Mathematica, you have few other options. And if you only want to tell
a story on your web page, you may well wonder whether your readers will
"get it" (or even be able to read it) in a supercalculator
environment that is designed to support research, not learning.
One
of the charming and powerful features of Java is the fact that it is
"object-oriented." This means that Java programmers may do
things more easily than programmers did in the past, because they can
first create a world of conceptually simple objects and their relations,
and can then design their programs by thinking more abstractly -- at
the level of the objects themselves -- than they would have been able
to do in the past.
For
a mathematical story-telling program, the teacher/author would "converse"
with the program at a level of abstraction that presupposed computer
algebra style representation, parsing, simplification and comparison
of algebraic expressions. The system should "understand" rational,
complex and decimal number types, and "know" how to create
functions of one or several variables, either real or vector valued.
One should be able to define vectors, matrices, sets of numbers or names,
differential equations, geometric objects, and so on, easily and informally.
Of
course, it is also important that
the language make available screen objects
that display these mathematical objects, such as graphing windows that
"know" how to draw graphs of functions and curves, and that
can display sprite animations, or draw and manipulate geometric objects.
There should be windows for displaying mathematical formulas, exact
rational (or decimal) matrices, and even pictures correctly, as well
as database tables (like spreadsheets) for input and output of data.
Along those lines, of course, there should be other input gadgets such
as text fields, sliders, checkboxes, and hotspots.
And
all of these must of course be tied to built-in programs that handle
such tasks as solving equations, differentiating and comparing algebraic
expressions, solving differential equations, inverting matrices, transforming
geometric objects, and so on.
Given
such a palette of objects, at such a level of abstraction, teachers
have been able to create colorful, interesting and engaging interactions
and simulations in Mathwright Microworlds. And they have fun doing it!
To see what a few teachers were able to do, starting from scratch, please
take a look at our listing of Microworlds
that teachers have created. You will doubtless be surprised to know
that they are not programmers, but are "ordinary" teachers
with extraordinary mathematical imagination and storytelling ability.
Now,
let's return to the canvas of our 3-Dimensional HTML page and ask how
the palette is applied to the canvas. It works this way. On each web
page, you may insert a rectangle (that we call the portal) that blends
in with the page, and appears to be a part of it. That rectangle can
have any size and position within the page, but it really represents
an additional dimension.
The
portal is in some ways like an Applet, in that its content is automatically
downloaded once from your web page, then cached on the user machine,
and the content fills the rectangle. But unlike an Applet, this rectangle
can have as many "pages" as you want. So when the reader finishes
a "page" she presses a button, or clicks a hyperlink, and
is taken to another page that is displayed in the same portal. Readers
may move back and forth this way among the pages, and whenever they
return to a page previously visited, there is no wait for objects to
be downloaded, and any structure they might have created (graphs, tables
of data, mathematical text or matrices, etc.) is there waiting for them!
Now
you may well ask: "Well how do you create this portal?" That
is the interesting thing. The portal itself is created in a separate
computer program called Mathwright32
Author, and then "inserted" bodily in the web page. In
fact, the authoring program will create the web page itself with the
portal in it, if you like, and then you can add the HTML decoration
later.
There
are two parts to creating the portal. On the one hand, there is the
screen design for each page. This is all point-and-click (or as some
say, WYSIWYG: "What you see is what you get") You choose the
page color (from 16 million) or a background picture that can carry
hotspots. And then you simply draw
the various screen objects such as textfields, graph windows, labels,
sliders, hotspots or buttons and so on, on the page. These will provide
the basic input and output or both.
Of
course, the other (essential) part of your work is to "script"
these objects. This determines the dynamics of your Microworld -- its
behavior. The language that you use to do this is neither HTML
nor Java. It is a high-level mathematical scripting language called
MathScript. MathScript "understands"
the array of mathematical object types and their transformations, presentations,
and comparisons outlined above. This is the most important sense in
which Microworlds differ from Applets. Mathematical objects and notations
enjoy first-class citizenship in MathScript. To integrate a function,
you simply say: Integrate. To graph a function, you simply say: Graph.
And to define a function, you write something like: f(x,y) := (x+sin(x-y))^2.
It is similar for other mathematical objects such as vectors and matrices,
polygons, ellipses, etc.
Now
of course, the scripts for screen objects are generally not such simple
commands. They can be as rich as you like, with all of the usual control
structures (loops, conditionals, recursions, and so on). And this means
that the only real limits on the expressive power and range of your
story will be your imagination. We now have roughly 90 Microworlds
in the Library. Why not look them over to get an idea what you can
do?
The
Mathwright32 Author program is the only WYSIWYG mathematical Microworld
builder available to teachers today. It was created by teachers, and
its design is based on 18 years of development and refinement following
feedback from the teachers who use it. You may download the free Author
Tutorial (140 pages) and see for yourself how easy it is now to
create rich and powerful mathematical Applets for your own website,
using a point-and-click interface and a mathematics language that are
together much easier than Java. If you would like to purchase one, you
may do that at the Library Store. You
may also download and distribute to the visitors to your website the
free Personal MathwrightWeb ActiveX
Control from the Library Store.