Pac Man

Inspired by our Computational Media professor’s lecture on arcs and ellipses and her sketch of a Pac Man, I just had to figure out how to animate it.


Using a sin function, Pac Man’s mouth opens and closes over time. He has an eye that moves with his mouth using the same sine function. I then added a food ball that would slide toward him using a modulo function.

See the code here.


1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *