CMPT 166 Lecture Notes - Lecture 3: Ellipse, Pie Chart, Quadrilateral
Document Summary
In these notes you will learn how to draw: straight-line shapes such as points, lines, ellipses, rectangles, and quads, curves using the arc(), curve(), and bezier() functions, more complex shapes using beginshape(), vertex(), and endshape(). Processing comes with a number of functions for drawing 2-dimensional shapes. 3-dimensional shapes, like spheres and cubes, but we will stick to 2-dimensional graphics in this course. You can set the color of a point using stroke. The processing function line(x, y, a, b) draws a straight-line segment between the points (x, y) and (a, b). The * means multiply , and so 2 * 50 is 100, 7 * 50 is 350, etc. We"ve written the numbers in this form to make the pattern obvious. In processing, the ellipse(x, y, width, height) draws an ellipse of the given width and height centered at the point (x, y) on the screen.