Foundations of Vector Graphics
Understand vector graphics basics, geometric primitives and parametric curves, and lossless format conversion.
Summary
Read Summary
Flashcards
Save Flashcards
Quiz
Take Quiz
Quick Practice
By what geometric elements are vector shapes described rather than pixels?
1 of 9
Summary
Vector Graphics: Definitions and Data Models
What Are Vector Graphics?
Vector graphics represent images using mathematical descriptions of geometric shapes rather than individual colored pixels. When you create a vector graphic, you're defining shapes like circles, lines, and polygons using coordinates and equations. This is fundamentally different from how other digital images work.
To understand why this matters, imagine you're drawing a simple letter "S". A vector graphic describes it using smooth curves and mathematical instructions. A raster graphic, by contrast, stores it as a grid of individual colored squares—much like a checkerboard where each square is a pixel.
Notice how the raster version on the left becomes blocky when you look closely, while the vector version on the right remains smooth and sharp. This difference becomes even more dramatic when you scale images up or down.
Vector Graphics vs. Raster Graphics
The fundamental distinction between these two approaches determines which format you should use for different tasks.
Raster graphics store images as a rectangular grid of pixels. Each pixel holds a single color value. If you zoom in far enough on any raster image, you'll see the individual colored squares. Raster images work beautifully for photographs and complex continuous-tone images because they can represent every subtle color variation. However, they have a major limitation: if you enlarge a raster image beyond its original size, the individual pixels become visible, and the image looks blurry or blocky.
Vector graphics store mathematical descriptions of shapes instead. A circle isn't a collection of pixels—it's a description that says "draw a circle with center at (100, 100) and radius 50." This approach has a remarkable advantage: you can scale a vector graphic to any size without any loss of quality. The computer simply recalculates the shape description for the new size. The letter "S" looks perfectly sharp whether it's one inch or one foot tall.
The trade-off is that raster graphics excel at representing complex, realistic imagery (like photographs), while vector graphics work best for clean geometric designs like logos, diagrams, and architectural plans.
When Vector Graphics Are Used
Different fields choose vector or raster graphics based on their needs. Engineering, architecture, and surveying rely heavily on vector graphics because they need geometric precision—a blueprint must be exact, and scaling must preserve accuracy. Typography (the design of typefaces) uses vector graphics so that letters look crisp at any size. 3D rendering often begins with vector descriptions of surfaces and shapes.
Geographic information systems (GIS) frequently combine both: they might store road networks as vector data (precise lines connecting specific coordinates) while using raster data for aerial photographs or satellite imagery. Graphic design similarly mixes formats—perhaps vector logos on top of raster photographs.
In contrast, photography and remote sensing (satellite imagery, thermal imaging, etc.) generate only raster data because cameras and sensors capture continuous-tone information pixel by pixel.
The Mathematical Foundation: Coordinate Geometry
Vector graphics are built on coordinate geometry. A point is the most basic element, defined by coordinates in space. In two dimensions, we write $p = (x, y)$. In three dimensions, we write $p = (x, y, z)$. These coordinates tell us exactly where the point is located on an invisible coordinate plane (or grid in 3D space).
Shapes are constructed from a finite set of important points called vertices (the plural of vertex). These vertices mark key positions that define the shape. The shape is then described by how these vertices connect—the computer fills in the details mathematically.
Geometric Primitives: Building Blocks of Vector Graphics
Vector graphics use several basic building blocks, each defined mathematically:
A point is a single location in space with no size or dimension. It's just coordinates: $(x, y)$ or $(x, y, z)$.
A line segment connects two points in a straight line. You define it by specifying the coordinates of its two endpoints. The computer knows that everything between those endpoints forms a straight path.
A polyline (also called a polygonal chain) is a series of connected line segments. You provide a list of points in order, and the computer connects each point to the next with a straight line. Polylines let you create zigzag patterns, angular shapes, and open paths.
A polygon is a special polyline that closes itself—the last point connects back to the first point, creating a sealed shape with an inside and an outside. Polygons are crucial because they define regions of space. You can fill a polygon with a color or pattern.
Beyond Straight Lines: Curves and Complex Shapes
Straight line segments can feel stiff and geometric. To create smooth, flowing shapes, vector graphics use parametric curves. These curves pass through or near a set of control points, but instead of connecting them with straight lines, the curve flows smoothly.
Bézier curves are the most commonly used parametric curves in vector graphics. They're named after Pierre Bézier, and they work by interpolating (creating smooth transitions) between control points using a mathematical formula. Catmull-Rom splines and cubic splines are other types of parametric curves that create smooth interpolation.
For three-dimensional objects, standard shapes include spheres, circles, and ellipses (the 2D versions). Superellipses and superellipsoids are mathematical variations that create elongated or flattened versions of these shapes. When you need to represent irregular three-dimensional surfaces (like the surface of a face or a landscape), you use a polygon mesh—essentially a collection of small polygons fitted together like a patchwork quilt. For very complex smooth surfaces, NURBS (non-uniform rational B-splines) provide precise mathematical control.
Adding Information to Shapes: Attributes and Topology
A shape is more than just its geometry. Each shape can have visual attributes that determine how it appears: its color, how thick its outline is, whether the outline is solid or dashed, whether it's filled, and so on.
In professional applications like geographic information systems and building information modeling, shapes can store additional semantic attributes—information about what the shape represents. A polygon representing a building might store its address, construction date, and square footage. A line representing a road might store its name, speed limit, and surface type. These attributes let professionals organize, analyze, and query their data.
Topological information describes relationships between shapes. For example, in a road network, topological data records which road segments connect to which others, allowing you to trace routes or analyze network connectivity. Topology is abstract—it doesn't care about exact coordinates, just about which things are connected to what.
Preserving Quality: Format Conversion
One significant advantage of vector graphics is that you can convert them between different file formats without losing information, provided both formats support the same geometric primitives. Converting from SVG (a vector format) to EPS (another vector format) can be completely lossless—the geometry, attributes, and topology survive intact.
This is very different from converting a raster image: once you've stored an image as pixels, you can't recover fine details if you switch formats. But with vector data, the mathematical descriptions remain perfect through multiple conversions, as long as you don't convert down to a less capable format (for example, converting from NURBS to simple line segments would lose the smooth curve information).
Flashcards
By what geometric elements are vector shapes described rather than pixels?
Points, lines, curves, and polygons.
What is the primary advantage of storing mathematical descriptions in vector graphics compared to raster grids?
It allows for infinite scaling without loss of quality.
In the context of vector shapes, what is the term for the finite set of salient points that approximate a geometric point set?
Vertices.
What is the definition of a polyline (or polygonal chain)?
An ordered list of points connected by line segments.
What geometric primitive is formed when a polyline's first and last vertices coincide to define a region?
A polygon.
What type of information records relationships like connectivity between road segments in a network?
Topological information.
What condition must be met for a conversion between vector file formats to be considered lossless?
The target format must support all the primitives used in the original dataset.
How do raster graphics store image data?
As a grid of pixels, each with a fixed color value.
How is a point $p$ defined in three-dimensional space?
$p = (x, y, z)$.
Quiz
Foundations of Vector Graphics Quiz Question 1: How are points defined in the coordinate geometry used for vector graphics?
- $p = (x, y)$ in 2‑D or $p = (x, y, z)$ in 3‑D. (correct)
- As a single intensity value per pixel.
- By specifying color and opacity attributes.
- Through a sequence of connected line segments.
Foundations of Vector Graphics Quiz Question 2: What advantage does storing images as mathematical descriptions give vector graphics?
- They can be scaled infinitely without loss of quality (correct)
- They always use less memory than raster images
- They inherently support photographic realism
- They must be rasterized before any display
Foundations of Vector Graphics Quiz Question 3: Which of the following is NOT listed as a standard parametric shape?
- Cylinder (correct)
- Circle
- Ellipse
- Superellipse
Foundations of Vector Graphics Quiz Question 4: What does a single point represent in a vector graphic data model?
- A location with no dimension (correct)
- A line segment connecting two coordinates
- A closed shape that defines an area
- A color value assigned to a pixel
How are points defined in the coordinate geometry used for vector graphics?
1 of 4
Key Concepts
Graphics Types
Vector graphics
Raster graphics
NURBS (non‑uniform rational B‑splines)
Mathematical Concepts
Coordinate geometry
Bézier curve
Parametric curve
3D Modeling and GIS
Polygon mesh
Geographic information system (GIS)
Lossless conversion
Topology (in GIS)
Definitions
Vector graphics
A type of digital image that uses mathematical equations to represent geometric shapes, allowing infinite scaling without loss of quality.
Raster graphics
Digital images composed of a fixed grid of pixels, each with its own color value, best suited for photographs.
Coordinate geometry
The branch of mathematics that describes geometric shapes using coordinates on a Cartesian plane.
Bézier curve
A parametric curve frequently used in computer graphics and design, defined by control points that determine its shape.
NURBS (non‑uniform rational B‑splines)
Mathematical representations of 3D geometry that provide smooth, flexible surfaces using weighted control points.
Polygon mesh
A collection of vertices, edges, and faces that approximates the shape of a 3D object, commonly used in modeling and rendering.
Geographic information system (GIS)
A framework for gathering, managing, and analyzing spatial and geographic data, often integrating vector and raster layers.
Parametric curve
A curve defined by parametric equations that express the coordinates of points as functions of a variable, enabling smooth interpolation.
Lossless conversion
The process of translating data between file formats without any loss of information, preserving both geometry and attributes.
Topology (in GIS)
The study of spatial relationships and connectivity among geometric features, such as adjacency and network flow.