Squircle

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Script error: No such module "Distinguish". Template:Use British English

File:Superellipse chamfered square.svg
Squircle centred on the origin (a = b = 0Script error: No such module "Check for unknown parameters".) with minor radius r = 1Script error: No such module "Check for unknown parameters".: x4 + y4 = 1Script error: No such module "Check for unknown parameters".

A squircle is a shape intermediate between a square and a circle. There are at least two definitions of "squircle" in use, one based on the superellipse, the other arising from work in optics. The word "squircle" is a portmanteau of the words "square" and "circle". Squircles have been applied in design and optics.

Superellipse-based squircle

In a Cartesian coordinate system, the superellipse is defined by the equation |xara|n+|ybrb|n=1, where raScript error: No such module "Check for unknown parameters". and rbScript error: No such module "Check for unknown parameters". are the semi-major and semi-minor axes, Template:Mvar and Template:Mvar are the xScript error: No such module "Check for unknown parameters". and yScript error: No such module "Check for unknown parameters". coordinates of the centre of the ellipse, and Template:Mvar is a positive number. The squircle is then defined as the superellipse where ra = rbScript error: No such module "Check for unknown parameters". and n = 4Script error: No such module "Check for unknown parameters".. Its equation is:[1]|xa|4+|yb|4=r4where rScript error: No such module "Check for unknown parameters". is the radius of the squircle. Compare this to the equation of a circle. When the squircle is centred at the origin, then a = b = 0Script error: No such module "Check for unknown parameters"., and it is called Lamé's special quartic.

The area inside the squircle can be expressed in terms of the beta function BScript error: No such module "Check for unknown parameters". or the gamma function ΓScript error: No such module "Check for unknown parameters". as[1]Area=40rr4x44dx=4r0r1x4r44dx=4r2011u44du=44r2014v3414v4dv=r201(1w)14w34dw=r201(1w)541w141dw=r2B(14,54)=4r2(Γ(1+14))2Γ(1+24)=8r2(Γ(54))2π=ϖ2r23.708149r2,where Template:Mvar is the radius of the squircle, and ϖ is the lemniscate constant.

p-norm notation

In terms of the pScript error: No such module "Check for unknown parameters".-norm ‖ · ‖pScript error: No such module "Check for unknown parameters". on R2Script error: No such module "Check for unknown parameters"., the squircle can be expressed as:𝐱𝐱cp=rwhere p = 4Script error: No such module "Check for unknown parameters"., xc = (a, b)Script error: No such module "Check for unknown parameters". is the vector denoting the centre of the squircle, and x = (x, y)Script error: No such module "Check for unknown parameters".. Effectively, this is still a "circle" of points at a distance Template:Mvar from the centre, but distance is defined differently. For comparison, the usual circle is the case p = 2Script error: No such module "Check for unknown parameters"., whereas the square is given by the p → ∞Script error: No such module "Check for unknown parameters". case (the supremum norm), and a rotated square is given by p = 1Script error: No such module "Check for unknown parameters". (the taxicab norm). This allows a straightforward generalization to a spherical cube, or sphube, in R3Script error: No such module "Check for unknown parameters"., or hypersphube in higher dimensions.[2]

Fernández-Guasti squircle

Another squircle comes from work in optics.[3][4] It may be called the Fernández-Guasti squircle or FG squircle, after one of its authors, to distinguish it from the superellipse-related squircle above.[2] This kind of squircle, centered at the origin, is defined by the equation:x2+y2s2r2x2y2=r2where Template:Mvar is the radius of the squircle, Template:Mvar is the squareness parameter, and Template:Mvar and Template:Mvar are in the interval Template:Closed-closed. If s = 0Script error: No such module "Check for unknown parameters"., the equation is a circle; if s = 1Script error: No such module "Check for unknown parameters"., it is a square. This equation allows a smooth parametrization of the transition to a square from a circle, without invoking infinity.

Polar form

The FG squircle's radial distance ρ from center to edge can be described parametrically in terms of the circle radius and rotation angle:[5]

ρ=r2s|sin2θ|11s2sin22θ

In practice, when plotting on a computer, a small value like 0.001 can be added to the angle argument 2θ to avoid the indeterminate form 00 when θ=nπ2 for any integer n, or one can set ρ=r for these cases.

Linearizing squareness

