Inspiration
When we saw the math challenge, not only including promising math problems but also a homemade solution to a rendering roadblock, we decided to pick it up. This seemed like the sort of theme that could challenge our knowledge and push our limits.
What it does
MathSmack is a billiard simulation where you can see balls collide in 3 dimensions in real time. We give the user control of the mass of the ball, number of balls and the radius of the balls for a more granular control over the simulation, making it a viable option to visualize labs or other things of the likes.
How we built it
This was made using only python, numpy and matplotlib. We achieved this by making custom functions and some thinking outside the box to get a 2d render going and eventually even the 3 dimension.
Challenges we ran into
First there was the 3 dimension support. Going from 2d is a big jump and it gave us some problems. The logic turned out to be pretty different, getting our brains to work a bit more.
The plotting of the spheres was also a tricky one, making sure that each sphere follows their trajectory and stays at their respective center.
Finally, the implementation of collisions was probably the hardest one. Finding the intersect and using npy.arrays and we had to learn them on the fly. The intersect was particularly challenging, forcing us to find the intersect using matplotlib.
Accomplishments that we're proud of
The time management that we managed to achieve, juggling between mentoring, participating and even hosting a workshop, we are very proud of the amount of work we managed to accomplish in the more strict timeframe we had this time around.
At first sight we also disregarded the math category because we found it too hard and the simple fact that me managed to finish it is very rewarding.
What we learned
We learned a lot about matplotlib, gearing us for plotting and implementations of data scientists.
What's next for MathSmack
The next part would be to add dynamic support (asking the user for n faces) to make a shape on the fly depending on the amount of shapes the user puts.
Log in or sign up for Devpost to join the conversation.