Sunday 14 March 2021

Squircles and Sphubes

I came across a reference to a shape called a squircle recently, a portmanteau word formed from square and circle. I thought I'd investigate its mathematical properties. The squircle is a special case of the superellipse defined as:$$
\bigg |\frac{x-a}{r_a}\bigg |^n+\bigg |\frac{y-b}{r_b}\bigg |^n=1$$where \(r_a\) and \(r_b\) are the semi-major and semi-minor axes and \(a\) and \(b\) are the \(x\) and \(y\) coordinates of the centre of the ellipse. The squircle is then defined as the superellipse with \(r_a=r_b=r\) and \(n=4\). So we have:$$(x-a)^4+(y-b)^4=r^2$$where \(r\) is the minor radius of the squircle. In its simplest form, when \(a=b=0\) and \(r=1\), we have:$$x^4+y^4=1$$Figure 1 shows this:


Figure 1: created using GeoGebra

The area inside the circle can be expressed in terms of the gamma function \( \Gamma(x) \) as follows:$$
\text{Area }=4r^2 \frac{\big ( \Gamma(1+\frac{1}{4}) \big )^2}{\Gamma(1+\frac{2}{4})}=8r^2 \frac{ \big ( \Gamma(\frac{5}{4}) \big )^2}{\sqrt{ \pi}}=S \sqrt{2} r^2 \approx 3.708 r^2$$where \(r\) is the minor radius of the squircle and \(S\) is the lemniscate constant. I've no idea as to how that equation comes about and just summarising what's in Wikipedia.

Another squircle is of the form:$$x^2+y^2-\frac{s^2}{r^2}x^2y^2=r^2$$ where \(r\) is the minor radius of the circle and \(s\) is the squareness parameter. If \(s=0\), we have a circle and if \(s=1\), we have a square. Figure 2 shows the case where \(r=1\) and \(s=0.9\). This form of the squircle can be referred to as the FG-squircle after Fernández–Guasti, after one of its authors.


Figure 2: GeoGebra link

Squircles have also been used to construct dinner plates. A squircular plate has a larger area (and can thus hold more food) than a circular one with the same radius, but still occupies the same amount of space in a rectangular or square cupboard. See Figure 3:


Figure 3: source

There is a site that let's you create your own squircles. See Figure 4.



Figure 4: https://squircley.app/

The three dimensional equivalent of a squircle could be called a sphube as this article suggests: Three Dimensional Counterpart of the FG-squircle. The equation of such a 3-D shape is given by:$$
x^2+y^2+z^2-\frac{s^2}{r^2}x^2y^2--\frac{s^2}{r^2}y^2z^2-\frac{s^2}{r^2}x^2z^2+\frac{s^4}{r^4}x^2y^2z^2=r^2$$Just like the FG-squircle, this shape has two parameters: squareness \(s\) and radius \(r\). When \(s\) = 0, the shape is a sphere with radius \(r\). When \(s =1\), the shape is a cube with side length \(2r\). In between, it is a three dimensional shape that resembles the sphere and the cube. The shape is shown in Figure 5 at varying values of squareness.


Figure 5: source

The article mentioned previously,  Three Dimensional Counterpart of the FG-squircle, treats other 3-D shapes among them being the: 
  • squircular ellipsoid (sqellipsoid)
  • squircular cylinder (sqylinder)
  • squircular cone (sqone)
  • sphylinder

No comments:

Post a Comment