Area of a polygon

### 25.13.6 Area of a polygon

The area command finds the area of a circle or a star-shaped polygon.

- area takes P, a circle or polygon which is star-shaped with respect to its first vertex (i.e., the line segment from the first vertex to any point in the polygon lies within the polygon).
- area(P) returns the area of P.

#### Examples

area(triangle(0,1,i))

1
2

area(square(0,2))

4 |  |  |  |  |  |  |  |  |  |

The area command has areaat and areaatraw versions (see Section 25.13.1).