hp
toc

Circle splatter

2015-05-03, post № 25

programming, Pygame, Python, #around, #around the center, #black, #center, #change, #changing, #circle, #color, #cursor, #mouse, #mouse position, #red, #repel

Continuing to work with vectors (see ‘Circle Crawler’), I thought to include the mouse cursor. In this simulation there are 𝟣 ⨉ 𝟣-sized entities (𝟦𝟢𝟢 of them) which create a circle around the center. By going near the entities with your mouse cursor, you push them away. Every entity has the urge to go back to its original position.

Usage

  • ‘m’ toggles if entities move or stay.
circle-splatter-1.png
circle-splatter-2.png
circle-splatter-3.png
Source code: circle-splatter.py
Jonathan Frech's blog; built 2024/04/13 20:55:09 CEST