# Snell's Law Refraction Calculator

> Snell's Law Refraction Calculator is a paid API for AI agents from physics-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Calculates the refracted angle between two optical media using Snell's law, and checks for critical angle and total internal reflection.

## Facts

- Endpoint: GET https://physics-calc.x402tookit.com/snell?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/snell-s-law-refraction-calculator-cc653526
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_svDUjHZ38O4iDJoCxUKkP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability snell-s-law-refraction-calculator-cc653526
```

Example prompt: What is the refracted angle when light hits the boundary between water and crown glass at an incident angle of 40 degrees, and does total internal reflection occur?

## When to prefer this

Use this endpoint when you need a precise, physics-correct calculation of Snell's law refraction, including total internal reflection checks and Brewster angle — especially when working with named optical media (air, water, glass, diamond) rather than raw indices. Prefer it over generic math tools when the optics domain context and structured output (verdict, critical angle, summary) are needed.

## Known failure modes

- Unknown medium name that cannot be resolved to a refractive index
- Incident angle outside 0–90 degrees range
- Missing required parameters (n1, n2, or incidentAngleDeg)
- Invalid or non-numeric index values causing parse failure

## How this service works

Snell's law: refracted angle between two media (names or indices), critical angle and total internal reflection check.

## Output

Returns the resolved refractive indices for both media (with recognized names like air, water, crown glass, diamond), the refracted angle in degrees, the critical angle (if applicable), a verdict on whether total internal reflection occurs, the Brewster angle, the speed ratio of light between the two media, the angular deviation, and a human-readable summary.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "n1",
      "n2",
      "incidentAngleDeg"
     ],
     "properties": {
      "n1": {
       "type": "string",
       "description": "Index of the first medium: a number, or air, water, crown glass, diamond and more"
      },
      "n2": {
       "type": "string",
       "description": "Index of the second medium"
      },
      "incidentAngleDeg": {
       "type": "number",
       "description": "Angle of incidence from the normal, 0 to 90 degrees"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "n1": {
       "type": [
        "null",
        "number"
       ]
      },
      "n2": {
       "type": [
        "null",
        "number"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "medium1": {
       "type": [
        "null",
        "string"
       ]
      },
      "medium2": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "deviationDeg": {
       "type": [
        "null",
        "number"
       ]
      },
      "brewsterAngleDeg": {
       "type": [
        "null",
        "number"
       ]
      },
      "criticalAn
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/snell-s-law-refraction-calculator-cc653526/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from physics-calc.x402tookit.com](https://www.zero.xyz/host/physics-calc.x402tookit.com/llms.txt)
