Experiment 3: Bouncy Balls

Sections in this Article:

Conclusions

Well, I certainly got carried away in this little experiment. The physics of a ball [in 2D space] were successfully encapsulated in a re-useable class. An implementation of that class was wrapped up into a Web Component that used svgs to create the visual representation of a box containing multiple bouncing balls.

If that wasn’t enough, to demonstrate the re-usability of the Ball class [and the KeyValuePair class], the entire experiment was wrapped up into an alternative engine that used basic html elements to ‘render’ a representation of the bouncy balls. I think I preferred the html implementation!

If you liked this article or can see ways to improve it, please drop me a line in the comments below: