kumar wrote on Jun 9^{th}, 2010, 8:57am:2. The ellipse which represents the number of emails received and sent should be more improvised by, If the number of emails are more, then the ellipse should be blinking while the ellipse with low number of email should be blink less.
Hi cedric,
I got the following code form this forum with which the ellipse will be blinking in an more attractive way. The problem is that I am not able to integrate my code with this program, am little confused with this. So, can you please integrate the following code with the actual code.
int radius1 = 5;
int rMove1 = 1;
int minRadius1 = 5, maxRadius1 = 100;
int xPos1 = 100;
int yPos1 = 200;
int radius2 = 5;
float rMove2 = 0;
int minRadius2 = 20, maxRadius2 = 140;
int xPos2 = 300;
int yPos2 = 200;
void setup()
{
size(400, 400);
// frameRate(10);
}
void draw()
{
background(240);
noFill();
// Linear
ellipse(xPos1, yPos1, radius1, radius1);
radius1 += rMove1;
if (radius1 > maxRadius1)
rMove1 = -1;
else if (radius1 < minRadius1)
rMove1 = +1;
// Sinus
ellipse(xPos2, yPos2, radius2, radius2);
rMove2 += 0.02;
radius2 = (int) ((maxRadius2 - minRadius2) * sin(rMove2) + minRadius2);
}
Thanks,
Kumar