Menu

Tree [3ba383] master /
 History

HTTPS access


File Date Author Commit
 headers 2019-12-08 Emil Indzhev Emil Indzhev [34a96d] Added saving/loading and refactored a bit
 include 2019-11-03 Emil Indzhev Emil Indzhev [aecd80] Add project
 lib-mingw 2019-11-03 Emil Indzhev Emil Indzhev [aecd80] Add project
 sources 2019-12-08 Emil Indzhev Emil Indzhev [34a96d] Added saving/loading and refactored a bit
 .gitattributes 2019-11-03 Emil Indzhev Emil Indzhev [aecd80] Add project
 .gitignore 2020-09-30 Emil Indzhev Emil Indzhev [3ba383] Create .gitignore
 GLFW_LICENSE 2019-11-03 Emil Indzhev Emil Indzhev [aecd80] Add project
 LICENSE 2019-11-03 Emil Indzhev Emil Indzhev [aecd80] Add project
 Particle-Structures.cbp 2019-12-08 Emil Indzhev Emil Indzhev [34a96d] Added saving/loading and refactored a bit
 README.md 2019-12-07 Emil Indzhev Emil Indzhev [673937] Update README.md

Read Me

Particles

Simulates particles of different randomly generated types.

Each particle type has a mass, radius and colour.

The radius of a particle follows this equation:

Pi * radius^2 * density = mass where density is some fixed particle density.

Each pair of particle types has an associated randomly generated interaction.

The interaction is a force along their distance vector with magnitude:

4 * strength * ( (eqDist / r) - (eqDist / r) ^ 2 ) where r is the distance (scalar).

The value eqDist determines the distance at which the two particles experience no force, while strength determines the maximum possible attraction. Notice that at a distance smaller than eqDist the particles repel each other and at a higher one they attract each other.

The particles evolve through time by interacting with each other and experiencing drag. The drag is also a force and follows this equation:

F = -dragCoeff * 2 * radius * velocity (it is proportional to the area the particle covers in a unit of time)

Finally, for each particle we get its accelaration by dividing the total force by its mass.

These rules result in various clusters of particle lattices forming.

Two further additions have been introduced:

  1. Asymmetric forces. We can toggle asymmetry of the forces which usually leads to particles chasing each other and thus moving the whole cluster of particles.

  2. Particle decay. Each particle type has a halflife/mean lifetime, when the particle decays it produces some number of other particles. Conservation of mass, conservation of energy and Galilean relativity are not currently followed (though conservation of momentum is).

This project uses the GLFW library and OpenGL.