Evaluating Spatial Reasoning and Parametric 3D Generation in Large Models

    This article examines an evaluation method for testing how well large language models handle spatial reasoning and parametric 3D generation. Instead of relying on static screenshots or subjective scoring, the approach uses an initial prompt that asks a model to produce a runnable script for a pelican riding a bicycle at dusk, followed by parameter perturbation to verify whether geometry is truly driven by global constants. It outlines the three capability layers being tested, a five-dimension scoring framework, common failure patterns, and practical suggestions for improving model selection and evaluation pipelines.

    1. Background: Why Writing Code Is Not the Same as Modeling

    Over the past year, large models have continued to improve at code generation. However, when the task shifts from “write a function” to “use code to build a 3D scene with real spatial constraints,” differences in model capability are quickly amplified. The original evaluation targets exactly this problem: given a purely textual description, the model must output a parametric script that runs directly in a command-line mode with no graphical interface, constructing a dusk scene of a pelican riding a bicycle.

    The value of this type of task lies in the fact that it tests three layers of capability at once:

    1. Semantic parsing: breaking a narrative description into computable geometric and motion relationships;
    2. Parametric modeling: converging all dimensions, phases, and gear ratios into global constants, and deriving geometry from those constants;
    3. Spatial and mechanical reasoning: ensuring parts do not intersect or float, and that motion phases remain self-consistent.

    Traditional evaluations often use simple 3D libraries to build static models, which makes it hard to expose the “breaks as soon as a parameter changes” problem. Switching to script-based modeling shifts the focus from “does it look right” to “do parameters actually drive the geometry,” which is closer to engineering practice.

    2. Evaluation Design: Parameter Perturbation Instead of Subjective Scoring

    The core method is “initial prompt + parameter perturbation acceptance.” The initial prompt requires the model to deliver a complete script. The scene includes a dusk coastal walkway, a dark green steel-frame bicycle, a pelican leaning forward, both wings extended forward to grip the handlebars, one webbed foot pressing a pedal while the other is suspended low on the return stroke, with the crank driving the rear wheel, the chain under tension, and the riding posture consistent with the drivetrain phase.

    The top of the script must declare several global constants, such as wingspan, wheelbase, chainring teeth, cog teeth, and crank phase angle, and all geometry generation must derive from these constants. No decoupled magic numbers are allowed inside functions. The acceptance side then changes only the numbers, not the code—for example, changing wingspan from 1.15 to 1.35, chainring teeth from 44 to 52, and crank phase from 35 degrees to 140 degrees—then reruns and checks three things: whether the handlebar widens with wingspan and the grips still enclose the wing tips; whether the chain path is correctly recomputed after the chainring grows; and whether the pedaling foot still contacts the pedal surface after the phase change while the suspended foot remains low on the return stroke.

    A schematic parameter skeleton looks like this:

    1. PELICAN_WINGSPAN = 1.15 # Wingspan; drives handlebar width and grip spacing
    2. BICYCLE_WHEELBASE = 1.02 # Wheelbase; drives frame geometry
    3. CHAINRING_TEETH = 44 # Chainring teeth; drives chain length and gear ratio
    4. COG_TEETH = 16 # Rear cog teeth
    5. CRANK_PHASE = 35.0 # Crank phase angle; drives pedal and foot contact
    6. # All geometry constructors accept only the constants above or their derived values

    The clever part of this design is that static screenshots cannot reveal the truth; only parameter linkage can verify whether the model has built a “constraint graph” rather than posing everything once.

    3. Scoring Dimensions: Quantifying Capability from Five Angles

    It is recommended to split scoring into five dimensions, each scored independently to avoid bias from an “overall feeling.”

    • Parameter consistency: whether hard-coded dimensions exist; whether any part fails to follow after parameters change.
    • Geometric correctness: whether the frame is a reasonable diamond shape; whether the chain is tensioned without clipping; whether the cargo net and tool bag have reasonable mounting points.
    • Kinematic self-consistency: whether crank phase, pedal position, and foot contact points are derived from the same variable; whether chain length is recomputed after the gear ratio changes.
    • Scene completeness: whether dusk lighting, walkway material, and color tone are present rather than just a white model.
    • Runnability: whether the script runs in one pass in headless command-line mode with no external resource dependencies.

    4. Common Failure Modes and Improvement Suggestions

    High-frequency problems in practice include: hard-coding wingspan so the handlebar does not change with the parameter; approximating the chain with a fixed curve, causing floating or clipping after the chainring changes; computing foot position and crank phase separately, so a phase change causes “letting go of the handlebar and pedal”; and scattering large numbers of magic numbers across the code, making it unmaintainable.

    There are three improvement directions. First, establish a clear derivation chain: constants → derived values → part transformation matrices, with no cross-layer hard-coding. Second, express contact relationships as constraints rather than coordinates—for example, “sole fits the pedal plane” should be solved as a constraint rather than placed manually. Third, for flexible paths such as the chain, use analytical computation based on tooth count and center distance, and recompute everything when parameters change.

    5. Implications for Model Selection

    The significance of this type of evaluation for users is this: do not rely only on general code leaderboards; use “parameter perturbation tests” close to your own business to validate models. If an enterprise cares about applying intelligent coding tools to assisted modeling and simulation script generation, it can first build a small internal acceptance set covering three types of assertions—parameter linkage, constraint preservation, and runnability—and then combine container platforms and logging services for batch automated regression. Baidu AI Cloud provides general capabilities for model evaluation and engineering deployment, such as containerized task orchestration and monitoring and alerting systems, turning the evaluation pipeline into a sustainable, iterable asset.

    6. Conclusion

    Parametric 3D generation evaluation turns “spatial reasoning” from a vague impression into assertable engineering metrics. Mastering the three principles—constant-driven, constraint solving, and perturbation acceptance—both enables fairer comparison across models and pushes prompt and process design toward greater rigor.