See section 13.7.3 for right triangles in space.
The right_triangle command takes three arguments and an optional fourth. The three mandatory arguments are two points A and B and a real nonzero number k.
right_triangle returns and draws the right triangle
ABC, with the right angle at A and with
AB = |k|·AC. If k > 0, then
AB to AC is counterclockwise; if k < 0
then AB to AC is clockwise.
Input:
Output:
Input:
Output:
The optional argument needs to be a variable name
which is assigned to vertex C.
Input:
Output:
Input:
Output: