hn.today

Squircles (Page on Linebender Wiki)

linebender.org223 points56 comments
Screenshot of Squircles (Page on Linebender Wiki)

A squircle is a family of shapes between a circle and a square, not one uniquely defined curve. The best-known version, the superellipse, follows |x|ⁿ + |y|ⁿ = 1: exponent 2 gives a circle, while increasing the exponent makes the shape more square-like. Because different squircle constructions can look similar, the page proposes comparing them by “gauge,” the shared x- and y-coordinate at the midpoint of a quadrant. It also distinguishes smooth analytic curves from flat-sided designs made by joining curved corners to straight edges; the latter can fit rectangles of different proportions without changing the corner shape.

The discussion compares prominent designs and their trade-offs. Apple’s iOS 7 icon shape is a flat-sided squircle, not the exponent-5 superellipse initially proposed; despite minor asymmetry and an unnecessary line segment, it can be closely matched by an exponent-3 superellipse with suitable flat sides. Figma’s influential approximation has limitations in its curvature transitions and available gauges, while a clothoid version achieves smoother G2 continuity. The page connects these options to CSS’s standardized superellipse corners and describes Chromium’s efficient Bézier approximation. It argues that G2 continuity generally supports visual smoothness, identifying clothoid curves and superellipses above exponent 2 as strong choices. Other alternatives, such as polynomial spirals and specialized squircle formulas, are also noted, along with the observation that offset and concentric squircles can be useful even though offsets are not themselves exact squircles.

Read on linebender.org56 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.