Javascript & the Unit Circle
Whilst cleaning up the mess that is my www directory I found this old demo I made a few years back. I think at the time I wanted to figure out how to position HTML elements in a perfect(ish) circle. It’s not something I’d seen done before or since, probably because it’s a pretty impractical way of positioning HTML. Oh well, I remember having fun doing the coding and figuring out the maths, it also looks quite pretty too.
The trigonometry behind the script is know in maths as the unit circle. Using these rules you can determine where on the xy axis an object should be placed to follow the circumference of a circle.
The code was done a while back, before I was programming OO javascript or using libraries. As such, no guarantees it’ll work and won’t crash your browser!

Ruben
on 8 Nov 2008 at 4:16 pmHi:
Please I would like get the example
Thanks
GS test demo
on 1 Apr 2013 at 6:40 amJavascript & the Unit Circle ยป Matt Haynes - Programming & Tech Blog