Back

#mechanics

7 APIs with this tag

Center of Mass API

Centre-of-mass and barycentre mechanics as an API, computed locally and deterministically. The point-masses endpoint computes the centre of mass of a system of point masses in one, two or three dimensions, applying x_com = Σ(m_i·x_i)/Σm_i to each axis from a list of masses and their x (and optional y and z) coordinates — masses of 1, 2 and 3 at positions 0, 1 and 2 give a centre of mass at 1.333, and four equal masses at the corners of a square sit at its centre. The two-body endpoint computes the barycentre of two masses separated by a distance, r1 = d·m2/(m1+m2) from the first body, which always lies closer to the heavier one — for the Earth-Moon system the barycentre is about 4 670 km from Earth’s centre, still inside the planet. Lists may be passed as comma-separated values (masses=1,2,3&x=0,1,2) or as JSON arrays in a POST body, and units are consistent and unit-agnostic. Everything is computed locally and deterministically, so it is instant and private. Ideal for physics, engineering-statics, astronomy, robotics, game-physics and mechanics-education app developers, balance-point and barycentre tools, and simulation software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 endpoints. This is the centre of mass; for the rotational moment of inertia use a moment-of-inertia API.

api.oanor.com/centerofmass-api

Moment of Inertia API

Rigid-body rotational-inertia mechanics as an API, computed locally and deterministically. The shape endpoint returns the mass moment of inertia and the radius of gyration k = √(I/m) for a named standard body about its characteristic axis — a solid sphere (I = 2/5·m·r²), thin spherical shell (2/3·m·r²), solid cylinder or disk (1/2·m·r²), annular/hollow cylinder (1/2·m·(r1²+r2²)), thin ring (m·r²), thin rod about its centre (1/12·m·l²) or about one end (1/3·m·l²), rectangular plate or cuboid (1/12·m·(a²+b²)), solid cone (3/10·m·r²) and point mass (m·r²) — so a 2 kg solid sphere of radius 0.5 m has I = 0.2 kg·m². The parallel-axis endpoint applies the Steiner theorem I = I_cm + m·d² to shift a moment of inertia from the centre-of-mass axis to any parallel axis a distance d away. The shapes endpoint lists the whole catalog with its formulas. All quantities are SI (kg, m → kg·m²). Everything is computed locally and deterministically, so it is instant and private. Ideal for mechanical-engineering, robotics, CAD/CAE, rotating-machinery, structural-dynamics and physics-education app developers, flywheel-and-shaft design tools, and simulation software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is rotational inertia; for stored rotational energy and flywheel sizing use a flywheel API and for torque and angular acceleration a torque API.

api.oanor.com/momentofinertia-api

Kinematics SUVAT API

Kinematics (SUVAT) maths as an API, computed locally and deterministically. The solve endpoint takes any three of the five constant-acceleration variables — initial velocity u, final velocity v, acceleration a, time t and displacement s — and returns the other two, picking the right equation among v = u + at, s = ut + ½at², s = ½(u+v)t, v² = u² + 2as and s = vt − ½at² automatically. The freefall endpoint computes the fall time, distance and impact velocity for a vertical drop from a height (or over a given time), with an adjustable gravity and optional initial velocity, no air resistance. The stopping endpoint computes reaction, braking and total stopping distance and braking time for a vehicle from its speed and either a deceleration or a road-surface friction coefficient (a = μ·g), with an optional reaction time. Everything is computed locally and deterministically, so it is instant and private. Ideal for physics-education, engineering, simulation, automotive and game-development app developers, motion and braking-distance tools, and STEM teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is linear-motion SUVAT; for projectile launch and trajectory use a projectile API and for momentum and collisions a momentum API.

api.oanor.com/kinematics-api

Hooke's Law & Spring API

Hooke's law and elastic potential energy as an API, computed locally and deterministically. The hooke endpoint applies F = k·x — the restoring force of a spring equals its spring constant times the extension — and solves for whichever of the force, the spring constant or the displacement you leave out, also returning the elastic potential energy ½·k·x². The energy endpoint computes the elastic potential energy E = ½·k·x² stored in a stretched or compressed spring, solves the extension from a stored energy, and finds the work done in stretching a spring from one extension to another, W = ½·k·(x2² − x1²). The combine endpoint combines springs: in series the assembly is softer, 1/k = Σ 1/kᵢ, and in parallel it is stiffer, k = Σ kᵢ — the spring equivalent of resistors in a circuit. Everything is computed locally and deterministically, so it is instant and private. Ideal for physics and mechanics-education tools, spring and suspension design, mechanism and gadget engineering, and simulation software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is the force-extension law and elastic energy; for the spring rate of a helical coil from its geometry use a spring-coil API and for spring-mass natural frequency use a vibration API.

api.oanor.com/hooke-api

Inclined Plane & Friction API

Inclined-plane and friction statics and dynamics as an API, computed locally and deterministically. The incline endpoint analyses a block on a ramp: from a mass, the slope angle and a coefficient of friction it returns the normal force N = m·g·cosθ, the gravity component along the slope m·g·sinθ, the maximum static friction μ·N, whether the block stays put or slides (it slides when tanθ > μ) and, if it slides, the net force and the acceleration a = g·(sinθ − μ·cosθ). The friction endpoint handles a flat surface: the friction force f = μ·N (the normal force given directly or from a mass), the angle of repose atan(μ), and — given an applied force — whether the object moves and its acceleration. The ramp endpoint gives the force needed to move a load up or down a ramp at constant velocity, F = m·g·(sinθ ± μ·cosθ), the frictionless force, the efficiency and whether the ramp is self-locking. Gravity defaults to 9.80665 m/s² and can be overridden. Everything is computed locally and deterministically, so it is instant and private. Ideal for physics and mechanics-education tools, materials-handling, conveyor and ramp design, and engineering-statics apps. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is inclined-plane forces with friction; for the ideal (frictionless) mechanical advantage of simple machines use a lever API.

api.oanor.com/incline-api

Momentum & Collision API

Linear momentum, impulse and one-dimensional collisions as an API, computed locally and deterministically. The momentum endpoint computes the linear momentum p = m·v of a moving body, with its kinetic energy, and solves for whichever of the mass, velocity or momentum you leave out. The impulse endpoint applies the impulse-momentum theorem, J = F·Δt = m·Δv = Δp: from a force and a time it gives the impulse and, with a mass, the change in velocity; or from a mass and a velocity change it gives the impulse and the average force over a contact time — the physics of a bat hitting a ball or an airbag softening a crash. The collision endpoint solves a head-on collision between two bodies using conservation of momentum and a coefficient of restitution: e = 1 for a perfectly elastic collision (kinetic energy conserved), e = 0 for a perfectly inelastic one (the bodies stick together), or any value between for a partially inelastic collision — returning both final velocities, the conserved total momentum, the kinetic energy before and after, and the energy lost. Everything is computed locally and deterministically, so it is instant and private. Ideal for physics-education and simulation tools, game and ballistics engines, vehicle-crash and sports apps, and engineering-dynamics software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is linear momentum and collisions; for rotational angular momentum and flywheel energy use a flywheel API.

api.oanor.com/momentum-api

Physics Motion API

Classical-mechanics maths as an API. The kinematics endpoint is a full SUVAT solver: give any three of initial velocity (u), final velocity (v), acceleration (a), time (t) and displacement (s) and it computes the rest using the standard constant-acceleration equations. The projectile endpoint takes a launch speed and angle (and an optional launch height and gravity) and returns the horizontal and vertical velocity components, the time to the peak, the maximum height, the total flight time, the range and the impact speed. The free-fall endpoint computes a vacuum fall from a height or for a time, with an optional initial velocity, returning the fall time, distance and impact velocity. Gravity defaults to standard 9.80665 m/s² but can be set for the Moon, Mars or any body. Everything is computed locally and deterministically in SI units, so it is instant and private. Ideal for physics education and homework, engineering and simulation, game and ballistics development, and motion tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is motion physics; for planetary data use a planets API and for unit conversion use a unit API.

api.oanor.com/physics-api