Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 8.4


Fun with Particles

Particle systems are fun!

Issue: 8.4 (May/June 2010)
Author: Jens Bendig
Author Bio: Jens Bendig is a software developer in Bremen, Germany since 1988. He has been producing 3D computer animations since 1996. He finds writing software and creating computer animations similar: everything can be interesting!
Article Description: No description available.
Article Length (in bytes): 21,691
Starting Page Number: 40
Article Number: 8412
Resource File(s):

Download Icon 8412.zip Updated: 2010-05-03 18:55:57

Related Web Link(s):


Excerpt of article text...

We all have seen Particle Systems. They lie under those smoke and fire effects we often see in games or movies. A Particle System is controlling the motion of a collection of objects following some rules. It can be two- or three-dimensional, and in rare cases higher dimensional (or even one-dimensional). In this article, I'll focus on how to make your own effective 2D Particle System. The objects are circles and the rules are elastic collisions with a boundary and elastic collisions with each other. I don't show how to put render effects onto those particles or how to generate CGI-effects. Instead I will concentrate on how to make an effective particle-particle collision so that you can move a high number of particles without having to compute too much. Once you have the system, you can implement your own rules of particle-particle interaction, design your own physics, or use it to produce effects within a game. I've made models for the simulation of chemical reactions within a cell, the simulation of thermal-transport, or a visualization of thermodynamic effects. A particle system for a scientist is a little bit like farina: you can make a lot of different breads and cakes out of it! Have fun with playing around.

My History with Particles

Years ago I read about algorithms that make an effective collision detection with multiple objects. It was interesting, but I didn't find the time to play around with it. But within the last few months I needed to program some interesting simulations based on particles that interact. (This was the visualization of some chemical reaction dynamics in a cell, with the influence of enzymes.) For that problem I needed effective collision detection and I thought I would share what I learned about it. I originally worked in a language called Processing (see the "Processing" sidebar), but for REALbasic Developer, I ported the project's kernel to REALbasic so you can play around with the running program and make your own experiments.

The Challenge

...End of Excerpt. Please purchase the magazine to read the full article.