How to Evaluate AI Coding Capabilities: A Scroll-Driven Vortex Particle Animation
Evaluating AI-assisted coding goes beyond checking whether it can generate code—what matters is whether it can understand a complex visual target and deliver a runnable, modifiable, verifiable implementation. This article uses a scroll-driven particle animation—a vortex galaxy morphing through digit and pointer outlines into an abstract mark—as a reproducible engineering practice. It covers how to translate a visual impression into engineering requirements, build a stable particle data model, generate spiral arms in polar coordinates, map particles across morphing shapes, drive continuous reversible animation from scroll position, separate structural morphing from decorative motion, optimize performance, and finally how to evaluate the quality of AI-generated implementations through staged collaboration and clear acceptance criteria.
How to Evaluate AI Coding Capabilities: A Scroll-Driven Vortex Particle Animation
As AI-assisted coding evolves rapidly, the question developers really care about is usually not “can it generate a piece of code,” but “can it understand a complex visual target and deliver an implementation that is runnable, modifiable, and verifiable?”
Compared with a static page, a particle animation involving a vortex structure, shape morphing, and scroll interaction is far better at exposing the limits of code generation. It touches geometric modeling, animation timing, graphics rendering, interaction design, and performance control all at once. If any one of these goes wrong, you end up with something that looks close in a screenshot but clearly falls apart in actual use.
So instead of giving a vague verdict on some specific tool, it is more useful to turn the question into a reproducible engineering practice: how do you build a scroll-driven particle scene that starts as a vortex galaxy, morphs through a digit outline and a pointer outline, and finally converges into an abstract mark? And how do you judge whether an AI-generated solution is actually good enough?
1. Turn the Visual Impression into Engineering Requirements
“Make a cool galaxy animation” is not an executable requirement. Different developers might implement it as random star points, a flat swirl, or a continuously rotating particle sphere. Each satisfies “galaxy” in some sense, yet none expresses the intended visual structure.
A more reliable approach is to break the target into four layers.
The first layer is form structure. Specify the initial spatial distribution of particles, whether there are recognizable spiral arms, whether the center is brighter, and whether the scene is flat or a three-dimensional space with perspective.
The second layer is the state sequence. For example: the opening forms a digit outline, then disperses into a vortex, then aggregates into a pointer shape, and finally converges into a custom geometric mark. The outlines should use original or properly licensed assets—do not copy someone else’s brand visuals.
The third layer is the driving inputs. Page scroll advances the state, elapsed time drives local rotation and twinkling, and pointer movement can add subtle parallax. The three inputs should each do their own job, not be mixed into a single unbounded displacement formula.
The fourth layer is delivery constraints: mobile adaptation, degradation on low-end devices, the reduced-motion preference, accessibility, and resource cleanup after the component unmounts.
Only after this breakdown does the evaluation target shift from “does it look good” to “does it satisfy a set of explicit, verifiable requirements.”
2. Build a Data Model for the Particle System
The foundation of particle animation is not random numbers—it is a stable data structure.
For each particle, you typically need to store:
- Positions under each target shape.
- Particle size, color, and opacity.
- Fixed random seeds for rotation, twinkling, or jitter.
- Depth information and motion parameters where needed.
The most important principle: random attributes should be fixed at initialization, not regenerated every frame. Otherwise particles jump inexplicably, and debugging and reproduction become difficult.
Given N particles and several target shapes, each shape should provide N target positions, so every particle has a well-defined start and end point at every stage.
For complex scenes, you can also split particles into a main layer, a background layer, and a few highlight points. The main layer carries the outline, the background layer provides spatial atmosphere, and the highlights set local visual rhythm. Layering is easier to control than forcing all particles to share one set of motion rules.
3. How to Generate the Vortex Structure
The visual signature of a spiral galaxy is not just “points rotating”—it is a dense center with continuous arms extending outward.
A common approach describes particle positions in polar coordinates:
θ = θ₀ + k × r + εθx = r × cosθy = r × sinθ
Here, r is the distance from the center, θ₀ is the initial angle of the arm the particle belongs to, k controls how much the arm curves, and εθ is a small angular perturbation.
For multiple arms, assign particles to different initial-angle groups and add moderate noise. Too much perturbation dissolves the arm structure; too little produces mechanical, regular stripes.
Radius distribution also matters. Sampling the radius uniformly in polar coordinates does not yield a uniform distribution over the disk’s area. For near-uniform disk coverage, sample the radius via a method related to the square root of a uniform random variable; for a denser center, use a deliberately designed radial density distribution.
To enhance the sense of space, add a small depth offset and let thickness vary with radius. But more depth is not always better: if the particles must later converge into a crisp outline, excessive spatial scatter makes the transition stage look messy.
4. Give Every Shape Corresponding Target Points
Morphing from a vortex into a digit or pointer is not just about drawing a new outline—it is about moving the existing particles to new positions in an orderly way.
For 2D outlines, prepare a mask first, then sample target points from the valid region. Sampling must distinguish two kinds of targets:
- Filled shapes, which emphasize overall area and recognizability;
- Stroked shapes, which emphasize boundary continuity.
The two require different sampling strategies and cannot simply share one random point-picking method.
When the sampled count differs from the particle count, unify them via resampling, region-based point filling, or density adjustment. In practice, also normalize the size and center-align each shape to avoid unexpected global scaling and shifting during transitions.
Next comes the particle mapping problem.
The simplest method is index-based correspondence, but if two target point sets are ordered completely independently, large numbers of particles will cross each other, producing a “sudden explosion” feel. For some artistic effects that chaos is acceptable; if the goal is smooth morphing, you need a more sensible correspondence.
You can group particles by spatial region first, then build approximate correspondences by angle, distance, or spatial sorting. More sophisticated matching improves overall displacement but increases preprocessing cost.
There is no single optimal method for every project. The right choice depends on particle count, shape differences, allowed initialization time, and whether the design calls for a visible dispersion phase.
5. Turn Scroll into a Continuous, Reversible Animation State
Scroll-driven animation should not rely on a pile of discrete events to “play the next segment.” Instead, build a continuous mapping from scroll position to visual state.
First, normalize the scroll distance within the animation region into a progress value p, clamped between 0 and 1. Then divide the progress into intervals according to the design:
- Opening hold zone
- First morph zone
- Vortex display zone
- Second morph zone
- Final convergence zone
Within a morph interval with start a and end b, compute the local progress:
u = clamp((p - a) / (b - a), 0, 1)
Apply a smoothing function:
s = u² × (3 - 2u)
Then interpolate between start position A and target position B:
P = (1 - s) × A + s × B
The advantage of this approach is that state can be computed directly from the current scroll position. When the user scrolls backward or jumps quickly, the scene still returns to the correct state, instead of depending on whether some segment was fully played before.
If scroll input jitters noticeably, apply moderate smoothing to the displayed progress—but don’t overdo it, or the visuals will feel laggy. The smoothing should also account for frame intervals so behavior stays consistent under different refresh conditions.
6. Separate Structural Morphing from Decorative Motion
Good animation has both a clear large-scale structure and subtle local variation. The problem is that if every motion is piled onto the final position, the outline gets destroyed by noise.
A more sensible formulation:
final position = shape-interpolated position + local perturbation × stage weight
During dispersion phases, raise the perturbation weight to make the scene lively; when a digit, pointer, or mark must appear clearly, gradually lower the weight.
Rotation should be treated distinctly too. Background particles can drift slowly and continuously, but the main outline should not necessarily rotate in sync—otherwise, even with correct geometry, users may fail to recognize the target shape.
Also, time-based animation must be computed from actual elapsed time, not by adding a fixed value each frame. The latter makes motion speed inconsistent across devices.
7. Performance Optimization Should Start from the Bottleneck
More particles does not mean a better effect. The final result is also shaped by screen resolution, point size, transparency blending, and rendered coverage area.
When many semi-transparent particles concentrate in one region, the cost can grow significantly from repeated blending even if the particle count stays the same. So optimization cannot fixate on count alone.
At the implementation level, minimize per-particle draw calls, reuse position and attribute buffers, and avoid creating large numbers of temporary objects every frame. Position interpolation that suits parallel processing can be offloaded to the GPU, but this must be weighed against implementation complexity and device compatibility.
At the page level, decouple input from rendering. Scroll listeners mainly update the target progress, while actual drawing is centralized in a single animation loop, avoiding duplicate work submissions within the same frame.
In addition, handle the following cases:
- Pause unnecessary updates when the page goes to the background;
- Reduce activity when the animation region leaves the viewport;
- Recompute viewport and projection on resize;
- Remove listeners and release graphics resources when the component is destroyed.
For low-end devices, lower the render resolution, reduce background particles, and simplify transparency blending. The goal of degradation is to preserve the core narrative, not to mechanically keep every decorative effect.
8. How to Evaluate an AI-Generated Implementation
If you use AI-assisted coding for the task above, evaluate it along six dimensions.
First, requirement understanding. Does it correctly distinguish the vortex structure, target outlines, and scroll stages—rather than just producing a continuously rotating particle background?
Second, visual accuracy. Are the outlines recognizable, is the aggregation and dispersion natural, and do the main body and background have clear hierarchy? Evaluate how well the design requirements are implemented, not pixel-level identity with some existing page.
Third, interaction completeness. Does the state remain correct after scrolling forward, scrolling backward, jumping quickly, and resizing the window?
Fourth, engineering quality. Are shape data, interaction logic, and rendering logic separated? Are key parameters centrally configured? Can a later developer understand and modify the code?
Fifth, runtime stability. Does resource usage keep growing over long sessions? Are event listeners left behind after page transitions? Does it degrade gracefully under abnormal conditions?
Sixth, accessibility. Can users with the reduced-motion preference see a static keyframe or a low-motion version? Is the body content provided as real text rather than hidden inside a purely visual scene?
If you need to compare different generated solutions, keep the requirement description, input assets, test devices, and acceptance procedure fixed, and record how many manual fixes were needed and their scope. Without actual testing, you should not conclude that any solution is “performance-leading” or “best-looking.”
9. Replace One-Shot Generation with Staged Collaboration
Complex animation is better built step by step than requested as a complete one-shot deliverable.
- First validate the static vortex: check density, arms, and spatial layering.
- Implement interpolation between two simple shapes to validate particle correspondence.
- Hook up scroll progress and ensure forward and backward operations behave consistently.
- Then add local perturbation, pointer parallax, and visual details.
- Finally, do performance profiling, mobile adaptation, and degradation testing.
Each stage should have explicit acceptance criteria. This not only makes problems easier to locate, but also reveals whether the AI coding system genuinely understands revision requests—rather than masking structural flaws by piling on patches.
Conclusion
A vortex particle animation looks like a visual task, but in essence it is a set of mutually constrained engineering problems: how to express form, organize data, build mappings, control time, and maintain a stable experience under resource limits.
Evaluating AI coding capability should come back to these concrete questions. Generating a first working version is only the starting point. The more valuable capability is explaining the approach, fixing boundary issues, supporting ongoing modification, and ultimately producing a maintainable deliverable.
