Previous Up Next

11.8.4  Equilateral triangles: equilateral_triangle

The equilateral_triangle command takes two arguments and an optional third. The two mandatory arguments are points A and B.

equilateral_triangle returns and draws the equilateral triangle ABC, where AB to AC is counterclockwise.
Input:

equilateral_triangle(0,2)

Output:

The optional argument needs to be a variable name which is assigned to vertex C.
Input:

equilateral_triangle(0, 2, C)

Output:

Input:

affix(C)

Output:

i*sqrt(3) + 1

Previous Up Next