Skip to content

apirrone/gravityLed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gravityLed

There is supposed to be a cool gif here

(better gif : https://media.giphy.com/media/8AdqYCYtrNTIgP7AE1/giphy.gif)

Tiny "physics engine" for displaying balls bouncing around walls and each others on a led matrix (or other use).

It's very simple to use :

#include "gravityLed.hpp"

gravityLed g(width, height, nb_balls);
[...]
while(true){
	[...]
	g.step(gravityVector.x, gravityVector.y); // (0., 0.2) works well 
	bool** occupancyMatrix = g.getMatrix();
	// do stuff with matrix
	[...]
}

Make the demo:

$ make

Demo Dependencies :

  • ncurses (but just if you want to display the matrix in a terminal)

About

Tiny "physics engine" for displaying balls bouncing around walls and each others on a led matrix (or other use).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors