function start() { clock = 1; } function update() { clearScreenWithColor(black); width = 100 + (Math.sin(clock/300*2*3.14) * 50); redAmount = Math.floor(150 + (Math.sin(clock/300*2*3.14) * 100)); greenAmount = Math.floor(150 + (Math.cos(clock/300*2*3.14) * 100)); blueAmount = Math.floor(150 + (Math.sin(clock/300*2*3.14) * 100)); circle(200, 200, width, "rgb(" + redAmount + "," + greenAmount + "," + blueAmount + ")"); clock++; }