An introduction to graphics and animation using JavaScript