algorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
1How It Works & Mechanism
Pure prompt-orchestrated phased generation skill: No scripts, CLI, or API calls; all capabilities stem from phased agent instructions plus two template files.
This happens in two steps: 1. Algorithmic Philosophy Creation (.md file) 2. Express by creating p5.js generative art (.html + .js files)
Two-stage relay architecture: Generates an 'algorithmic philosophy' (art movement manifesto as .md) first, followed by translating that philosophy into code later in the same session.
The same version receives the philosophy and EXPRESSES IT IN CODE - creating p5.js sketches that are 90% algorithmic generation, 10% essential parameters.
HTML output is not freeform but uses templates/viewer.html as a literal starting point: preserves FIXED sections (layout, Anthropic branding, seed controls, Actions), only replacing parameters and algorithms.
Use that file as the LITERAL STARTING POINT - not just inspiration
The artwork itself is written on the fly by the model: algorithm areas in the template are placeholder comments, and the model writes generateFlowField, draw, Particle, etc. ad hoc based on the philosophy and conceptual seed.
function generateFlowField() { // fill this in }
Reproducibility discipline (Art Blocks style): identical seed must produce identical output via dual randomSeed + noiseSeed seeding.
randomSeed(seed); noiseSeed(seed);
Unique conceptual layer: Deduces a 'conceptual seed' from the user's raw prompt—weaving subtle references into algorithmic parameters and behaviors rather than literal replication.
The concept is a **subtle, niche reference embedded within the algorithm itself** - not always literal, always sophisticated.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| network | p5.js CDN |
| network | Google Fonts (Poppins/Lora) |
| package | p5.js 1.7.0 (浏览器端库) |
4Recommended Governance & Evidence
- 本地工作目录: File read/write and artifact output: SKILL.md instructs the agent to output .md philosophy files and .html artifact files (the deliverables of the skill itself).
5Second-Pass Verification
- [ok] 外部资源:p5.js cdnjs 引用真实存在 — viewer.html:23 确有 cdnjs p5 1.7.0 script 标签
- [ok] 外部资源:Google Fonts 引用真实存在 — viewer.html:24-26 preconnect + stylesheet(Poppins/Lora)
- [ok] 模板即起点、算法区为占位(实现原理核心证据) — viewer.html 中 generateFlowField()/draw()/Particle 构造/updateParam/updateColor 均为 '// fill this in' 占位注释
- [discrepancy] SKILL.md 声称 FIXED Actions = Regenerate + Reset + Download PNG 按钮 — 实际 viewer.html Actions 区(425-427 行)仅有 Reset 按钮;模板无 Regenerate 与 Download PNG 按钮。重生成靠 seed 的 Prev/Next/Random 隐式完成;PNG 导出函数 exportImage() 只在 generator_template.js 中存在且无 UI 接线
- [discrepancy] SKILL.md 声称 seed 区含『Jump to seed input + Go button』 — viewer.html:342 只有 <input type=number onchange=updateSeed()>,无 Go 按钮(跳转功能在,UI 形态与描述不符,属轻微出入)
- [discrepancy] 文档内部一致性:交付文件类型 — SKILL.md:7/11 称输出 .md + .html + .js 三类文件,SKILL.md:399 却要求 'Embed algorithms inline in the HTML artifact (don't create separate .js files)',正文 302 行又称产物除 p5 CDN 外无任何外部导入(未计字体)——同一文档三处表述互斥
- [discrepancy] 『works immediately in any browser - no setup required / completely self-contained』声明 — 产物依赖 cdnjs p5.js 与 Google Fonts 两个网络端点,离线/无网环境无法立即工作;『自包含』仅在联网前提下成立
- [ok] 双种子可复现模式(randomSeed+noiseSeed)落地 — SKILL.md:139-140 指令 + viewer.html initializeSystem() 内 'randomSeed(params.seed); noiseSeed(params.seed);' 双处一致
6Verdict & Scenarios
c72553d5d7cf3344…