The Squircle Conquest: Apple Icons Meet CSS Standards
Squircles are shapes intermediate between circles and squares, with no single mathematical definition but multiple curve variants achieving this form. The best-known is the superellipse, popularized by Piet Hein and detailed by Martin Gardner in Scientific American in 1977. Superellipses follow the formula |x|^n + |y|^n = 1, producing a circle when n=2 and asymptotically approaching a square as n approaches infinity.
Apple brought squircles to mainstream attention by switching iOS icon shapes from rounded rectangles to squircles in iOS 7 in 2013. Early analysis incorrectly identified the Apple shape as a superellipse with exponent 5, but extraction and analysis of the actual Bézier curves revealed it to be a flat-sided variant. The Apple design contains minor flaws including an extraneous straight line segment and asymmetry. Without its flat side, the Apple squircle maintains a fixed gauge measurement of 0.809.
Figma published an influential analysis and developed an approximation using three Bézier segments per quadrant, correcting some Apple flaws while introducing curvature discontinuities. Its gauge capability ranges from 0.707 to 0.854 without a flat side. Alternative approaches like clothoid squircles offer G2 continuity improvements. Squircles recently became standardized in CSS through the corner-shape property in the box decorations spec, with browser implementations like Chromium using two-segment Bézier approximations to approximate the mathematical ideal.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.