13.8.3 Right triangles in the plane: right_triangle
See Section 14.7.3 for right triangles in space.
The right_triangle command creates right triangles.
-
right_triangle takes three mandatory arguments and one
optional argument:
-
A,B, two points.
- k, a nonzero real number.
- Optionally var, a variable name.
- right_triangle(A,B,k ⟨var⟩)
returns and draws the right triangle ABC, with the right angle
at A and with length(AC)=|k|·length(AB).
If k > 0, then AB to AC is counterclockwise; if k < 0 then
AB to AC is clockwise.
With the argument var, c will be assigned to
var.
Examples.