Large Language Models and Parametric 3D Modeling: A Hands-On Test of Spatial Reasoning

    This article tests the spatial reasoning capabilities of large language models through a parametric 3D modeling task: generating a runnable script from a natural-language description and verifying the resulting geometry. It explains why script-based modeling is more effective than web-based 3D libraries for evaluating parameter-driven structures, how to design prompts that translate artistic descriptions into engineering constraints, and how automated acceptance checks work by changing only constants. The article also breaks spatial reasoning into four levels—topology understanding, scale reasoning, phase and constraint solving, and robustness—and offers practical guidance for turning this evaluation into a repeatable pipeline.

    1. The Problem: From Generating Code to Generating Verifiable 3D Structures

    Discussions about the spatial reasoning capabilities of large language models have heated up recently. A common evaluation method is to give a model only a natural-language description, have it output a script that runs in headless mode, automatically generate a structurally complex 3D scene, and then run parametric checks on the result.

    Tasks like this are valuable because they turn “spatial reasoning” from a subjective impression into a quantifiable fact. The model must not only understand the relative positions of objects, but also translate that understanding into executable geometry-generation logic. More importantly, the entire structure must remain self-consistent after key dimensions are changed.

    The scenario in the source material is representative: on a coastal boardwalk at dusk, a pelican rides a dark green steel-frame bicycle, leaning forward, with both wings extended to grip the handlebars. One webbed foot presses a pedal while the other hangs in the air at the lowest point of the return stroke. The frame is a classic diamond design, a canvas tool bag hangs from the down tube, and a fishing net is strapped to the rear rack. The cranks are driving the rear wheel, the chain is tensioned, and the riding posture is consistent with the drivetrain phase.

    This kind of description may look like an art exercise, but it is actually a strict set of spatial constraints. It requires the model to handle skeleton topology, joint posture, drivetrain relationships, and parameter linkage at the same time. Any “close enough” approximation will expose problems once parameters change.

    2. Evaluation Method: Why Script-Based Modeling Instead of Web 3D Libraries

    Earlier evaluations of this kind mostly relied on web-based 3D libraries to build scenes. The advantage is that they are intuitive and quick to debug, but they have clear shortcomings when testing “parameter-driven” behavior: many implementations hardcode dimensions into the interaction logic, making it hard to verify the strict requirement of “change only the constants, never the code.”

    After switching to a script-based modeling paradigm, the focus shifted from “does it look right” to “is the structure correct.” The approach is to have multiple models generate scripts for the same task in parallel, execute them uniformly in a headless environment, and finally use automated checks to read the geometric relationships. In one comparison mentioned in the material, one model finished first, one completed successfully, and another failed to complete the task—which itself shows that the task is difficult enough to distinguish how stable models are under long chains of constraints.

    To make the evaluation reproducible, three elements should be fixed: a unified initial prompt, a unified runtime environment, and a unified acceptance script. The acceptance script does not judge aesthetics; it only checks whether spatial relationships hold.

    3. Prompt Design: Translating Artistic Descriptions into Engineering Constraints

    The key to a high-quality prompt is translating vague artistic language into computable engineering language. Two points in the original prompt are especially worth borrowing.

    First, specify the form of the deliverable. Require a complete script and state that it must run in headless mode. This prevents the model from offering a semi-automatic solution that requires a human to “click a few times in the interface.”

    Second, define the boundary of parameters and linkage. The prompt extracts key dimensions as global constants at the top of the script and requires all geometry generation to derive from these constants, with no magic numbers disconnected from them inside functions. An example:

    1. PELICAN_WINGSPAN = 1.15 # Wingspan (meters); controls handlebar width and grip spacing
    2. BICYCLE_WHEELBASE = 1.02 # Wheelbase (meters); drives frame geometry
    3. BICYCLE_CHAINRING_TEETH = 44 # Chainring teeth; drives chain length and rear cog ratio
    4. BICYCLE_COG_TEETH = 16 # Rear cog teeth
    5. BICYCLE_CRANK_PHASE = 35.0 # Crank phase angle (degrees); drives pedal position and foot contact

    The deeper purpose of this design is to turn “does the model really understand the structure” into an actionable question. If the model merely stacks parts together, changing a parameter will cause clipping, floating, or misalignment. If the model has genuinely established the derivation between parameters and geometry, the structure still holds after the change.

    4. Acceptance Mechanism: Change Only the Numbers, Not the Code

    The most convincing part of the evaluation is that the acceptance side changes only the constant values and reruns, then checks three things.

    First, change the wingspan from 1.15 to 1.35 and check whether the handlebars widen accordingly and whether the grip positions still enclose the wing tips. This tests whether the width parameter truly drives the position of the end effectors, rather than merely scaling the appearance.

    Second, change the chainring teeth from 44 to 52 and check whether the chain path is correctly recomputed without clipping or floating. This tests the topological consistency of the drivetrain: after the chainring radius changes, the chain wrap angle, tension segment, and return segment must all be re-solved.

    Third, change the crank phase from 35 to 140 degrees and check whether the webbed foot on the pedal still contacts the pedal surface and whether the other foot remains at the low point of the return stroke. This tests the coupling between posture and phase: foot position is not an independent ornament but is derived from the crank angle.

    This acceptance logic can be abstracted into three general principles that apply to most parametric modeling evaluations:

    • Parameters must live in a single source of truth; redefining them in downstream logic is forbidden.
    • Geometry must be derived from parameters; approximating with fixed values is forbidden.
    • Acceptance must be automated, reading only geometric relationships rather than relying on visual inspection.

    5. Capability Breakdown: Four Levels of Spatial Reasoning

    Based on the task above, the spatial reasoning of large language models can be broken into four progressive levels, which is useful for enterprise selection and internal evaluation.

    The first level is topology understanding. The model must recognize the triangular structure of a diamond frame and the relative positions of the front and rear wheels and the bottom bracket, rather than treating the bicycle as a collection of cylinders.

    The second level is scale reasoning. Wheelbase, wingspan, and tooth count are not isolated: a change in wheelbase affects frame tube lengths and chain routing, while a change in wingspan affects grip spacing and shoulder posture.

    The third level is phase and constraint solving. The crank phase determines the pedal position, the pedal position determines the foot contact point, and the chain tension state in turn constrains the center distance between the chainring and the cog. This is a typical simultaneous-solution problem.

    The fourth level is robustness. The real dividing line is whether the structure remains self-consistent after parameters are changed substantially. Only models that stay correct across spans such as 1.15 to 1.35, 44 to 52, and 35 to 140 are usable in engineering.

    6. Engineering Recommendations: Turn the Evaluation into a Pipeline

    For enterprise teams that want to evaluate or adopt this capability, it is advisable to solidify the above ideas into a pipeline rather than a one-off demo.

    1. Build a task set. Prepare several triples of “artistic description + parameter list + acceptance script” covering types such as mechanical drivetrains, articulated structures, and scene placement.
    2. Sandbox execution. Provide a unified script runtime environment on a container platform, pin dependency versions to ensure reproducibility, and archive generated artifacts to object storage for traceability.
    3. Automated judgment. Use logging services and monitoring alerts to record the pass rate, failure points, and elapsed time of each run, forming a trend dashboard.
    4. Prompt version management. Manage prompts like code; any wording change should go through review to avoid “evaluation result drift.”
    5. Human-machine division of labor. The model handles first-pass generation and batch variants, while humans handle aesthetics and final acceptance, forming a closed loop.

    For compute and model access, teams can use the model services and general cloud infrastructure offered by Baidu AI Cloud to complete batch evaluation and archiving without building the entire infrastructure stack themselves.

    7. Conclusion: Verifiability Is the Touchstone of Spatial Reasoning

    The real significance of this kind of evaluation is not whether a single generated scene looks impressive, but that it provides a reproducible, automatically judgeable standard. Only when parameters change and the structure still holds can we say the model understands relationships rather than appearances.

    For enterprises, treating “change only the numbers, not the code” as the acceptance baseline and single-source parameters plus geometry derivation as engineering standards can significantly reduce the production inefficiency and rework costs of 3D content. As script-based modeling and automated acceptance become widespread, spatial reasoning capability will shift from a demo topic to a measurable productivity metric.