Skip to content

lainceline/js-collide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Particle Collision Simulator

This project is a particle collision simulator that visualizes the motion and collisions of particles in a confined space. The particles change color based on their speed, creating a heat map effect. The average speed of the particles is also plotted over time using a real-time chart.

Features

  • Real-time particle simulation with collisions.
  • Heat map effect: particle colors reflect their speed.
  • Adjustable number of particles and particle size using sliders.
  • Real-time chart displaying the average speed of particles over time.

Installation

  1. Clone the repository:

    git clone https://github.com/lainceline/js-collide.git
    cd js-collide
  2. Open index.html in your web browser to view the simulation.

Usage

  • Use the sliders to adjust the number of particles and their size.
  • The simulation will update in real-time based on the slider values.
  • Observe the particles colliding and changing color based on their speed.
  • The average speed of the particles is displayed on a chart below the simulation.

Technologies Used

  • HTML5
  • CSS3
  • JavaScript (ES6)
  • Chart.js (for the real-time chart)

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any features, bug fixes, or improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Chart.js library for the real-time chart visualization.

About

Simple particle collision simulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published