90 likes | 225 Views
This tutorial covers the essential commands for drawing shapes using vertex functions in Processing. You'll learn how to create custom shapes using `beginShape()` and `endShape()`, and explore the use of `vertex()`, `curveVertex()`, and `bezierVertex()` to construct various geometric forms. Discover how to manipulate shapes with parameters like `CLOSE`, and visualize with styles like `POINTS`, `LINES`, `TRIANGLES`, and more. By the end, you'll be able to combine these techniques to create intricate designs and smooth curves seamlessly.
E N D
Lets shape up! Pages: 69-77
Lets draw random shapes Commands introduced vertex(x,y); beginShape() endShape() curveVertex() BezierVertex()… lets not worry about this now
Shape with vertex(x,y) nofill(); beginShape(); vertex(30,20); vertex(85,20); vertex(85,75); vertex(30,75); endShape();
Lets close the Shape //nofill(); beginShape(); vertex(30,20); vertex(85,20); vertex(85,75); vertex(30,75); endShape(CLOSE);
POINTS or LINES? //nofill(); beginShape(POINTS);// lets change it to LINES vertex(30,20); vertex(85,20); vertex(85,75); vertex(30,75); endShape(CLOSE);
TRIANGLES or TRIANGLE_STRIP //nofill(); beginShape(TRIANGLES); vertex(75,30); vertex(10,20); vertex(75,50); vertex(20,60); vertex(90,70); Vertex(35,85); endShape();
Curves smooth(); noFill(); beginShape(); curveVertex(20,80); curveVertex(20,40); curveVertex(30,30); curveVertex(40,80); curveVertex(80,80); endShape();
Putting it all together smooth(); noFill(); beginShape(); vertex(15,40); bezierVertex(5,0,80,0,50,55); vertex(30,45); vertext(25,75); bezierVertex(50,70,75,90,80,70); endShape();
bezierCurve noFill(); beginShape(); vertex(32,20); bezierVertex(80,5,80,75,30,75); endShape();