Lably
Skip to content

Vector graphics

Computer graphics images defined by points, lines and curves

  • 11 min read
  • 7 chapters

Related on Lably

Through Cartesian coordinate system, Point (geometry) and Curve

While vector hardware has largely disappeared in favor of raster-based monitors and printers, vector data and software continue to be widely used, especially when a high degree of geometric precision is required, and when complex information can be decomposed into simple geometric primitives. Thus, it is the preferred model for domains such as engineering, architecture, surveying, 3D rendering, and typography, but is entirely inappropriate for applications such as photography and remote sensing, where raster is more effective and efficient. Some application domains, such as geographic information systems (GIS) and graphic design, use both vector and raster graphics at times, depending on purpose.

Vector graphics are based on the mathematics of analytic or coordinate geometry, and is not related to other mathematical uses of the term vector. This can lead to some confusion in disciplines in which both meanings are used.

Data model

The logical data model of vector graphics is based on the mathematics of coordinate geometry, in which shapes are defined as a set of points in a two- or three-dimensional cartesian coordinate system, as p = (x, y) or p = (x, y, z). Because almost all shapes consist of an infinite number of points, the vector model defines a limited set of geometric primitives that can be specified using a finite sample of salient points called vertices. For example, a square can be unambiguously defined by the locations of three of its four corners, from which the software can interpolate the connecting boundary lines and the interior space. Because it is a regular shape, a square could also be defined by the location of one corner, a size (width=height), and a rotation angle.

The fundamental geometric primitives are:

  • A single point.
  • A line segment, defined by two end points, allowing for a simple linear interpolation of the intervening line.
  • A polygonal chain or polyline, a connected set of line segments, defined by an ordered list of points.
  • A polygon, representing a region of space, defined by its boundary, a polyline with coincident starting and ending vertices.

A variety of more complex shapes may be supported:

  • Parametric curves, in which polylines or polygons are augmented with parameters to define a non-linear interpolation between vertices, including circular arcs, cubic splines, Catmull–Rom splines, Bézier curves and bezigons.
  • Standard parametric shapes in two or three dimensions, such as circles, ellipses, squares, superellipses, spheres, tetrahedrons, superellipsoids, etc.
  • Irregular three-dimensional surfaces and solids, are usually defined as a connected set of polygons (e.g., a polygon mesh) or as parametric surfaces (e.g., NURBS).
  • Fractals, often defined as an iterated function system.

In many vector datasets, each shape can be combined with a set of properties. The most common are visual characteristics, such as color, line weight, or dash pattern. In systems in which shapes represent real-world features, such as GIS and BIM, a variety of attributes of each represented feature can be stored, such as name, age, size, and so on.

In some Vector data, especially in GIS, information about topological relationships between objects may be represented in the data model, such as tracking the connections between road segments in a transport network.

If a dataset 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.

Sign in to keep reading

6 more chapters are free with a Lably account.

More in Computing and communication