X

#### Xah Lee

Xah Lee, 2007-03-16

In this essay, i give a list of requirements that i think is necessary

for a software system for creating scientific visualization for the

next decade (2007-2017).

(for a HTML version with images, please see

http://xahlee.org/3d/viz.html )

For the past 10 years, i have been strongly interested in mathematical

visualization. I'm not a professor, and am not doing it for the

educational purposes per se. Geometry has just been beautiful for me,

and i'm also a professional programer. Programing computers to

visualize geometric theorems or geometric objects, has been a immense

personal pleasure. A particular aspect of visualization, is to design

it so that when viewed, it forces a immediate and crystal clear

understanding of the object or theorem, to its viewers.

I have for the past couple years sought for a software platform/system

where i can build 3D objects, with abilities to do interactive

manipulation (such as moving a slider to change a parametric surface's

parameter), dynamic rotation (viewing from different angles

instantaneously), animations (such as morphing that shows geometric

processes), and most of all, walk-thru in it as if it is a building

(e.g. the perception of actually walking on a moebius stripâ†— or Klein

bottleâ†— is vastly different than just viewing it.).

--------

Requirement: Real-Time 3D Rotation

For math visualization, it is absolutely necessary to be able to

rotate the object in real-time. For example, when viewing a complex

surface, a molecule structure, or the design of a complex device. This

requirement is so basic it warrants no further explanation.

above: The Chen Gackstatter minimal surface as shown by the software

3D-XplorMath â†—. This surface has several 3-fold symmetries, but a

static image does not show this. (Live Rotation with Java Applet)

--------

Requirement: Real-time Interactivity

The programer should be able to build buttons and sliders that change

parameters and have the object reflect these changes visually right

away.

This real-time interactivity is frequently needed. For example, most

math visualizations involve a function, a process, or a geometric

object, that varies by parameters, and the key to the visualization is

showing how the parameter effect the graph or object. Some Examples

follows.

Example: Moebius Transformation

above: A software that plots a complex function (the Moebius

transformationâ†—), by showing the pre-image and post-image of the

function. The function is keyed by various parameters that can be

represented as points in the plane. Dragging these points will change

the image interactively. Source: MoeApplet by Paul Murray â†—

Example: Regular Polytopes

above: a Java applet showing a slice of 4-dimensional symmetric

polytopesâ†— , with sliders that change the polytope's parameters.

Dragging the polytope will rotate it in real-time. Hyperstar Java

Applet by Mark Newbold â†—.

Example: Plane Geometry

above: A interactive plane geometry software showing a Equiangular

Spiral and its inverse curve , with respect to a point O. Equiangular

spiral is a family of curves varying by a parameter Î¸, from 0 to Ï€/2.

This parameter can be changed by dragging the point E of the angle

DAE, and the corresponding curve will be shown (blue). Its inverse

curve with respect to the point O is shown in pink. Dragging the point

O will change the position of O, and corresponding inverse curve will

be shown in real-time.

above: A plane geometry software demonstrating Bezier curve. User can

drag the poins to very the input, and see the polynomial change shape

in real-time. Java Applet version.

Example: Conic Sections

Computing power today are some 50 times faster than a decade ago.

However, math visualizations, have hardly advanced. For example, let's

consider the simple task of plotting of polynomial equations. As we

know, 2nd degree polynomials of 2 variables are conic sections. It

would nice, that the program can show the general form A x^2 + B x y +

C y^2 + D x + E y + F == 0 and let users change the constants by

sliders, and have the graph change on the fly. Such a application

would give immense feedback that reinforces learning, which is what

visualization is about. Similiarly, this can be done for 3rd degree

polynomials, and the visualization of polynomials of 3 variables.

There are tens, if not hundreds, elementary equation and function

graphing software. However, it is almost impossible to find one that

shows the power of interactivity described above. Apple Computer Inc,

bundled with OS X as current as of March 2007, a plotting software

(called Grapherâ†—) that has zero interactivity features. And

Mathematica's abilities for plotting polynomial equations in as late

as 2005, is basically the same as 1996. Its ability for visual

experiment and learning of polynomials of 3 variables is practically

zero.

I have personally played with perhaps over 20 major plotting software

over the past 15 years, and i only know one that has this feature.

(see Nucalcâ†—)

--------

Requirement: easy-to-create, real-time animation

The software system must have the capabilities for programers to build

animations, and view the animation interactively in real-time (as

opposed to generating the animation once and save it as a movie).

For example, once a programer has coded the animation, she should

easily play it forward and backward in the program, as well as

changing parameters and re-run the new animation without going thru

some compilation or export process. For example, if the animation

involves a 3D object, the system should also allow the user to rotate

it while the animation is on-going, all in real-time.

For example, this system should allow programer to easily create a

animation that morphs a sphere into a cube, or a bunch of spheres

flying in space as a swarm of flies or in some artificial formation

like a 3D-kaleidoscope.

Example: Cycloidal Curves

above: A movie generated by a math software, showing how the cycloid

curve is generated by rolling a circle. (cycloidGen.mov).

In this example, you can see the trace by a point on the boundary of

the circle. What happens if the tracing point is nearer to the center

of the circle? This is a example where a interactive slider will help.

As a user adjust the slider, the animation should show its effects in

real-time.

Example: Cellular Automaton

above: A software that computes the cellular automatonâ†—known as Game

Of Life, showing it as a animation as it evolves. At any point in

time, a user can add more cells to it by clicking in the window, and

continue the animation to see its effects.

Example: Helicoid-catenoid Surface Family

above: A frame of a software generated animation, showing the isometry

property of the surface family helicoid-catenoid. (helicoid-

catenoid.mov)

This is a example where it shows the importance of being able to

rotate the object in real-time in a on-going animation.

Example: Sphere-eversion

above: The classic Sphere-eversion visualization problem, visually

demonstrating how a sphere can be turned inside-out without creating

any crease. (Source: John Sullivan et al. â†—. image source â†—, accessed

on 2007-03-18.) (For detail about this problem, see: Smale's paradoxâ†—)

Examples of system that do NOT satisfy this requirement would be:

Mathematica (up to version 5), 3D-XplorMath, most CAD systems. Most of

these systems allow animations, but usually for a generate-once and

save-as-static-movie-file, not designed for interactive view.

Example: Stereographic Projection

above: A illustration showing stereographic projection. (source)

To create visualization for stereographic projection, ideally, the

user should be able to rotate the whole plane, or move it up and down

in relation to the sphere, as to see the effect on the mapping. Also,

the user should be able to rotate the sphere and see the mapping

change on the plane. The user should also be able to move a single

projection line to see mappings of arbitrary points. Lastly, it is

ideal in this visualization to let users change the pattern on plane

or on the sphere to arbitrary images. For example, the plane should

have a default set containing rectangular grids and polar grids.

(showing the important property of circles mapping to circles/lines)

The sphere should have standard projection of platonic solids.

(showing the important concept of platonic solids as networks) And,

the user should be able to put the graph of arbitrary complex function

on the plane or a Riemann sphereâ†— on the sphere.

Today, it is non-trivial to create a visualization such as this. For

example, the above image is created in Mathematica. One has to write a

function that plots riemann sphere in the first place, to create the

image of the sphere. The system also needs to have animation and

interactive slider abilities, as to be able to make the sphere and

plane rotate or reposition independently in real-time, and the moving

of the projection line.

Examples of visualization systems that do satisfy the animation

requirement to various degrees discussed in this section would be:

Macromedia Flash, VPython, 3D Game Engines.

--------

Requirement: Walk-thru

The software system should have the capability of walk-thru or fly-

thru. That is, allow the programer precise control of the camera

position and orientation in real-time.

The most obvious application of this requirement is in CAD systems

that are specialized for architecture.

For example, if i build a fancy 3D-maze or elaborate cathedral, i

should be able to say, walk inside it, so as to view the object from

inside and as well as getting the real experience of perceiving such a

building.

The ability to do walk-thrus has significant applications in math

visualization too, however, it is seldom realized. Here are some

examples of its application.

Example: Walking on Surfaces

above: A hyperbolic-paraboloid, with a human character standing on top

of it. (from the computer graphics virtual world Second Life. Credit:

Henry Segermanâ†—, aka Seifert Surface.)

Compare the above image with the following abstract rendering that is

commonly found in math visualization software.

above: a abstract rendering of the hyperbolic-paraboloid. Java Applet

Perhaps due to the evolution of our perception system, the experience

of actually walking on or inside a math object, is vastly different

than just seeing it as zero-thickness abstract lines and sheets

rotating around its center.

Although, the virtual world created by computer graphics only fake the

experience of actually being there, still, such a virtual world

experience throws a impact on understanding. Imagine, demonstrating

the one-sidedness property of surfaces such as the moebius stripâ†— or

Klein bottleâ†— thru a live rotation and explanation, compared to having

the student inadvertently taking a walk inside such a object and

suddenly felt the single-sided oddity. A person experiencing such a

situation will probably remember it as part of his life's memory.

Example: 3D-Lattices

The ability to do walk-thrus also fits well in visualizations

involving 3-dimensional lattices, such as Crystallographic groupâ†—, 3D-

tilings (sphere packing), or visualizing periodic minimal surfaces.

For example, the following images of periodic minimal surfaces are

shown in the way they are traditionally presented, as a few

representative patchs of the periodic surface, and users can rotate

the surfaces in real-time:

above: Periodic minimal surfacesâ†—. Source: Richard Palais, Karcher

Hermann. â†—)

As they are shown, their periodic structure is not visually clear,

especially those non-rectangular ones. (e.g. the last 3) It also takes

some effort to imagine how they actually fill the space.

Now, imagine these shown in a walk-thru system, where a portion of

space is filled with its repetitions, and the user effectively becomes

a bee, flying about in it, able to observe detail in a close-up on any

point of the surface from any angle, or getting a bird's eye's

overview of the surface's lattice symmetry.

Example: 3-Manifolds

above: Screenshot of Jeff Week's Curved Space â†— software. This program

lets users fly-thru various 3-manifoldsâ†— . There is basically no other

way of visualizing 3-manifolds other than the techniques of walk-thru.

There is effectively no visualization system that lets programers

easily code interactive walk-thrus. The possible exception is 3D Game

Enginesâ†—, however, it requires a specialized programer with years of

dedicated experience to create any thing in it, and the work is rather

tedious. Some such game engines have higher level (scripting)

languages that let the user (players) create objects or scenes in-

world. (A example is the Linden Scripting Languageâ†— of Second Lifeâ†—. )

--------

Requirement: Easy To Use For Average Programers

The system must be easy to use for average programers or scientists.

For example, a person who had just a year of programing experience,

should be able to code a variety of visualization projects with the

system.

Often, these high-level languages are called scripting languages.

Mathematicaâ†—, Lisps (Logoâ†—, Schemeâ†—, Tcl/tkâ†— ), Visual Basicâ†—,

VPythonâ†—, Macromedia Flashâ†—, CAD systems (AutoLISPâ†— ), Linden

Scripting Languageâ†— are examples of high-level systems.

On the other hand, low-level language such as Javaâ†—, C sharpâ†—, or,

systems such as OpenGLâ†— and Game Enginesâ†—, or application programing

systems such as Cocoa (API)â†— and X Window Systemâ†—, all require

professional programers with years of experience to create a non-

trivial application. These are not useful to most scientists or

engineers.

--------

Requirement: A Set of Basic Geometric Shapes

The system must have a set of basic primitives or shapes that serve as

building blocks. For example, spheres, torus, cubes, as well as meshes

of triangles.

Of course, the system should also have the following common elements:

various coordinates systems, projection systems, lighting and camera

control, build-in manifold by parametric surfaces and algebraic

equations, and a whole set of 2D and 3D transformation functions

(which can also work on n-dimensional coordinates).

For a system aimed for math visualization, it would also be necessary

to have access to a full range of math functions, such as integration,

derivative, higher-order functions.

[Continues on page 2]

-----

This post is archived at

I'm still working on the second part. Your opinions and comments on

existing systems are welcome. Thanks.

Xah

(e-mail address removed)

âˆ‘ http://xahlee.org/