e-artsup
2ème année
TP à rendre juin 2017
Fichiers à utiliser :
- Code utilisation du Micro : tpsonmicro
- Code utilisation lecteur mp3 : tpsonokmp3
- Code boucle pour exemple : boucle
Présentation de Processing
Débuter avec Processing
Exemples
Fonction Etoile
void star(float x, float y,float radius1, float radius2,int nbpoints){
float angle = TWO_PI/nbpoints;
float halfAngle = angle/2.0;
beginShape();
for(float a = 0;a < TWO_PI; a= a + angle){
float sx = x + cos(a) *radius2;
float sy = y + sin(a) *radius2;
vertex(sx,sy);
sx = x + cos(a+halfAngle) *radius1;
sy = y + sin(a+halfAngle) *radius1;
vertex(sx,sy);
}
endShape(CLOSE);
}