Inspiration

I was playing basketball with my freind the other day, and I noticed he threw the ball in a different way from me. He was very tall and didn't have to shoot at a higher angle and didn't have to apply as much pressure. After making this observation I wondered if I could prove it somehow or demonstrate the advantages of different heights and how each one would need to shoo the ball.

What it does

After asking the user for a player height, it allows the user to place a marker anywhere on the court. After placing the marker the program maps the coordinates onto a real 14 x 15 meter court using math and calculates the exact needed force and angle of a ball being shot by a player of a certain height at a specific point in the court.

How we built it

I first took a sheet of paper and compiled all the formulas I knew could be helpful in this project, I did some research on physics formulas that could help for this. I then solved for what I needed on paper multiple times, to double check I was doing it properly. After this I programmed a rudimentary program on python that did only the physics calculations. I then made the scratch interface and had to figure out how to make a coordinate system that I could do math with(this was a huge challenge). After doing some problem solving I was able to make a standardized system to figure out the coordinates(I made my own coord system). After this I mapped it to meters onto the coordinate system I created and used Pythagorean theorem to calculate the distance from the hoop. I solved for all my needed variables and then plugged it into the necessary equations.

Challenges we ran into

Scratch Integration was very hard. Took a lot of trial and error to get a system where you can effortlessly click a place in a court and get real life basketball data out of it. Scratch used a positive and negative axis for their coordinates. I needed a completely different style with only positive (x,y)meter values from the top left corner of the court. Reformatting this was difficult, and figuring out how to integrate everything was satisfying.

Accomplishments that we're proud of

All of the Scratch Integration(Physics ideas -> Scratch UI). Read above for more details.

What we learned

I learned a lot about how scratch could be a great outlet for my theoretical ideas and that I could help people visualize and see the practical applications of math in real life.

What's next for Court Calc

Next I want to do physics simulation program to show the ball going in the hoop(likely easier than what I have built so far).

Built With

Share this project:

Updates