function drawDog(xClick,yClick,color){ t=0; //tułw while(t<=6.9){ var x1 = 8*Math.cos(t); var y1 = 8*Math.sin(t); //obrot var x2 = x1*Math.cos(2) - y1*Math.sin(2); var y2 = x1*Math.sin(2) + y1*Math.cos(2); var x = Math.round(19*x2)/2 ; var y = Math.round(19*y2)/7 ; canv.fillStyle=color; canv.fillRect(xClick+x,yClick-y,2,2); t+=0.01; } currentDraw = "elipse"; xCoordinate = xClick; yCoordinate = yClick; console.log(currentDraw, xCoordinate, yCoordinate); }