A great article on HTML5’s Canvas element by Ray Hammond. The HTML5 element is used to draw graphics, on the fly, via javascript.

Geek's Retreat

HTML5The canvas element is part of HTML5.  It allows for dynamic, scriptable rendering of 2D shapes.  It allows a developer to draw just as an artist would on their canvas; albeit, without the same creative flare an artist may have.  As I’m a developer I couldn’t resist having an attempt.  They first step was to come up with a project to do.  Not being that creative I decided to draw a speedometer – similar to the ones we see in most cars.  Initially it sounded quite simple, although, I did find parts quite tricky.  This was due to my less than impressive maths skills and inexperience with the Canvas implementation. I’ll start with the end result and then explain how the parts of the speedometer were rendered.  With any luck some skilled mathematician will be able to explain the maths I’ve used because I have managed to get it working without fully understanding the mathematical theory…

View original post 667 more words

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s