Introducing Mathwright Microworlds

Author(s): 
James E. White

I describe in this paper a new type of web document -- the Mathwright Microworld -- that appeared recently at the New Mathwright Library and Café. I will discuss the Mathwright Microworld from the points of view of both

  • its readers -- typically students of mathematics -- and
  • its prospective authors --typically teachers of mathematics.

James E. White is Director of The New Mathwright Library and Café and President of Bluejay Lispware.

A Mathwright Microworld is an HTML document (i.e., a web page) that an author may create with any handy HTML editor. The document becomes a Mathwright Microworld when the author embeds a "portal" that he or she creates independently with the Mathwright32 Author program. The portal in a Mathwright Microworld is a rectangular region of the web page which is, in some ways, like a Java applet. Its content is automatically downloaded -- just once -- from the author's web site when the reader comes to the page, and it is then cached on the reader's machine. This portal may be designed to blend with the background, so that only its content distinguishes it. But unlike most Java applets, this rectangle can hold as many "story pages" as the author wants to create. These story pages remain in the portal on the web page as the reader enters this new dimension of that page. Thus, the reader who is finished with a story page presses a button or clicks a hyperlink and is taken to another story page that is displayed in the same portal.

Before you can view a Microworld, you must be using Internet Explorer 5.0 or later, and you must download and install the (free) Personal MathwrightWeb ActiveX Control. Please do that now.

In the next section, our first example, Transformations of a Function, illustrates the appearance and behavior of a Microworld. If you would like a more detailed explanation, go to our Definitions of Terms.

Published June, 2002
© 2002 by Bluejay Lispware

Introducing Mathwright Microworlds - Introduction

Author(s): 
James E. White

I describe in this paper a new type of web document -- the Mathwright Microworld -- that appeared recently at the New Mathwright Library and Café. I will discuss the Mathwright Microworld from the points of view of both

  • its readers -- typically students of mathematics -- and
  • its prospective authors --typically teachers of mathematics.

James E. White is Director of The New Mathwright Library and Café and President of Bluejay Lispware.

A Mathwright Microworld is an HTML document (i.e., a web page) that an author may create with any handy HTML editor. The document becomes a Mathwright Microworld when the author embeds a "portal" that he or she creates independently with the Mathwright32 Author program. The portal in a Mathwright Microworld is a rectangular region of the web page which is, in some ways, like a Java applet. Its content is automatically downloaded -- just once -- from the author's web site when the reader comes to the page, and it is then cached on the reader's machine. This portal may be designed to blend with the background, so that only its content distinguishes it. But unlike most Java applets, this rectangle can hold as many "story pages" as the author wants to create. These story pages remain in the portal on the web page as the reader enters this new dimension of that page. Thus, the reader who is finished with a story page presses a button or clicks a hyperlink and is taken to another story page that is displayed in the same portal.

Before you can view a Microworld, you must be using Internet Explorer 5.0 or later, and you must download and install the (free) Personal MathwrightWeb ActiveX Control. Please do that now.

In the next section, our first example, Transformations of a Function, illustrates the appearance and behavior of a Microworld. If you would like a more detailed explanation, go to our Definitions of Terms.

Published June, 2002
© 2002 by Bluejay Lispware

Introducing Mathwright Microworlds - Microworld: Transformations of a Function

Author(s): 
James E. White

  Transformations of a Function, written by Mike Pepe of Seattle Central Community College, is a microworld with eight story pages embedded in a single web page. It has a menu from which you can navigate to most pages, or you can move from story page to story page by clicking buttons. In this book, each page allows you to experiment with a certain type of transformation of a function. If you change data in any of the text fields, the changes persist as long as you are in the book.

While you experiment in the book, use the menu buttons on the story pages to navigate. When you finish with your exploration, close the window to return here. You will see a pop-up message telling you that Mathwright is stopping. Click OK to proceed. Whenever you leave a microworld page, you will see this message. It means that the microworld session is closed.

