/v1/point-masses
Center of mass of point masses
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
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_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}