The magazine of the Melbourne PC User Group

The superellipsoid: Beyond the supercube
Ken Holmes
kholmes@melbpc.org.au

Articles in PC Update, May and June 96, might tend to indicate my intrigue with the supercube and its ramifications. It derives from the equation for a sphere:
x squared + y squared + z squared = radius squared

We can replace "radius squared" with "1" for a unit radius sphere and then scale it as we please along the three axes to give any sized sphere, or ellipsoid, we desire. If we take the exponent, 2, used for squaring, and vary it from 0 to infinity, we get a family of shapes that have been given the name "Supercubes". Logically, one might expect them to be called superspheres but, presumably, the surprising near-cubes with high exponents captured the attention of the first contriver of the artifice. Figure 1 was produced using the freeware ray-tracing program, POV-Ray for Windows POVWIN3.EXE (3.67MB download) , and depicts four members of the clan. From outside in, they are:

  • A rounded cube (exponent = 20), hollowed out
  • A sphere (exponent 2), hollowed using cylinders along each axis
  • An octahedron (exponent 1), hollowed to the corners (middle of edges missing) and with the nearest corner cut off to reveal
  • A hollowed, sucked-in octahedron (exponent 0.3). What would you call it?
T hose inside the sphere are octoid(?) in that they have twelve edges or ridges and eight faces or flatter areas, whereas those outside are cuboid, having twelve ridges and six faces. A neat way to hollow them is to use a near relative (closer to the sphere) which puts nicely shaped holes in the faces (whether six or eight) and leaves ridges with either thin lenticular, or triangular, cross-sections. As the exponent moves to zero, the figure becomes simply the three axes between -1 and +1 (see Figure 5 inner). As it moves to infinity, it becomes a sharp-edged cube - there are easier ways to draw a cube - but it becomes quite a respectable cube at modest exponents.


Figure 1.


Figure 2.


Figure 3.

But that's not all. Now POVWIN3 offers us the Superellipsoid. We don't have to keep the x, y and z exponents all equal - why not vary them separately? Just give it two numbers and it will use the first as the exponent for x and y, and the second as the exponent for z, producing a wondrous shape. It does not offer different exponents for all three axes. Figures 2, 3 and 4 show some of the possible shapes and Table 1 shows the exponents used for them. SUPELLIP.LZH (2.0MB download) has a 40 frame .FLC animation, which varies the exponents in a systematic way to give a fairly comprehensive sample of the superellipsoids.

Sorry, but I just had to satisfy curiosity as to what three different exponents would produce. This needed a C++ program to calculate and capture an example and we might as well see it in full stereo using the mirror. Figure 6 (outer) uses x, y and z exponents of 10, 0.1 and 2.0, and the surface is delineated by bands at 0, 45, 90 and 135 degrees to all axes. The low exponent y causes the razor-sharp horizontal flange and the high exponent x squares off the left and right ends. The exponent z, of 2.0, rounds off the top and bottom; each pair of the axes interacts to produce the cross-section shape in their plane. The inner figure with all exponents at 0.1 merely provides the three axes and an extremely small cusped solid at the origin, (akin to the innermost Figure 1, exponent = 0.3), too small to be visible.


Figure 4.


Figure 5. 


Table 1.

You might query the practical value of all this. I found it useful in getting a passable shape for the engine nacelles in a ray tracing of the Space Shuttle (Figure 5) using POVRay's two variables (ex/ey = 0.5, ez = 1.2). It's possible that it might get closer to the real thing with three variables, but please don't think I'm complaining about POVRay. As many know, I consider it surpasses sliced bread; it is a reasonable compromise as the third variable would be more confusing for a limited gain.


Figure 6. To see this in stereo, use a mirror along the centreline at right angles to the page, facing left. Put your nose on its near edge. Look at right with your right eye and at the reflection of the left image with your left eye.

The superellipsoid could be useful in the design of car panels and other consumer items where squarish, roundish and concave shapes need to be blended. Abrupt changes of curvature are very visible and hard to avoid; they are often disguised with chrome strips or deliberate ridges or grooves. Single equations can give very smooth curvature changes and, using computer-aided manufacture, are more convenient than the clay model. I hope you agree that they make satisfying on-screen sculptures; they might be a challenge to use for real sculptures, akin to building the Sydney Opera House to Utzon's original parabolic design rather than the final pure spherical shells.

Reprinted from the March 1999 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[About Melbourne PC User Group]