[KongchangAI]
· 2 min read· 1,188 words

I Had Claude Build a Physically Accurate, Walkable O'Neill Cylinder: The Limits of AI-Generated 3D Simulation

I Had Claude Build a Physically Accura…

A developer challenged Claude to simulate a walkable O'Neill cylinder, probing AI's limits on physics-accurate 3D generation.

A developer handed Claude the challenge of building a real-time walkable O'Neill cylinder simulation to test whether LLMs can handle genuine physical constraints like Coriolis forces, gravity gradients, and rotating reference frame transformations. The experiment highlights a key leap in AI-assisted creation: from generating single functions to building complete runnable systems. While impressive as a proof of concept — rapidly turning abstract science into interactive experience — LLM-generated physics simulations still fall short on numerical precision, boundary conditions, and long-run stability, and should not be mistaken for rigorous scientific tools.

A Bold Experiment: Reconstructing a Space Colony with AI

A developer shared an experiment on Hacker News: asking Claude directly to build a physically accurate, real-time walkable simulation of an O'Neill cylinder. The idea itself is loaded with tension — the O'Neill cylinder is a rotating space habitat concept proposed by physicist Gerard K. O'Neill last century, which simulates gravity through centrifugal force from rotation, a classic staple of science fiction. Getting it to "run" in a browser or interactive environment means the AI must not only generate code, but also correctly handle the physics of a rotating reference frame.

The post didn't generate much discussion (10 points, 6 comments), but it touches on an increasingly relevant question: to what extent can large language models take on complex engineering generation tasks with real physical constraints?

The O'Neill cylinder was first proposed by Princeton physicist Gerard K. O'Neill in 1974 in Physics Today, and elaborated in his 1976 book The High Frontier. The standard design consists of two counter-rotating cylinders, each about 8 km in diameter and 32 km long, with a rotation period of roughly 2 minutes, capable of housing millions of people on the inner surface. The counter-rotating dual-cylinder design cancels out the gyroscopic effect, allowing the entire structure to stably maintain its orientation toward the sun. NASA conducted a systematic evaluation of the concept during its 1975 Summer Study project, concluding it was technically feasible but engineering-wise enormously ambitious. The O'Neill cylinder later became an iconic symbol in science fiction, appearing in Cowboy Bebop, the Halo game series, and the film Elysium, and has returned to serious space settlement discussions in recent years with the rise of commercial spaceflight companies like SpaceX.

Where the Physics Gets Hard

To understand the challenge of this experiment, you first need to understand the physics of an O'Neill cylinder. It's a massive rotating cylinder where people stand on the inner surface, and the centripetal acceleration produced by the rotation acts as "artificial gravity." The truly tricky part is that this gravity is not constant:

  • Coriolis effect: As you move in different directions inside the cylinder, you experience a lateral deflecting force — walking in a straight line becomes anything but straight.
  • Gravity gradient: The closer you get to the rotation axis, the weaker the centrifugal force becomes, and the sense of gravity diminishes accordingly, approaching near-weightlessness near the central axis.
  • Reference frame transformation: Converting between the rotating coordinate system and the inertial coordinate system is the core of whether the simulation is accurate.

A "physically accurate" simulation requires all of these effects to be correctly modeled — not simply plastered over with a curved texture to fool the eye. This is precisely the litmus test for whether AI truly "understands" physics, rather than just stitching together code.

The Coriolis force is ubiquitous in rotating reference frames — atmospheric circulation and hurricane rotation directions on Earth are macroscopic manifestations of it. But inside a closed space like an O'Neill cylinder with a high angular velocity, its effects would be directly perceived by the human body. Specifically, if the cylinder's angular velocity is ω, a person with mass m moving at velocity v relative to the inner wall experiences a Coriolis force of magnitude 2mωv, directed perpendicular to the plane formed by the velocity vector and the rotation axis. For a cylinder 8 km in diameter providing 1g of gravity, ω is approximately 0.028 rad/s. At a normal walking speed (1.4 m/s), the Coriolis acceleration is about 0.08 m/s² — roughly 0.008g — which is near the threshold of human perception. In a simulation, if the sign or direction of the Coriolis force is calculated incorrectly, players will notice the counterintuitive phenomenon of "drifting further off course the more you turn" — an intuitive test for validating the physical correctness of the simulation.

The Real Significance of AI-Generated Interactive 3D

Asking a model like Claude to generate an interactive 3D scene is fundamentally a comprehensive test of multiple capabilities: it must organize spatial geometry, invoke a rendering pipeline like WebGL or Three.js, implement camera controls and collision detection, and embed the physics equations into every frame of computation.

This kind of attempt is worth paying attention to because it demonstrates AI-assisted creation making the leap from "write a function" to "build a complete, runnable system." In the past, developers needed to separately master graphics, physics engines, and front-end interaction. Now, through natural language description, a model can produce a playable prototype in a short time. Even if the result isn't perfect, the acceleration from "idea to prototype" itself changes the barrier to entry for exploratory projects.

Three.js is currently the most widely used WebGL-based JavaScript 3D rendering library. It wraps the low-level OpenGL Shading Language (GLSL) into a more accessible API, allowing developers to create complex 3D scenes without diving into GPU programming. For a scene like the O'Neill cylinder, the rendering challenges come from two main sources: first, the geometrically curved inner surface requires a large number of polygon subdivisions or tessellation shaders to appear smooth; second, real-time physics calculations (especially updating Coriolis forces and normal acceleration every frame) must be completed within JavaScript's single-threaded environment, creating significant performance pressure. When AI generates this kind of code, it tends to favor Three.js over native WebGL, because the former's API descriptions appear extensively in training data, making the model more familiar with its calling patterns and reducing the probability of errors in generated code.

Limitations Worth Acknowledging

That said, it's wise not to over-extrapolate AI's capabilities from a post with limited engagement. "Physically accurate" is a high bar, and physics simulations generated by LLMs frequently suffer from issues with numerical precision, boundary condition handling, and long-run stability. A model might produce code that looks reasonable and runs smoothly, but may not hold up under rigorous physical scrutiny — for instance, whether the direction of the Coriolis force is correct, or whether the gravity gradient varies linearly with radius.

For this kind of project, the more appropriate framing is "impressive proof of concept" rather than "trustworthy scientific tool." It demonstrates that AI can rapidly transform abstract concepts into interactive, intuitive experiences — but in contexts requiring rigorous physical conclusions, human review and cross-validation with specialized tools remain necessary.

What These Experiments Tell Us

This experiment offers a few takeaways for AI practitioners:

First, using AI to prototype grand sci-fi or scientific concepts is an underappreciated creative approach, especially suited for education and science communication — turning an abstract rotating habitat into an experience you can "walk through" is far more compelling than any text description.

Second, the more a task emphasizes physical accuracy, the more clearly humans need to provide physical constraints and acceptance criteria upfront. Otherwise, AI tends to converge visually while diverging physically.

Third, small-scale experiments like this, though low in visibility, are excellent windows into the boundaries of AI capability. They remind us: evaluating AI shouldn't just be about whether it can produce a result — it should also be about whether that result holds up under professional standards.

#O'Neill cylinder simulation#Claude AI 3D generation#AI physics simulation#Coriolis effect#WebGL Three.js#space habitat simulation#LLM code generation
Share:

Related articles