From t-o-f

Processing: Formes

Contents (hide)

  1. 1. Le système de coordonnées
  2. 2. Formes simples
    1. 2.1 Modes de localisation
  3. 3. Formes complexes
    1. 3.1 Fermer des formes complexes
    2. 3.2 Editeur de vertex
  4. 4. Styles

1.  Le système de coordonnées

2.  Formes simples

2.1  Modes de localisation

Fonctions pour changer de mode de localisation:

3.  Formes complexes

  1. beginShape() 
  2. vertex(x,y) 
  3. endShape()  ou endShape(CLOSE) 
beginShape();
vertex(x1, y1);
vertex(x2, y2);
vertex(x3, y3);
endShape(CLOSE);
  1. beginShape() 
  2. curveVertex(x,y) 
  3. endShape()  ou endShape(CLOSE) 
beginShape();
curveVertex(a,  b);
curveVertex(x1,  y1);
curveVertex(x2,  y2);
[...]
curveVertex(c,  d);
endShape();

3.1  Fermer des formes complexes

Pour bien fermer une forme curveVertex, il faut suivre le modèle suivant:

beginShape();
// A
// B
// C
[...]
// A
// B
// C
endShape();

Par exemple:

beginShape();
curveVertex(51.0, 75.0); // A
curveVertex(51.0, 211.0); // B
curveVertex(257.0, 106.0); // C
curveVertex(265.0, 197.0);
curveVertex(312.0, 68.0);
curveVertex(51.0, 75.0); // A
curveVertex(50.0, 211.0); // B
curveVertex(257.0, 106.0); // C
endShape();

3.2  Editeur de vertex

4.  Styles

Récupéré sur http://wiki.t-o-f.info/Processing/Formes
Page mise à jour le 17 January 2013 à 13h07