Vector graphics

From Wikipedia, the free encyclopedia - View original article

Jump to: navigation, search
This article is about computer illustration. For other uses, see Vector graphics (disambiguation).
Example showing effect of vector graphics versus raster graphics. The original vector-based illustration is at the left. The upper-right image illustrates magnification of 7x as a vector graphic. The lower-right illustrates the same magnification as a raster (bitmap) graphic. Raster images are based on pixels and so when scaled there is a loss of clarity, while vector-based graphics can be scaled by any amount without degrading quality.

Vector graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygons—all of which are based on mathematical expressions—to represent images in computer graphics.[1][not in citation given] Vector graphics are based on vectors (also called paths), which lead through locations called control points or nodes. Each of these points has a definite position on the x and y axes of the work plane and determines the direction of the path; further, each path may be assigned a stroke color, shape, thickness, and fill.[2][not in citation given] These properties don't increase the size of vector graphics files in a substantial manner, as all information resides in the document's structure, which describes solely how the vector should be drawn.[citation needed]

The term vector graphics is typically used only for 2D (planar) graphics objects, in order to distinguish them from 2D raster graphics, which are also very common. 3D graphics as commonly implemented today (e.g. in OpenGL) are typically described using primitives like 3D points and polygons connecting these (which in turn describe surfaces); these 3D primitives are much more similar to vector graphics than to raster graphics, but aren't explicitly called vector graphics. The equivalent of raster graphics in the 3D world are voxel-based graphics.[3][4]

Some authors have criticized the term vector graphics as being confusing.[5][6] In particular, vector graphics does not simply refer to graphics described by Euclidean vectors.[7] Some authors have proposed to use object-oriented graphics instead.[5][8][9] However this term can be also be confusing as it can be read as any kind of graphics implemented using object-oriented programming.[5]


A vector-based image of a round four-color swirl.



The World Wide Web Consortium (W3C) standard for vector graphics is Scalable Vector Graphics (SVG). The standard is complex and has been relatively slow to be established at least in part owing to commercial interests. Many web browsers now have some support for rendering SVG data but full implementations of the standard are still comparatively rare.

In recent years, SVG has become a significant format that is completely independent of the resolution of the rendering device, typically a printer or display monitor. SVG files are essentially printable text that describes both straight and curved paths, as well as other attributes. Wikipedia prefers SVG for images such as simple maps, line illustrations, coats of arms, and flags, which generally are not like photographs or other continuous-tone images. Rendering SVG requires conversion to raster format at a resolution appropriate for the current task. SVG is also a format for animated graphics.

There is also a version of SVG for mobile phones. In particular, the specific format for mobile phones is called SVGT (SVG Tiny version). These images can count links and also exploit anti-aliasing. They can also be displayed as wallpaper.

An original reference photograph before vectorization
Detail can be added to or removed from vector art.


The earliest 2D computer graphics were all vector graphics.

One of the first uses of vector graphic displays was the US SAGE air defense system. Vector graphics systems were only retired from U.S. en route air traffic control in 1999, and are likely still in use in military and specialised systems. Vector graphics were also used on the TX-2 at the MIT Lincoln Laboratory by computer graphics pioneer Ivan Sutherland to run his program Sketchpad in 1963.

Subsequent vector graphics systems, most of which iterated through dynamically modifiable stored lists of drawing instructions, include the IBM 2250, Imlac PDS-1, and DEC GT40. There was a home gaming system that used vector graphics called Vectrex as well as various arcade games like Asteroids , Space Wars and many cinematronics titles such as "rip off", "tail gunner", "Armor Attack" and "Boxing Bugs" using vector monitors. Storage scope displays, such as the Tektronix 4014, could display vector images but not modify them without first erasing the display.

