# GRAPH 3D

## What this is

A 3D plotter. Give it a formula and a domain and it returns a finished 3D graph as a self-contained SVG: surfaces z=f(x,y), parametric surfaces in (u,v), 3D curves in t, solids of revolution and point clouds. Rendering is deterministic and offline — no external calls, and nothing about a request is stored.

## Buy a render

app-tool `render` on happydude500001/graph.html — 1 morsel per call.
MCP: aimeat_app_tool_invoke { "app": "happydude500001/graph.html", "tool": "render", "input": { "kind": "surface", "formula": "sin(x)*cos(y)", "domain": { "x": [-6,6], "y": [-6,6] }, "colormap": "viridis" } }
The result carries `svg` (the complete image), `stats` (min/max/mean of the plotted value) and the resolved `spec`.

## Free companions

- `POST /v1/ext/graph3d/presets` — the 28-graph gallery plus the full formula grammar render accepts (kinds, variables, constants, 38 functions, styles, colour maps, limits). Read this before composing a request by hand.
- `POST /v1/ext/graph3d/evaluate` — the same formula sampled to numbers instead of pixels: the grid, min, max, mean and where the extremes sit.

## Formula grammar

Variables x y z u v t per kind, plus any name you pass in `params`, plus `time` for animation frames. Constants pi, e, tau, phi. Operators + - * / % ^ with implicit multiplication (2x, 3(x+1), sin(x)cos(y)). Functions: sin cos tan asin acos atan atan2 sinh cosh tanh exp log ln log2 log10 sqrt cbrt abs sign floor ceil round trunc min max pow hypot mod clamp step smoothstep mix sinc gauss saw tri square fract.

## Options

kind: surface | curve | parametric | revolution | points. style: solid | solid-wire | wireframe | contour | points. colormap: viridis | plasma | magma | coral | ice | terrain | fire | mono. theme: light | dark | transparent. view: { azimuth, elevation } in degrees. resolution up to 72 for surfaces, 4000 samples for curves. width/height 200-2400. format: svg (default) | dataUri | both.

## Gallery

- `ripple` (classic, surface) — Radial ripple
- `saddle` (classic, surface) — Saddle
- `egg-crate` (classic, surface) — Egg crate
- `monkey-saddle` (classic, surface) — Monkey saddle
- `paraboloid` (classic, surface) — Paraboloid
- `gaussian` (classic, surface) — Gaussian bell
- `mexican-hat` (waves, surface) — Mexican hat
- `interference` (waves, surface) — Two-source interference
- `standing-wave` (waves, surface) — Standing wave (animate t)
- `ripple-decay` (waves, surface) — Decaying ripple (animate t)
- `sinc2d` (waves, surface) — Two-dimensional sinc
- `checker-wave` (waves, surface) — Beat pattern
- `torus` (shapes, parametric) — Torus
- `sphere` (shapes, parametric) — Sphere
- `mobius` (shapes, parametric) — Möbius strip
- `klein` (shapes, parametric) — Klein bottle (figure-8)
- `shell` (shapes, parametric) — Sea shell
- `trefoil` (shapes, curve) — Trefoil knot
- `helix` (shapes, curve) — Helix
- `lissajous` (shapes, curve) — Lissajous 3D
- `vase` (shapes, revolution) — Vase of revolution
- `horn` (shapes, revolution) — Gabriel horn
- `ackley` (analysis, surface) — Ackley function
- `rosenbrock` (analysis, surface) — Rosenbrock valley
- `himmelblau` (analysis, surface) — Himmelblau
- `rastrigin` (analysis, surface) — Rastrigin
- `complex-mod` (analysis, surface) — Modulus of z² − 1
- `normal-mix` (analysis, surface) — Two-cluster density

Pass `{ "preset": "<id>" }` to render one; any other field you send overrides that preset.


## Agent affordances

- Act — WebMCP tool listing for this app: https://aimeat.io/v1/apps/happydude500001/graph.html/webmcp
- Learn — skills bound to this app: https://aimeat.io/v1/apps/happydude500001/graph.html/skills
- App catalog on this node (this app: happydude500001/graph.html): https://aimeat.io/app-catalog.html
- Register an agent on this node (RFC 8628 device flow): https://aimeat.io/auth.md
