Pinball Dilemma. Simon’s own code.

Simon heard the word “pinball” and looked it up on Google (never played it himself). He then decided to write a pinball program in Processing (Java), but soon encountered a mathematical dilemma: the flippers at the bottom of the canvas (their role is to protect the ball from falling) didn’t stop rotating the way Simon wanted. This slowly unfolded into a real drama.

Here Simon explains the problem:

As his math tutor came to give Simon his regular math lesson, Simon turned to him for help and they thought to have solved the problem by applying cosine and setting it to 1. But after the teacher left Simon realized that the angular velocity of the flipper was too high for the cosine to reach 1, which would mean the flipper wouldn’t stop. Unless approximate values could be programmed, which Simon said he doubted. Simon was crying hard. We just sat there hugging after we recorded this:

Then Simon tried writing an approximate function.

I’m not sure he will come back to this unfinished project. It is all part of his learning experience and learning to apply math/ physics though.



Approximate cosine:

Pinball cos solution 22 Mei 2017

Approximate Function and 1D distance function:

Pinball. Approximate Function and 1D distance function 22 Mei 2017


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s