Formation à la communication digitale et réalisation de sites web à Bordeaux

e-artsup

2ème année

TP à rendre juin 2017

brief tp à rendre

Fichiers à utiliser :

 

 

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);
}