More precisely, what's being demoed is Sketchpad III, which improved Sutherland's original 2d Sketchpad with 3d rendering capabilities. And Ivan Sutherland's not in the video.
Sutherland saw, very early, that a constraint system was the way to go. We went through generations of CAD systems and draw programs which didn't do constraints. Even today, most draw programs don't do constraints as well as Sketchpad.
Sketch mode in Autodesk Inventor does constraints very well, including difficult geometry problems like circles tangent to other circles. This is a solved problem today, but tends to be solved right only in the better CAD systems.
(If only the HTML people had thought in terms of constraints. Left edge of box B is coincident with right edge of box A. Right edge of box B is coincident with right edge of window. Left edge of box A is coincident with left edge of window. Top edge of box A and top edge of box B are collinear. Boxes A and B have equal width. That's the way to get two columns.
Unlike CSS layout, this concept can be extended beyond rectangular boxes; constraints with circles and splines are usually solveable.)
As I remember, an early CSS proposal included the Cassowary constraints solver engine, but they decided not to go with it because either a fast implementation didn't exist at the time, or they were worried users wouldn't find the system intuitive?
I remember that the Cassowary constraint system was implemented in Apple's app development framework, and people reporting that it was hell to work with after building anything beyond minimal complexity.
Also, there is an actual GSS implementation by thegrid.io
- The GUI built into Xcode is usable once you learn its quirks (e.g. how to swap the relationship in a constraint so that it doesn't say that the right edge of some button needs to be -5pt from the left edge of the button next to it).
- The ObjC/Swift API is bad.
- It handles RTL languages excellently: by default, constraints are expressed in terms of leading/trailing edges, but can be literal left/right if you want.
- It deals poorly with adding and removing views from a hierarchy: removing a view discards all of its constraints, so you need to have logic to reestablish them.
Unfortunately, there are horror stories about performance tanking with an OS update or taking on exponential properties, like this one which lead the team to develop a non-constraint-based layout framework:
It leads me to wonder if unpredictable performance is a limitation of constraint solving… or at least to be cautious with current implementations. Maybe an API that only makes known-fast relationships possible would help.
Probably people were trying to talk to the constraint system by typing code manually, rather than using a graphical editor. All the CAD systems with a constraint engine let you deal with it graphically, which is straightforward.
For comparison, here's what Autodesk Inventor's 2D sketch mode is like.
- If you draw a line, and it's close to horizontal or vertical, it gets a horizontal or vertical constraint. The constraint shows as a symbol and you can click on it and hit DEL if you don't want it.
- If you start a line from very close to another line, or close to another point, the endpoint is constrained to touch that line or point.
- You can explicitly select various constraints from a menu bar, such as "parallel", "collinear", "coincident", "tangent", and then select two lines, which applies the constraint. This works on lines, circles, arcs, and splines.
- If you try to add a conflicting constraint, you get an error message and the constraint won't be applied. Constraints do not have priorities; all constraints are enforced.
- You can explicitly dimension something, and give it an absolute length or angle, or some function of other dimensions.
- Anything that isn't constrained can be dragged and moved. There's a counter of the number of unconstrained degrees of freedom, and when everything is locked by some constraint, the message "Fully constrained" appears. All unconstrained degrees of freedom are displayed as straight or curved arrows, indicating how something could be moved.
- The hard cases, such as making a arc tangent to a line, or circles tangent to each other, work right.
It's a really easy way to set up geometry for parts you're going to make. This is all part of a much larger system for full 3D machine design, but the sketch module is close to what you'd want for web layout.
The robustness and flexibility of a constraint solver (including limited symbolic capability) is what I enjoy the most when using systems like Inventor and SolidWorks, compared to say OpenSCAD. Compared to hard-coding dimensions, proper usage of constraints encode semantics and design intent (e.g. mating, clearance, symmetry) into the 3D model and makes it a lot easier to reason with.
The chat with the professor is one of my favourite parts. Paraphrasing.....At the start he may not know what the problem is, but through interaction and response, he and the computer will work it out together. Totally nails interactive design, and what software development is, and yet often still fails to be
The https://en.wikipedia.org/wiki/TX-2, the machine SketchPad ran on, had 460KB of 36-bit memory, and it. ran. at. 400kHz - yes - 400k instructions per second.
The CAD system that introduced the idea of the GUI, clipboard, OOP, and so many other things, ran only a little faster than the masked-ROM calculators you can buy for a couple dollars at the store down the road nowadays. It's kind of depressing.
I really, REALLY want the SketchPad program. If I had a bunch of money tucked away I would easily dedicate a decade of my life to trying to track it down.
As an aside, I'm not quite sure how to refer to the amount of memory it has, particularly considering that the memory is 36-bit and not 8-bit. Wikipedia says it has 64KB; the video says (I quote) "460 K bytes".
20 comments
[ 3.0 ms ] story [ 44.8 ms ] thread> When asked, "How could you possibly have done the first interactive graphics program,
> the first non-procedural programming language, the first object oriented software system,
> all in one year?"
> Ivan replied: "Well, I didn't know it was hard."
https://youtu.be/yJDv-zdhzMY
Light pen's and chorded keyboards in the 1960's.
Sketch mode in Autodesk Inventor does constraints very well, including difficult geometry problems like circles tangent to other circles. This is a solved problem today, but tends to be solved right only in the better CAD systems.
(If only the HTML people had thought in terms of constraints. Left edge of box B is coincident with right edge of box A. Right edge of box B is coincident with right edge of window. Left edge of box A is coincident with left edge of window. Top edge of box A and top edge of box B are collinear. Boxes A and B have equal width. That's the way to get two columns.
Unlike CSS layout, this concept can be extended beyond rectangular boxes; constraints with circles and splines are usually solveable.)
Also, there is an actual GSS implementation by thegrid.io
https://gridstylesheets.org/
- The GUI built into Xcode is usable once you learn its quirks (e.g. how to swap the relationship in a constraint so that it doesn't say that the right edge of some button needs to be -5pt from the left edge of the button next to it).
- The ObjC/Swift API is bad.
- It handles RTL languages excellently: by default, constraints are expressed in terms of leading/trailing edges, but can be literal left/right if you want.
- It deals poorly with adding and removing views from a hierarchy: removing a view discards all of its constraints, so you need to have logic to reestablish them.
Unfortunately, there are horror stories about performance tanking with an OS update or taking on exponential properties, like this one which lead the team to develop a non-constraint-based layout framework:
https://realm.io/news/slug-nick-snyder-layoutkit/
It leads me to wonder if unpredictable performance is a limitation of constraint solving… or at least to be cautious with current implementations. Maybe an API that only makes known-fast relationships possible would help.
- If you draw a line, and it's close to horizontal or vertical, it gets a horizontal or vertical constraint. The constraint shows as a symbol and you can click on it and hit DEL if you don't want it.
- If you start a line from very close to another line, or close to another point, the endpoint is constrained to touch that line or point.
- You can explicitly select various constraints from a menu bar, such as "parallel", "collinear", "coincident", "tangent", and then select two lines, which applies the constraint. This works on lines, circles, arcs, and splines.
- If you try to add a conflicting constraint, you get an error message and the constraint won't be applied. Constraints do not have priorities; all constraints are enforced.
- You can explicitly dimension something, and give it an absolute length or angle, or some function of other dimensions.
- Anything that isn't constrained can be dragged and moved. There's a counter of the number of unconstrained degrees of freedom, and when everything is locked by some constraint, the message "Fully constrained" appears. All unconstrained degrees of freedom are displayed as straight or curved arrows, indicating how something could be moved.
- The hard cases, such as making a arc tangent to a line, or circles tangent to each other, work right.
It's a really easy way to set up geometry for parts you're going to make. This is all part of a much larger system for full 3D machine design, but the sketch module is close to what you'd want for web layout.
https://gridstylesheets.org
The https://en.wikipedia.org/wiki/TX-2, the machine SketchPad ran on, had 460KB of 36-bit memory, and it. ran. at. 400kHz - yes - 400k instructions per second.
The CAD system that introduced the idea of the GUI, clipboard, OOP, and so many other things, ran only a little faster than the masked-ROM calculators you can buy for a couple dollars at the store down the road nowadays. It's kind of depressing.
If you liked the OP video, you must watch https://archive.org/details/AlanKeyD1987. It's only 46:29 long.
I really, REALLY want the SketchPad program. If I had a bunch of money tucked away I would easily dedicate a decade of my life to trying to track it down.
As an aside, I'm not quite sure how to refer to the amount of memory it has, particularly considering that the memory is 36-bit and not 8-bit. Wikipedia says it has 64KB; the video says (I quote) "460 K bytes".
References:
- I waxed philosophical about SketchPad a few months ago: https://news.ycombinator.com/item?id=13102757 (article: https://news.ycombinator.com/item?id=13097121)
- http://bitsavers.trailing-edge.com/pdf/mit/tx-2/