04.04.2013 Views

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ezier(350, 100, 400, 150, 350, 250, 350, 300);<br />

line(350, 100, 400, 150);<br />

rect(350, 100, 10, 10);<br />

ellipse(400, 150, 10, 10);<br />

line(350, 300, 350, 250);<br />

rect(350, 300, 10, 10);<br />

ellipse(350, 250, 10, 10);<br />

bezier(350, 300, 300, 350, 100, 250, 100, 400);<br />

line(350, 300, 300, 350);<br />

rect(350, 300, 10, 10);<br />

ellipse(300, 350, 10, 10);<br />

line(100, 400, 100, 250);<br />

rect(100, 400, 10, 10);<br />

ellipse(100, 250, 10, 10);<br />

Figure 7-29. Connecting Bézier curves together<br />

In this last example, notice how the control h<strong>and</strong>les change the curve. The control h<strong>and</strong>les<br />

that are aligned, forming a straight line at the second anchor point, generate a really<br />

smooth curve segment. However, the next anchor point forms a cusp, or kink, in the curve,<br />

as the h<strong>and</strong>les don’t align. This independence of the two control h<strong>and</strong>les is both a benefit<br />

<strong>and</strong> liability of using Bézier curves. Cusps in the curve can translate to jerky motion in<br />

object or camera animations in 3D animation programs, or create an unwanted detail in a<br />

vector illustration or typeface design. However, in spite of these challenges, Bézier curves<br />

are very efficient, with a lot of descriptive capabilities, <strong>and</strong> are used widely in computer<br />

graphics.<br />

CURVES<br />

279<br />

7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!