5 ms·
"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 applicabl
by TheDudeMan 2y ago
"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?
- sircastor 2y agoI 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.
- n4r9 2y agoThis 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?"
- int_19h 2y agoIs 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/100282.pdf https://academic.oup.com/comjnl/article-pdf/10/3/282/1333509...
- sircastor 2y agoI meant more specifically the first time it was really being used as a rapidly drawn object on a screen.
- voiceblue 2y agoHelps explain why Jobs turned out the way he did, when perfectly capable people behaved this way around him.
- TheDudeMan 2y agoI wonder whether, prior to this conversation, Steve had ever communicated to Bill that rounded rects would be nice.
- lukas099 2y agoMaybe he didn’t realize he wanted it until he saw it without it
- bhaak 2y agoI 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 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.
- Someone 2y ago> 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.
- int_19h 2y agoThe 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.
- rob74 2y agoAlso, 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.