In computer typography, modern outline fonts describe printable characters (glyphs) by cubic or quadratic mathematical curves with control points.[10] Nevertheless, bitmap fonts are still in use. Converting outlines requires filling them in; converting to bitmaps is not trivial, because bitmaps often don't have sufficient resolution to avoid "stairstepping" ("aliasing"), especially with smaller visible character sizes. Processing outline character data in sophisticated fashion to create satisfactory bitmaps for rendering is called "hinting". Although the term implies suggestion, the process is deterministic, and done by executable code, essentially a special-purpose computer language. While automatic hinting is possible, results can be inferior to that done by experts.

Modern vector graphics displays can sometimes be found at laser light shows, where two fast-moving X-Y mirrors position the beam to rapidly draw shapes and text as straight and curved strokes on a screen.

Vector graphics can be created in form using a pen plotter, a special type of printer that uses a series of ballpoint and felt-tip pens on a servo-driven mount that moves horizontally across the paper, with the plotter moving the paper back and forth through its paper path for vertical movement. Although a typical plot might easily require a few thousand paper motions, back and forth, the paper doesn't slip. In a tiny roll-fed plotter made by Alps in Japan, teeth on thin sprockets indented the paper near its edges on the first pass, and maintained registration on subsequent passes.

Some Hewlett-Packard pen plotters had two-axis pen carriers and stationery paper (plot size was limited). However, the moving-paper H-P plotters had grit wheels (akin to machine-shop grinding wheels) which, on the first pass, indented the paper surface, and collectively maintained registration.

Present-day vector graphic files such as engineering drawings are typically printed as bitmaps, after vector-to-raster conversion.

The term "vector graphics" is mainly used today in the context of two-dimensional computer graphics. It is one of several modes an artist can use to create an image on a raster display. Other modes include text, multimedia, and 3D rendering. Virtually all modern 3D rendering is done using extensions of 2D vector graphics techniques. Plotters used in technical drawing still draw vectors directly to paper.

Typical primitive objects[edit]

Any particular vector file format supports only some kinds of primitive objects. Nearly all vector file formats support simple and fast-rendering primitive objects:

Most vector file formats support

A few vector file formats support more complex objects as primitives:

If an image stored in one vector file format is converted to another file format that supports all the primitive objects used in that particular image, then the conversion can be lossless.

Vector operations[edit]

