To start, we’ll use the first line segment and add three more to create something like this:
- Still with the line segment tool selected, place the cursor near point B and draw three more line segments. (Remember, there’s no need to draw precisely.)
To ensure that point D lies along the line AC, move the cursor near enough to AC that the line becomes selected, and D will snap to it automatically.
- Change to the selection tool and select line AB by clicking the mouse anywhere along its length.
- With one object selected, some of the tools in the Constrain Input palette are enabled. Click the Distance/Length constraint. (Use the tool tips to see which constraints are available.)
The constraint appears, along with the default variable name of a, selected and ready to change. Press Return to accept it.
- Select line BC and repeat the previous two steps to constrain its length to b.
- You’ve now added two variables to your drawing. Go to the Variables palette to see their names and values.
The values displayed in the Variables palette are the current values, as taken from the default coordinate system. Notice that these values will change as you vary the lengths of the sides. Vice versa, if you select a variable and change its value in the Variables palette, the geometry will change accordingly.
- Select the variable a in the Variables list and, in the input field below, enter the nearest round number.
- Select both lines AB and BC. (You can select more than one object at a time by making the first selection, then holding down Shift as you make subsequent selections.)
- With two objects selected, you’ll see a different set of constraint tools enabled. Click the Perpendicular constraint to constrain the angle to 90º. ABC is now a right triangle.
Notice that point C moved, not point A, though either could have moved to satisfy the constraint. Geometry Expressions moves the more recently added object when it can.
- There’s one last constraint to add. Select both lines BD and AC, and constrain their angle to be perpendicular as well.
|