Skip to main content

simpleParticle01

Draw particles with the mouse that generate a latticework of lines between them.


Eric Pavey
(akeric)

I wrote this in couple afternoons. Hadn’t done any projects like this in a while, but this was a simple task I wanted to tackle: Draw particles with the mouse, when close generate an interaction, and when the interaction occurs trigger an event. In a nutshell, that’s what this does:

  • LMB draws red, unfilled particles that slowly fall down the screen.
  • When they get close together, a latticework of lines will draw between them:
  • The more lines that connect them, the more opaque they get.
  • When the lines are created, a ‘burst’ of smaller white particles will emit from the larger red particle that spawned the line.

The app was mainly just written for leisure, it’s not that speedy. But was a nice relaxing thing to do over the weekend. If you grab just the source, you'll also need a fixed-up version of the Pygame vec2d lib, which you can download from my site here:

Links

Home Page
http://www.akeric.com/blog/?page_id=1096

Releases

simpleParticle01 1.0 — 21 Jun, 2010

Pygame.org account Comments