Mathematical Modeling & Mathematica

Lab 6:  Graphing in 3-Space
The Monkey Saddle Animation

John E. Cruthirds and L. Richard Hitt
Department of Mathematics and Statistics
University of South Alabama

Introduction

This notebook contains the necessary ingredients for an animation of the monkey saddle surface rotating in 3-space.  The actual frames of the animation are contained in the next section.  The last section shows how the frames were generated by Mathematica .

The Monkey Saddle

The "monkey saddle" is the name usually associated with graph of the function given by

f(x,y) = x3 - 3 y2 x

A graph of the function is depicted below.  Can you see why the graph is called a monkey saddle?

The graph that you see is actually the first of 24 graphs of the monkey saddle.  Each graph is computed from a slightly different perspective.  If you select the closed group of cells containing the graphs and animate it, the graph will appear to rotate around in space.  You should be sure you have plenty of free memory to obtain a smooth animation.

Implementation

In order to make a graph appear to rotate, you can take at least two approaches.  You can leave your perspective fixed while the graph actually rotates.  This requires changing the function defining the surface using, for example, the rotation equations in the xy-plane.  Alternatively, you can leave the graph alone, but vary your ViewPoint around a large circle which surrounds the graph.  The second approach is usually much easier than the first, although the final products should be indistinguishable.  The function graphic defined in the Mathematica  code below produces graphs of the monkey saddle from diferent perspectives determined by the ViewPoint.  Examine the  coordinates produced by ViewPoint to see exactly how it works.

This kind of animation can also be done using one of the standard packages that comes with Mathematica , namely the Animation package found in the Graphics folder.  This package defines, among other things, a function named SpinShow which can be used to animate a single graphic image.  The reason for using the code below instead to produce the animation here is that the theta parameter allows control over the perspective used for the first graphic, which is the one displayed as the head cell in the closed group of graphics produced above.  The ablility to choose the perspective of the first image is lost when using SpinShow.

Clear[x, y, i, n, theta]graphic[i_, n_, theta_] := 
      Plot3D[(x^3) - 3 (y^2) x, {x, -2, 2}, {y, -2, 2}, 
        AspectRatio -> 1.5, 
        ViewPoint 
          -> {5 Cos[theta - ((2 π i)/n)], 
            5 Sin[theta - ((2 π i)/n)], 1.2}, 
        BoxRatios -> {1, 1, 1}, Boxed -> False, Axes -> False, 
        SphericalRegion -> True]; n = 24; theta = -1; Do[graphic[i, n, theta], {i, 0, 23}]