Lesson 2 - Drawing a Superellipse

Brief History of the Superellipse

In 1959 a city planning team in Stockholm, Sweden, was considering a problem with a rectangular square in the center of the city. The architects wanted the traffic to flow around this square, therefore a rectangular shape was not suitable. However an ellipse did not work either, because the pointed ends of the ellipse would prevent smooth traffic. Not knowing what to do, the team consulted Piet Hein, a known Danish writer, scientist, inventor and philosopher. They believed it was the kind of a problem, that appealed to his combined mathematical and artistic imagination, his sense of humor and his ability to think creatively in unexpected ways.

Piet Heins was searching for a curve, that was something in between an ellipse and a rectangle. He was especially interested in a curve that was defined by mathematically means, because he wanted the curve to be smooth and harmonic. The usual ellipse is defined by the equation

Piet Hein considered changing the exponents to a more generic value n:

He realized that increasing the exponent would make the shape like more and more like a rectangle. He then defined the Superellipse as any curve satisfying the last equation with n greater than 2. Especially he choose n = 2.5 for the actual problem, because he found that with this value the curve was looking especially pleasing for the eye. The parameters a and b happens to be half the width and half the height of the curve. For this particular case he chose a/b = 6/5.

Piet Heins solution was accepted and today you can find the Superellipse Square in Stockholm, called Sergels Torg. Since then more people have been inspired by the curve. Just to mention a few, the Superellipse was used in the design of the Olympic Stadium in Mexico City. At the top of his popularity, Piet Hein was on the front page of Life Magazine with his Superellipse (1966).

It has to be mentioned that the curves considered by Hein were in fact looked at earlier by the French mathematician Gabriel Lamé (1795 - 1870). Therefore these curves go under the name of Lamé curves.

The Superellipse created with the Function Plotter

If you are interested in a detailed explanation of math used in the following example, please click here: The math behind the Superellipse.

  1. Click on the Function Plotter icon on the Tool bar in CorelDRAW.
  2. We will start defining a new function with parameters. Click on the Functions tab in the plotter window.
  3. Write in the Name and Parameters box: hein(x,a,n), where x is the variable and a and n are parameters, that is convenient for us to include.
  4. In the Declaration part you must tell Function Plotter how you want to define the function. Write: a*sign(x)*abs(x)^(2/n)
  5. In the Description field you can explain what the function does, if you want.
  6. Pressing Add button to add the function to the list, it should look like the screen shot below.


    Note that you can save functions from the list by clicking the Export button and selecting which function you want to save. This might be useful for backup purposes as well as for sharing custom function declarations between different projects. You can load the function declarations back from a file using the Import button.
  7. Now at the top of the dialog, enter the following value in X(t) field: hein(cos(t),3,2.5). Here parameters of the hein function are: x = cos(t), a = 3, n = 2.5.
  8. In the Y(t) specify: hein(sin(t),2,2.5) for x = sin(t) a = 2, n = 2.5.

  9. The range for the variable t should go from -pi to pi, so you don't need to change anything here, because it is the default settings. As T Step you can consider using more or less than the 100 data points, which is default, dependant on the size of the curve you want to create.
  10. Now you have the following graph:
  11. Oberon Function plotter automatically chooses the scale on both X and Y axes to best fit the plot inside the chart area. If you want to use uniform scale on both axes (so that 1 unit on axis X equals to 1 unit on axis Y), you can go to Chart Area tab and put a checkmark into Auto Width checkbox.
  12. Remove the gridlines by going to the Gridlines tab, click the Major button for both x- and y-axis, and change the Weight settings to None. The gridlines will disappear.
  13. Now go to the X Axis tab, and click on Line to change the weight to None.
  14. Set Major Tick Marks to None.
  15. Set Position under Labels to None.
  16. Repeat steps 13-15 for the Y Axis tab. Now all axes, tick marks and labels have disappeared:
  17. Select the Data tab and place a checkmark into Show Plots Only checkbox. This will hide all the chart elements except for the function curve itself. You can also change the thickness of the curve, its color or style here, if you want.
  18. Make sure that Smoothen Curves and Auto-Reduce Nodes settings are checked.
  19. Click Generate! to create the Superellipse in CorelDRAW and close the Function Plotter dialog:
  20. Even though the curve look closed, it isn't. If you want to fill it with color, you need to close the curve first. Select it with the Pick tool in CorelDRAW and click the Auto-Close Curve on the property bar. Now you can fill the superellipse:
     

The advantage of using custom functions

Above we did not have to define our new custom function hein(x,a,n). We could as well have written the following coordinate functions from the very beginning:

X(t) = 3*sign(cos(t)*(abs(cos(t)))^(2/2.5)

Y(t) = 2*sign(sin(t)*(abs(sin(t)))^(2/2.5)

However if we want to make changes it is not at all as "streamlined" compared to using custom defined functions. Often you have to make more substitutions and you don't get the same overview. And in fact the functions used could have been much more complicated than in this example. As an added bonus to using custom functions, you can save them in an external file for future use.

Let's experiment more with our hein function. Let's use a = b = 1 in all of following examples and see what effect the parameter n has on the shape of the superellipse.

In fact if we use n = 2/3 we get the well-known mathematical curve called The Astroid. Using n = 1 will yield a square. n = 2 generally results in an ellipse, but because a = b here, we get a precise circle. When using n = 2.5 we get the Superellipse of Piet Hein and because a = b we can call it a Supercircle. With n = 10 to show that the shape will approximate a square more and more when you increase the value of n.





All these curves you can get by just changing a few parameters. For example you get the Astroid by using the following coordinate functions for x(t) and y(t) respectively: hein(cos(t),1,2/3) and hein(sin(t),1,2/3). So very easily you get a whole bunch of curves just by changing a few parameters. Good luck with your investigations!


[ 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.