File Exchange

image thumbnail

Particle System Toolbox

version (20 KB) by Joerg Buchholz
Graphically simulate the interactions of particles, springs, and attractions in a particle system.


Updated 04 Dec 2015

View Version History

View License

Did you ever wonder, how they do the simulation of all that snow, rain, dust, smoke, and fire in modern computer games? How they model bullets, ropes, curtains and solar systems?
With this particle system toolbox you can easily create particles, attractions, and springs in a particle system environment with gravity and drag and graphically simulate their interactions with just a few lines of code. Run one of the 12 demos and read the detailed documentation at

Have fun ...

Cite As

Joerg Buchholz (2021). Particle System Toolbox (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (22)

Joerg Buchholz

@retta EL Sayed: The toolbox allows you to create particles at certain initial positions with certain initial velocities. You can define springs and attractions between the particles and have the toolbox simulate the reaction of the particles. Additionally, you have to do the collision detection with the other plane and the time measuring.

retta EL Sayed

Hi Joerg, Very nice work! I am trying to release a specific number of particles from a specific plan in specific geometry and measure how long it takes to hit another plane in the same geometry. Do you have an advices about what direction I should follow?

Joerg Buchholz

@yousra tchorbo: If you can express your problem in terms of (additional) forces acting on the particles, you can use the method I described a few years ago:

You can write your own
method and call
in the

yousra tchorbo

Thank you for your great work !
I want to simulate a smoke generated by an explosion. How can I do that ?
The smoke follows a Gaussian Plume Equation.
Thank you.

Jim Goodall

Konrad Wit

Mario Ayala

Joerg Buchholz

@Johannes Korsawe: Right now, you can write your own


method and call


in the


method. I save your request on my "stack of things to do ...".

Johannes Korsawe

That is some nice piece of code.

Could be extended to application of external forces? (or is this possible by now?)

Joerg Buchholz

@Sangeeta Ydaav: Press the big blue button in the upper right corner of this page to download the Particle System Toolbox.

Sangeeta Ydaav

Sir I do not have matlab particle simulation toolbox Can you send me the required files so that I can install Particle simulation toolbox?

kalantor Saquib

Roberto Gallea

Great work! I suggest to improve it by allowing the particles to be fixed in a desired direction (x, y, z or arbitrary).

In addition, I ported this framework in C/C++, if someone is interested please let me know.

Andrew Bolt

Prashant Pawar

thank you

Joerg Buchholz

@ Prashant Pawar: The Mathworks augmented the Matlab object model in R2008a. Therefore you have to use a version equal or higher than that for the PSTB 2.x. The error indicates that you use an older version of Matlab. I will send you a 1.0 version of the PSTB that sholud work with your Matlab via e-mail .

Prashant Pawar

I am getting following error

??? Error: File: particle_system.m Line: 1 Column: 10
A class definition must be in an "@" directory.

Error in ==> demo_1 at 23
Particle_System = particle_system

Can you plz help me about avoiding the error.

Namhee Kim

Joerg Buchholz

It is a very long story, why I had to do that ...

The password is: dummy

Shawn Harrison

So, what is the password to read the pdf documentation??

Seems silly to password protect the documentation.

Joerg Buchholz

John, seems like I'm a little antediluvian regarding file size. I just can't get rid of that feeling that there are still some 56k-modem users out there in Matlab Country, hating to download "large" files for just a sneak preview... ;-)

John D'Errico

Complex, but absolutely splendid!

My only thought was a minor one. I'd have liked to see the pdf documentation already be included in the zip file itself. It is something that any user will want to read and keep around, so why make the user download it separately, then move it into the particles directory to keep it around?

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!