Vector graphics editors typically allow rotation, movement (without rotation), mirroring, stretching, skewing, affine transformations, changing of z-order (loosely, what's in front of what) and combination of primitives into more complex objects.

More sophisticated transformations include set operations on closed shapes (union, difference, intersection, etc.).

Vector graphics are ideal for simple or composite drawings that need to be device-independent, or do not need to achieve photo-realism. For example, the PostScript and PDF page description languages use a vector graphics model.

Compared to raster graphics[edit]

Advantages to this style of drawing over raster graphics:

For example, consider a circle of radius r.[11] The main pieces of information a program needs in order to draw this circle are

  1. an indication that what is to be drawn is a circle
  2. the radius r
  3. the location of the center point of the circle
  4. stroke line style and color (possibly transparent)
  5. fill style and color (possibly transparent)

Vector formats are not always appropriate in graphics work and also have numerous disadvantages.[12] For example, devices such as cameras and scanners produce essentially continuous-tone raster graphics that are impractical to convert into vectors, and so for this type of work, an image editor will operate on the pixels rather than on drawing objects defined by mathematical expressions. Comprehensive graphics tools will combine images from vector and raster sources, and may provide editing tools for both, since some parts of an image could come from a camera source, and others could have been drawn using vector tools.


To raster[edit]

Modern displays and printers are raster devices; vector formats have to be converted to raster format (bitmaps – pixel arrays) before they can be rendered (displayed or printed). The size of the bitmap/raster-format file generated by the conversion will depend on the resolution required, but the size of the vector file generating the bitmap/raster file will always remain the same. Thus, it is easy to convert from a vector file to a range of bitmap/raster file formats but it is much more difficult to go in the opposite direction, especially if subsequent editing of the vector picture is required. It might be an advantage to save an image created from a vector source file as a bitmap/raster format, because different systems have different (and incompatible) vector formats, and some might not support vector graphics at all. However, once a file is converted from the vector format, it is likely to be bigger, and it loses the advantage of scalability without loss of resolution. It will also no longer be possible to edit individual parts of the image as discrete objects. The file size of a vector graphic image depends on the number of graphic elements it contains; it is a list of descriptions.

From raster[edit]


Vector art is ideal for printing since the art is made from a series of mathematical curves, it will print very crisply even when resized.[13] For instance, one can print a vector logo on a small sheet of copy paper, and then enlarge the same vector logo to billboard size and keep the same crisp quality. A low-resolution raster graphic would blur or pixelate excessively if it were enlarged from business card size to billboard size. (The precise resolution of a raster graphic necessary for high-quality results depends on the viewing distance; e.g., a billboard may still appear to be of high quality even at low resolution if the viewing distance is great enough.)[14]

If we regard typographic characters as images, then the same considerations that we have made for graphics apply even to composition of written text for printing (typesetting). Older character sets were stored as bitmaps. Therefore, to achieve maximum print quality they had to be used at a given resolution only; these font formats are said to be non-scalable. High quality typography is nowadays based on character drawings (fonts) which are typically stored as vector graphics, and as such are scalable to any size. Examples of these vector formats for characters are Postscript fonts and TrueType fonts.

3D modeling[edit]

Main article: 3D modeling

In 3D computer graphics, vectorized surface representations are most common (bitmaps can be used for special purposes such as surface texturing, height-field data and bump mapping). At the low-end, simple meshes of polygons are used to represent geometric detail in applications where interactive frame rates or simplicity are important. At the high-end, where one is willing to trade-off higher rendering times for increased image quality and precision, smooth surface representations such as Bézier patches, NURBS or Subdivision surfaces are used. One can, however, achieve a smooth surface rendering from a polygonal mesh through the use of shading algorithms such as Phong and Gouraud.


Main article: Vector formats

The list of proprietary and public vector formats is maintained in the main article.

See also[edit]


  1. ^ "Vector Graphics Overview". Retrieved 2014-06-16. 
  2. ^ "Overview of Vector Graphics (Windows)". Retrieved 2014-06-16. 
  3. ^ Arie Kaufman (1993). Rendering, Visualization and Rasterization Hardware. Springer Science & Business Media. pp. 86–87. ISBN 978-3-540-56787-5. 
  4. ^ Nigel Chapman; Jenny Chapman (2002) [2000]. Digital Multimedia. Wiley. p. 86. ISBN 0-471-98386-1. 
  5. ^ a b c Nigel Chapman; Jenny Chapman (2002) [2000]. Digital Multimedia. Wiley. p. 70. ISBN 0-471-98386-1. 
  6. ^, p. 7
  7. ^ Rex van der Spuy (2010). AdvancED Game Design with Flash. Apress. p. 306. ISBN 978-1-4302-2739-7. 
  8. ^ Ted Landau (2000). Sad Macs, Bombs and Other Disasters (4th ed.). Peachpit Press. p. 409. ISBN 978-0-201-69963-0. 
  9. ^ Amy Arntson (2011). Graphic Design Basics (6th ed.). Cengage Learning. p. 194. ISBN 1-133-41950-X. 
  10. ^ "Fonts – SVG 1.1 (Second Edition)". 2011-08-16. Retrieved 2014-06-16. 
  11. ^ "ASCIIsvg: Easy mathematical vector graphics". Retrieved 2014-06-16. 
  12. ^ "Vector Graphics". Retrieved 2014-06-16. 
  13. ^ "Vector & Raster Graphics in Offset Printing - Olympus Press - Commercial Printing". Retrieved 2014-06-16. 
  14. ^ "Printing and Exporting (Graphics)". 2002-06-18. Retrieved 2014-06-16. 

External links[edit]