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.

need to be stored in memory, <strong>and</strong> the computer needs to sequentially plot each of the<br />

vertices, too may vertices can become a performance drain on the computer <strong>and</strong> even<br />

potentially yield worse performance than with raster graphics.<br />

Vector graphics are also resolution independent—one of their best attributes. You are able<br />

to scale vector shapes up or down without any loss in quality. It is just as easy for the computer<br />

to calculate 1000 as 9999, so size is essentially irrelevant with regard to vector graphics.<br />

Additionally, you can edit vector graphics by manipulating their vertices individually—so<br />

they may be deformed in real time, leading to possibilities such as character animation or<br />

shape morphing. One of the reasons a program like Flash became so popular was because<br />

of its strength as a vector-based animation program, which allowed it to effectively overcome<br />

the b<strong>and</strong>width issues associated with the Web, especially back in the days when we<br />

all had slow dial-up modems.<br />

Animation<br />

COMPUTER GRAPHICS, THE FUN, EASY WAY<br />

Animation is really just an extension of static imaging, <strong>and</strong> everything covered thus far in<br />

this chapter applies to animation. In the simplest sense, animation is a series of still images<br />

displayed sequentially. If the rate of change between images, commonly called the frame<br />

rate, is fast enough, our brains can’t detect the transitions, <strong>and</strong> you see fluid motion. This<br />

effect is referred to as persistence of vision. In actuality, we perceive the physical world in<br />

much the same way. Light enters our cornea, moves through the pupil <strong>and</strong> lens, <strong>and</strong> eventually<br />

reaches the retina. The retina is the light-sensing part of the eye, containing photosensitive<br />

structures called rods <strong>and</strong> cones. The rods detect low light, while the cones detect<br />

color <strong>and</strong> detail. The received light is transformed, through a chemical process, into electrical<br />

impulses, which then pass through the optic nerve into the brain to form vision. Thus,<br />

our vision is not static, but—similar to animation—a perpetual sequence of dynamic 2D<br />

data. When I taught painting, I tried to encourage my students to see two-dimensionally, to<br />

record the actual visual data the eye was seeing, not the interpreted image the brain was<br />

forming. I argued that if you wanted other viewers to read 3D space in the painting, you<br />

needed to record the actual perceptual 2D cues that the eyes were seeing, which would<br />

then naturally lead to the perception of 3D space in the viewer’s brain. Our binocular<br />

vision (two eyes) <strong>and</strong> our brain provide the illusion that we see three-dimensionally <strong>and</strong><br />

that the visual field is constant. One simple way to prove the brain’s giant cover-up of the<br />

true visual chaos surrounding us is to detect the eye’s blind spot. At the back of each of<br />

our eyes, where the optic nerve exits the retina, is a structure called the optic disc. The<br />

optic disc has no rods or cones on it to receive light <strong>and</strong> thus causes a literal blind spot in<br />

our field of vision—actually a blind spot in each eye. However, each of our clever eyes<br />

compensates for the other eye’s blind spot—blinding us to our own blind spots (ignorance<br />

is bliss). Figure 4-4 provides a little example of how to fool the brain <strong>and</strong> reveal the holes<br />

in your vision. Close your left eye <strong>and</strong> stare at the dot on the left in the figure. Don’t look<br />

at the star, but you should be able to see it in your peripheral vision. Slowly move toward<br />

the page <strong>and</strong> keep looking at the dot. When you get to about a foot away or so, the star<br />

on the right should disappear—that’s your blind spot. For a good article on how vision<br />

works, check out http://science.howstuffworks.com/eye1.htm.<br />

117<br />

4

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

Saved successfully!

Ooh no, something went wrong!