You may enter the microworld now by clicking the hyperlink or the image above.

You may move back and forth among the story pages of the microworld, and, whenever you return to a story page previously visited -- even after you have closed and reopened your browser -- you will not have to wait for objects to be downloaded again. Once cached, objects are immediately available on future visits. In fact, during a single session, any structure you might have created -- a graph, a table of data, mathematical text, a matrix, etc. -- will be there waiting for you when you return to a story page. This persistence of data is often useful, as our next two microworld examples will show.

Microworlds can be designed to encourage students to experiment with an idea from different perspectives. They usually allow students to approach a topic from their own levels of understanding and to ask their own questions. This style of storytelling can be both integrative and constructivist, and it can support visualization in a way that stand-alone demonstrations seldom do.

Introducing Mathwright Microworlds - An Epicycloid Microworld

Author(s): 
James E. White

Now we consider another microworld embedded in a single web page, one for which persistence of data is a useful feature. The Epicycloid microworld has just two story pages. It is designed so that readers can compare two very different ways of constructing these curves. We also begin to consider what is involved in building microworlds like these.

Imagine that you are creating a mathematical web page about epicycloids. You put careful thought into its design, and you decorate the page with instructional text, pictures, forms, hyperlinks, and whatever other HTML gadgets you find useful for telling your story. You then have a hypertext mathematical story with the additional important property that it is linked to a vast collection of other mathematical stories on the World Wide Web. You make the observation that a certain geometric construction yields a family of curves parametrized by a and b:

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 "What does the graph of the cycloid look like if I make the a parameter negative instead of positive?" Unless you have provided an example, or a pointer to a page that has one, the student will not learn the answer here. HTML was not designed to provide the support you need. The equations above are only a picture with no "life" or meaning in the page. What you want is an added dimension of interactivity .

So you say, "I can provide this interactivity with a Java applet," and you go to work. You know that Java is a very powerful computer language, so it will certainly be possible to do this. And you were not misinformed: Java is powerful. But you learn a sad truth: Java is a general-purpose language, not a mathematical language.

Creating a Java Applet from scratch that can support exploration with cycloids can be daunting. We could start with the parametric expression for the curve given above. The Applet would have to accept the parameters a and b from the reader -- easy enough! -- and then draw the curve. This is still fairly easy to do in Java. The simple two-page Microworld below is, on its first story page at least, essentially a Java Applet It invites readers to experiment with parameters a and b, and it draws the graphs for them when they press the "Draw the Cycloid" button. Then, if the reader presses the "Animate" button, it shows how such a cycloid can be constructed by rolling one circle on another without slipping, tracing the path of a point on the circumference.

Such things are fairly easy to do with Java applets, but the reason we do not see more of them is that they do take time. One usually has to start from "first principles" to make a simple demonstration like this. Even if one has access to a good class library, it is necessary to tweak and modify the code at a very concrete level in order to get it to work. Such a project might take days -- more likely weeks -- using Java alone.

But the two-page Microworld on this page required only two to three hours to write. It is based on earlier work by Mathwright authors Mike Pepe (Seattle Central Community College) and Samuel Masih (Albany State University). The reasons it was so easy to write:

  • The screen design required only a few minutes of drawing. Once that was done, all that remained was to "script" the screen objects -- buttons and pages in this case -- using Mathwright's high level scripting language called MathScript.
  • With Mathwight Library's Open Source convention, some of these scripts were already available in earlier workbooks at the Library, so all that was needed was to "tweak" and extend them to work for this microworld.

Unlike Java (or any general purpose computer language), MathScript treats mathematical objects, their transformations, comparisons, and presentations, as first-class citizens of the language. So it is easy for authors to translate their mathematical ideas quickly into working code. We will say more about that later.

This is the portal.  The white sidebars are not part of it.

A demonstration like this is designed to raise questions.

What if a divides b?
What if one is negative (or both are)?
What is the relation of a and b to the radii of the circles? and, of course,
How is this construction related to the formula above?

