Skip to main content

Introduction to Computer Graphics

Learning Objectives

By the end of this page, you will be able to:

  • Define computer graphics and distinguish it from image processing and computer vision.
  • Trace the major milestones in the history of computer graphics and explain why each mattered.
  • Explain the core concepts that every graphics pipeline relies on: coordinate systems, color models, transformations, projections, and lighting.
  • Identify the tools, libraries, and engines used by graphics professionals and match them to the right use case.
  • Describe real-world applications of computer graphics across entertainment, science, and industry.
  • Recognize common beginner misconceptions about how computer-generated images are produced.

Quick Answer

Computer graphics is the branch of computer science concerned with generating, manipulating, and displaying visual content using a computer. It covers everything from drawing a single line on screen to rendering a photorealistic 3D scene in a movie. It matters because almost every modern interface — games, films, medical scans, engineering simulations, phone UIs — is built on graphics techniques: representing shapes numerically, transforming them mathematically, and converting them into pixels a screen can display. Without computer graphics, there would be no GUIs, no CAD software, no visual effects, and no way to "see" data that isn't naturally visual, like an MRI scan or a weather simulation.

What Is Computer Graphics?

Computer graphics is the field of creating, manipulating, and displaying images using a computer. That single sentence hides three very different jobs, and it helps to separate them:

  • Creation — describing a shape or scene numerically (a triangle's three corner points, a curve's control points, a light's position and color).
  • Manipulation — moving, rotating, scaling, deforming, or animating that numerical description.
  • Display — converting the numerical description into pixels on a screen, a process called rendering.

A useful way to think about it: a 3D model of a chair is not a picture of a chair. It's a list of numbers (vertex coordinates, colors, texture references). Computer graphics is the set of techniques that turns that list of numbers into an image you can actually look at, and that lets you change the numbers to move or reshape the chair before you do.

Why it matters: Graphics is the layer between raw data and human perception. Doctors "see" a tumor because a CT scanner's numeric data was rendered into an image; engineers "see" airflow over a wing because a simulation's output was visualized. Graphics turns abstract numbers into something a human can reason about at a glance.

Common misunderstanding: Students often confuse computer graphics with photo editing or "making things look pretty." In reality, most of the field is mathematics and systems engineering — linear algebra for transformations, physics for lighting, and highly optimized hardware pipelines for speed. The artistic result is the visible tip of a much larger computational iceberg.

A Brief History

Computer graphics didn't appear overnight — it grew alongside computing hardware itself, and each era solved a specific bottleneck.

  • 1962: Ivan Sutherland's Sketchpad is often cited as the first interactive graphics program, letting a user draw and manipulate shapes directly with a light pen. This proved a computer could be used as a visual, interactive tool rather than just a number-cruncher.
  • 1970s: Vector graphics systems (drawing images as lines rather than pixel grids) were common because early displays and memory were extremely limited — storing a full grid of pixels was too expensive.
  • 1980s: Falling memory costs made raster graphics (pixel-grid images) practical, and 3D modeling and rendering techniques (like Phong shading, covered later in this unit) matured.
  • 1990s: Consumer 3D graphics accelerators and game engines emerged, moving real-time rendering out of research labs and into living rooms.
  • 2000s onward: Programmable GPUs made ray tracing and physically-based rendering practical even for real-time applications, a trend that continues today with hardware ray-tracing cores.

Why it matters: Each leap happened because a hardware constraint (memory, processing speed) loosened. Understanding this history helps you see why techniques exist — for example, why flat and Gouraud shading (simpler, cheaper) came before ray tracing (expensive, realistic): the hardware simply couldn't afford the expensive approach yet.

Core Concepts in Computer Graphics

These five ideas are the foundation for everything else in this unit — later chapters build directly on them.

Coordinate Systems

Definition: A coordinate system is a way of assigning numbers to positions in space so that shapes can be described mathematically.

Explanation: Cartesian coordinates (x, y, or x, y, z) are the default in graphics because they map cleanly onto matrix operations. Polar and spherical coordinates are useful when a problem is naturally described by angle and distance — for example, orbiting a camera around an object.

Example: A point at (3, 4) in Cartesian coordinates is at distance 5 and angle 53.1° from the origin in polar coordinates — the same location, two descriptions.

Real-world example: Game cameras that "orbit" a character often store the camera position in spherical coordinates (distance, yaw, pitch) because it's far easier to say "rotate 5° around the character" than to recompute new x, y, z values by hand.

Why it matters: Every transformation, every rendering calculation, starts from a coordinate system. Pick the wrong one and simple operations become needlessly complex.

Common misunderstanding: Students assume Cartesian coordinates are the only "correct" system. In practice, graphics programmers switch between coordinate systems constantly (object space, world space, camera space, screen space) — mastering these conversions is a core skill covered in the Transformations chapter.

Color Models

Definition: A color model is a mathematical scheme for representing color as numbers.

Explanation: RGB (red, green, blue) is an additive model used for screens, which emit light. CMYK (cyan, magenta, yellow, black) is a subtractive model used for print, which reflects light. Color spaces like sRGB and Adobe RGB define exactly which shades a given set of RGB numbers correspond to, since not every device reproduces the "same" red identically.

Example: Pure red on screen is RGB(255, 0, 0). Printing that same red requires ink combinations expressed in CMYK, because print media absorbs rather than emits light.

Real-world example: A photo that looks vivid on a phone screen (RGB) can look dull when printed (CMYK) if the color space isn't converted correctly — a common frustration in photography and design.

Why it matters: Choosing the right color model affects visual accuracy across devices, and mismatches cause the "why does my photo look different when printed" problem.

Common misunderstanding: Beginners think color is just "the number you type in." In reality, the same RGB value can look different across two monitors if their calibration or color space differs — color is device-dependent unless a standard color space is specified.

Geometric Transformations

Definition: Operations that change an object's position, orientation, or size: translation, rotation, scaling, and shearing.

Explanation: Every one of these can be expressed as a matrix multiplication, which lets a computer combine multiple transformations (say, rotate then scale then move) into a single efficient operation. This is explored in depth in the "2D and 3D Transformations" chapter.

Example: Sliding a square 5 units to the right is a translation; spinning it 90° around its center is a rotation.

Real-world example: When you pinch-to-zoom on a map app, the app applies a scaling transformation to every point on the map in real time.

Why it matters: Animation, in essence, is just applying small transformations repeatedly across frames.

Common misunderstanding: Students think rotation and translation always "commute" (order doesn't matter). It does — rotating then translating gives a different result than translating then rotating, which is a frequent source of animation bugs.

Projections

Definition: The mathematical process of mapping 3D coordinates onto a 2D screen.

Explanation: Perspective projection mimics human vision — distant objects appear smaller — and is used in games and films. Orthographic projection preserves relative size regardless of distance and is used in technical/engineering drawings where accurate measurement matters more than realism.

Example: Two identical cubes at different distances from the camera appear as different sizes under perspective projection but the same size under orthographic projection.

Real-world example: CAD software (used by architects and engineers) defaults to orthographic views so that a 10-meter wall always measures as 10 meters on screen, regardless of camera distance.

Why it matters: Choosing the wrong projection produces misleading or unusable images — a floor plan drawn in perspective would be useless for construction.

Common misunderstanding: Beginners assume "more realistic" projection is always better. For technical work, geometric accuracy (orthographic) is more valuable than visual realism (perspective).

Lighting Models

Definition: Mathematical approximations of how light interacts with surfaces, used to make 3D scenes look three-dimensional and realistic.

Explanation: Ambient light simulates indirect, scattered light so nothing is ever pure black; diffuse lighting simulates light scattering evenly off a rough surface; specular highlights simulate the bright, mirror-like reflection you see on shiny surfaces.

Example: A matte rubber ball mostly shows diffuse lighting (a soft gradient), while a polished metal ball shows a sharp specular highlight.

Real-world example: Car configurator websites use strong specular highlights on the paint and glass to make renders look "showroom-polished."

Why it matters: Lighting is what separates a flat, cartoonish image from one that reads as solid and three-dimensional. This is expanded fully in the "Shading and Rendering Techniques" chapter.

Common misunderstanding: Students think realistic lighting requires ray tracing. Basic diffuse and specular models (decades old) already produce convincing results for most real-time applications; ray tracing adds accurate shadows, reflections, and indirect light on top of that foundation.

Visual Learning

This flow is the backbone of the entire unit: every chapter that follows zooms into one box of this diagram — hardware that executes it (Graphics Hardware), the math behind transformations (2D and 3D Transformations), and the lighting math (Shading and Rendering Techniques).

Tools and Software Used in Computer Graphics

Knowing what each tool is for matters more than memorizing names:

  • 3D modeling software (Blender, 3ds Max, Maya) — used to build and sculpt 3D geometry before it's animated or rendered.
  • Game engines (Unity, Unreal Engine) — combine rendering, physics, and interactivity into a complete real-time application framework.
  • Graphics APIs/libraries (OpenGL, DirectX, Vulkan) — low-level interfaces that let programs talk directly to the GPU to draw pixels efficiently.
  • Code editors/IDEs (VS Code, etc.) — used to write shader code and graphics application logic.

Why it matters: A 3D artist and a graphics programmer use almost entirely different tools from this list, even though they both work "in computer graphics" — the field spans both creative and highly technical roles.

Real-World Applications

  • Entertainment — film VFX, video games, and virtual reality all rely on real-time or offline rendering pipelines.
  • Scientific visualization — medical imaging (CT/MRI reconstruction), climate modeling, and astrophysical simulations turn numeric data into images scientists can interpret.
  • Architecture and engineering — CAD tools use orthographic projection and precise transformations for design and structural analysis.
  • Education — interactive simulations and virtual labs let students manipulate 3D representations of concepts that are hard to visualize otherwise.
  • Healthcare — surgical planning software and patient-specific implant design depend on accurate 3D reconstruction from scan data.

Why students should care: Even outside a "graphics job," these skills apply directly to data science (visualization), robotics (spatial reasoning), and UI/UX design (rendering pipelines power every screen).

Key Terms

TermDefinition
RenderingThe process of converting a numeric scene description into a 2D image of pixels.
Raster graphicsImages represented as a grid of pixels, each with its own color value.
Vector graphicsImages represented as mathematical shapes (lines, curves) rather than pixel grids.
Coordinate systemA scheme (Cartesian, polar, spherical) for assigning numbers to positions in space.
RGB / CMYKAdditive (screen) and subtractive (print) color models, respectively.
TransformationAn operation — translation, rotation, scaling, shearing — that changes an object's position, orientation, or size.
ProjectionThe mapping of 3D coordinates onto a 2D plane (perspective or orthographic).
ShadingThe process of computing a surface's color based on lighting and material properties.
GPUGraphics Processing Unit — specialized hardware that accelerates rendering computations.

Common Mistakes

Misconception 1: "Computer graphics is mostly about artistic skill, not math or programming." Why it's wrong: Artistic judgment matters for content creation, but the underlying pipeline — transformations, projections, lighting equations, memory management on the GPU — is applied linear algebra and systems programming. Correct understanding: Computer graphics is an engineering discipline with an artistic output; most professional roles (rendering engineer, graphics programmer) require strong math and programming skills, not drawing ability.

Misconception 2: "A 3D model is basically a photograph of an object." Why it's wrong: A photograph is a fixed 2D grid of pixels; a 3D model is a numeric description (vertices, edges, faces, materials) that must be rendered from a chosen viewpoint before it becomes an image at all. Correct understanding: The same 3D model can produce infinitely many different images depending on camera position, lighting, and projection choices.

Misconception 3: "More realistic rendering (like ray tracing) is always the better choice." Why it's wrong: Realism costs computation time. Real-time applications like games historically favored rasterization and simplified lighting models precisely because ray tracing was too slow for interactive frame rates. Correct understanding: The right rendering technique depends on the trade-off between required realism and available time/hardware — engineering drawings, for instance, prioritize accuracy over realism entirely.

Comparison and Connections

ConceptRaster GraphicsVector Graphics
RepresentationGrid of pixelsMathematical shapes (lines, curves)
Scaling behaviorLoses quality when enlargedScales without quality loss
Typical usePhotographs, rendered 3D scenesLogos, icons, technical illustrations
File size driverResolution (image dimensions)Shape complexity
ConceptPerspective ProjectionOrthographic Projection
Distant objectsAppear smallerAppear the same size regardless of distance
Primary goalVisual realismMeasurement accuracy
Typical useGames, filmsCAD, engineering drawings

Practice Questions

Recall

  1. What are the three core activities involved in computer graphics? Answer guidance: Creation (describing shapes numerically), manipulation (transforming that description), and display/rendering (converting it into pixels).
  2. Name the two major color models discussed and the type of device each is designed for. Answer guidance: RGB for screens (additive/light-emitting); CMYK for print (subtractive/light-reflecting).

Understanding

  1. Why did vector graphics dominate in the 1970s but raster graphics take over in the 1980s? Answer guidance: Early memory and display hardware couldn't afford to store a full pixel grid, so vector (line-based) representations were cheaper; falling memory costs later made storing full pixel grids (raster) practical.
  2. Explain why the same 3D model can produce very different images depending on the projection used. Answer guidance: Perspective projection scales objects by distance to mimic human vision, while orthographic projection preserves true relative size — the same geometry, different mapping rules onto 2D.

Application

  1. An architecture firm needs software to produce accurate floor plans for a construction crew. Which type of projection should the software use, and why? Answer guidance: Orthographic projection, because measurements must remain accurate regardless of viewing distance; perspective would distort real-world dimensions.
  2. A mobile game needs to render complex 3D scenes at 60 frames per second on limited hardware. Would you recommend ray tracing or rasterization, and why? Answer guidance: Rasterization, because it is far less computationally expensive and can meet real-time frame-rate requirements; ray tracing's realism comes at a speed cost that may not fit the hardware budget.

Analysis

  1. Compare raster and vector graphics for the task of designing a company logo that will be used at sizes from a business card to a billboard. Which is more appropriate and why? Answer guidance: Vector graphics, since the logo must scale without quality loss; raster images would pixelate at large sizes unless captured at extremely high resolution.
  2. A student claims that adding ray tracing to any application automatically makes it "better." Evaluate this claim using the ideas of trade-offs discussed in this chapter. Answer guidance: The claim is oversimplified — ray tracing improves visual realism (accurate reflections, shadows, indirect light) but at a significant computational cost; "better" depends on whether the application values realism over speed (e.g., a film render can afford it, a real-time mobile game usually cannot).

FAQ

Q1: Is computer graphics the same as computer vision? No. Computer graphics generates images from numeric data (synthesis); computer vision extracts information from existing images (analysis). They are often described as inverse problems of each other.

Q2: Do I need to be good at drawing to work in computer graphics? No. Many graphics careers — graphics programmer, rendering engineer, GPU architect — are almost entirely mathematics and programming. Artistic roles (3D artist, animator) exist alongside these technical ones.

Q3: Why do games look "flatter" than movies even though both use 3D graphics? Games must render 30-60+ images every second, so they use faster, approximate lighting techniques. Movies render each frame over minutes or hours, affording much more expensive and accurate lighting calculations like ray tracing.

Q4: What math do I actually need for computer graphics? Linear algebra (vectors, matrices) is essential for transformations and projections; trigonometry is needed for rotations; some calculus and physics knowledge helps with advanced lighting and simulation.

Q5: What's the difference between a graphics API (like OpenGL) and a game engine (like Unity)? A graphics API is a low-level toolkit for talking directly to the GPU (drawing triangles, managing memory). A game engine is a much larger framework built on top of one or more graphics APIs, adding physics, scripting, audio, and tools — Unity itself uses lower-level APIs internally.

Quick Revision

  • Computer graphics = creation + manipulation + display (rendering) of visual data.
  • 1962 Sketchpad → interactive graphics; 1980s → raster graphics and 3D modeling matured; 2000s → GPU-accelerated ray tracing.
  • Raster graphics = pixel grid (photos); vector graphics = mathematical shapes (logos, scalable without quality loss).
  • RGB is additive (screens); CMYK is subtractive (print).
  • Core transformations: translation, rotation, scaling, shearing — all expressible as matrices.
  • Perspective projection = realism (distant objects shrink); orthographic projection = accurate measurement (size preserved).
  • Lighting models (ambient, diffuse, specular) make flat 3D shapes look solid.
  • GPUs are specialized hardware that accelerate the rendering pipeline.
  • Graphics is applied math and systems engineering as much as it is art.
  • Real-time applications (games) trade realism for speed; offline rendering (film) trades speed for realism.
  • Fields relying on computer graphics: entertainment, medicine, engineering, education, and data visualization.

Prerequisites: Basic algebra and coordinate geometry; familiarity with vectors is helpful but not required at this stage.

Related Topics: Linear Algebra and Probability for Computer Science (matrices, used throughout graphics); Digital Logic Design (hardware fundamentals underlying GPUs).

Next Topics: Graphics Hardware (how GPUs execute the rendering pipeline); 2D and 3D Transformations (the matrix math behind translation, rotation, and scaling); Shading and Rendering Techniques (how lighting models produce realistic images).