anbeime/skill / skills/anatomy/anatomy
anatomy
UnverifiedBuild crafted, highly detailed, interactive isometric SVG figures that explain a technical idea as a real physical object (a test rig, a dial gauge, a cabinet of drawers, a plotter, a lock), with many small precise solid parts, four-tone shading, correct painter's order, a framed card with title, hint and live readout, and calm eased motion. Use this whenever someone wants an isometric illustration, an explanatory diagram or figure for docs, a blog post, a landing page or an article, a "Linear-style" or "premium" technical drawing, an interactive explainer, or an SVG that shows how a system, algorithm or component works, even if they never say "isometric". Works framework-free (TypeScript/JS that writes SVG and HTML) and in React/Next.js, and can add realistic WebGL shaders (fire, exhaust, water, caustics, lamp light) that live inside the drawing in the same isometric perspective. Also prints a figure as an A4 PDF (poster, drawing or handout) and publishes it to the Anatomy community gallery when asked.
scripts/turn-rounded-polygon.test.mjs
View on GitHubimport assert from "node:assert/strict";
import test from "node:test";
import * as G from "../kit/lathe.mjs";
import { roundedPolygon, turning } from "../kit/turn-build.mjs";
const square = [[0, 0], [10, 0], [10, 10], [0, 10]];
const extent = (ring, axis) => [Math.min(...ring.map((p) => p[axis])), Math.max(...ring.map((p) => p[axis]))];
test("a repeated vertex does not change the rounded outline", () => {
const expected = roundedPolygon(square, 1, 2);
assert.equal(expected.length, 12);
assert.deepEqual(roundedPolygon([[0, 0], [10, 0], [10, 0], [10, 10], [0, 10]], 1, 2), expected);
assert.deepEqual(roundedPolygon([[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], 1, 2), expected);
assert.deepEqual(roundedPolygon([[0, 0], [0, 0], [0, 0], [10, 0], [10, 10], [0, 10]], 1, 2), expected);
});
test("a repeated vertex keeps the rounded outline inside the polygon", () => {
const ring = roundedPolygon([[0, 0], [10, 0], [10, 0], [10, 10], [0, 10]], 1, 2);
assert.deepEqual(extent(ring, 0), [0, 10]);
assert.deepEqual(extent(ring, 1), [0, 10]);
});
test("a prism with a repeated vertex and a corner radius stays inside its polygon", () => {
const T = turning({ origin: [0, 0], scale: 1, azimuth: 45, elevation: 30 }); T.layer("all");
const F = G.frameAlong([0, 0, 0], [0, 0, 1]);
const part = T.prism({ name: "block", F, s0: 0, s1: 2, polygon: [[0, 0], [4, 0], [4, 0], [4, 4], [0, 4]], round: 1 });
assert.deepEqual(extent(part.world.ring, 0), [0, 4]);
assert.deepEqual(extent(part.world.ring, 1), [0, 4]);
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |