| OCR Text |
Show 20 A constraint is a Thinglab object and new constraint types may be created in the same way that new objects are created. New instances of existing constraint types are merged to create a new constraint object. This new object may be added to the menu of constraint types and becomes a part of the system. Since Thinglab is an interactive system, its satisfaction algorithms have been tailored for interactive performance. The user often modifies the model by grabbing some part of it with the mouse and dragging the part somewhere else. Since the model is being continuously updated and displayed, satisfaction must be fast. When the user grabs and begins to drag a part of the model, Thinglab builds a constraint propagation plan starting from the part the user grabbed. The system constructs and compiles a piece of Smalltalk code to execute the satisfaction plan. If propagation fails then Thlnglab resorts to relaxation. Thinglab's satisfaction method is interesting for two reasons: 1. Thinglab assumes that the same set of constraints will need to be satisfied several times in quick succession. It makes sense to spend some time to plan a constraint satisfaction plan carefully and then compile it to Smalltalk code so it will run quickly. Satisfaction breaks down Into two phases, planning and execution. 2. Thinglab's planning is local to the part of the model affected by the change. The satisfaction plan begins at the changed part and radiates outward towards the edges of the connected region of the constraint graph. Planning is still linear to the number of constraints visited as in Sketchpad, but where Sketchpad examines the entire model, Thinglab may examine only a small subgraph in the model. Thinglab would in general examine a significantly smaller part of the model than Sketchpad. 2.5 Magrltte. James Gosling developed Magritte [4], an experimental drawing system using algebraic constraints. Magritte is the only system described in this thesis which limits itself to algebraic constraints. Other constraint systems were free to create constraints on non-algebraic quantities such as strings. Magritte could constrain numeric quantities with built in constraint types such as add and multiply. More cofJl)lex entities such as n dimensional points may be constrained using a constraint macro facility to apply simple constraints on each component of the entity. The ordinary rules of algebra apply to all the constraints and they may be manipulated |