The magazine of the Melbourne PC User Group
What is a supercube?
Ken Holmes
|
 |
You probably are aware that the equation for the circumference of a circle looks something like x^2 + y^2 = r^2 (shades of Pythagoras!) and, in three dimensions, the surface of a sphere is described by x^2 + y^2 + z^2 = r^2.
You can scale the axes to get an ellipsoid, and you can rotate it and shift the origin to get a somewhat longer equation if you wish. However, you can generate some interesting shapes, simply by varying the exponent, 2. This results in an infinite series of surfaces known as "supercubes" (some might argue that they could just as well be called "superspheres"). Unfortunately, I can't recall where I first heard of supercubes, so I regret I can't make proper attribution.
Typical shapes are shown in the accompanying stereo pair, where (to lessen the congestion a bit) we only show opposite halves of consecutive
supercubes.
|
Shape
|
Colour
|
Exponent
|
|
Three axes |
Not shown |
0
|
|
Concave
|
Yellow
|
0.5
|
|
Octahedron
|
Magenta
|
1
|
|
Sphere
|
Red |
2
|
|
Bulging
|
Cyan |
4
|
|
Bulging
|
Green |
8
|
|
Cube
|
Blue
|
Infinity
|
To see these in true 3D - put the edge of a mirror down the centreline, facing left and at right angles to the page. Look parallel to the mirror from its other edge with the right eye seeing the right half of the picture and the left eye seeing the reflection of the left half in the mirror. That 2D dog's breakfast suddenly becomes a 3D space (only on the right) allowing you to clearly see the structure of the supercubes and even the linked, tapering toroids beyond. The latter are included to give you your money's worth, and also to show another pleasing shape derived from fairly simple trigonometry.
The picture is calculated using ray-tracing, programmed directly in C++. Whilst this doesn't enjoy the advantages of the fabulous features of programs such as POV-Ray (see 2-Stroke engine in PC Update, April 95, cover and article), you can explore shapes not provided by such programs. I prepared this picture on a SVGA 1024 x 768 x 256 colour screen. A palette was constructed using sets of 16 consecutive colours to fade-in from black to, say, green and out to black. On a black screen this gets rid of the jaggies at the edges of the bands. For publication, a white background was used, so the small jaggies are back, but they tend to disappear when you look at both pictures simultaneously using the mirror.br>
This has been uploaded as an animation of this SUPRCUBE.LZH
[1.4 MB]; with seven frames, the two helical bands on each ring will seem to move in opposite directions around the ring. They will be more visible as each frame will have only one supercube which will repeatedly grow from just the axes out to a cube. Having it contract as well would double the file size, so we will respect the Law of Diminishing Returns. The animation will also use a 640 x 480 x 256 colour screen to cut the file size, animations are not so critically examined.
FLICS.LZH
[500 KB] is also available containing 640 x 480 (.FLC) versions of the (320 x 200 (.FLI)) animations,
2STROKE.LZH, PENDULUM.LZH and BALLRACE.LZH.
The more mathematically inclined readers may like to consider this:
Fractional exponents are meaningless for negative values of x, y and z; for example, (-1)^0.5, or the square root of -1, gives us the imaginary number, i, so useful in many branches of maths but a bit hard to visualise. Odd integers as exponents of negative numbers give negative values, which don't serve our current purpose. Hence, we use only the absolute values of x, y and z so that we get, in the seven "negative" octants, mirror images of the surface in the positive octant and thus some nice symmetrical shapes. Of course, the even integer exponents always give positive numbers and don't really need this artifice.
Strictly speaking, with an exponent of 0, on the axes we are faced with 0^0, which is indeterminate, so the supercube does not exist. However, as the exponent approaches 0 (from above), it shrinks to closely enclose the portions of the three axes from -r to +r.
You will also like to consider negative exponents; as x^(-n) is the inverse of x^n, the supercubes will enjoy an inversion type of transformation outwards. The cube will become corners in each octant, touching the corner of the cube and extending to infinity as the planes x = ñr, y = ñr and z = ñr. The sphere (typical of all the other supercubes) becomes 8 triangular-hyperboloid-like surfaces, asymptotic to each corner's planes. Their innermost points will be 3 times r from the origin; the "inversions" of the flat faces of the octahedron have their inner points at (27)^.5 (or 5.2) times r from the origin. Another project?
The odd integer exponents could be worth a look; for example, the value 3 would give a bulgy sphere in the positive octant with, I imagine, a triply symmetric real surface flaring to infinity in the six adjacent octants. There is no real surface in the all-negative octant since there is no way that (-x)^3 + (-y)^3 + (-z)^3 can equal the (always positive) r^3 - unless we introduce our old, imaginary friend, i.
Every fractional value for the exponent creates its own imaginary base number (or dimension), i.e. (-1)^.6593 has no real connection to (-1)^.5. Each supercube may be considered as existing in a 4D hyper-space having its own imaginary fourth dimension. In the positive octant, the hypersurface corresponds to the real 3D surface but, in the other seven octants, the hypersurface only "intersects" the real world on the surfaces we have drawn as mirror images of the positive octant. All exponents with the same fractional component will have the same imaginary fourth dimension, e.g. (-1)^4.6 = (-1)^4 x (-1)^.6 ; now (-1)^4 is a real number (= 1), so the other two must be in the same imaginary dimension. I think!
Which only goes to show what a bag of worms you can unearth when examining a simple equation!
Reprinted from the May 1996 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|