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-convex-check.test.mjs
View on GitHubimport assert from "node:assert/strict";
import test from "node:test";
import * as G from "../kit/lathe.mjs";
import { turning } from "../kit/turn-build.mjs";
const prism = (polygon, options = {}) => {
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]);
return T.prism({ name: "part", F, s0: 0, s1: 2, polygon, ...options });
};
const regular = (count, step, radius = 3) => Array.from({ length: count }, (_, i) => [radius * Math.cos(Math.PI / 2 + i * step), radius * Math.sin(Math.PI / 2 + i * step)]);
test("a pentagram is not a convex prism", () => {
assert.throws(() => prism(regular(5, (4 * Math.PI) / 5)), /part is not convex/);
});
test("a heptagram is not a convex prism, in either winding", () => {
assert.throws(() => prism(regular(7, (4 * Math.PI) / 7)), /part is not convex/);
assert.throws(() => prism(regular(7, (4 * Math.PI) / 7).reverse()), /part is not convex/);
});
test("a bowtie and an L shape are still rejected", () => {
assert.throws(() => prism([[0, 0], [2, 2], [2, 0], [0, 2]]), /part is not convex/);
assert.throws(() => prism([[0, 0], [4, 0], [4, 1], [1, 1], [1, 4], [0, 4]]), /part is not convex/);
});
test("convex polygons are still accepted, whichever way they wind", () => {
for (const polygon of [regular(3, (2 * Math.PI) / 3), regular(5, (2 * Math.PI) / 5), regular(12, (2 * Math.PI) / 12), regular(6, (2 * Math.PI) / 6).reverse(), [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10]]]) {
assert.equal(prism(polygon).world.ring.length, polygon.length);
}
assert.ok(prism([[0, 0], [10, 0], [10, 10], [0, 10]], { round: 2, steps: 6 }).world.ring.length > 4);
});
test("a repeated vertex does not make a convex polygon look concave", () => {
assert.equal(prism([[0, 0], [4, 0], [4, 0], [4, 4], [0, 4], [0, 0]]).world.ring.length, 6);
});
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: 198k | Updated | Claude CodeCodex | Verified | Install |