Zum Inhalt springen
GET /v1/point-masses

Center of mass of point masses

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/centerofmass-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/centerofmass-api/v1/point-masses" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/centerofmass-api/v1/point-masses", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/centerofmass-api/v1/point-masses");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/centerofmass-api/v1/point-masses",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "note": "Centre of mass x_com = Σ(m_i·x_i)/Σm_i, applied per axis. Masses [1,2,3] at x [0,1,2] give x_com = 8/6 ≈ 1.3333.",
        "x_com": 1.33333333,
        "inputs": {
            "count": 3,
            "total_mass": 6
        },
        "dimensions": 1
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:22.935Z",
        "request_id": "fee3e554-2556-4361-9647-ad0cab42e1f8"
    },
    "status": "ok",
    "message": "Center of mass of point masses",
    "success": true
}