Microworld Title Page:
3 Dimensional Graphics

Individual and Institutional Members may sign in. Click here to join the Library


Software environments that can bring the player "under the spell" of an imaginary world they create, and can make the player an active participant in that microworld can touch and stir the imagination of the player. And if the microworld mirrors and illuminates the conventions that we teach in the schools, then the player also becomes a learner, and the author a teacher.
In this way, software environments can provide entirely new learning experiences and possibilities for students. Mathwright combines a number of features that have these goals in mind:

  • interactive 32-bit 3D graphics (based on OpenGL),
  • an object-oriented development environment, and
  • a mathematical scripting language called Mathscript
  • real-time simulations in the browser with MathwrightWeb

Mathscript combines both decimal and symbolic mathematics with a flexible and expressive idiom for creating and managing complex and interesting simulations through user-defined object hierarchies.

Mathematics (and especially geometry) will always play an important role in constructing 3D simulations, simply because scripts must move the actors correctly. Mathscript and OpenGL will "do the math" for you at the lowest levels. Mathwright32 provides a high-level language environment in which you may design your scenes and interactions abstractly, and from the top down, and then tell the lower levels of the language what "math" to do in those abstract terms.

We have not yet learned how to translate the hypnotic allure of video games (Myst, Riven, even Super Mario Brothers 3!) into effective learning experiences for mathematics and science, but we know that the key is through interactive simulations. These have been successful in teaching since the early days, in environments like Tom Snyder's Halley Project, and the Logo Turtle environments, and these would never be mistaken for 'edutainment'.

This Microworld is designed to illustrate how our new OpenGL based 3D Graphics Objects may be used to support visualization. For Mathwright authors, it provides a few examples that may guide them in the construction of their own dynamic 3D Microworlds. And for students, there are some utilities that they can use to visualize a few interesting constructions in geometry. The nine page Microworld contains the following 7explorations:

  • Exploring Conic Sections
  • Strange Attractors
  • Orbit the Shuttle
  • Quaternions in Motion
  • Graphing Functions
  • Implicit Surfaces
  • Gravitational Potential Well

The Microworld features a new capability of Mathwright (available since version 2.10, May 12, 2003) that makes use of Windows Help to give pop-up information about each page if the reader desires it.

Requires the Java MathwrightWeb ActiveX Control to read in your Browser.
For proper viewing, be sure to use Version 2.10 or later, dated May 12, 2003
Download free MathwrightWeb to view Microworlds in your browser, then press



Library members, download the free Mathwright32 Reader, then press

For proper viewing, be sure to use Version 2.10 or later, dated May 12, 2003

Microworld: 3 Dimensional Graphics
Click the Hyperlink above to visit the Microworld.
Author: James White

In Exploring Conic Sections is a simulation that allows readers to define a plane, then to view, in three dimensions, the way the plane intersects a standard cone. The entire scene may be rotated and translated, and you may "fly" through it in the first person. See the Navigation section below in the Interaction Instructions. In addition to this, you may view the "Conic Section" itself as a plane curve. For each plane you define, the 3 dimensional intersection is mapped isometrically onto a 2 dimensional plane. In this way, you may study the passage from ellipse to parabola to hyperbola as you vary the plane parameters, both in 2 dimensions and in 3. In this way, the idea of "Conic section" is reinforced.

In Strange Attractors, is a differential equation solver for ordinary differential equations in 3 dimensionl space. The Lorenz equations are entered when it comes up, but the reader may change the equation at will. When the reader solves the Lorenz equations, he sees a "Lorenz Attractor" in R(3). He may "walk around" the attractor, zoom in on any part, and so on using the built-in navigational tools (See Below).

Orbit the Shuttle shows how a realistic 3 dimensional model of a "Space Shuttle" may be moved along a smooth path by a simple script. In a 3D scene, "actors" may be moved independently of each other in support of simulations. These objects may be arbitrary geometry created using our OpenGL interactive commands (see also the next example) surfaces, space curves, or imported models from 3D Studio or DirectX format. We move the actors using Euclidean (rigid) transformations based in translations and quaternionic rotations. If this sounds formidable, we guarantee that is easier by far than the old-fashioned direct matrix manipulation that one finds in most 3D environments. It is quite simple, as this example, with its scripts, will show.

