/pauls-skills:figure-to-3dfrom pauls-skills
Turn a photo of a figure from a textbook, lab manual or instruction manual (a heart, a cell, an engine, a gear train) into an interactive 3D model on one self-contained HTML page for teaching. Use whenever someone shares a picture of a diagram or figure and wants it in 3D, interactive or "brought to life", or asks for a 3D model of a body part, mechanism or solid for a class, even if they don't name the skill. For drawn OPS-style figures of everyday machines use ops-figures.
Ships in pauls-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Someone photographs a figure in a book and gets back a 3D model they can teach with. Each model is one HTML page:
the engine (assets/engine.js, bundled with a pinned Three.js) plus your scene, a plain description of the parts
and how the thing works. The engine owns the look, the controls and the teaching layer. You own reading the figure
correctly, getting good geometry, and writing the teaching copy.
The spec this skill was built from, with the reasons behind each choice: specs/figure-to-3d.md in the
claude-skills repo.
Mainly a teacher projecting it in front of a class, sometimes students on their own devices.
Never write "students will…" or "teachers can…" on the page.
npm ci in this skill folder (Node 20+). Verification uses Playwright's Chromium.<name>.scene.js: one mountModel({...}) call. Read first:
assets/examples/heart.scene.js, the reference: segmented meshes, layers, flows, Take apart along the blood
path, a Cut, a Walk through with beats and Predict, and its read-back written out at the top.assets/examples/trumpet.scene.js, the machine reference: every part procedural (tube, lathe, cylinder) at
real size, pistons that move per step (move), and an air path that changes with the valves pressed.assets/examples/gears.scene.js, the running-machine reference: real meshing spur gears (shape: { gear }),
motion with Run/Stop and a speed slider, live stats (turn counters), and steps that run, set speed and
reset.assets/examples/solid.scene.js, the math reference: params sliders, parts whose shape, at and
spin are functions of them (a triangle spun into a cone), a see-through comparison solid (opacity), live
volumes in stats, and steps and beats that slide the values.assets/examples/bookcase.scene.js, the instruction-manual reference: a parts list (tray: true), parts
added step by step (adds) that fly in or slide over from the tray, the manual's step numbers (manual), and
the manual's exploded drawing as Take apart.assets/engine.js, which lists every option mountModel takes.node scripts/build.mjs <name>.scene.js OUT.html. It inlines Three.js, the engine, the scene and the
meshes into one file and prints the size.node scripts/verify.mjs OUT.html. It screenshots 6 angles, every step, Take apart, three cut
depths and Present, and checks for label overlaps, script errors, captions replaced too early, size and triangle
budget. Then look at the shots (OUT.shots/): a page can pass every check and still read badly (a label
pointing at the wrong part, a flow dot path outside the vessel, a step that frames the wrong side). Fix and
re-run, at most 2 rounds.--artifact (the artifact host adds its own page skeleton) and publish that as an
artifact (private; the person shares it if they want). Give the link and the plain OUT.html (for offline use),
plus two or three lines: what the buttons do, which switches it has, and the assumptions you made (what you
guessed, what the mesh shows differently from the book). If the work is in the claude-skills repo, offer to add it
to the gallery: the built page in gallery/figures/ (or the scene in assets/examples/, if it should become a
reference), with any new meshes and their recipe in mesh-library/, in one PR.Short, in this order:
[?].If it's a heart, it looks like a heart. Organic forms always use a real mesh. Never build a heart, brain or cell
from spheres and blobs. When no good mesh exists, say so in the read-back instead of building a weak model. Machines
and math are procedural (shape:), because exact geometry beats a scanned mesh there.
The library is mesh-library/ at the root of the claude-skills repo (outside the plugin, so installs stay small):
one folder per group (bp3d/heart/), a recipe.json in each that rebuilds it, and manifest.json listing every
mesh with its source, license, credit, triangles, bounds and centre. build.mjs finds it on its own inside the repo;
elsewhere pass --lib. Look there first.
Sources, in this order (scripts/fetch-mesh.mjs does each; run it with no arguments for usage):
| Source | Good for | License | |
|---|---|---|---|
| BodyParts3D | human anatomy, one file per structure | CC BY 4.0 | search bp3d, parts bp3d <FMA id>, get bp3d <recipe> |
| NIH 3D | biology, anatomy, molecules | per model, check it | download the GLB from 3d.nih.gov, then get url |
| Smithsonian Open Access | specimens, fossils, objects | CC0 | search si, get url |
| Sketchfab | anything | CC BY or CC0 only | search sketchfab; get sketchfab <uid> only with a token set |
Never ask for a Sketchfab token in chat. If downloading says no token is set, skip Sketchfab.
Prep with node scripts/prep-mesh.mjs <recipe.json> --src <raw folder>: it merges each part's files, turns them
Y-up with the front toward +Z, scales to centimetres, centres the group (parts keep their places relative to each
other), simplifies to each part's triangle target, compresses (meshopt), and updates the manifest. Write the recipe
first (mesh-library/bp3d/heart/recipe.json is the model):
keep trims a part to a range ({ "z": [1160, null] }): a vessel cut to a short stub, so it doesn't run off
toward the feet and push the model off centre.info and in the hand-over.Credits: the build writes a Credits panel from the manifest for every mesh the scene uses. The book is named
there only if the person names it (source:). Never put the photo itself on the page: it is the publisher's.
Retype the labels.
The ops-figures rules, unchanged.
caption: is the opening one; each step has its own.beats: [{ caption, highlight?, flows? }]). The engine holds each one READ_S(caption) seconds (about 3 words a second plus 1, never under 3 s).
Shorter sentences make a faster step: cut words before you cut time.style.labels: leader, boxed or numbered). Every part
is labelled unless label: false (small parts that crowd the rest). Labels go in columns either side of the model
with leader lines, follow the side that faces the camera, dim when the part is hidden behind another, and drop
when the Cut removes the part. While a step highlights parts, only those are labelled.info: sentence about what it does, not what it looks like.view that shows its parts (check the
shots: a step about the back of the heart needs a back view), highlights what it's about (the rest fades), and
can turn layers and flows on, and move parts (a piston pressed down: offsets from where the part is built;
parts the step doesn't move go back).apart.order is the path the flow takes (blood, light,
water, current), 3–8 parts; those are labelled and joined by a dashed red arrow line. Give offsets that slide
each part out along that path, far enough to separate and no farther; the engine zooms out to fit.section.normal is the direction that gets cut away ([0,0,1] removes the front half: the frontal
section most books draw). Cut faces show darker, so the inside reads as solid.flows: { id: { path, color } }), drawn over the model the way a book draws
arrows. A path is a list of points in the model's centimetres (front view: +x is the body's left, +y up, +z toward
you) or part ids. Keep every point inside the vessel or chamber it means: the shots show strays.group:.motion.drive(turns) returns each moving part's rot (and at) for a count of
turns that climbs while it runs. A part turns about its at; use offset to put a shape off that axis (a crank
arm). Mesh real gears with one module and centre distances that add up to the pitch radii; check in the front
shot that teeth meet gaps. stats shows live numbers (turns, rpm): count something a student can predict.params are the figure's variables (r, h, an angle), with real units and ranges a student
can reason about. Make the shapes functions of them, so the solid rebuilds as they move, and show the formula's
result live in stats. A Predict step slides one value (in a beat) so the change happens after the question.
A ghost solid to compare against takes opacity: .2. A math idea gets no Take apart.assembly: { tray, from } and steps with adds. Step 1 is the parts list (tray: true,
manual: 'Parts') with every part laid out and the counts in its caption; then one step per manual step, in the
manual's order and with its numbers (manual: '3'), adding only what that step adds; then a last Done step.
Parts fly in from from (the direction you'd push them: a shelf from the front, a back panel from behind).
Name parts with the manual's letters ("Shelf (B)"), use style.labels: 'boxed', and label one of each repeated
part. Before Walk through the piece is shown finished.The page matches the book, not the OPS brand: style takes paper, ink, muted, accent, font (serif or
sans, system fonts only so it works offline) and labels. Sample them from the photo in the read-back. The model
gets the figure's own colors with soft toon shading and thin ink outlines, which reads like a printed illustration
and holds up on a projector. Colors that carry meaning are never changed for looks. Build machines, solids and
furniture at real size in centimetres, and route tubes so they don't pass through each other: the shots show it.
There is no SpartBoard version: a Three.js page is far over the mini-app limit, and build.mjs says so.
README.md (opens in a new tab)assets/engine.js (opens in a new tab)assets/examples/bookcase.scene.js (opens in a new tab)assets/examples/gears.scene.js (opens in a new tab)assets/examples/heart.scene.js (opens in a new tab)assets/examples/solid.scene.js (opens in a new tab)assets/examples/trumpet.scene.js (opens in a new tab)package-lock.json (opens in a new tab)package.json (opens in a new tab)scripts/build.mjs (opens in a new tab)scripts/fetch-mesh.mjs (opens in a new tab)scripts/prep-mesh.mjs (opens in a new tab)scripts/verify.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ops-pivers/claude-skills --plugin pauls-skills41 skills in this plugin
/aim-higherTake a task, research how top practitioners in its field work, push it to go deeper across altitude, depth, range and verification, grill the user until the plan is settled, then do the work and prove it worked with real measurements./animateBuild an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations./