home    Nederlands

# Superellipse

## Introduction

A supercircle is a generalisation of a circle. Where the well-known equation for a circle is x²+y²=r², for a supercircle it is x^n+y^n=r^n with n≥2.
For n=2 we have the circle, for n≈10 the supercircle is almost undistinguishable from a square.
More general the equation for a superellipse with halfaxes a and b can be written as (x/a)^n+(y/b)^n=1 .
Although superellipses as mathematical shapes are 'unnatural', they are esthetically pleasing as shapes between ellipses and rectangles.

## Computation

The easiest way to compute the detailed shape of a superellipse is with awk . Under Linux this is always available. For Microsoft Windows awk.exe can be downloaded from http://unxutils.sourceforge.net/ .
Execute
awk '{a=123.0;b=456.0;n=7.8;x=0.0+\$0;if(x>=0.0&&x<a)print x " " b*exp(log(1.0-exp(n*(log(x)-log(a))))/n);}'
where the values for halfwidth a, halfheight b and power n should be replaced by their actual values. By typing a x-value, the coordinates of a point on the superellipse are returned. Finish the program by typing ^D (letter d while holding down the Ctrl key).

## A superellipse table

For my personal use I constructed a readingtable of 315 × 57 cm in the shape of a superellipse (x/1575)^35+(y/285)^35=1 .
First I made a gauge based on a exact drawing on graph-paper of the desired curve. Limited to the part where the superellipse departs more than a fraction of a millimeter from the full rectangle, just 4 × 12 cm. A corner of the finished table looks like this. home (English)    Nederlands