Trigonometry animation

A few days ago, I chanced across on twitter1. It occurred to me that you could use the same style of diagram to show all three of sin, cos and tan simultaneously. If you project downward at the same time as you project sideways, the two projections will be 90 degrees out-of-phase, just as sine and cosine are.

An hour or so’s hacking in Squeak resulted in the following. (Click here to hide the animation.)

Animation of three trig functions

The source code is available for the curious. (Automatic syntax-highlighting courtesy of github. If the previous link doesn’t work for some reason, a less-pretty but almost certainly available link is this one.)

  1. I haven’t been able to find any attribution for this diagram, I’m afraid. If it’s yours, please let me know!

Comments (closed)
Jason Davies 19:56, 8 Jul 2010

Cool! You inspired me to write a version using Protovis:

Tony Garnock-Jones 21:07, 8 Jul 2010 (in reply to this comment)

That's really cool, Jason. I love how it's so much faster and smoother than the cheesy animated GIF I used :-) Protovis looks very interesting, thank you for the pointer.