The single most significant component of the original Macintosh technology was QuickDraw, the graphics package written by Bill Atkinson for the Lisa project, which pushed pixels around the frame buffer at blinding speeds to create the celebrated user interface. One of QuickDraw's main jobs was to provide the primitives for quickly drawing text and graphics into overlapping windows, when the window that you're drawing into may be partially obscured by other windows. Applications could just draw without worrying if their window was obstructed because Quickdraw, with a little help from the window manager, would take care of the clipping to make sure pixels stayed inside in their window.

Overlapping windows can form complex shapes, especially if their corners are rounded. The key data structure in QuickDraw was called a "region", which compactly represented an area of the screen. QuickDraw provided routines that allowed the programmer to define regions by using the built-in drawing primitives, and to perform operations with them like union and intersection. Most importantly, all of the QuickDraw drawing primitives clipped to the intersection of three different regions, to allow drawing into obscured windows. We considered QuickDraw's speed and deftness at region handling to be the most significant "crown jewel" in Apple's entire arsenal.

The region data structure was a variable-sized list of what Bill called "inversion points", the coordinate values where black changed to white or vice versa. Since most regions were mostly rectangular, there weren't many inversion points, so regions were quite compact. But occasionally, there were lots of inversions, like in a circle, so regions grew as necessary.

QuickDraw was written entirely by Bill Atkinson, and in the spring of 1982 it was still evolving. He had recently sped up region operations by more than a factor of four. The concept of "pictures", a set of drawing operations grouped together for easy playback, was just added to the package, and hadn't really settled down yet. At this point, the Lisa applications were beginning to come together and Bill was changing QuickDraw in response to what they needed.

One morning, we were shocked to hear that Bill had gotten into a really bad car accident on his way into work. Apparently, he had turned a corner and not seen a parked truck, and slammed his little Corvette into the truck, shearing the roof off the top of his car. Bill was knocked unconscious and got pretty banged up, although he was still in one piece - one of the police officers who surveyed the wrecked Corvette commented that it was a miracle that Bill wasn't decapitated. This was a little more than a year after Woz's plane crash, but it brought back memories of that.

When Steve Jobs heard about the accident, he immediately jumped into his car and drove to the hospital where they had taken Bill. He was in a hospital bed, and had only recently regained consciousness by the time Steve arrived. He sustained a head injury and lost some blood, but luckily there were no major problems.

Steve entered the hospital room and was relieved to see that Bill had regained consciousness. "Is everything OK?", Steve asked. "We were pretty worried about you."

Bill turned his head and looked at Steve. He managed a painful smile. "Don't worry, Steve, I still remember regions."

I must add a few details to Andy's story of Bill's accident.
The truck Bill hit straddled a road near his home that he drove on every day. There had never before been a vehicle at that location. He didn't see it soon enough to stop. But he rolled his upper body onto the passenger seat and thus avoided decapitation.
The Corvette emerged from the other side of the truck and proceeded down the road on its own. After a block or so, it crossed a major boulevard and came to rest on the other side. Bill regained consciousness just long enough to tell the police officer, "Call Larry Tesler and tell him I'll be late for the meeting." He then passed out and forgot the conversation. But I did get the call.

from Glenn Fleishman on March 06, 2004 06:21:07

I met Bill a few times after he had moved into his photographic career, and asked him about a story I'd read about how he developed the implementation of overlapping windows, and I can't recall his reply. The story I'd heard was that Bill was unable to get the code to work as he wanted, but then heard via Steve Jobs that PARC had actually developed functional overlapping window union/exclusion code. So Bill went and wrote the code. Is this story true? Based on some of these other stories it sounds in character.

from Brian Matthews on January 20, 2007 18:18:53

I remember long discussions about computing and computers with my coworkers in the mid to late 80's. Occasionally the topic would be about why Macs were so obviously better than other computers. My coworkers just used their Macs as tools, so they'd have the obvious reasons. But I programmed my Mac, so my answer was invariably "regions".
I'd never heard the story of Bill's accident, I'm glad it turned out ok (i.e. he remembered regions :-)).

from phoebus66 on March 20, 2013 10:17:34

I never passed that problem when I was confronted with it when wanting to cull normally hidden lines in a 3D drawing algorithm. Since not being a mathematition and worked out simple sollutions for the spacial drawing of lines without considering higher maths than vectors I couldn't get passed that problem of hiding hidden lines. I got as far as drawing the wireframe srructures and still had an infinity problem somewhere in the middle of the virtual space. I used an Atari ST. Animated 3D a walking man (legs arms elbows feet movements etc by use of sine, cosine, limits etc ...) walking in a circle in perspective view.

from dubaaron on September 03, 2013 07:25:36

@glennf: From what I read in the "Steve Jobs" biography by Isaacson, they hadn't actually achieved overlapping windows at Xerox PARC, but the visitors from Apple thought they had. And so, believing that they had achieved this, they felt they needed to do this to, since it was such a "killer feature".

from Helge Frisenette on October 24, 2013 23:56:29

@Aaron Wallentine
The overlapping windows thing is just one of quite a few gross errors in the book.
Errors that should and could have been readily been picked up and corrected by letting knowledgeable people read the draft. Sadly people are thinking the book is gospel.
Truth is, Smalltalk was far more advanced in almost every way than the first (and in many ways the current) Mac OS. And it DID have overlapping windows. Numerous videos and stories on the web will show you that.
It needed a much bigger disc and also preferably a faster CPU than the one supplied with the first Mac though.
The first Mac was a nice start, but should have been followed up with something more advanced soon after. Instead we are stuck with basically the same "paradigm" 30 years later. With a lot faster hardware, but woefully held back by the interface and programming techniques.
In fact, it could be said that the first Mac GUI is a great improvement on everything that came after. Because everything that has been added has been essentially feature-bloat and half assed fixes on stuff that needed a much more radical rethinking.
Hypercard was a step in the right direction, but was not taken to it's logical conclusion. Steve never got to explain in that All Things D interview why he axed it, instead of resurrecting it.
It's not too late though. But then it never really will be.