The app is simple project to tinker with collison detection in javascript.
Impurity can be induced by clicking anywhere on the canvas. On clicking the clean tank button, charcoal is induced. The charocoal absorbs the carbon-based impurity due to its large surface area. Size of charcoal balls increase when they come in contact with impurity and not with orignal water molecules. At the end left-over charcoal can be removed using remove charcoal button.
Live Preview: https://pineapple45.github.io/water-tank/
Reference to vedio on collision detection by Chris Courses: https://www.youtube.com/watch?v=789weryntzM&list=PLpPnRKq7eNW3We9VdCfx9fprhqXHwTPXL&index=7