When I was looking at the Voronoi noise with rounded edges, I felt like I could create a city using the white edges as roads. 3D shapes were stacked and rotated to look like buildings and placed within the Voronoi regions with the image of Tokyo. Noise, 3D shapes, and skybox were all created procedurally. See below.
https://github.com/taKana671/NoiseTexture
https://github.com/taKana671/shapes
https://github.com/taKana671/skybox
Mouse drag to rotate the entire city.
- Panda3D 1.10.16
- numpy 2.2.6
- Python 3.13
- Windows11
git clone --recursive https://github.com/taKana671/VoronoiCity.git
python voronoi_city.py
demo.mp4
| key | description |
|---|---|
| Esc | Close the screen. |
| t | Toggles physical object display on and off. |
| i | Click on a building and press the [i] key, its position and angle will be displayed on the console. |
| r | Releases the building selected by pressing the i key. |
| w | Toggles wireframe display on and off. |
| v | Switch between sky view mode and moving view mode. |
In skyview mode, you can view the city from above and rotate the entire city by dragging the mouse.
moving view mode allows you to move around the city by keystrokes below.
| key | description |
|---|---|
| up arrow | Move forward. |
| left arrow | Turn left. |
| right arrow | Turn right. |
| down arrow | Move backward. |
| u | Go up. |
| d | Go down. |