color BackGround = color( 200, 200, 255 ); boolean Debug = false; boolean Random = false; int Shape = 0; // 0-circle, 1=box int Size = 30; void setup( ) { size( 800, 600 ); background( BackGround ); smooth( ); } void draw( ) { stroke( 0, 0, 0 ); fill( 255, 50, 50 ); if( mousePressed ) { Circle( mouseX, mouseY, Size ); //rect( mouseX, mouseY, Size, Size ); } } void Circle( int xc, int yc, int r ) { int numSegs = 20; float dang = 2. * PI / float( numSegs ); float ang = 0.; beginShape( ); for( int i = 0; i <= numSegs; i = i + 1 ) { float x = xc + r * cos(ang); float y = yc + r * sin(ang); vertex( x, y ); ang = ang + dang; } endShape( ); } void keyPressed( ) { } void mousePressed( ) { } void mouseMoved( ) { } void mouseDragged( ) { }