Some of these questions might occur to one student and not another.

At some point, a student might be interested in the question:

When do these curves close, given that t varies from 0 to 2 pi?

Another student might recognize the 1-homogeneity of the formula: If a and b are multiplied by the same positive factor, this only changes the scale of the curve by that factor. This student might connect that fact to the invariance of form when the circles are so treated.

The observation on the right is the point of departure for story page 2 of the Microworld. Notice that if a and b are both positive and a divides b, then we can factor a out of the expressions for x(t) and y(t) to get

Suppose we let   be the integer n, and we represent a general point on the unit circle, using Euler's Formula, as

Then the points on the curve just described may be represented in the complex plane as

Thus, we have a different interpretation of these epicycloids as images of a unit circle in the complex plane under certain degree-n complex polynomial maps. On story page 2 the reader is invited to explore this fact and to move back and forth between the pages to compare the resulting graphs.

The style of mathematical calculation and the nature of the exploration on the second page veer off in a new direction. Now it is a matter of applying complex polynomials to circles. The built-in complex/quaternion number type in MathScript makes this easy. It leads of course to a nice way to visualize complex polynomials from their mapping properties. And while this connection takes only moments to occur to an author, making this facility available to readers, even in this limited generality (arbitrary complex polynomials applied to circles) would be difficult and time-consuming if implemented directly in Java.

In the next section, we discuss in more detail the issues facing web authors of interactive mathematics explorations and some of the new options open to them with Mathwright Microworlds and Mathwright Interactive Web Books.

Introducing Mathwright Microworlds - Interactive Web Books

Author(s): 
James E. White

A virtual learning environment is more useful to the extent that students can ask a wider variety of questions within it. With the appearance of Java-enabled web browsers, it became possible to put small interactions in the form of Java applets within the browser itself.

Mathematical Applets are, however, a somewhat paradoxical solution to the problem of bringing interactive and live mathematical learning environments to students on the web. While applets make use of some of the most advanced and sophisticated technology available to the web, and they harness the power of a truly elegant and powerful language, they have placed the creators of these applets in the prehistoric conditions of the early '80s, where programmers had to build pretty much everything from scratch. You must do a fair amount of work to teach Java the meanings of expressions such as the cycloid formulas or complex polynomials. And if you want Java to graph a curve, you must teach it how to do that also. 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.

So we see a proliferation of dedicated "appliances" on the web, each devoted to the illustration of some particular mathematical point, with very little -- if any -- communication among them. But it is precisely the possibility of communication among tools that can lead to the integrated experiences for students that can elicit new questions and arouse their curiosity. We saw a very simple example of that communication in the epicycloid microworld.

Of course, it is the virtue of Java that programmers can easily develop reusable class libraries that make possible an object-oriented approach to the development of mathematical applets -- building them from components. But very few teachers have the time or the inclination to use Java in this most elegant way to place mathematical explorations on their own web pages. So they (and their programmers) often have to "reinvent the wheel" again and again to do such simple things as parsing input expressions, or drawing graphs.

We will see another pedagogically useful example of this communication in the Heron's Formula Interactive Web Book. A Mathwright Interactive Web Book is a microworld that is distributed over more than one web page. These books may feature internal navigation among the story pages, or they may not. Heron's Formula uses internal navigation to "prepare" an experiment on one story page, and then to "perform" the experiment on the next. Later, we will visit a microworld called Cardano that is distributed across 12 web pages but that does not use internal navigation at all.

Interactive Web Books such as Heron and Cardano have in common the fact that they unfold a dynamic story. In general, the author of such a story will have an easier job if all of the tools needed to support that story are available in one place. In this way, the author can reuse and re-purpose these tools as the story unfolds. While the advantage for the author is obvious, the pedagogical advantage for readers is less obvious. Such Interactive Web Books, built on a coherent and straightforward functional plan, lead to richer experiences for readers. Readers are invited to participate in the story by

  • making and testing hypotheses,
  • preparing and viewing simulations -- such as the wheel rolling on a wheel, or the ones we'll see in Heron -- and, in general,
  • by asking their own questions.

