Round Rects Are Everywhere! 圆形矩形无处不在!

作者: 安迪·赫茨菲尔德 日期: 1981年5月 人物: 史蒂夫·乔布斯、比尔·阿特金森 主题: 软件设计、灵感、QuickDraw 概括: 关于苹果第一代Macintosh的开发以及制造它的人的轶事: 史蒂夫通过指出现实世界的一些事情来激励比尔

Bill Atkinson worked mostly from his home, but when he achieved something important, he would go to Apple’s office to share it with others. This time, he went to the Macintosh office at Texaco Towers to show off his new oval routines. These routines were very smart and used a special way of doing things that was clever.

比尔·阿特金森大部分时间在家工作,但当他取得重要成就时,他会去苹果办公室与其他人分享。
这一次,他来到德士古大厦的麦金塔办公室,展示他的新椭圆形程序。
这些例程非常聪明,并且使用了一种聪明的特殊方式来做事。

Bill added some new code to QuickDraw. This code helped QuickDraw draw circles and ovals very fast. This was a bit tricky because circles usually require calculations that include square roots. The computer’s processor didn’t support these types of calculations. However, Bill found a smart way to do the circle calculation using only addition and subtraction, which the computer’s processor could handle. Bill’s method was efficient and worked well for the computer.

Bill 向 QuickDraw 添加了一些新代码。这段代码帮助 QuickDraw 非常快速地绘制圆形和椭圆形。
这有点棘手,因为圆通常需要包含平方根的计算。计算机的处理器不支持这些类型的计算。
然而,比尔找到了一种仅使用加法和减法进行圆计算的聪明方法,计算机处理器可以处理这种方法。
比尔的方法非常高效,并且在计算机上运行良好。

Bill’s way of doing things used a helpful idea. The sum of a list of odd numbers always equals the next perfect square. For example, 1 + 3 is equal to 4, and 1 + 3 + 5 is equal to 9. This helped Bill know when to change the moving part (the dependent coordinate) quickly. He used a loop to do this, which meant it didn’t take long. This allowed QuickDraw to draw circles quickly.

比尔的做事方式使用了一个有用的想法。奇数列表的总和始终等于下一个完全平方数。
例如,1 + 3 等于 4,1 + 3 + 5 等于 9。这有助于 Bill 知道何时快速更改移动部分(从属坐标)。
他使用了一个循环来完成此操作,这意味着不需要很长时间。这使得 QuickDraw 能够快速绘制圆圈。

Bill showed his demo on the Lisa computer, and it quickly filled the screen with circles and ovals of different sizes. This happened very quickly. However, Steve Jobs seemed concerned. “What about rectangles with rounded edges?” he asked. “Can we also draw those?”

比尔在丽莎电脑上展示了他的演示,屏幕很快就充满了不同大小的圆形和椭圆形。
这一切发生得很快。然而,史蒂夫·乔布斯似乎很担心。 “那么带有圆角边缘的矩形呢?”他问。 “我们也可以画那些吗?”

“No, it’s not possible to do that. It would be very difficult and probably not necessary. I think Bill got a bit upset because Steve wasn’t very impressed with the fast curves and still wanted more changes.”

“不,这是不可能的。这会非常困难,而且可能没有必要。
我认为比尔有点不高兴,因为史蒂夫对快速弯道印象不深,仍然想要更多改变。”

Steve started talking very seriously. “Rectangles with rounded corners are everywhere! Just look around this room.” And indeed, there were many things in the room that were rectangles with rounded corners, like the whiteboard and some of the desks and tables. Then Steve pointed outside the window. “And outside, you can see even more of them!” He convinced Bill to take a short walk with him around the block, pointing out all the rectangles with rounded corners they could see.

史蒂夫开始非常严肃地说话。 “到处都是圆角矩形!看看这个房间。”确实,房间里有很多东西都是圆角长方形的,比如白板和一些课桌。
然后史蒂夫指着窗外。 “而在外面,你可以看到更多!”他说服比尔和他一起在街区周围散步,指出他们能看到的所有圆角矩形。

When Steve and Bill saw a sign that said “No Parking”, it worked. “I give up”, Bill said. “It’s really hard, I’ll go back home and try again.”

当史蒂夫和比尔看到“禁止停车”的标志时,它起作用了。 “我放弃了”,比尔说。 “真的很难,我会​​回家再试一次。”

Bill went back to work the next day with a big smile on his face. He was now able to draw round rectangles very quickly on his computer. He added this code to his program called LisaGraf and called it “RoundRects”. Over the next few months, round rectangles became important parts of the computer’s user interface and people could not imagine using the computer without them.

第二天,比尔带着灿烂的笑容回去工作。他现在能够在计算机上非常快速地绘制圆角矩形。
他将此代码添加到名为 LisaGraf 的程序中,并将其命名为“RoundRects”。
在接下来的几个月里,圆角矩形成为计算机用户界面的重要组成部分,人们无法想象没有它们如何使用计算机。
目录