In Quaternions in Motion, we take a closer look at how quaternions are used to manage rotations of objects in space, and how they interact with translations. We do not actually use quaternions directly in our scripts. We specify them by selecting an axis of rotation in space (a vector) and an angle to rotate about it using the right hand rule. Using OpenGL geometry, we create a "cube" named "ted" and some other objects also. Then we place ted in a loop where, for gradually increasing angles: theta, we first translate ted to a point on the x axis, and then rotate ted through theta about the x axis, then rotate ted through the same theta about the y axis. The overall effect is a smooth somersaulting motion that is easy to understand. The net rotation is obtained by multiplying the corresponding motions (thought of as unit quaternions). Now the order of unit quaternionic multiplication matters, since the group is not commutative. So when we put ted through the same paces, but multiply the corresponding quaternions in the reverse order (rotate ted through theta about the y axis, then rotate ted through the same theta about the x axis after the translation) we see an entirely different smooth motion. The important point is that from the point of view of scripting, the only difference in the scripts is that we multiplied two objects in the opposite order.

Graphing Functions is a simple utility that a student may use to draw the graph of any function: z = f(x,y) that they care to define. These graphs are drawn in different colors so that their intersections are easy to see and understand. Again, the aim is to provide visualization here. An author may easily extend this utility for dedicated purposes, providing for example, a command line in which arbitrarily many functions may be created, graphed and compared. Or the author may allow the reader to draw parametric surfaces (i.e. tori, spheres, immersed Klein bottles, etc.) or to define implicit surfaces defined by equations of the form f(x,y,z) = 0. Or a reader might simply use the utility as a general purpose function grapher, and take snapshots of interesting graphs so obtained. One direction in which this may be extended is in the next and final example in this Microworld.

Implicit Surfaces is another utility that a student may use to draw the solution of an equation: f(x,y,z) = 0. The student defines the function f(x,y,z) by writing any expression in x,y and z. The system needs two more pieces of information and is then ready to draw. First, it needs a refinement, a positive integer between 2 and 39. It divides the original box into a lattice of equal boxes numbering refinement in each of the three dimensions. Of couse. It also needs to know the dimensions of the original box. Given that information, the system creates the surface. The larger the refinement, the more accurately it represents the surface, and the longer it takes.

In the Implicit Surface utility, one may define two surfaces. One is colored red by default, and the other yellow. These surfaces are Actors and may (in other contexts) be directly manipulated by Mathscript-OpenGL commands, just as Ted and Ed and the gang were in the "quaternions in motion: example. You may also edit their scripts to change their properties, such as size, location and orientation, but you will have to read the online Mathscript help at the Library to learn how to do that.

Gravitational Potential Wells extends the function grapher in an interesting direction. In this exercise, the reader defines a gravitational potential function. The graph is drawn of course. But such a function defines, by its gradient, a second order differential equation -- the equation of motion of a point that is allowed to move without friction on the surface under the influence of gravity alone. The reader sets the initial conditions (initial position of the point on the surface, and initial velocity) and may then watch the simulation as the point moves under the influence of gravity, illustrating in its smooth motion the principle of conservation of energy.

Author: James E. White

Author Email:mathwrig@gte.net

Topics: Lorenz attractor, ODEs in three space, conic sections, second order differential equations in the plane, chaos, tutorial on quaternionic motion, simulations with 3D models

Suggested Use: Visualization of various geometric constructions

Number of Pages: 9

Animation:Yes

Grade Level:10-16

Once you download our free Mathwright32 Reader above, then simply click Get This Microworld, and it will be downloaded to your machine and installed in a directory there. You may find it whenever you want to view it, by going to the Start, Programs, Mathwright32 Reader menu.

To visit our Microworlds in your browser, it must be able to read ActiveX controls. Microsoft Internet Explorer 4.0 Browser (or later) is so equipped. You should check that the Security Settings under Tools, Internet Options, Security for the Internet, Custom Level has:

  • "Run ActiveX Controls and Plugins" set either to enable or prompt.
  • "Initialize and Script ActiveX Controls not marked as safe" set either to enable or prompt

 

Return to the listing of MathwrightWeb Microworlds


    - James E. White, Ph.D. , Library Director,
    author of this website, Mathwright 2000, MindScapes,
    MathwrightWeb, and Mathwright32