I'm working on a tool to author better splines and superellipses/clothoids feature heavily. If anyone is interested here's a little demo you can play around with:
It's just a giant stack of edge case exceptions that mostly does the thing you'd expect it to, sorry about the UI, it's very much just in the exploration stage.
tty456 17 hours ago [-]
Looks interesting but not usable on mobile (although that's probably not the target platform for something like this)
thot_experiment 17 hours ago [-]
yeah, sorry, the "this" you're looking at is just a tool i made for myself to break the library in interesting ways and explore modes of interacting with more complex splines like this in order to boil it down to something that's intuitive.
there are a lot of edge cases that don't have an obvious analytical solution that's easy to state, so it's on me to encode an aesthetic fallback
scarecrw 21 hours ago [-]
Squircles are an excellent shape, slightly outdone in my opinion by their dimensional older brother the sphube. Both thoroughly described here: https://arxiv.org/abs/1604.02174
Squricles have the benefit of being bounded by exponents and more easily manipulated within CAD software
Exoristos 15 hours ago [-]
This comment sets me pondering how immense the loss may have been when design moved from hand drawing to CAD.
Gravityloss 8 hours ago [-]
I think about this too.
I think computer interfaces are very limiting and slow still. Lots of room to innovate.
darthcircuit 17 hours ago [-]
One of my favorite squircles in the wild was on the Zune 2nd gen models. It felt great to flick through your music, with the added benefit of also being able to click like a regular dpad. It felt smooth, almost like a mini touchpad for your mp3s, but without the cursor.
mosura 21 hours ago [-]
Generally speaking curves that avoid having discontinuities in their derivatives become hugely interesting the moment you want to interact with physical reality, since they are what enable smoothness. Squircles are just part of this.
This is the kind of wholesome content HN needs more of.
Some hate it, some love it.
My perspective on this post is, great! Another idea I can add to my bookmarks for when I’m designing.
Appreciate the OP!
Descon 16 hours ago [-]
Squolesome content!
viktorcode 7 hours ago [-]
Some years ago I had to add a squircle to a UI system that lacked one. I compared Figma's approach to Apple's and found out they do not match well. So, then I just drew a default rounded rectangle path in Apple's playground and read the Bézier curves from that path. I got my control points I could use to perfectly represent Apple's approach!
One interesting detail I noticed: in Apple's squircles the rounded corners are slightly pushing outwards from the flatness of a side. But the absolute value is very low, so the effect isn't visible unless you specifically look for it.
fiatpandas 20 hours ago [-]
iOS squircle primarily exists because of Apple's use of it in industrial design. Yes a squircle icon rests easier on the eyes, so it has some function, but IMO it's more a nod to the importance of G2/G3 curvature and Class-A surfaces in Apple's industrial design and CNC process. Objects that are nicer to hold, with much more visually pleasing highlights, and arguably more efficient use of machine time.
fasterik 22 hours ago [-]
For those who are confused by the plot like I was, the horizontal axis is arc length, and the vertical axis is curvature.
croisillon 21 hours ago [-]
and the axis zooms from a maximum of 2 to a maximum of 200
terhechte 23 hours ago [-]
PaintCode! Here's a name I haven't heard in a long time. I had a license for this and one of my Mac apps (InstaDesk, later, PhotoDesk) used it a lot for all kinds of UI elements.
ChrisMarshallNY 16 hours ago [-]
I think it's still around, but I haven't used it in ages.
It worked great. I could feed it a line drawing, and it would emit the core graphics code to reproduce the drawing in realtime. You could easily create one of those animations that show the shape being drawn.
amelius 10 hours ago [-]
Anyone else who thinks that the "Apple" option is the least beautiful of these options?
And how long until we get these squircles in CSS?
Semiapies 9 hours ago [-]
Corner-shape:squircle is apparently in desktop browsers, now.
yummypaint 9 hours ago [-]
It also appears to be the only one that doesn't use the rounded corner style Apple was absurdly granted a design patent on and subsequently used to have their competitors phones pulled from the US market. The others all look they have some 2nd order smoothing beyond matching the tangents. Amusing stuff.
pampas 21 hours ago [-]
The maths is elegant but I'm really tired of squircle icons. I find them ugly and I want to go back to the good old days where every icon could have it's own distinctive shape which makes that one app much easier to find. The human brain is great at quickly recognizing shapes and angles so why throw it away. Someone got a promotion for squircles.
apt-apt-apt-apt 21 hours ago [-]
I find rounded rects to be jarring in their harsh edges, while squircles fix that.
dsego 7 hours ago [-]
Me too, for some reason they cause unease, they are very uncanny. Reminds me of those wristwatches from the 70ies, the aesthetics of it are just repulsive.
xg15 23 hours ago [-]
Can someone explain the difference to me between a rounded rectangle and a squircle?
layer8 23 hours ago [-]
The sides of a squircle never become completely straight, they are curved at every point.
Of course, Apple’s squircles deviate from that by inserting straight line segments. What remains is that the corners still have a non-constant curvature.
Sharlin 20 hours ago [-]
A highway or railway curve between two straight segments is usually not a simple circle arc. If it were, the sudden discontinuity in higher derivatives (acceleration and jerk) at the transition point from straight to curved would feel uncomfortable, be harder to anticipate and slow down appropriately by a driver, and cause unwanted shear stresses to mechanical parts. So transition curves are used that smoothly vary the curvature from zero to that of the circular segment and back to zero again. The typical transition curve in engineering is called a clothoid, which is one of the squircle types mentioned in the article.
In digital graphic design curvature discontinuities don’t usually cause mechanical issues, but discontinuities in curved shapes can still look jarring – for whatever reason the visual system is rather good at detecting such sudden changes in shapes, even those that naively "should" look smooth.
srean 12 hours ago [-]
Ha! Must you tease me so ?
This is one of my pet fascinations (nerd snipe pits) - deciphering transition curve markings along railway tracks while travelling by train, preferably peeling an orange [*]. These transition curves are usually some approximation of an Euler Spiral (aka Cornu Spiral, Clothoid), typically a cubic parabola. To compute the Euler spiral as a closed form one gets into Fresnel integrals. Cubic parabolas are a lot easier to compute and for short arc lengths almost indistinguishable.
These get used in roller-coasters too, for pretty much the same reason (to avoid the "jerk")
What is not so well known is that Markov (of Markov chains) worked on the problem of optimal curves for joining straight railway tracks constrained by steering dynamics of trains. I think this was before his work on chains. His formulation was later rediscovered independently by Dubins.
Train track transition curve diagrams are also where you would still encounter the mow archaic trigonometric function the versine except that they standardize it to some standard radius that is not unity.
alanbernstein 22 hours ago [-]
On a rounded rectangle, the shape of the corner is continuous, but the curvature is not - it jumps from 0 to R. Rounded rectangles look fine, but if you're attuned to it, this subtle discontinuity can look just a little bit off.
A squircle is one (actually several variations) approach to making the curvature continuous.
I would say it's still a subjective aesthetic difference, but you can use math jargon to explain why you like one better than the other.
YuechenLi 22 hours ago [-]
A regular rounded rectangle is G1 continuous while a squircle (superellipse) is G2 continuous, which means that it is not only continuous on position and tangent for its outline, but the curvature rate of change for the outline is also continuous, so it's smoother and doesn't have hard difference between "line" and "rounded corner" on the shape.
flowerlad 23 hours ago [-]
A standard rounded rectangle has quarter-circle corners. A squircle starts curving earlier and more gently, with a gradual transition from its flatter sides into its corners.
Personally, I prefer regular old round rectangles. Squircles are ugly.
prideout 21 hours ago [-]
Like Raph's post says: squircles do not have a single agreed-upon mathematical definition. I don't think "rounded rectangle" does either.
raphlinus 21 hours ago [-]
I think a rounded rectangle is defined as 4 straight line segments joined with G1 continuity to quarter circle arcs. I'm unaware of any other definition. The only variation I know is whether the radii have to be the same or can be different. Flexible implementations do allow the latter.
kbelder 19 hours ago [-]
So a letter "D" is an extreme rounded rectangle with different radii on the left and right side? That makes some sense.
I like that he asked this question because that was not a question I thought to even ask
wolttam 23 hours ago [-]
Rounded rectangle is a rectangle with fixed radius corners, a “squircle” is some shape where the corner’s radius is not constant.
(My interpretation)
vindex10 21 hours ago [-]
I came here expecting squirrels, haha)
coolfox 20 hours ago [-]
don't let the models see this. they're obsessed with rounded corners
MitPitt 23 hours ago [-]
Too bad squircle corner shape (along with scoop, notch, bevel) are only available on chrome as a CSS feature, but not firefox or safari. I hate rounded corners in UI, with a passion.
layer8 23 hours ago [-]
I dislike rounded corners as well, but also when they are squircles.
Firefox recently went hard on really rounded corners in a recent version, and me being an antique interface connoisseur went "Oh hey, project athena is back" an aesthetic I find hideously ugly.
The fun thing is athena toolkit widgets can actually be made to look halfway decent. Put a "*shapeStyle: rectangle" in your xresources. My xmessages have never looked sharper. [1]
1. A blatant lie, I have it themed to look like an old amber monochrome monitor. But "if" I had employed some tasteful pastels my xmessages would look sharp. https://nl1.outband.net/image/xmessage.png
https://thiic.cc/omnispline/
It's just a giant stack of edge case exceptions that mostly does the thing you'd expect it to, sorry about the UI, it's very much just in the exploration stage.
there are a lot of edge cases that don't have an obvious analytical solution that's easy to state, so it's on me to encode an aesthetic fallback
Some hate it, some love it.
My perspective on this post is, great! Another idea I can add to my bookmarks for when I’m designing.
Appreciate the OP!
One interesting detail I noticed: in Apple's squircles the rounded corners are slightly pushing outwards from the flatness of a side. But the absolute value is very low, so the effect isn't visible unless you specifically look for it.
It worked great. I could feed it a line drawing, and it would emit the core graphics code to reproduce the drawing in realtime. You could easily create one of those animations that show the shape being drawn.
And how long until we get these squircles in CSS?
One consequence of that is that they scale more nicely for nesting: https://thatsmaths.com/wp-content/uploads/2016/07/squircles-... (right half of the image)
Of course, Apple’s squircles deviate from that by inserting straight line segments. What remains is that the corners still have a non-constant curvature.
In digital graphic design curvature discontinuities don’t usually cause mechanical issues, but discontinuities in curved shapes can still look jarring – for whatever reason the visual system is rather good at detecting such sudden changes in shapes, even those that naively "should" look smooth.
This is one of my pet fascinations (nerd snipe pits) - deciphering transition curve markings along railway tracks while travelling by train, preferably peeling an orange [*]. These transition curves are usually some approximation of an Euler Spiral (aka Cornu Spiral, Clothoid), typically a cubic parabola. To compute the Euler spiral as a closed form one gets into Fresnel integrals. Cubic parabolas are a lot easier to compute and for short arc lengths almost indistinguishable.
These get used in roller-coasters too, for pretty much the same reason (to avoid the "jerk")
What is not so well known is that Markov (of Markov chains) worked on the problem of optimal curves for joining straight railway tracks constrained by steering dynamics of trains. I think this was before his work on chains. His formulation was later rediscovered independently by Dubins.
[*] I am so glad you asked why an orange https://arxiv.org/html/1202.3033v1
A squircle is one (actually several variations) approach to making the curvature continuous.
I would say it's still a subjective aesthetic difference, but you can use math jargon to explain why you like one better than the other.
Personally, I prefer regular old round rectangles. Squircles are ugly.
(My interpretation)
The fun thing is athena toolkit widgets can actually be made to look halfway decent. Put a "*shapeStyle: rectangle" in your xresources. My xmessages have never looked sharper. [1]
1. A blatant lie, I have it themed to look like an old amber monochrome monitor. But "if" I had employed some tasteful pastels my xmessages would look sharp. https://nl1.outband.net/image/xmessage.png
> Added support for the corner-shape property.
https://developer.apple.com/documentation/safari-release-not...
There's a wonderful book about it: https://link.springer.com/book/10.1007/978-3-031-13783-9
Amazing.