GitXplorerGitXplorer
T

particles

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
f4bbdcdcbdb25100b36851381ca24c8d907451aa

Added MIT license

TTristanBomb committed 7 years ago
Unverified
81d619ae279eee61d7ba9c4132f59d83dde1a94c

Fixed readme

TTristanBomb committed 8 years ago
Unverified
0a0e7133983679ef4077d1d00a8bf553f453acfd

Fixed readme

TTristanBomb committed 8 years ago
Unverified
4208a1d27a7177ac299fdcff7a8f7b868be026c7

More optimizations

TTristanBomb committed 8 years ago
Unverified
b40f7944b4ceb757348d522ae16526e59dc79919

Fixed asymmetry bug, optimizations, various other tweaks

TTristanBomb committed 8 years ago
Unverified
645c0e7df75540b84d30503c5b3d7b314afc28bd

Fixed preset bug, commented code, listed more controls

TTristanBomb committed 8 years ago

README

The README file for this repository.

Particles

Particle System - The physics kind!

This is a small little toy to simulate particles; currently, electromagnetism, gravity, and collision are implemented. In the future, radioactivity and possibly chromodynamics will be added as well. The forces are fairly accurate to reality, but the constants are different, as are particle masses.

Installation

This application requires Ruby, RubyGems, and the Gosu gem.

On Linux:

  • Install Ruby from your distribution's package manager, or from source. On Debian and Ubuntu, this will be sudo apt-get install ruby; for other distros, this will be different.
  • In most Ruby packages, RubyGems will be already included. If not, either get it from your package manager or compile it.
  • Run sudo gem install gosu to - you guessed it - install Gosu.
  • Download the source from GitHub and run main.rb.

On Windows:

  • Install Ruby (v2.0.0+) from RubyInstaller.
  • On the same page, download and install the DevKit that matches the version of Ruby you just installed.
  • Run gem install gosu. If this fails, see here.
  • Finally, run main.rb. Note that I have not tested this application on Windows, so no promises!

I am not familiar with OSX, so unfortunately I cannot help you there.

Controls

  • Left click and drag: Create particle with velocity
  • Middle click: Create still particle
  • Right click: Delete particle
  • Escape: Clear the screen
  • Space: Pause the simulation
  • WASD: Pan the view
  • Numbers 1-9: Load presets
  • Backspace: Pick random color
  • Plus/minus: Increase/decrease charge
  • Brackets: Increase/decrease mass
  • Backslash: Invert mass

Particle Presets

Note: particle masses are not accurate to reality.

  1. Neutron: Mass 1, charge 0, #FFFFFF
  2. Proton: Mass 1, charge +1, #33CCFF
  3. Antiproton: Mass 1, charge -1, #FFCC33
  4. Electron: Mass 0.25, charge -1, #CCFF33
  5. Positron: Mass 0.25, charge +1, #CC33FF
  6. Neutrino: Mass 0.25, charge +1, #66FFCC
  7. Exotic (0): Mass -1, charge 0, #33FF66
  8. Exotic (+): Mass -1, charge +1, #FF6633
  9. Exotic (-): Mass -1, charge -1, #6633FF