Skip to content

angelodaveigaalves/pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

This programm, simulates two ideal blocks, which are frictionless, perfectly elastic so that there are no loss in energy when they collide. It's true that if they were to be ideal there would be no sound when they collide, but the sound makes it more fun. The left wall and the ground are also frictionless and perfectly elastic. A counter counts the total number of collision, it does not matter if the collision is between the squares or the wall. Pressing the Space tab will reset the experiment and increase the mass of the bigger block. They start with the same mass a ratio 1:1. 2nd experiment has a ratio 100 to 1. 3rd experiment has a ratio 10 000 to 1. 4th experiment has a ratio 1 million to 1. 5th experiment has a ratio 100 million to 1. 6th experiment has a ratio 10 billion to 1. 7th experiment has a ratio 1 trillion to 1. Unfortunately the programm breaks here.

"Pi is the bridge between the tangible and the intangible, the finite and the infinite." -Luca Pacioli

You need a wav soundfile, https://mixkit.co/free-sound-effects/tools/ , i suggest Metal hammer hit, something short. Than paste the file path click_sound = pygame.mixer.Sound('File _ Path) or disable 2 lines which are commented like this #!!!!!!!!!!, for no sound.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published