Wizzy particles
On my first visit to an open day
for my secondary school in Exeter (This was
when I was twelve), I was entranced by a demo
in the otherwise rather sparse computing department,
consisting of a number of brightly coloured
particles that chased each other around the
screen in a perpectual cascade, apparently suspended
around a centre of gravity in space. At the
time, I couldn't work out why the particles
didn't simply catch up with each other and coalesce;
the physical world the particles inhabit is
frictionless and defies the laws of thermodynamics,
and so there's no surpirse that the motion of
the particles is counter intuitive. Nevertheless,
there was something incredibly satisfying in
watching them race around the screen, and several
years later I constructed my own interpretation
of what I imagine is a classic computing exercise.
This was one of the earlist full programs I
constructed using my high-res SVGA graphics
library, and it demonstrates its speed wonderfully.
Around 200 particles, represented by small (smiley)
sprites are created in random positions on the
surface, and accelerate towards their assigned
forrunner. A gravity source keeps the scrummage
centralised on the screen, and by altering the
source all the physial factors can be varied,
loeading to some interesting and sometimes bizaare
effects. In the original program, up to two
gravity sources could be introduced and moved
with the mouse, but this program predates the
development of the SVGA mouse unit, which I
had to construct from scratch (finding many
of the available ones unsatisfactory), and so
this remains a fixed demo, with a few key combinations:
space resets the particles to the origin, and
S reverses the order of persuer and persued,
making the bundle rotate in the opposite direction.
This remarkable simple program required a minimal
knowledge of newtonian mechanics and an afternoon
to put together, and I was rather pleased with
the results at the time. Enjoy playing with
this demo; it is probably best enjoyed by those
that have the capability of doctoring the source
code. The demo can be downloaded with full source.
Download
the Wizzy particle demo (52 kb, zipped) |
Back to Graphical
trinkets