Skip to content

Membrane

Physical simulation of a membrane-ball system

Core trick

Simulates an elastic membrane's spring forces and ball collisions, then tracks total energy across steps to verify numerical stability.

Tags

Description

Physical simulation of a membrane-ball system
yugt/membrane-ball★ 10 forksPythonCreated May 23, 2026 · last push Oct 2, 2026

README excerpt

# Membrane Breakout 3D

A physics-based 3D Breakout prototype where the player controls an elastic circular membrane frame to bounce a ball and break glowing bricks.

The project is built to show three things clearly:

- A playable browser demo using Three.js.
- A Python/Pygame prototype of the same idea.
- Numerical verification scripts that track energy behavior in the membrane-ball system.

## Review Links

<a href="https://www.youtube.com/watch?v=-JdWYVzKI3c&t=1s" title="Watch the Membrane Breakout 3D demo video">
  <img src="https://img.youtube.com/vi/-JdWYVzKI3c/maxresdefault.jpg" alt="Membrane Breakout 3D demo video" width="100%">
</a>

- Browser game: [`game_web/index.html`](game_web/index.html)
- Demo video: [YouTube walkthrough](https://www.youtube.com/watch?v=-JdWYVzKI3c&t=1s)
- Physics presentation: [`physics_presentation.html`](physics_presentation.html)
- Technical overview: [`docs/TECHNICAL_OVERVIEW.md`](docs/TECHNICAL_OVERVIEW.md)
- Smoke verification: `./scripts/verify.sh`

## Quick Start

### Browser Demo

```bash
python3 -m http.server 8000 -d game_web
```

Open:

```text
http://localhost:8000/
```

Controls:

- Move the mouse or touch-drag to move the membrane frame.
- Drag the scene to rotate the camera.
- Refresh the page to reset the simulation.

### Python Prototype

This repo uses `uv` for reproducible local execution.

```bash
uv run python game_python/game.py
```

### Verification

Run the smoke test:

```bash
./scripts/verify.sh
```

Or run the ver

Team