Header menu logo PhysicsSandbox

Physics Sandbox

A real-time 3D physics simulation built as an F# microservices architecture, orchestrated by .NET Aspire 13.2. Create bodies with 10 shape types, connect them with 10 constraint types, cast rays, toggle debug wireframes, record and replay sessions, and watch the results in a live 3D viewer — all controlled through a REPL client, scripting (F# and Python), or AI assistants via MCP.

Architecture

Five services communicate through a central gRPC hub:

graph TD
    Server["Server\n(gRPC Hub)"]
    Sim["Simulation\n(BepuPhysics2)"]
    Viewer["3D Viewer\n(Stride3D)"]
    Client["REPL Client\n(Spectre.Console)"]
    MCP["MCP Server\n(59 AI Tools)"]
    Server <-->|"commands / state\nbidirectional stream"| Sim
    Client -->|"commands\nview commands"| Server
    Server -->|"state stream"| Client
    Server -->|"state stream\nview commands"| Viewer
    MCP -->|"commands"| Server
    Server -->|"state stream"| MCP

Documentation

Type something to start searching.