Cours1 2. Processing en pratique: formes, couleurs - picardlimpens/TechArtsNum GitHub Wiki

/***********************************************************************

Composition de formes géométriques

***********************************************************************/

size(500,500);
background(0);
smooth();

fill(255,0,0,185);
stroke(0,0,255);
ellipse(width/4,height/4,width/3,height/3);
println("disque rouge dessiné, coin supérieur gauche");

ellipse(width/2,height/2,width/3,height/3);
println("disque rouge dessiné, central");

ellipse(3*width/4,3*height/4,width/3,height/3);
println("disque rouge dessiné, coin inférieur droit");

ellipse(2*width/3,2*height/3,width/2,height/2);
ellipse(width/3,height/3,width/2,height/2);
println("grands disques rouges");

rect(width/2-width/3/2,height/2-height/3/2,width/3,height/3);
println("rectangle dessiné");