"I love to love"
" Oh, I love to love
But my baby just loves to dance
The minute the band begins to swing it
He's on his feet to dig it and
dance the night away
Stop, I'm spinnin' like a top
We'll dance until we drop,
but if I have my way " Tina Charles
Chanson Disco qui m'adonné l'envie de créer ce petit univers.
Voici le code( animation sur Processing):
int po=0;
int ju=0;
int ti=300;
int ta=0;
int vitpo=1;
int vitju=1;
int vitti=1;
int vitta=1;
void setup()
{
size(350,350);
background(0);
}
void draw()
{ carreblanc (0,0); //ligne blanc droite
carreblanc (0,100);
carreblanc (0,200);
carreblanc (0,300);
carreblanc (50,50);
carreblanc (50,150);
carreblanc (50,250);
carreblanc (50,350);
noStroke ();
fill(255,0,0,50);
rect (po,ju,50,50);
po=po+vitpo;
ju=ju+vitju;
po++;
ju++;
noStroke ();
fill(171,0,219,50);
rect (ti,ta,50,50);
ti=ti-vitti;
ta=ta+vitta;
ti--;
ta++;
}
void carreblanc(int x, int y)
{ fill (255);
rect (x,y,50,50);
rect (x+100,y,50,50);
rect (x+200,y,50,50);
rect (x+300,y,50,50);
}