Processing > Formes
Contents (hide)
Fonctions pour changer de mode de localisation:
beginShape(); vertex(x1, y1); vertex(x2, y2); vertex(x3, y3); endShape(CLOSE);
beginShape(); curveVertex(a, b); curveVertex(x1, y1); curveVertex(x2, y2); [...] curveVertex(c, d); endShape();
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();