TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Optical Effects in User Interfaces

200 pointsby Ivoahover 7 years ago

11 comments

vladdanilovover 7 years ago
Good article in general but mixed with many fallacies.<p>1. Size is obviously not height. It&#x27;s the area of the shape. There are complications though, e.g. negative space often adds weight. Blurring shapes is a terrible idea here.<p>2. Aligning shape edges is also an optimization problem to equalize overshooting areas.<p>3. Finding a visual center has nothing to do with the circumcircle in a general case. It&#x27;s a well-known centroid. But, again, there are lots of complications.<p>4. A circle is perfectly circular. There are other reasons for the &quot;O&quot; adjustments in typography. It&#x27;s even mentioned later on with no connection to here.<p>5. The round corners is another story. In this case G2 fillets are most pleasing. It&#x27;s hard to make this adjustment by hand, that is why the examples look bad and unnatural. Squircle, Lamé curve, has nothing to do with the iOS icon shape.<p>Most of these adjustments can be done with mathematical precision. The rest can be approximated well enough with mathematical models. Ideally, design tools should guide these adjustments. There is definitely interest. My most successful plugin for Sketch happened to be the one for optical adjustments <a href="http:&#x2F;&#x2F;designplugins.com&#x2F;optically" rel="nofollow">http:&#x2F;&#x2F;designplugins.com&#x2F;optically</a>.
评论 #15423844 未加载
评论 #15424340 未加载
crazygringoover 7 years ago
Regarding optical size of icons... for <i>years</i> I&#x27;ve wished that icons were sized (in the dock, in Finder, etc.) to consistent maximum <i>area</i> on top of maximum height&#x2F;width, so that applications with square icons wouldn&#x27;t look bigger than the circular or irregular ones. It would make everyone&#x27;s dock look <i>so</i> much better.<p>For example, a 32 x 32 icon has 1,024 pixels. If we declared than any icon can only use 2&#x2F;3 of the available area, then square icons would be reduced to 26 x 26, circle icons to 29 x 29, and more irregular shapes like a printer or magnifying glass would presumably get the full 32 x 32. It&#x27;s trivial to sum up and calculate from the amount of transparency, and would leave rows of icons <i>so</i> much more optically balanced.<p>(More advanced -- to deal with hollows, you can &quot;shrink wrap&quot;&#x2F;&quot;gift wrap&quot; the icon before calculating area.)
评论 #15424852 未加载
rawnlqover 7 years ago
Fun fact, the google logo is not a circle: <a href="http:&#x2F;&#x2F;i.imgur.com&#x2F;lBk99be.jpg" rel="nofollow">http:&#x2F;&#x2F;i.imgur.com&#x2F;lBk99be.jpg</a>
评论 #15424084 未加载
kaffeemitsahneover 7 years ago
I like the optical effect where 1&#x2F;4 of the article is obscured by two banners.
评论 #15424364 未加载
评论 #15443214 未加载
mjw1007over 7 years ago
To me the circle in the diagram which is supposed to be &quot;equal visual weight&quot; looks larger than the square, while the ones in the first example appear about the same.<p>But if I zoom the page out to 50%, or look at it on my phone, then things do work the way the author expects them to.<p>So I fear it may be difficult to correct for these effects as long as people use different screens.
twissover 7 years ago
&gt; What is bigger: a 400-pixel square or a 400-pixel circle? Geometrically speaking, their width and height are equal.<p>The area of a circle isn&#x27;t width * height though, obviously. If you plug pi * r^2 = 400^2 into WolframAlpha, you get a diameter of 2*r = 451.35 pixels, very close to the 450 pixels the author came up with.<p>For the icons too, maybe you could just count the pixels (ask Photoshop the amount of filled in pixels?) and make sure every icon has a similar amount.
Gravitylossover 7 years ago
Things like weight, continuous first and second derivatives in other words.
dahartover 7 years ago
Inscribing something in a circle isn&#x27;t good enough. Use the image center of mass to really balance icons. Are there any design tools that provide center of mass?<p>Here&#x27;s a minimal python&#x2F;scipy script to measure the image centroid (of a b&#x2F;w image):<p><pre><code> from scipy import ndimage im = ndimage.imread(args.input) com = ndimage.measurements.center_of_mass(im)[:2] size = im.shape[:2] print(&quot;positive x is right, positive y is up&quot;) print(&quot;image centroid is offset from image center by x:{0:.1f} pixels by y:{1:.1f} pixels&quot;.format(com[1] - size[1]&#x2F;2, -(com[0] - size[0]&#x2F;2)))</code></pre>
corey_moncureover 7 years ago
Is it safe to assume that pixels are perfectly square?
评论 #15424548 未加载
评论 #15424782 未加载
xaedesover 7 years ago
s&#x2F;weight&#x2F;area&#x2F;
cup-of-teaover 7 years ago
This makes me think of optical margins which are used in some typesetting software (like LaTeX with the microtype package). The thing is when it comes to geometry for human consumption the only thing that matters is how it <i>looks</i>. My Dad actually taught me this a long time before I knew about typography. He told me that while a spirit level is an important tool, it&#x27;s a mistake to put a shelf up level if it doesn&#x27;t <i>look</i> level next to the ceiling.