Bresenham's Midpoint Algorithm with HTML Canvas and JavaScript.
Simple HTML demonstration using JavaScript to demonstrate Bresnham's midpoint algorithm. The HTML page contains 6 buttons, for a line, polyline, circle, ellipse, and polygon.
The last piece is that when you are over the canvas you, the JavaScript code retrieves the user's mouse coordinates, and does a simple (pixel by pixel) free hand draw. The behavior of this is not perfect - and the performance seems to cause a loss of pixels if the user moves the mouse curson too quickly.