Sin and Cos – The Programmers Friend!

I was doing a little bit of searching on the internet for how I might go about drawing a simple circle on an LED matrix. I then stumbled upon an excellent website which had some great information on using Sin and Cos to not only draw circles but also for making game mechanics work.

For example, if you were making a game that is similar to say, Micro Machines you would need to work out the angle and speed that the car is travelling when the player is accelerating / turning etc… The website goes into all of this and has been a great learning experience for me.

Micro Machines Screenshot


The site also goes into Polar to Cartesian conversions, making psuedo 3D graphics from 2D graphics (like the Super Nintendo Mode 7 games such as Super Mario Kart and F-ZERO). The site includes lots of code examples too.

Here is a Super Mario Kart Game Track (this is the actual graphic that you drive on).

Here is that same graphic but now with Mode 7 enabled:

Here is the link!



Image References:,O.png


0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x