Logarithmic zoom in javascript using html5 canvas.