算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
enhance-glyph【设计与创意】Improve an existing R-based pictogram glyph for the visualization layer. Covers visual audit of the current glyph, diagnosis of specific issues (proportions, readability, glow balance), targeted modifications to the glyph function, re-rendering, and before/after comparison. Works for skill, agent, and team glyphs. Use when a glyph renders poorly at s…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Improve existing pictogram glyph in viz/ → audit render, diagnose issues, targeted mods, re-render, compare before/after. Works skill/agent/team.
skill, agent, teamcommit-changes, mystic, tending)Examine current, identify issues.
viz/R/primitives*.R (19 domain files), map viz/R/glyphs.Rviz/R/agent_primitives.R, map viz/R/agent_glyphs.Rviz/R/team_primitives.R, map viz/R/team_glyphs.Rviz/public/icons/cyberpunk/<domain>/<skillId>.webpviz/public/icons/cyberpunk/agents/<agentId>.webpviz/public/icons/cyberpunk/teams/<teamId>.webpGlyph Quality Dimensions:
+----------------+------+-----------------------------------------------+
| Dimension | 1-5 | Assessment Criteria |
+----------------+------+-----------------------------------------------+
| Readability | | Recognizable at 48px? Clear at 160px? |
| Proportions | | Well-centered? Good use of the 100x100 canvas?|
| Metaphor | | Does the shape clearly represent the entity? |
| Glow balance | | Glow enhances without overwhelming? |
| Palette compat | | Looks good across cyberpunk + viridis palettes?|
| Complexity | | Appropriate layer count (not too busy/sparse)? |
+----------------+------+-----------------------------------------------+
→ Clear diagnosis. Specific: "proportions: uses 40% canvas" not "looks bad."
If err: fn missing or entity not in *_glyphs.R → glyph not created → use create-glyph.
Root cause.
size at s=1.0)?s too small/large?ggfx::with_outer_glow():
col/bright?→ Root causes point to code changes. "Too small" → "s=0.6, should be 0.8." "Glow overwhelms" → "3 overlapping filled polygons each generate glow."
If err: root cause not obvious from code → render isolation w/ diff params. render_glyph() single glyph to test.
Edit fn → targeted fixes.
s multiplier or element offsetscol/bright, alpha for depthglyph_name <- function(cx, cy, s, col, bright) {
# cx, cy = center (50, 50)
# s = scale (1.0 = ~70% of canvas)
# col = domain color, bright = brightened variant
# Returns: list() of ggplot2 layers
}
→ Modified fn addresses Step 1-2 issues. Targeted + minimal.
If err: mods make other dims worse → revert, try diff. Needs redesign → create-glyph.
Render + verify. Always build.sh → handles platform + R binary. See render-icon-pipeline for flags.
Re-render by entity:
# From project root — use --no-cache to force re-render of modified glyph
bash viz/build.sh --only <domain> --no-cache # skills
bash viz/build.sh --type agent --only <id> --no-cache # agents
bash viz/build.sh --type team --only <id> --no-cache # teams
Verify output exists each palette
Check sizes — icons 2-15 KB (WebP):
→ Fresh icons each palette. Sizes in range.
If err: build errs → R console for specific. Common: missing paren, undefined primitives, non-list return. Renders but blank → layers outside canvas.
Verify enhancement improved targets.
python3 -m http.server 8080 from viz/→ Measurable improvement on targets, no regression others. Better both sizes + all palettes.
If err: marginal improvement or regression → revert, reconsider diagnosis. Sometimes orig limit = inherent to metaphor → metaphor itself needs change (escalate create-glyph).
build-icons.R, agents build-agent-icons.R, teams build-team-icons.R.