# Epicycle Studio: Ink Portrait

> Turn rotating circles into luminous drawings with a real Fourier transform and an interactive reveal.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Education](https://www.sandbase.ai/skills/education)
- Version: 0.1.0
- Runs online: yes
- Page: https://www.sandbase.ai/skills/education/epicycle-studio

## What you get

Bring a subject, editable vector drawings and an optional palette. The Skill returns a downloadable Skill, interactive demos and example videos.

## Install

Download the Skill package from https://www.sandbase.ai/skills/education/epicycle-studio (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/epicycle-studio build an interactive Fourier drawing of <your subject> with editable vector strokes, bilingual controls and measured error
```

## How it works

1. **Fill the drawing prompt** Epicycle Studio fills its prompt from a slots file: node scripts/fill-prompt.mjs --slots assets/prompts/examples/ink-portrait.json --out prompt.md. Then node scripts/new-project.mjs --out my-epicycles and npm ci set up the project. The agent edits src/drawings.ts, where each subject is a closed, normalized vector path. The Ink Portrait example ships a portrait, a butterfly and a spiral shell.
2. **Compute the rotating circles** A real discrete Fourier transform turns each path into rotating vectors, and the trail and the numerical error derive from those coefficients. The verified build samples 1024 points per drawing and reports a full reconstruction error near 1.7e-11. In the page you choose a drawing, pick one of five harmonic detail levels, scrub the reveal, pause, restart, hide the circles and zoom.
3. **Build and check offline** npm run build:single writes one offline HTML file with English and Simplified Chinese, and npm run shoot -- --file dist-single/index.html runs the screenshot and state checks in references/verification.md. Node 22.4 and the npm dependencies are needed to build, and Chrome to verify. Check that each drawing closes and that the error readout shrinks as harmonic detail rises.

## FAQ

### Is Epicycle Studio a prerecorded animation?

No. Epicycle Studio computes the circles, the endpoint and the line in the browser on every frame. The rotating vectors come from a Fourier transform of the authored path, so changing harmonic detail changes the drawing live. Reduced motion starts the reveal paused, and the scrubber lets you move to any point of it.

### Can Epicycle Studio draw my own subject?

Yes. Epicycle Studio redraws any subject you add as a normalized vector path in src/drawings.ts and regenerates the Fourier coefficients. The path must be closed and non-degenerate, or the reconstruction fails. The shipped example holds three drawings, and you can replace them or add more.

### Does Epicycle Studio call any model?

No. Epicycle Studio needs no key, model call, external asset or storage, so building and playing it costs nothing on SandBase.

### Does Epicycle Studio include music?

Epicycle Studio bundles no song. It plays optional synthesized tones that start only after a user gesture, and a mute control turns them off. No recording ships in the package, so the HTML file stays a self-contained Canvas page with no audio assets.

### What does Epicycle Studio output?

Epicycle Studio outputs one offline HTML file plus bilingual verification reports. The file runs on Canvas and includes both English and Simplified Chinese. Browser timing in the reports is indicative only and does not establish performance on a physical device. If the canvas fails to start, the page reports the failure in its UI.

## Examples

- Epicycle Studio interactive drawing (scene)
- Epicycle Studio: Ink Portrait (video)
