Evaluating LLM Spatial Reasoning and Programming Through 3D Generation

    A convincing 3D render does not necessarily demonstrate reliable spatial reasoning. Using a pelican riding a bicycle as an evaluation task, this article explains how to translate natural-language requirements into geometric constraints, build parameter dependencies, validate mechanical relationships, and test consistency across parameter changes and animation. It also outlines how to report model performance without confusing visual quality with structural correctness.

    1. Evaluating Model Capability Beyond Visual Quality

    When assessing a 3D scene generated by a large language model, the most immediate questions are usually whether it looks convincing, contains enough detail, or shows creativity. These criteria matter, but they do not establish reliable spatial reasoning.

    A render can hide structural problems through camera placement. A chain may sit outside the sprocket plane, a wing may not actually touch the handlebar, or a gap may separate a pedal from its crank. The bicycle frame might even consist of intersecting rods rather than properly connected members. Such problems can remain invisible from one viewpoint and become obvious when the camera moves, parameters change, or animation begins.

    Evaluation should therefore shift from the resulting image to the verifiable relationships established during generation. At least four dimensions need to be distinguished:

    1. Semantic understanding: Does the system identify the characters, objects, actions, and narrative requirements?
    2. Geometric construction: Does it build a complete 3D structure with the required contact and connection relationships?
    3. Parameter coupling: When an input changes, do the affected objects update together as expected?
    4. Temporal consistency: Do geometry, character poses, and drivetrain relationships remain valid during motion?

    The source material describes a text-driven modeling task but does not provide a complete script, execution logs, finished assets, or standardized scores. It supports the design of an evaluation procedure, not a broad judgment about any particular model based on whether it reportedly “completed” the task. Nor should performance on one task be generalized to all spatial reasoning scenarios.

    2. Why Use a Pelican Riding a Bicycle?

    The value of this scene is not its unusual subject. It is the concentration of different constraints within a single task.

    A bicycle has well-defined mechanical relationships among its wheels, frame, handlebar, cranks, chainring, rear sprocket, chain, and rack. The pelican adds pose constraints: its body must lean forward, its wings must reach toward the grips, and its feet must relate plausibly to the pedals.

    The system cannot simply model a bird and a bicycle independently. It must solve the coupling between them. For example:

    • If handlebar width changes, do the wing-tip targets move accordingly?
    • If the crank rotates, do pedal positions and foot poses update together?
    • If the chainring grows, are the chain path and surrounding clearances recalculated?
    • If the wheelbase changes, do frame nodes, axle positions, and accessory placement remain consistent?

    Narrative elements such as dusk lighting, a coastal path, a tool bag, and a fishing net can test visual expression and scene completeness. They should, however, be scored separately from mechanical constraints. Otherwise, elaborate decoration can conceal structural failures.

    3. Translate Natural-Language Requirements into a Constraint Table

    Passing a long prompt directly to a generation system often produces rich detail but confused relationships. A more reliable approach is to first map parameters to objects, constraints, and acceptance checks.

    The core inputs can be organized as follows:

    Parameter Example Initial Value Main Objects Affected Acceptance Focus
    Wingspan 1.15 m Wings, handlebar grip targets Wing-tip contact and pose reachability
    Wheelbase 1.02 m Wheel axles, frame nodes, accessory anchors Structural proportions and connection integrity
    Chainring tooth count 44 Chainring, chain path Propagation of dimensional changes
    Rear sprocket tooth count 16 Rear sprocket, drivetrain ratio Valid transmission relationships
    Crank phase 35° Cranks, pedals, foot poses Consistency between phase and contact

    These values are inputs for the evaluation task, not general mechanical design recommendations.

    Potential conflicts in the natural-language requirements also need to be resolved in advance. For example, “one foot rests on a pedal while the other hovers at the lowest point” is not automatically compatible with an arbitrarily adjustable crank phase. In a conventional arrangement with cranks half a revolution apart, the opposite pedal will not necessarily be at its lowest point for every phase setting.

    Priorities should therefore be explicit:

    • Mechanical drivetrain relationships are hard constraints.
    • The hovering foot is an adjustable pose requirement.
    • If “the lowest point” must hold exactly, the phase definition or permitted input range must be restricted.
    • If phase is freely adjustable, the requirement should instead specify that the other foot adopts a plausible raised or return-stroke pose for the current pedal phase.

    Recognizing and explaining this conflict is itself evidence of spatial reasoning, rather than a failure to follow the prompt.

    4. Parametric Modeling Requires Dependency Propagation

    Moving constants to the top of a script is only the first step toward parameterization. True parametric modeling requires every affected object to be traceable to its inputs through explicit dependencies.

    A useful hierarchy is:

    Input parameters → Derived geometry → Structural nodes → Visual geometry → Poses and animation → Validation results

    For the bicycle frame, first calculate the front and rear axle centers, bottom bracket center, head tube endpoints, and seat tube connection points. Then construct frame members from those nodes. When an axle moves, the relevant member endpoints should follow automatically instead of requiring separate coordinate edits.

    Accessories should follow the same principle. The tool bag can attach to the down tube’s local coordinate system, while the rolled fishing net can attach to an anchor on the rack. Changing frame proportions should not leave these objects behind at their old positions.

    A “no magic numbers” requirement also needs a practical interpretation. Scripts may contain auxiliary settings such as segment counts, material roughness, and stylized proportions. These should be named, centrally managed, and documented. Core geometry should not depend on fixed coordinates scattered across functions.

    For example, grip spacing might be defined as wingspan multiplied by an explicit proportion. That is a modeling rule for this scene, not a biological law. Evaluation should check whether the rule is applied consistently, rather than treating an arbitrary proportion as a universal fact.

    5. Derive Pedal and Foot Positions from Crank Phase

    Once a common coordinate system is established, pedal positions can be calculated directly from crank phase.

    Assume the bicycle’s forward direction is the horizontal axis and the vertical direction is the vertical axis. Let the crank center be (C=(x_c,z_c)), crank radius be (r), and phase be (\theta). One pedal center is:

    [
    P_1=(x_c+r\cos\theta,\ z_c+r\sin\theta)
    ]

    The other crank is half a revolution apart:

    [
    P_2=(x_c+r\cos(\theta+\pi),\ z_c+r\sin(\theta+\pi))
    ]

    The zero-angle reference, rotation direction, and angle units must be specified. Otherwise, the same input of “35 degrees” can produce different poses.

    Foot targets should be derived from pedal centers, with offsets for pedal thickness and the contact surface, rather than assigned independent fixed coordinates. Inverse kinematics or geometric solving can then determine the leg pose.

    Reachability must also be checked. If a target lies beyond the limb’s available reach, the system should not disguise the problem by stretching the limb indefinitely. It should report the constraint conflict or adjust the body position within the permitted range.

    Wing-to-handlebar contact should use the same approach: calculate grip targets, solve the wing poses, and verify contact distances. Looking approximately connected is not a substitute for satisfying a measurable constraint.

    6. Model the Chain and Drivetrain, Not Just a Closed Curve

    The chain is one of the easiest parts of this task to approximate visually while getting the geometry wrong.

    First, chainring and rear sprocket tooth counts affect pitch-circle dimensions as well as appearance. For an idealized sprocket with chain pitch (p) and tooth count (N), the pitch-circle radius can be approximated as:

    [
    R=\frac{p}{2\sin(\pi/N)}
    ]

    This is an idealized geometric relationship. Manufacturing also involves tooth profiles, tolerances, and chain construction. The formula alone does not establish an industrial-grade mechanical design.

    Second, the chain path should be constructed from the centers, radii, and coplanar arrangement of the two sprockets. A simplified two-sprocket system can use tangent segments and circular wrap arcs to form a closed path. Changing the chainring from 44 to 52 teeth should alter the chain envelope and trigger a new frame-clearance check.

    Path length must also be distinguished from physical chain length. A continuous curve can change length freely, while a real chain consists of discrete links. Link-level evaluation therefore requires handling link count, closure error, and tensioning. If the scene uses a continuous-chain approximation for stylized animation, that assumption should be stated explicitly.

    The transmission ratio is equally important. Under simplified conditions with no slip and an engaged drivetrain:

    [
    \omega{\text{rear sprocket}}
    =
    \omega
    {\text{crank}}
    \frac{N{\text{chainring}}}{N{\text{rear sprocket}}}
    ]

    If the rear sprocket and rear wheel are assumed to rotate together during driving, rear wheel angular velocity can then be derived. Crank phase, however, describes position at a particular instant; it cannot determine speed by itself. Animation also requires an angular velocity or a time-dependent phase function.

    7. Turn Visual Plausibility into Automated Acceptance Checks

    A reliable evaluation workflow should preserve both visual and numerical evidence.

    Execution Checks

    First, verify that the script runs to completion in a headless environment and produces the expected files. Check for missing resources, unhandled exceptions, and uncontrolled external dependencies.

    Successful execution only demonstrates that the program runs. It does not establish structural correctness.

    Geometry Checks

    Read key coordinates from the scene and verify that:

    • The actual wheelbase matches the input.
    • Frame member endpoints connect to their designated nodes.
    • Pedals lie on the crank’s circular trajectory.
    • The left and right cranks maintain the required phase difference.
    • Foot contact points are close to the pedal surfaces.
    • Wing tips are close to the corresponding grips.
    • The chain lies in the intended drivetrain plane.

    Distance constraints need explicit tolerances. Combining absolute and relative tolerances helps prevent scene scaling from distorting the results.

    Parameter Perturbation Checks

    Apply the required changes: increase wingspan from 1.15 to 1.35 m, change the chainring from 44 to 52 teeth, and change crank phase from 35° to 140°. Then regenerate the scene.

    The question is not simply whether the image changes, but whether each change reaches the correct objects. A larger chainring with an unchanged chain indicates a broken dependency. A moving pedal with a stationary foot indicates that the character pose is not coupled to the mechanical system.

    Test individual parameter changes first, followed by combined changes. Single-parameter tests help locate faults; combined tests evaluate overall coupling.

    Multi-View and Temporal Checks

    In addition to the main camera view, output side views, top views, close-ups, and wireframe views where needed. For animation, sample throughout a complete motion cycle rather than checking only the first and last frames.

    Simplified collision checks can begin with bounding volumes, followed by more precise geometric checks in suspected problem areas. A stylized scene does not necessarily need full physics simulation, but its approximations should be clearly documented.

    8. Creative Coding and Video Generation Need Continuity

    Generating animation or video from code requires more than composition, lighting, and narrative. Scene states must remain continuous.

    As the character moves with the bicycle, a foot must not suddenly jump to the opposite pedal. Chain movement should be compatible with chainring motion. If forward motion assumes rolling without slipping, the bicycle’s speed must be consistent with wheel radius and angular velocity.

    Camera motion should remain independent of mechanical constraints. A shot can emphasize the atmosphere at dusk, but it should not use occlusion to hide structural errors.

    A more reliable production sequence is:

    1. Validate the structure using low-complexity geometry.
    2. Add character poses and mechanical coupling.
    3. Complete multi-parameter and temporal sampling checks.
    4. Add materials, accessories, the environment, and cameras.
    5. Increase visual detail and output quality.

    This sequence reduces debugging effort. Adding large amounts of feather geometry, mesh detail, and complex materials at the outset makes structural problems harder to isolate.

    9. Report Model Performance with Clear Evidence

    Comparisons between generation systems should use the same task text, runtime environment, resource limits, permitted correction attempts, and validation scripts. Failure types should also be recorded.

    “Did not complete” may mean a syntax error, interrupted execution, a resource-limit failure, or an output that violates geometric requirements. These outcomes should not be treated as equivalent.

    An evaluation report should separately present:

    • First-run execution success.
    • Core constraint compliance.
    • Stability after parameter changes.
    • Consistency across the animation cycle.
    • Manual correction effort.
    • Visual quality and creative completeness.

    If an aggregate score is needed, its weights should be set before results are examined. For engineering automation, structural correctness and maintainability generally deserve greater priority than decoration. For creative previsualization, visual expression may carry more weight, but hard-constraint failures should still remain visible in the assessment.

    Conclusion: Evaluate Verifiable Relationships

    The central challenge in text-to-3D generation is not converting object names into shapes. It is turning relationships among objects into structures that can be computed, checked, and modified.

    A more reliable generated result should explain how parameters affect geometry, identify conflicting language requirements, preserve coupling after input changes, and demonstrate compliance through automated checks.

    The most useful question for evaluating LLM spatial reasoning and programming is therefore not “How impressive is this image?” but “Does the scene remain correct when key parameters change?” That standard helps move generation beyond one-off visual demonstrations toward reproducible, maintainable workflows suitable for engineering use.