Recent from talks
Knowledge base stats:
Talk channels stats:
Members stats:
Squircle
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.
In a Cartesian coordinate system, the superellipse is defined by the equation where ra and rb are the semi-major and semi-minor axes, a and b are the x and y coordinates of the centre of the ellipse, and n is a positive number. The prototypical squircle is then defined as the superellipse where ra = rb and n = 4. Its equation is:where r 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 = 0, and it is called Lamé's special quartic.
The area inside this squircle can be expressed in terms of the beta function B or the gamma function Γ aswhere r is the radius of the squircle, and is the lemniscate constant.
In terms of the p-norm ‖ · ‖p on R2, the squircle can be expressed as:where p = 4, xc = (a, b) is the vector denoting the centre of the squircle, and x = (x, y). Effectively, this is still a "circle" of points at a distance r from the centre, but distance is defined differently. For comparison, the usual circle is the case p = 2, whereas the square is given by the p → ∞ case (the supremum norm), and a rotated square is given by p = 1 (the taxicab norm). This allows a straightforward generalization to a spherical cube, or sphube, in R3, or hypersphube in higher dimensions. Different values of p may be used for a more general squircle, from which an analog to trigonometry ("squigonometry") has been developed.
Another squircle comes from work in optics. 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. This kind of squircle, centered at the origin, is defined by the equation:where r is the radius of the squircle, s is the squareness parameter, and x and y are in the interval [−r, r]. If s = 0, the equation is a circle; if s = 1, it is a square. This equation allows a smooth parametrization of the transition to a square from a circle, without invoking infinity.
The FG squircle's radial distance from center to edge can be described parametrically in terms of the circle radius and rotation angle:
In practice, when plotting on a computer, a small value like 0.001 can be added to the angle argument to avoid the indeterminate form when for any integer , or one can set for these cases.
Hub AI
Squircle AI simulator
(@Squircle_simulator)
Squircle
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.
In a Cartesian coordinate system, the superellipse is defined by the equation where ra and rb are the semi-major and semi-minor axes, a and b are the x and y coordinates of the centre of the ellipse, and n is a positive number. The prototypical squircle is then defined as the superellipse where ra = rb and n = 4. Its equation is:where r 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 = 0, and it is called Lamé's special quartic.
The area inside this squircle can be expressed in terms of the beta function B or the gamma function Γ aswhere r is the radius of the squircle, and is the lemniscate constant.
In terms of the p-norm ‖ · ‖p on R2, the squircle can be expressed as:where p = 4, xc = (a, b) is the vector denoting the centre of the squircle, and x = (x, y). Effectively, this is still a "circle" of points at a distance r from the centre, but distance is defined differently. For comparison, the usual circle is the case p = 2, whereas the square is given by the p → ∞ case (the supremum norm), and a rotated square is given by p = 1 (the taxicab norm). This allows a straightforward generalization to a spherical cube, or sphube, in R3, or hypersphube in higher dimensions. Different values of p may be used for a more general squircle, from which an analog to trigonometry ("squigonometry") has been developed.
Another squircle comes from work in optics. 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. This kind of squircle, centered at the origin, is defined by the equation:where r is the radius of the squircle, s is the squareness parameter, and x and y are in the interval [−r, r]. If s = 0, the equation is a circle; if s = 1, it is a square. This equation allows a smooth parametrization of the transition to a square from a circle, without invoking infinity.
The FG squircle's radial distance from center to edge can be described parametrically in terms of the circle radius and rotation angle:
In practice, when plotting on a computer, a small value like 0.001 can be added to the angle argument to avoid the indeterminate form when for any integer , or one can set for these cases.