PFont font; // The font must be located in the sketch's // "data" directory to load successfully Ngon[] polyGon = new Ngon[1]; int i = 0; float clr,sec; boolean blnVal = false; void setup(){ size(400,400); background(155,190,255); font = loadFont("Gulim-24.vlw"); textFont(font); } void draw(){ smooth(); noStroke(); if (second() == 0 && blnVal == false){ blnVal = true; fill(155,190,255); rect(0,0,width,height); } if (blnVal == true){ sec = second()+1; polyGon[0] = new Ngon(width/2,height/2,width/2*(sec/60.0),2+int(sec/60.0*12.0),i/60.0); clr = (1.0 - sec / 60.0) * 255.0; fill(clr,clr,255,100); ellipse(polyGon[0].x,polyGon[0].y,10,10); i=i+1; if (sec == 60.0){ fill(155,190,255); rect(0,0,width,height); i=0; } } else{ fill(155,190,255); rect(0,0,width,height); fill(255,255,255); text("Starts in " + int(60-second()),0,height); } }