calculate_perimeter
Compute perimeter or circumference for six common shapes: rectangle, triangle, circle, square, hexagon, and ellipse. Input shape and required dimensions to obtain the boundary length.
Instructions
Calculate perimeter/circumference for common shapes. Returns: {shape, perimeter}. See list_bundles for related 'math' calculators.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shape | Yes | Shape | |
| length | No | Length/side a | |
| width | No | Width/side b | |
| side_c | No | Side c for triangle | |
| radius | No | Radius | |
| side | No | Side for square/hexagon | |
| semi_major | No | Semi-major for ellipse | |
| semi_minor | No | Semi-minor for ellipse |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Computed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools). | |
| formula | No | Human-readable formula or method used (e.g. "I=P·r·t", "Magnus formula"). | |
| source | No | Authoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21"). | |
| reference_url | No | Link to a calcul2 page documenting the calculation in detail. |