Geometry
Triangle metrics from vertices API
Full triangle dossier from three 2D vertices: area (shoelace), side lengths, perimeter, centroid, interior angles, circumradius and inradius. Answers 'what is the area and the angles of this triangle?'.
Price$0.02per request
MethodPOST
Route/v1/geometry/triangle-metrics
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
triangleareacentroidcircumradiusinradiusanglesshoelace2d
API URL
Integration docshttps://x402.hexl.dev/v1/geometry/triangle-metricsExample request
{
"a": [
0,
0
],
"b": [
4,
0
],
"c": [
0,
3
]
}Example response
{
"area": 6,
"perimeter": 12,
"sides": {
"a": 5,
"b": 3,
"c": 4
},
"centroid": [
1.333333333,
1
],
"anglesDeg": {
"A": 90,
"B": 36.869897646,
"C": 53.130102354
},
"circumradius": 2.5,
"inradius": 1
}Input schema
{
"type": "object",
"required": [
"a",
"b",
"c"
],
"properties": {
"a": {
"type": "array",
"items": {
"type": "number"
},
"examples": [
[
0,
0
]
]
},
"b": {
"type": "array",
"items": {
"type": "number"
},
"examples": [
[
4,
0
]
]
},
"c": {
"type": "array",
"items": {
"type": "number"
},
"examples": [
[
0,
3
]
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}