Back

#geometry

8 APIs with this tag

Geometric Solids API

Advanced 3D-solid geometry as an API, computed locally and deterministically — the shapes a basic geometry calculator leaves out. The cone-frustum endpoint gives the volume V = (π·h/3)·(R² + R·r + r²), the slant height √(h² + (R−r)²) and the lateral and total surface area of a truncated cone, the shape of buckets, lampshades and hoppers. The torus endpoint gives a doughnut’s volume 2π²·R·r² and surface area 4π²·R·r from its centre-to-tube and tube radii. The ellipsoid endpoint gives the exact volume (4/3)π·a·b·c and a Knud-Thomsen surface-area approximation accurate to better than 1.1 %. The platonic endpoint returns the volume and surface area of any of the five Platonic solids — tetrahedron, cube, octahedron, dodecahedron and icosahedron — from the edge length, using the exact golden-ratio coefficients (a unit icosahedron has volume 2.1817 and surface area 8.6603). Use a consistent length unit and get area and volume out. Everything is computed locally and deterministically, so it is instant and private. Ideal for engineering, CAD, 3D-modelling, architecture, manufacturing and maths-education app developers, volume-and-area and packaging tools, and simulation software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. These are the advanced solids; for sphere, cube, cylinder, cone and 2D shapes use a general geometry API.

api.oanor.com/solids-api

Bézier Curve API

Bézier-curve geometry maths as an API, computed locally and deterministically. The point endpoint evaluates a quadratic (three control points) or cubic (four) Bézier curve at a parameter t between 0 and 1 using de Casteljau's algorithm, returning the point on the curve and the tangent there — its direction vector, angle and speed (the derivative B'(t)). The length endpoint computes the arc length of the curve by fine polyline sampling, together with the straight-line chord length and the axis-aligned bounding box (min and max x and y, width and height). The split endpoint splits the curve at a parameter into two sub-curves and returns the control points of each — the standard de Casteljau subdivision used for trimming and adaptive rendering. Control points are passed as plain x/y coordinates. Everything is computed locally and deterministically, so it is instant and private. Ideal for graphics, CAD, font, animation, game-engine and vector-design app developers, path and curve tools, and computational-geometry education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is Bézier-curve geometry; for animation easing and timing functions use an easing API.

api.oanor.com/bezier-api

Triangle Solver API

Triangle-solving maths as an API, computed locally and deterministically. The solve endpoint solves any triangle from three values — three sides (SSS), two sides and the included angle (SAS), two angles and a side (ASA/AAS), or the ambiguous two-sides-and-a-non-included-angle case (SSA) — using the law of cosines and the law of sines, and returns all three sides and angles, the perimeter, the Heron area and whether the triangle is acute, right or obtuse and equilateral, isosceles or scalene; for an ambiguous SSA input it also returns the second valid triangle. The right endpoint is a dedicated right-triangle solver from any two of the two legs, the hypotenuse and an acute angle, applying Pythagoras and basic trigonometry. The points endpoint builds a triangle from three cartesian vertices, giving the side lengths, the interior angles, the shoelace area and the centroid. Angles are in degrees. Everything is computed locally and deterministically, so it is instant and private. Ideal for education, CAD, surveying, game-development and engineering app developers, geometry and trigonometry tools, and STEM teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This solves triangles; for areas and volumes of general shapes use a geometry API and for polygon point-set operations a polygon API.

api.oanor.com/triangle-api

Bolt Circle API