The squareness parameter s in the FG squircle, while bounded between 0 and 1, results in a nonlinear interpolation of the squircle "corner" between the inner circle and the square corner. If sL is the intended liniearly-interpolated position of the corner, the following relationship converts sL to s for use in the squircle formula to obtain correctly interpolated squircles:[5]

s=2(322)sL2(22)sL(1(12)sL)2

Periodic squircle

Another type of squircle arises from trigonometry.[6] This type of squircle is periodic in R2Script error: No such module "Check for unknown parameters". and has the equation

cos(sπx2r)cos(sπy2r)=cos(sπ2)

where Template:Mvar is the minor radius of the squircle, Template:Mvar is the squareness parameter, and Template:Mvar and Template:Mvar are in the interval Template:Open-open. As Template:Mvar approaches 0 in the limit, the equation becomes a circle. When s = 1Script error: No such module "Check for unknown parameters"., the equation is a square.

Similar shapes

File:Squircle rounded square.svg
A squircle (<templatestyles src="Template:Color/styles.css" />blue) compared with a rounded square (<templatestyles src="Template:Color/styles.css" />red).

Rounded square

A shape similar to a squircle, called a Template:Visible anchor, may be generated by separating four quarters of a circle and connecting their loose ends with straight lines, or by separating the four sides of a square and connecting them with quarter-circles. Such a shape is very similar but not identical to the squircle. Although constructing a rounded square may be conceptually and physically simpler, the squircle has a simpler equation and can be generalised much more easily. One consequence of this is that the squircle and other superellipses can be scaled up or down quite easily. This is useful where, for example, one wishes to create nested squircles.

Truncated circle

File:Truncated circles.svg
Various forms of a truncated circle

Another similar shape is a truncated circle, the boundary of the intersection of the regions enclosed by a square and by a concentric circle whose diameter is both greater than the length of the side of the square and less than the length of the diagonal of the square (so that each figure has interior points that are not in the interior of the other). Such shapes lack the tangent continuity possessed by both superellipses and rounded squares.

Rounded cube

A rounded cube can be defined in terms of superellipsoids.

Sphube

Similar to the name squircle, a sphube is a portmanteau of 'sphere' and 'cube'. It is the three-dimensional counterpart to the squircle. The equation for the FG-squircle in three dimensions is:[5]

x2+y2+z2s2r2(x2y2+y2z2+x2z2s2r2x2y2z2)=r2

In polar coordinates, the sphube is expressed parametrically as

x=rcosθ cosϕ1scos2θsin2ϕssin2θy=rcosθ sinϕ1scos2θcos2ϕssin2θz=rsinθ1scos2θ

While the squareness parameter Template:Mvar in this case does not behave identically to its squircle counterpart, nevertheless the surface is a sphere when Template:Mvar equals 0, and approaches a cube with sharp corners as Template:Mvar approaches 1.[5]

Uses

File:Squircle dishes.jpg
Squircle-shaped porcelain dishes

Squircles are useful in optics. If light is passed through a two-dimensional square aperture, the central spot in the diffraction pattern can be closely modelled by a squircle or supercircle. If a rectangular aperture is used, the spot can be approximated by a superellipse.[4]

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

Many Nokia phone models have been designed with a squircle-shaped touchpad button,[8][9] as was the second generation Microsoft Zune.[10] Apple uses an approximation of a squircle (actually a quintic superellipse) for icons in iOS, iPadOS, macOS, and the home buttons of some Apple hardware.[11] One of the shapes for adaptive icons introduced in the Android "Oreo" operating system is a squircle.[12] Samsung uses squircle-shaped icons in their Android software overlay One UI, and in Samsung Experience and TouchWiz.[13]

Italian car manufacturer Fiat used numerous squircles in the interior and exterior design of the third generation Panda.[14]

See also

References

<templatestyles src="Reflist/styles.css" />

  1. a b Script error: No such module "Template wrapper".
  2. a b Script error: No such module "citation/CS1".
  3. Script error: No such module "Citation/CS1".
  4. a b Script error: No such module "Citation/CS1".
  5. a b c d Script error: No such module "citation/CS1".
  6. Script error: No such module "citation/CS1".
  7. Script error: No such module "citation/CS1".
  8. Nokia Designer Mark Delaney mentions the squircle in a video regarding classic Nokia phone designs:
    Template:Cite video
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".
  13. Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

External links

Template:Sister project