var c = document.getElementById('c'), ctx = c.getContext('2d'), cw = c.width = 400, ch = c.height = 300, rand = function(a,b){return ~~((Math.random()*(b-a+1))+a);}, dToR = function(degrees){ return degrees * (Math.PI / 180); }, circle = { x: (cw / 2…