Testing Creative Coding: A Multi-dimensional Evaluation of LLMs' Coding and Aesthetic Capabilities
This article argues that creative coding is a stronger stress test for large language models than traditional algorithm or CRUD problems, since it forces models to build runnable, interactive, and visually coherent code from natural language alone. It lays out a progressive framework across four dimensions—interaction logic (SVG animation), graphic rendering (ray tracing), spatial reasoning (3D generation), and aesthetic judgment—and offers a practical, reusable methodology for scoring each. Readers will learn what separates strong models from weak ones and how to evaluate code through runnability, evolvability, and independent, dimension-by-dimension scoring.
Why Evaluate LLMs With Creative Coding
Traditional code benchmarks favor algorithm problems and business logic: sorting, CRUD, regex matching. These reveal how familiar a model is with syntax and common libraries, but they rarely expose its weaknesses when it has to build a complex system from scratch. Creative coding fills that gap—it asks a model to produce runnable, interactive, and visually coherent code from a natural-language description alone, with almost no ready-made template to lean on.
Whether a model can write good creative code ultimately depends on four things: its understanding of rendering models (DOM, Canvas, SVG, WebGL), its ability to model state and time, the depth of its geometric and mathematical reasoning, and finally its aesthetic judgment—the most easily overlooked of the four. This article unfolds across three progressive test dimensions—interaction logic, graphic rendering, and spatial imagination—and closes with a discussion of aesthetics as a “soft skill.”
1. SVG Animation: A Combined Test of State Management and Timing Logic
The classic prompt is “generate a pelican riding a bicycle.” It seems silly, but it is an excellent stress test, because an animated pelican must satisfy several constraints at once:
- Structured modeling: breaking the pelican’s body, beak, wings, the bicycle, wheels, and background into independently addressable elements.
- Timed animation: wheels spinning continuously, a scarf fluttering with speed, pedaling in a loop—all requiring sensible
animationkeyframes or a SMIL timeline. - Interactive state: pause/play, adjusting pedaling speed, toggling day/night—which demands a clear state machine in the code rather than a hardcoded static image.
A high-scoring implementation usually has this kind of skeleton:
<svg viewBox="0 0 400 300"><style>.wheel { animation: spin 1s linear infinite; }.scarf { animation: flutter 0.6s ease-in-out infinite; }@keyframes spin { to { transform: rotate(360deg); } }@keyframes flutter { 50% { transform: skewX(8deg); } }</style><!-- background, ground, day/night toggle layer --><rect class="sky" onclick="toggleNight()" /><!-- pelican + bicycle --><g id="rider"><g class="wheel">...</g><g class="scarf">...</g></g><script>let speed = 1;function setSpeed(v){ speed = v; /* adjust animation duration */ }function toggleNight(){ /* switch color palette variables */ }</script></svg>
What matters in the evaluation is not whether the drawing looks realistic, but whether the code has a structure that can keep evolving. If the animation still exports correctly after cranking the speed to 1.75×, and still runs when opened offline, the animation logic is self-contained rather than dependent on the external environment. Current mainstream models generally deliver decent results on this dimension; the gaps show up mainly in the physical realism of the animation (the inertia of the scarf, the consistency between wheel rotation and speed).
2. Pure-Code Rendering: From Geometric Modeling to Ray Tracing
The second dimension jumps sharply in difficulty: “drawing” a photorealistic image of an afternoon room using only code. To reach photorealism, the model has to write a ray tracer / path tracer—not assemble ready-made assets, but build a rendering pipeline from physical principles.
A minimal viable path-tracing approach looks roughly like this:
// Conceptual illustration: Monte Carlo path tracing main loopColor trace(Ray ray, Scene& scene, int depth) {if (depth == 0) return Color(0,0,0);HitRecord rec;if (!scene.intersect(ray, rec)) return background(ray);Color direct = 0;for (int i = 0; i < SAMPLES; ++i) {Vec3 dir = rec.normal.sampleHemisphere(random());direct += 0.5 * trace(Ray(rec.point, dir), scene, depth - 1);}return rec.albedo * direct / SAMPLES;}
For this code to run, the model must correctly handle: ray-object intersection (rectangles, spheres, planes), normal orientation, cosine-weighted hemisphere sampling, recursion depth, and energy conservation. The shadows cast by window panes on the floor, the texture of parquet flooring, the soft falloff of light—all of these come from whether the underlying math is correctly implemented.
The evaluation here is straightforward: can the code actually compile, run, and render the expected image? The gap between a model that writes correct intersection and sampling logic and one that can only stack up primitives via high-level drawing libraries is obvious at a glance. Rendering time (offline renders that take hours) is itself an indirect signal of whether the implementation took the physically correct “heavy” path or cut corners with textures.
3. 3D Generation: Spatial Understanding and Geometric Reasoning
The third dimension tests the model’s grasp of 3D space: given a description, produce a 3D scene (a Three.js/WebGL scene, or a 3D model description) with sound structure, correct viewpoint, and coherent proportions. The difficulties lie in:
- Coordinates and viewpoint: the camera, lighting, and relative positions of objects must be self-consistent in 3D space.
- Geometric reasoning: occlusion relationships, foreshortening, and projection proportions must follow real-world rules.
- Materials and lighting models: correct configuration of PBR materials, ambient light, and shadow maps.
A common problem in this dimension is “looks right at a glance, wrong on closer inspection”: objects clipping through each other, contradictory light directions, off proportions. Whether geometry stays consistent across multiple viewpoints is the dividing line that separates strong spatial reasoning from weak.
4. Aesthetics: The Underrated “Soft Skill”
The three dimensions above are relatively “judgeable”—it runs, it renders, the geometry is correct, and it scores. But aesthetics is hard to quantify: given the same functionality and correctness, whether the color palette is harmonious, whether the composition has breathing room, whether the motion rhythm feels natural—these determine the “quality” of the work.
A recurring pattern in the evaluation is that many models get the technique right but look thin on aesthetics. Implementations that are feature-complete yet have harsh color schemes, mechanical animations, and a lack of detail hierarchy are common. A shortfall in aesthetic ability usually shows up in “design sense”—the willingness to make trade-offs, an understanding of negative space, and the ability to anticipate the visual focal point. This is exactly where current models are relatively weak, and it is the key threshold on the way to top-tier work.
5. A Reusable Evaluation Methodology
Combining these dimensions, here is a practical evaluation framework:
- Design tasks in layers: interaction logic (SVG animation) → graphic rendering (ray tracing) → spatial reasoning (3D) → aesthetic expression, adding pressure at each layer.
- Emphasize runnability: use “can it compile, run, and produce the expected result” as a hard metric, rather than scoring by human impression.
- Test evolvability: good code should support parameter tuning, offline running, and secondary modification, not be a one-off hardcoded artifact.
- Evaluate across independent dimensions: score correctness, performance, and aesthetics separately, avoiding cases where “technical correctness masks aesthetic flaws” or the reverse.
- Compare baselines: align with human implementations or known excellent examples to quantify exactly where the gap lies.
The value of creative coding evaluation is that it translates the abstract notion of “coding ability” into concrete works that are visible, runnable, and comparable. For developers, rather than focusing on a model’s claimed parameters or leaderboard rankings, it is better to run these tasks yourself—whether the animation is self-consistent, whether the rendering is physically correct, whether the 3D is spatially sound, whether the visuals have quality. The answers are often more trustworthy than any marketing pitch.