Bolt-circle (bolt pattern / PCD) geometry as an API, computed locally and deterministically. The coordinates endpoint lays out a set of equally spaced holes on a circle: from the bolt-circle diameter (or radius), the number of holes, an optional start angle, centre offset and direction, it returns the X and Y coordinate and angle of every hole, the angular step (360 ÷ number of holes) and the chord between adjacent holes — exactly what a CNC or drawing needs. The chord endpoint gives the straight-line distance between any two holes on the pattern using chord = 2·R·sin(central angle ÷ 2), taking the shorter way around. The diameter endpoint works in reverse: from a measured distance between two holes and the number of holes it recovers the bolt-circle diameter, so you can reverse-engineer an existing flange or wheel. Lengths are unit-agnostic — the output is in whatever unit you supply. Everything is computed locally and deterministically, so it is instant and private. Ideal for CNC and CAD tools, machining and fabrication apps, flange, wheel and hub design, and drilling-jig and robotics projects. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is bolt-circle geometry; for screw-thread pitch and tap drill use a thread API and for spur-gear geometry use a gear API.

api.oanor.com/boltcircle-api

Polygon Geometry API

Computational geometry for arbitrary polygons and point sets — on a plane, with no map or shape templates needed. The area endpoint takes a polygon as a list of [x,y] vertices and returns its area (by the shoelace formula), perimeter, centroid, winding orientation (clockwise or counter-clockwise), whether it is convex, and its bounding box. The contains endpoint tests whether a point is inside a polygon, outside it, or exactly on its boundary, using robust ray casting that handles concave shapes correctly. The convex-hull endpoint computes the convex hull of a set of points by Andrew's monotone chain, along with its area and perimeter. It works for any simple polygon, convex or concave. Everything is computed locally and deterministically, so it is instant and private. Ideal for graphics and game development, GIS and mapping, CAD and collision detection, computational geometry, and data visualisation. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is planar polygon geometry; for the area of named shapes (circle, triangle, …) use a geometry API and for geographic GeoJSON area on the earth use a GeoJSON API.

api.oanor.com/polygon-api

Vector API

A 2D, 3D and n-dimensional vector maths toolkit. The op endpoint performs the operation you ask for on one or two vectors: add and subtract, scale by a factor, negate, the dot product, the cross product (a vector in 3D, the scalar z-component in 2D), the magnitude (length), the unit (normalized) vector, the Euclidean distance and the angle between two vectors (in both radians and degrees), linear interpolation (lerp) between two vectors, and the projection of one vector onto another. The info endpoint analyses a single vector — its dimension, magnitude, unit vector and, for 2D, its heading angle from the x-axis. Vectors are just comma-separated components like 3,4 or 1,2,3, and operations work in any dimension up to 32 (cross product is 2D/3D only). Everything is exact local maths, so it is instant and deterministic. Ideal for game and physics engines, graphics and WebGL/canvas, robotics and navigation, data-visualisation, simulations and engineering tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This does vector algebra; for plane-angle unit conversion use the Angle API and for shape area/perimeter use the Geometry API.

api.oanor.com/vector-api

Polyline API

Encode and decode Google/Mapbox encoded polylines — the compact ASCII string used by the Google Maps Directions API, Mapbox, Valhalla, OSRM and GPX-style route geometry to pack a list of coordinates into a few bytes. Decode an encoded string into an array of latitude/longitude points, encode a coordinate list back into a polyline (precision 5, the Google default, or 6 for OSRM/Valhalla overview), and measure a path — point count, total length by the haversine great-circle formula in km and miles, and the bounding box. Perfect for drawing routes on a map, storing tracks compactly, computing trip distance and fitting a map viewport. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. Distinct from coordinate-format conversion (Plus Code/MGRS/UTM) and geohash.

api.oanor.com/polyline-api

Geometry API

Calculate the geometry of common shapes. Get the area of 2D shapes (circle, square, rectangle, triangle — by base/height or three sides via Heron, trapezoid, parallelogram, rhombus, ellipse, regular polygon), the perimeter or circumference, and for 3D shapes the volume and surface area (sphere, cube, box, cylinder, cone, square pyramid). Pass a shape and its dimensions and get back the exact result plus the formula used. Pure local math — no key, no third-party service, instant and deterministic. Live. 6 endpoints. Built for CAD and engineering tools, education and e-learning, construction and material estimation, and any app that needs reliable shape math. Distinct from a generic expression evaluator or unit converter.

api.oanor.com/geometry-api