Engineering
Snell's law & critical angle API
Applies Snell's law n1·sinθ1 = n2·sinθ2 to find the refraction angle, detects total internal reflection, and reports the critical angle when passing into a less-dense medium. Answers 'At what angle does light refract?', 'Is there total internal reflection here?'.
Price$0.04per request
MethodPOST
Route/v1/engineering/snell-refraction
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
opticssnellrefractioncritical-angletotal-internal-reflectionrefractive-indexwavesphysics
API URL
Integration docshttps://x402.hexl.dev/v1/engineering/snell-refractionExample request
{
"index1": 1,
"index2": 1.33,
"incidentAngleDeg": 30
}Example response
{
"totalInternalReflection": false,
"refractionAngleDeg": 22.0824,
"criticalAngleDeg": null,
"bending": "toward normal (into denser medium)",
"interpretation": "Refracted ray at 22.082° from normal (n1=1 → n2=1.33)."
}Input schema
{
"type": "object",
"required": [
"index1",
"index2",
"incidentAngleDeg"
],
"properties": {
"index1": {
"type": "number",
"description": "Refractive index of incident medium",
"examples": [
1
]
},
"index2": {
"type": "number",
"description": "Refractive index of transmitting medium",
"examples": [
1.33
]
},
"incidentAngleDeg": {
"type": "number",
"description": "Angle of incidence from normal (0–90°)",
"examples": [
30
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}