The Benefits of Vectors

When it comes to drawing shapes on a computer, there are essentially two ways to represent drawn lines. The first method works by dividing the screen into pixels; if the line passes through a pixel, it is colored and if the line misses a pixel, it remains white. The computer then remembers in a large array of memory which pixels are colored and which remain white.

This pixel-based method works well, but it has some drawbacks. One drawback is that diagonal lines can appear jagged due to pixilation that occurs when some pixels are fully colored and others are not, as shown in Figure 8.1. This can be reduced by filtering the pixels using a process called anti-aliasing, so that the pixels on the edge of a line are a lighter color. Aliasing (or jaggies) can also be eliminated by making the pixel array large, but this introduces another problem with pixel-based drawings, which is that they can take up a large amount of memory.

Figure 8.1. Pixelated circle.


The memory problem with pixel-based drawings is compounded when you animate them. If a single pixel-based image takes up 1MB of memory, an animation sequence at 24 frames per second would require a whopping 24MB for one second of animation.

An alternative to the pixel-based approach is to have the computer simply remember the mathematical formula used to create the shape. This formula is then recalled and executed every time the shape needs to be drawn, based on the size and position of the shape. This is known as vector-based drawing. The benefit of this method is that the drawing is scale independent, which results in smooth lines regardless of the size, as shown in Figure 8.2. It also dramatically reduces the amount of memory required.

Figure 8.2. Vector-based circle.


Because vector-based graphics have such a small memory footprint, they are particularly useful for displaying images on the Web, which requires that all graphics be downloaded before they can be displayed.

Note

Flash is another vector-based format, which explains its popularity on the Web.


Vector-based graphics are also very handy for animation because they can be edited easily over time by simply dragging handles and objects. Pixel-based graphics are animated by having to redraw every frame of the animation. The memory required for producing an animated vector-based sequence is also very small when compared with pixel-based movies.

Even though Anime Studio is a vector-based package, it can still deal with pixel-based images using image layers. More on image layers is covered in Chapter 22, “Adding Image Layers.” The rendering process converts the vector-based drawings to a pixel-based format when the AVI or QuickTime formats are used. Rendering and exporting topics are presented in Part IX, “Rendering and Exporting.”

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset