{"id":"polygon-measures-compute","version":"1.0.0","description":"Compute exact signed double-area, area, orientation, and squared edge lengths for a rational simple polygon.","supported_operations":["compute exact polygon area","shoelace formula for rational coordinates","find polygon orientation","calculate signed double area","squared lengths of polygon edges","measure a simple polygon exactly","polygon area without floating point"],"unsupported_operations":["self-intersecting or degenerate polygons","square-root perimeter approximation","three-dimensional or curved geometry"],"semantics":["Vertices are ordered boundary vertices; the closing edge from the last vertex to the first is implicit.","Coordinates must be canonical reduced base-10 integers or p/q fractions with positive denominators and components no larger than 1000000000000000000.","The polygon must be simple and nondegenerate; signed double-area is positive for counterclockwise order and negative for clockwise order.","Area and each squared edge length are exact reduced rational strings; no floating-point approximation or rounding occurs.","perimeter_squared_components follows edge order and includes the closing edge; it reports squared lengths rather than irrational square roots."],"limits":{"max_input_bytes":20000,"max_vertices":128,"max_coordinate_bytes":64,"max_abs_integer_component":1000000000000000000,"max_output_bytes":40000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["vertices"],"properties":{"vertices":{"type":"array","minItems":3,"maxItems":128,"items":{"type":"object","additionalProperties":false,"required":["x","y"],"properties":{"x":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(0|-?[1-9][0-9]*)(/[1-9][0-9]*)?$"},"y":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(0|-?[1-9][0-9]*)(/[1-9][0-9]*)?$"}}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["signed_double_area","absolute_area","orientation","perimeter_squared_components"],"properties":{"signed_double_area":{"type":"string","minLength":1,"maxLength":256,"pattern":"^-?(0|[1-9][0-9]*)(/[1-9][0-9]*)?$"},"absolute_area":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(0|[1-9][0-9]*)(/[1-9][0-9]*)?$"},"orientation":{"type":"string","enum":["counterclockwise","clockwise"]},"perimeter_squared_components":{"type":"array","minItems":3,"maxItems":128,"items":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(0|[1-9][0-9]*)(/[1-9][0-9]*)?$"}}}},"examples":[{"input":{"vertices":[{"x":"0","y":"0"},{"x":"4","y":"0"},{"x":"0","y":"3"}]},"output":{"signed_double_area":"12","absolute_area":"6","orientation":"counterclockwise","perimeter_squared_components":["16","25","9"]}},{"input":{"vertices":[{"x":"0","y":"0"},{"x":"0","y":"1/2"},{"x":"1/3","y":"0"}]},"output":{"signed_double_area":"-1/6","absolute_area":"1/12","orientation":"clockwise","perimeter_squared_components":["1/4","13/36","1/9"]}}],"execute_url":"/v1/tools/polygon-measures-compute/versions/1.0.0/execute"}