These Interactive Web Books also benefit from the new, easy-to-use, presentation quality, mathematical typesetting tools (such as Design Science's MathPage™) that are becoming available. We used that tool to create the formulas on the preceding page, as well as in both Heron and Cardano. Until MathML becomes available in your browser, you will have to live with GIF images of mathematical formulas.

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.

MathwrightWeb, the program that shows these microworlds, is a Java Application (running within an ActiveX Control). Why Java? We chose it precisely because it easily supports an object-oriented interface both to the author and to the reader. For a mathematical storytelling program, the teacher/author should be able to "converse" with the program at a level of abstraction that presupposes computer algebra style representation, parsing, simplification, and comparison of algebraic expressions. The system should "understand" rational, complex, and decimal number types, and it should "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, and always as "mathematical objects." You might like to visit our Definitions of Terms if you have not already done so, for clarification.

In this sense, one might say that Mathwright is "mathematical-object-oriented." This is a great advantage over raw Java, but it is brought to you by Java itself. The Heron IWB will illustrate that with a few "geometric" objects that it allows the reader to create and manipulate.

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 correctly mathematical formulas, exact rational (or decimal) matrices, pictures, and 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, check boxes, and hotspots.

All of these tools must be tied to built-in programs that handle such tasks as solving equations, differentiating and integrating functions, 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 as Mathwright Microworlds.

Introducing Mathwright Microworlds - Web Book: [i]Heron's Formula[/i]

Author(s): 
James E. White
The Interactive Web Book Heron's Formula explores the geometry behind Heron's famous equation for the area of a triangle in terms of its sides. The formula may be understood by asking which quadrilateral with assigned side lengths has the largest area. This book has several experiments embedded in its pages, one of which allows the reader to vary the shape of the quadrilaterals to discover the surprising answer, and thereby, to discover Heron's formula.

Nearly all of the topics discussed will be accessible to a student who is comfortable with algebra and geometry. The crucial step of the argument, however, uses elementary calculus and may, as a surprising application of the ideas of limit and derivative, be taken as a motivation for studying those concepts.

To visit Heron's Formula, click the hyperlink or the image above.

Perhaps the most important difference between the interactions that appear on the pages of the Heron book, from the viewpoint of authorship and web design, is that they were not written directly in Java but were created in a high level, object-oriented mathematics scripting language called MathScript. Further, the visual design was graphical "point-and-click" or "What you see is what you get." This combination, using the Mathwright32 Author™ program, produces efficient Java code but does not require any knowledge of Java itself. It is much simpler to write books with this system than with Java.

Another difference is this: The "microworld rooms" that appear on each interaction page are actually multi-page stories themselves. When they have a "Continue Arrow" at the top, you will be told to click the arrow to continue the experiment before leaving the web page. That will take you to a different room that "remembers" what you did. The web page itself does not change, and the various objects you create (functions, graphs, algebraic constructions, and so on) persist; they will be there waiting for you if you decide to return to the room by clicking the "Return Arrow" at the top of the page. If you leave the web page (say, by clicking the Back Button) the microworlds are then closed, and you would have to start the experiment over afresh if you return to it again.

Introducing Mathwright Microworlds - Web Book: [i]Cardano[/i]

Author(s): 
James E. White

Our final example of an Interactive Web Book is Cardano, which develops and illustrates Cardano's Method for solving cubic equations. For that purpose, the book uses some tools that will offer a few experiments with complex algebra and then with abstract algebra. It finishes by demonstrating graphically an interesting property that cubic functions have when all of their roots are real. In that case, the three real roots are the projections of three equally spaced points on a certain circle (centered on the inflection point) to the real axis. This fact is non-intuitive and surprising, and it really benefits from the integration of two tools: One allows the reader to select cubics that satisfy the discriminant condition and to visualize how the shapes of cubic curves depend on the two parameters. The second tool demonstrates the above-mentioned fact, which is very helpful for a geometric understanding of Cardano's method.

The Cardano Interactive Web Book combines a variety of tools, including

  • graphing tools,
  • an abstract algebra "calculator" that allows the reader to explore some interesting properties of a certain complex algebra,
  • an expert system that solves cubic equations (among others) step-by-step, giving explanations for each step, and
  • many exercises that combine modern algebra with graphics.

It develops a novel and straightforward approach to Cardano's method, along with a simple means to understand it.

You may visit the Cardano Interactive Web Book by clicking the link or the picture above.

Introducing Mathwright Microworlds - Creating Microworlds

Author(s): 
James E. White

Now, let's return to the canvas of an 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 (we call it 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.

Now you may well ask: "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 with the portal in it, if you like, and then you can add the HTML decoration later.

There are two steps in creating the portal. On the one hand, there is the screen design for each page. This is all point-and-click -- or WYSIWYG: "What you see is what you get." You choose the page color (from 16 million possibilities) or a background picture that can carry hotspots. And then you simply draw the various screen objects such as text fields, graph windows, labels, sliders, hotspots or buttons, and so on, on the page. These provide the basic input or output or both. At this time, you decide whether the portal should be a fixed-pixel size, or whether it should be re-sized to appear the same in all popular screen resolutions, such as 640x480, 800x600, 1024x768. For embedded microworlds such as Transformations of a Function or Epicycloids, this can be an important design decision.

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 the high-level mathematical scripting language that we mentioned earlier called MathScript, which "understands" the array of mathematical object types and their transformations, presentations, and comparisons outlined in the preceding section. This is the most important sense in which Microworlds differ from generic Java 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.

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.

The language is extensible. You may create your own commands, functions, and programs for each book. Finally, once the reader has the ActiveX Control installed, the entire language will always be immediately available for each book. There is never a need to download new Java Classes. In this sense, the Control contains an all-in-one pre-built class library for mathematical web books. Authors can focus on the mathematical design of their web pages and need not be distracted by the questions of compatibility of components or the availability of those components to the reader.

Another important consideration is the Open Source nature of our materials. The Mathwright Library is a collection of over 190 workbooks and roughly 34 Microworlds. The microworlds and the workbooks are contributed by their authors as "ClipMath" for future authors to extend and modify. All of the microworlds we have demonstrated in this paper and all of the Project WELCOME microworlds (see below) depend, to some extent, on earlier work. For example, the Epicycloid microworld began with an idea of Mike Pepe, was extended in a Project WELCOME microworld by author Sam Masih, and finally, a single modified page of the latter is what you saw in this article. All microworlds come with all source scripts, so that authors may use them (or parts of them) as the starting points for new books. This greatly reduces the effort needed to build microworlds and Interactive Web Books.

We realize that a browser is not necessarily an ideal place to think hard about mathematics. So authors may give readers the opportunity to download and read any Microworld with our free Java Mathwright32 Reader, which is an application that runs independently of the browser. Thus, students may read your Microworlds off-line if they choose to, without having to be connected to the web at all! You would have to zip up the Microworld so that your readers can download it from your web site if you wanted to offer this option. You will see some examples of this at the Project WELCOME web site.

Finally, let us take a look at Project WELCOME, a rather unusual faculty development project of the Mathematical Association of America. We invited faculty at selected Historically Black Colleges and Universities (HBCUs) to collaborate with experienced Mathwright authors to create a collection of web documents that can support certain entry-level mathematics courses at the home institutions. Although the four "novice developers" came with very little experience with web pedagogy, and essentially no knowledge of Mathwright, they have created 22 Microworlds so far, ranging from 4 to 25 pages each, and comprising over 200 interactive mathematical web pages. Their work represents the debut of this new web technology, which was, in fact, created for Project WELCOME.

  Ready to take a look? Well, hop on the bus!