function area(a,b){this.pole=1;this.sb=0;this.r=Math.sqrt(this.pole/Math.PI);this.r_s=this.r-this.sb;0>this.r_s&&(this.r_s=0);this.pole_sr=Math.PI*this.r_s*this.r_s;this.setSize(a);this.setSB(b);this.recalc();this.x=1E11*(Math.random()-0.5);this.y=1E11*(Math.random()-0.5);return this} area.prototype.recalc=function(){var a=this.pole-this.toPole,b=this.sb-this.toSB;10<Math.abs(a)&&(a*=0.1);10<Math.abs(b)&&(a=0.1*b);this.pole-=a;this.sb-=b;this.r=Math.sqrt(this.pole/Math.PI);this.r_s=this.r-this.sb;0>this.r_s&&(this.r_s=0);this.pole_sr=Math.PI*this.r_s*this.r_s};area.prototype.setSize=function(a){this.toPole=ha2mkw(a);this.pole=ha2mkw(a);this.sb=this.sb;this.r=Math.sqrt(this.pole/Math.PI);this.r_s=this.r-this.sb;0>this.r_s&&(this.r_s=0);this.pole_sr=Math.PI*this.r_s*this.r_s}; area.prototype.setSB=function(a){this.toSB=a};area.prototype.tick=function(){this.recalc()};area.prototype.getStrefaBrzezna=function(){return this.pole-this.pole_sr};area.prototype.getSrodek=function(){return this.pole_sr};area.prototype.drawLas=function(a,b,c){a=document.getElementById("myCanvas");b=a.getContext("2d");c=a.width/2;a=a.height/2;b.beginPath();b.arc(c,a,70,0,2*Math.PI,!1);b.fillStyle="green";b.fill();b.lineWidth=1;b.strokeStyle="#003300";b.stroke()};
