How to use Image Engine
A two-minute orientation. Image Engine is a public-quality scientific figure generator + library — the same engine DreamBook Studio uses for our own textbook production.
1
Browse the existing library
The Browse images tab holds 90+ vetted figures from real DreamBook textbook builds — physics, mathematics, electrodynamics. Use the filters at the top to narrow by textbook or topic, or search by free text.
- Click any card → modal with full description, caption, and a download button.
- Source badges: 🟡 vetted = went through critique loop · 🔵 production = shipped in a real book · 🟠 generated = made on demand via the Generate tab.
2
Generate a new figure
The Generate new tab is the on-demand engine. It uses Claude Opus to write a TikZ figure, compiles it through tectonic, and rasterizes to PNG. The output is publication-grade scientific TikZ — not a generic AI image.
- Description — write what the figure should show, like a figure caption. Include all key elements, labels, and what's emphasized. Specificity beats brevity.
- Try one — quick-pick example pills auto-fill the description for canonical figures (pendulum phase portrait, dipole field lines, Bohr atom, etc.). Use these to learn the right level of detail.
- Title + Topic — used to organize the figure in the gallery and as the download filename.
- Figure background — White (default), Cream paper (textbook), Graph grid, Dark (slide-friendly), Transparent.
- Style hint — optional one-liner to nudge the visual style.
- Generate figure — runs the pipeline. Live progress shows you the stage (Classifying → Computing curves → Composing TikZ → Compiling → Rasterizing) with a timer. Typical: 30–90 seconds, ~$0.20–1.00 per figure.
3
Save and reuse
Every generated figure is auto-saved to the engine gallery — you don't need to do anything. From the result panel:
- ⬇ Download PNG — saves to your local Downloads folder.
- ⬇ TikZ source (.tex) — the LaTeX source. Drop it into Overleaf or any LaTeX project to recompile or modify.
- View TikZ inline — toggle the source code in-page to inspect.
- Copy TikZ — copies source to clipboard.
- → View in Gallery — switches to Browse tab, filtered to all your generated figures.
4
Theme the interface
Top-right of the page: 4 theme swatches (Clean, Paper, Graphite, Dark). These change the UI background only — independent of the figure-background option in the Generate tab. Your choice is remembered across reloads.
5
Tips for getting great figures
- Be visual. Describe what's drawn, where. "Phase portrait of pendulum: librating orbits encircling the origin, separatrix at E=2 passing through saddles at (±π, 0), rotating orbits above/below." beats "draw a pendulum phase portrait".
- Name the labels. If you want axes, fixed points, or quantities labeled, name them.
- One concept per figure. The engine handles single-concept figures best. For multi-panel layouts, generate each panel separately.
- Class I figures (phase portraits, field lines, trajectories, level curves) get the physics sidecar — analytic ground-truth curves backing the figure. Use precise physics language to trigger the sidecar correctly.
- Iterate. If a figure is close but off, regenerate with a clearer description or a hint about what to fix.
6
About the engine
Image Engine is built on DreamBook Studio's figure-engine library — the same code that produces figures for our own textbooks (graduate physics, electrodynamics, condensed matter, general relativity).
- Backend: FastAPI · Anthropic Claude Opus for TikZ composition · tectonic for LaTeX compilation · pdftoppm for rasterization.
- Output: PNG at 200 DPI + the original TikZ
.tex source. Both are publication-ready.
- Cost transparency: shown per-figure (~$0.20–1.00). All cost is the LLM call to Opus; compile and rasterization are local.
- Built by AI · Guided by Mukesh Bansal. All output rights belong to the principal who guided generation; the AI tooling is a means.
!
For technical contacts
The /api endpoints are public during this preview:
GET /api/textbooks — list textbooks + counts
GET /api/topics?textbook=… — list topics
GET /api/images?textbook=…&topic=…&q=… — list images (filterable)
GET /img?path=…&download=1&name=… — fetch an image
POST /api/generate — body: {description, title?, topic?, style_hint?, background?} — returns {id, image_url, tikz_url, model, cost_usd, figure_class}
API rate-limits and authentication are not enabled in the preview. If you want a stable contract — bearer auth, a versioned /v1/ path, batch generation — we add those for production deployment.
Image Engine v0.1 · DreamBook Studio · 2026