Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"No, there's no way to do that. In fact it would be really hard to do."

Why would Bill say this? Why would his ellipse optimization not be trivially applicable to a quarter-circle?



I asked the same question years ago. :)

The probable answer is that he thought about modeling the rectangle with rounded rects with a single mathematical expression. https://news.ycombinator.com/item?id=15073696

That's probably impossible (as rounded rects are not continuous) but also completely unnecessary as you can handle the quarter circle segments and line segments separately.


> as you can handle the quarter circle segments and line segments separately.

Possibly, but that is tricky in the presence of blitting modes such as XOR; the movement you accidentally draw a pixel twice, it would get flipped twice (nowadays, with anti-aliasing, it gets really tricky, but they didn’t have that problem yet)

You may want to draw the four circle segments in one go, too, as that allows you to share large parts of the computations for what pixels to touch.


The algorithm used to draw the ellipse should not have any issues with accidentally overdrawing even by a single pixel if your arcs are defined in 90-degree increments.

And you can, in fact, draw the four circle segments in one go, since they will all be mirror images of each other. If, instead of the absolute coordinate of the pixel, you compute the offset from the starting point, then you can compute it once, negate it as needed, and draw 4 pixels on each step.


I think as Andy writes, Bill was showing off a very impressive demo, and was maybe miffed that Steve wasn’t appreciating it.

Also, the question had just been sprung, and literally no one had ever done this before.


Is it actually true that "no-one had ever done this before?". As far as I know, the midpoint circle algorithm, being a straightforward extension of Bresenham's line algorithm, was already well-known by 1981. Indeed, here's a paper from 1967 that does basically the same thing: https://academic.oup.com/comjnl/article-pdf/10/3/282/1333509...


I meant more specifically the first time it was really being used as a rapidly drawn object on a screen.


This was my interpretation as well. Internally I would be thinking "Look, I've just worked my ass off and produced something incredible. Can't we just put it straight into production?"


Helps explain why Jobs turned out the way he did, when perfectly capable people behaved this way around him.


I wonder whether, prior to this conversation, Steve had ever communicated to Bill that rounded rects would be nice.


Maybe he didn’t realize he wanted it until he saw it without it


Also, for the most common cases this probably wasn't even needed - I bet they just stored the "masks" for rounding the corners hardcoded, as that would have been much faster.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: