Evaluating LLM Spatial Reasoning Through Parametric 3D Tasks
This article presents a rigorous framework for evaluating large language models on 3D spatial reasoning and generative engineering tasks. Using the illustrative case of building a pelican riding a bicycle in a parametric scene, it explains why successful script generation and a good-looking render do not prove a correct model. It then details how to convert natural-language requirements into testable acceptance contracts, organize parameters via a dependency graph, model chain drives and crank phases correctly, and apply automated acceptance checks including parameter perturbation and multi-view validation. The article concludes with a weighted scoring methodology, guidance on extending evaluation to animation and creative coding, and the engineering criteria that matter most when judging model capability.
1. Evaluating a Model Requires More Than a Working Script
In generative programming and creative coding, 3D modeling tasks are a high-discrimination test of capability. A model must simultaneously understand natural language, establish geometric relationships, organize program structure, and translate abstract constraints into an executable scene description.
However, three outcomes are often conflated: “successfully generated a script,” “successfully rendered an image,” and “correctly built the model.” They are different levels of achievement.
A script that executes only demonstrates that syntax, dependencies, and the execution flow are fundamentally sound. A picture that looks reasonable only demonstrates that the visual representation meets requirements from one particular viewpoint. Only when geometric relationships, parameter variations, and motion constraints all hold up under inspection can the output be considered reliably engineered.
Therefore, evaluating a large model’s spatial reasoning ability should not revolve around a single demonstration or a single rendered image. Instead, it should be based on a reproducible task protocol: identical inputs, a controlled runtime environment, acceptance criteria defined in advance, and re-verification whenever parameters change.
It is important to note that the original material provided only the task description and partial observations, without complete scripts, run logs, or acceptance records. Consequently, no conclusion can be drawn about whether one model is superior to another. The more valuable direction is to abstract this task into a general methodology for evaluating spatial capability.
2. Why “A Pelican Riding a Bicycle” Is a Good Test of Spatial Reasoning
This scene appears to be a creative modeling exercise, but it actually contains multiple tightly coupled subsystems.
First, the bicycle has a well-defined mechanical structure. The front and rear wheels, frame, handlebars, cranks, chainring, and rear sprocket are not arbitrary elements placed next to each other; they are connected by axes, spacing, alignment, and transmission relationships.
Second, the character’s pose must adapt to that mechanical structure. The pelican’s wing tips should approach the grips, its feet should correspond to the pedal positions, and its center of mass and torso orientation should fit the riding narrative.
Third, local parameters affect multiple objects. A change in wingspan influences both the wing pose and the grip spacing; a change in chainring tooth count alters the pitch-circle radius and the chain path; a change in crank phase simultaneously moves both the pedals and the foot targets.
Fourth, the image must also satisfy aesthetic requirements. Golden-hour lighting, a seaside boardwalk, a toolbox, and a fishing net can enhance expressiveness, but they can also mask structural errors.
The key to this kind of test is not the number of objects in the scene, but whether real, checkable relationships exist between objects—relationships that remain valid as parameters vary.
3. Turn Natural-Language Requirements into an Acceptance Contract
Natural-language prompts typically mix narrative, appearance, and engineering constraints. Before implementation, they should be decomposed into three layers.
3.1 Visual and narrative requirements
This layer covers the dusk setting, dark-green frame, forward-leaning riding posture, toolbox, fishing net, and similar elements. These are validated primarily through rendered images and human observation.
Some degree of stylization is acceptable in this layer. For example, the pelican can use simplified body volumes, and feathers can be represented with a few geometric pieces. But stylization must not become an excuse for ignoring contact relationships.
3.2 Geometric and structural requirements
This layer covers wheel axle positions, frame connections, handlebar width, the plane of the chain, pedal centers, and character joint positions.
Each requirement should be defined with a computable metric rather than merely “looks right.” For example:
- The distance between the front and rear wheel axle centers should match the specified wheelbase.
- The distance between the grip target point and each wing tip should be below a specified tolerance.
- The chain, chainring, and rear sprocket should lie in compatible transmission planes.
- The foot contact region should cover the effective region of the corresponding pedal.
Tolerances must be scaled to the scene. A meter-scale scene and millimeter-scale parts must not share the same error thresholds.
3.3 Parameter and motion requirements
This layer requires that parameter changes propagate along dependency relationships.
Parameters can be classified into three categories:
- Primary parameters: direct inputs such as wingspan, wheelbase, tooth count, and crank phase.
- Derived parameters: computed results such as handlebar width, wheel axle positions, pitch-circle radius, and pedal coordinates.
- Style parameters: presentation configurations such as material roughness, background color, and decorative density.
Not every dimension should be forced to be derived from a few primary parameters, because the scene also needs independent proportions, thicknesses, and safety clearances. A better approach is to declare these design coefficients explicitly and document their meaning, rather than scattering unexplained hard-coded values throughout functions.
4. Organize Parametric Modeling with a Dependency Graph
A reliable generated script should first establish a parameter dependency graph, then create scene objects.
For example:
- Wingspan → handlebar width → grip positions → wing-tip targets → wing pose
- Wheelbase → front/rear wheel axles → frame nodes → tube connections and attachment positions
- Tooth count and chain pitch → pitch-circle radius → chain tangent points → chain path
- Crank phase → pedal positions → foot targets → leg pose
Organizing the model this way prevents common failures: the handlebars have widened but the wing tips stay at their old positions; the chainring has grown but the chain still follows the old path; the crank has rotated but the character’s feet have not updated.
At implementation time, the workflow can follow this pseudocode:
params = read_and_validate_config()structure = compute_frame_and_axle_positions(params)drive = compute_sprocket_and_chain_geometry(params, structure)contact_targets = compute_grip_and_pedal_targets(params, structure)character_pose = solve_joint_positions(params, contact_targets)create_structure_objects(structure)create_drive_objects(drive)create_character_objects(character_pose)check_result = run_geometric_and_contact_acceptance()output scene, renders, and check report
Geometric computation and object creation should be kept separate. That way, even if rendering fails, the key coordinates and constraints can still be inspected independently, reducing debugging cost.
5. Chain Modeling Must Not Be Reduced to Two Connected Circles
The drivetrain is the part of this task most prone to “visually correct, geometrically wrong” results.
5.1 Tooth count and chain pitch jointly determine size
Knowing only the tooth count does not determine a sprocket’s actual size; the chain pitch is also required. For an ideal sprocket, the pitch-circle radius can be estimated as:
r = p / [2 × sin(π / N)]
where p is the chain pitch and N is the number of teeth.
This radius corresponds to the theoretical trajectory of the chain link centers, not the outer edge of the tooth tips. If the model represents a sprocket simply as a disk, that must be stated explicitly as a simplification; the disk boundary must not be treated as the actual meshing profile.
5.2 The chain path requires solving tangent lines and wrap angles
In a two-dimensional approximation without idler pulleys, the chain path can be composed of two common tangent lines plus wrap arcs on the two sprockets.
When the chainring grows, the tangent points, straight-segment lengths, and wrap angles must all be recomputed. If only the chainring object is scaled while the old chain path is kept, the chain may penetrate the chainring or leave its pitch circle.
The geometric feasibility of the solution must also be checked. The center distance and radius difference must satisfy the tangent-line existence condition. For clearly unreasonable inputs, the script should return a clear error instead of generating a broken scene.
5.3 A correct continuous curve does not mean a real chain works
A real chain consists of discrete links; its total length is constrained by the number of links and the assembly method. The length computed from a continuous path will not generally equal an exact integer number of pitches.
Therefore, the fidelity level must be specified before evaluation:
- Visual approximation: represent the chain as a continuous curve; check the path and clearances.
- Link-level modeling: place links at a fixed pitch and handle closure error.
- Mechanical-level validation: additionally consider meshing, tension, assembly, and kinematic interference.
These three levels must not be conflated. Higher fidelity requires center-distance fine-tuning, a tensioning mechanism, or a proper assembly solve; it cannot be faked by arbitrarily scaling chain links.
6. Crank Phase Must Stay Synchronized with the Character’s Pose
When the crank phase changes, pedal positions should be obtained through explicit coordinate transformations.
Suppose the crank rotates in a local plane, with crank center C, length l, and phase θ. One pedal center can be expressed as:
P₁ = C + l × (cosθ, sinθ)
The opposite pedal’s phase is typically offset by 180 degrees. When converting local coordinates to scene coordinates, the crank axis direction, left/right side offset, and pedal dimensions must also be taken into account.
The character’s feet should be driven by the pedal targets, not placed by hand. A simplified character can use a two-segment joint chain: first determine the hip, the pedal target, and the two limb lengths, then solve for the intermediate joint position.
Reachability must be checked before solving. If the target is too far or too near, a pose satisfying the limb-length constraints may not exist. In that case, adjust the torso, seat, or target settings rather than forcibly stretching the limbs.
The original narrative’s “one foot suspended in the air” and “varies with crank phase” also need explicit rules. A suspended foot may not touch a pedal, but its trajectory should remain reasonable and avoid obvious interference with the frame or wheels.
Additionally, crank phase alone determines only the current pose, not the rear wheel’s absolute rotation angle. Under ideal rolling without slip, the ratio of the rear sprocket’s angular displacement to the crank’s angular displacement is determined by the front-to-rear tooth ratio; whether the wheel follows along also depends on the transmission structure and the current engagement state. To express dynamic riding, initial state, time parameters, and motion assumptions must be added.
7. Use Automated Acceptance Instead of Judging by a Single Image
A complete acceptance suite should include at least four categories of checks.
7.1 Execution check
Confirm that the script completes in the specified headless environment, produces the expected files, and records exceptions and warnings. Successful execution is the minimum bar and must not be equated with task success.
7.2 Geometric check
Read the key objects or computed results and verify the wheelbase, tube endpoints, chain plane, pedal centers, and character contact points.
For contact relationships, check the contact region, direction, and clearance. Two objects’ centers being close does not mean their surfaces are actually in contact.
7.3 Parameter perturbation check
Vary the wingspan, tooth count, and crank phase individually and verify the corresponding dependencies; then combine multiple parameter changes to detect hidden coupling.
Boundary tests should also be included, such as a wingspan near the edge of the reachable pose range, a significantly enlarged chainring, and multiple phase angles. Parameter ranges must be specified in advance, so that impossible inputs are not mistaken for model failures.
7.4 Multi-view check
At minimum, output side, front, top, and close-up views. A single view can hide chain misalignment, wing interpenetration, or floating feet.
Visual inspection and numerical checks must complement each other: the former catches overall proportion and narrative problems, while the latter verifies constraints that cannot be judged reliably by eye.
8. Layered Scoring to Prevent Pretty Renders from Masking Structural Defects
The evaluation can be divided into six dimensions: code execution, structural correctness, parameter coupling, pose and contact, visual expression, and maintainability.
Scoring weights should reflect the intended use. For creative concept work, visual expression can carry more weight; for engineering-assist applications, structural correctness and parameter coupling should carry more weight.
However, critical constraints must not be averaged away. Script failure to run, missing core objects, severe chain interpenetration, or structural collapse under parameter changes should be treated as threshold failures.
The test record should also capture first-attempt success, number of fix iterations, amount of manual modification, runtime resources, and failure types. If the model is allowed to read error logs and iterate, then “first-delivery capability” and “closed-loop repair capability” should be evaluated separately rather than mixed together.
Repeated testing matters. A single success may be luck, and a single failure may be output variance. Only repeated runs under identical task conditions reveal true stability.
9. Extending from 3D Scripts to Animation and Creative Coding
Once static modeling passes acceptance, the time dimension can be introduced to test dynamic consistency.
For example, let the crank rotate continuously and verify that pedals, feet, rear sprocket, and wheels update according to the agreed relationships; let the bicycle travel along the boardwalk and verify that wheel speed matches displacement; move the camera and verify that the scene remains well-composed and occlusion stays reasonable.
It is important to distinguish “generating a set of independent frames” from “establishing a continuous motion system.” The former may produce a beautiful frame every time while exhibiting character scale jumps, contact drift, or mechanical phase discontinuities; the latter requires all frames to share the same structure, state, and motion rules.
For creative coding, the capability that truly matters is whether the model can preserve adjustable parameters, clear dependencies, and a reproducible program structure alongside visual creativity. That determines whether the work can continue to be edited, extended, and delivered—not merely displayed once.
10. Final Judgment in Engineering Practice
Three-dimensional spatial tasks can test whether a large model is good at organizing complex relationships, but they cannot be used to infer all of its capabilities. A reliable evaluation must limit the task scope, the modeling fidelity level, and the acceptance conditions.
For developers, what matters most is not whether the model can write a large amount of code in one pass, but whether it can:
- Understand mutually constraining requirements and build correct parameter dependencies.
- State its simplifying assumptions and their applicable boundaries.
- Keep the structure stable when parameters change.
- Detect infeasible conditions and explain them.
- Produce results that are checkable, repairable, and maintainable.
Turning these requirements into scripted acceptance checks is what converts a “looks impressive” demo into evidence of genuine engineering capability.
