# How to get smoother shape edges?

I am currently working on some custom icons. I stumbled upon an article which addresses issues of optical effects and illusions of shapes. What I noticed is that the shapes shown in images provided in the articles look a lot smoother than mine. I tried few of ways to maybe reach that level of smoothness (increased ppi, checked art optimized and aligned them to pixel grid) but these attempts bore no fruition.

Is it perhaps due to anti-aliasing?

Here's the article: https://medium.muz.li/optical-effects-9fca82b4cd9a

• Very nice question! – Rafael Feb 25 at 17:30

Your version at the left has the corner replaced by a fourth of circle. There's an abrupt change from straight horizontal or vertical line to circle. Human sight recognizes a step in the curvature, no matter the direction changes still smoothly- except it doesn't because practical renderings are made of pixels, so also the direction has a step, but in high res that's neglible.

(not asked, but if a railway had such curves, people would notice an unpleasant sideways thump when the curve starts and the centrifugal force jumps abruptly ON)

Any method which replaces line+circular curve with something where the curvature changes smoothly will fix it. Here's one example in Inkscape:

Both of these are rounded squares, but the blue one is converted to path (=bezier curve) and there's new nodes inserted to the midpoints of the sides

The next step is to delete all original nodes and to stretch the midpoint node handles to equally long and strictly horizontal and vertical. The result:

In Illustrator you can do the same differently:

Start with a square which is rotated exactly 45 degrees with Object > Transform > Rotate

Draw a square (red) around the rotated square, it will snap easily if you have snap to points and smart guides ON

With the anchor type conversion tool drag the handles of the rotated square to the corners of the red square

There are two methods.

I am sorry I can not give you an exact answer for Illustrator because I am using Corel Draw.

The article is focusing on the rounded corners, which can be accomplished adding a node in the middle (orange) and moving it outwards. I use the keyboard which in Corel Draw can be configured to fractions of mm, and is very exact (B)

But as you can see you need a good amount of deformation (Pink marks the original shape)

A more elegant solution is to work on the flat edges. In the end, all the shape is rounded, but the deformation needed is a lot smaller, and the results are more pleasant (C)

A round corner has a very quick change in curvature compared to straight line. This can be seen as a abrupt change where line meets arc. This is a big issue mainly in 3d surfaces but also sometimes for very astute observers in silhouettes of objects. 2D drawing is mainly silhouettes.

If i make a curvature plot, that plots the inverse of curvature (straight lines are infinite which is hard to draw), you can see this better.

A circular curve has constant curvature* where as a curve with a longer tangent has a gradually increasing curvature. Thsi gradually increasing curvature is smoother. Ideally you would match curvature on both sides of the curve boundary. But this isn't easily done with a symmetric span bezier (impossible in this case).

Now this is much more important in 3d, so 3d apps have tools for this. In 2d being close enough is often perfect, but in 3d surfaces this is not the case.

* if you think the curvature of the circular arc isn't constant then your right. Illustrator is incapable of making circles, since Bézier curves can not make but approximate circles. And the error is much more visible in higher derivates of the curve, and thus visible in curvature plots.