The math behind the Superellipse

In his search for a harmonic shape Piet Hein was inspired by the usual ellipse made up of the the points (x,y) satisfying the following equation:

 

However he wanted the shape to be more rectangular. His idea was then to try other exponents than 2. The absolute values must be used here:

  (*)

where the absolute value, is defined by:

It is not difficult to see, that the following values for x and y satisfies (*):

because if you insert it in (*) you will get the well-known trigonometric formula

which is universally true. In the expression for x and y, we will let t run in the interval from -pi to pi, and we could draw four different curves corresponding to the four possible combinations of + (plus) and - (minus) in the expression above. However we can do it in one turn: if we use the signum function sgn defined by

then

Or, if you prefer the notation with abs:

For simplicity we could define a new function hein, which takes one variable x and two parameters a and b:

This is convenient way to handle it, because both functions, sgn and abs, are predefined functions in the function plotter. Then the solutions to (*) would obtain the following harmonic look:

Now using n = 2 would yield an ellipse with half-axes a and b. Piet choose n = 2.5 for his superellipse. For example a superellipse with half-axes 3 and 2 can be produced by the following functions:

The Astroid

The formula (**) not only produces the superellipse but also the well-known curve called the Astroid. The expressions

produces the Astroid with half-axes 1 and 1.

[ Back to Tutorial ]


[ Function Plotter | Oberon Product Index | Oberon Home Page ]

Copyright © 2002 by Alex Vakulenko. All rights reserved.
This page was last revised on 11/17/02.