Equilateral triangles in space: equilateral_triangle

### 14.7.4 Equilateral triangles in space: equilateral_triangle

See Section 13.8.4 for equilateral triangles in the plane.

The equilateral_triangle command returns and draws equilateral triangles.

- equilateral_triangle takes three mandatory arguments and one optional argument:
  - A,B,P, three points.
  - Optionally, var, a variable name.
- equilateral_triangle(A,B,P ⟨,var⟩) returns and draws equilateral triangle ABC, where C and P are on the same side of line AB in plane ABP.
  If the argument var is given, it will be assigned the value of C.

#### Examples

- Input:

  A:= point(0,0,0);
  B:= point(3,3,3);
  P:= point(0,0,3)
  equilateral_triangle(A,B,P)

  Output:
- Input:

  A:= point(0,0,0);
  B:= point(3,3,3);
  P:= point(0,0,3)
  equilateral_triangle(A,B,P,C)
  simplify(coordinates(C))

  Output:

  ⎡ ⎢ ⎢ ⎣ |
  −3 | √ |
  6
  | +6
  4
  | , |
  −3 | √ |
  6
  | +6
  4
  | , |
  3 | √ |
  6
  | +3
  2
  | ⎤ ⎥ ⎥ ⎦