Chapter 1: Introduction to Computer Graphics
Computer Graphics (CG) is a sub-field of computer science which studies methods for digitally synthesizing and manipulating visual content. Although the term often refers to the study of three-dimensional computer graphics, it also encompasses two-dimensional graphics and image processing.
What is Computer Graphics?
At its core, Computer Graphics is about the conversion of data into a visual representation that a human can perceive and understand. This involves several key processes:
- Modeling: Creating a digital representation of an object or scene.
- Rendering: The process of generating an image from a model by means of computer programs.
- Animation: Creating the illusion of motion through a sequence of static images.
- Interaction: Techniques for human-computer interaction through visual feedback.
Applications of Computer Graphics
The applications of CG are vast and touch almost every aspect of modern life:
- Entertainment: Movies (CGI, special effects), video games, and virtual reality.
- Computer-Aided Design (CAD): Used in engineering, architecture, and manufacturing to create precise models of physical objects.
- Scientific Visualization: Representing complex data sets (e.g., weather patterns, molecular structures, medical scans) in a visual format to aid analysis.
- Education and Training: Simulators (flight, surgical), educational software, and interactive textbooks.
- User Interfaces (GUI): The visual elements of operating systems and applications (windows, icons, menus).
- Digital Art: Tools for painting, sculpting, and designing digitally.
Raster vs. Vector Graphics
The two primary ways of representing digital images are Raster and Vector.
Raster Graphics
Raster graphics (or bitmap graphics) represent an image as a rectangular grid of pixels (picture elements). Each pixel contains specific color information.
- Characteristics:
- Resolution-dependent: Scaling up leads to pixelation (loss of quality).
- Ideal for complex images with many colors and gradients (e.g., photographs).
- Large file sizes, especially at high resolutions.
- Common Formats: JPEG, PNG, GIF, BMP, TIFF.
Vector Graphics
Vector graphics represent an image using mathematical formulas that define geometric primitives such as points, lines, curves, and polygons.
- Characteristics:
- Resolution-independent: Can be scaled infinitely without losing quality.
- Ideal for logos, icons, and illustrations with clean lines and flat colors.
- Small file sizes as only mathematical descriptions are stored.
- Common Formats: SVG, AI, EPS, PDF (can contain both).
Display Devices
The evolution of display technology has been a primary driver for the advancement of computer graphics.
Cathode Ray Tube (CRT)
The CRT was the standard display technology for decades. It uses an electron gun to fire a beam of electrons at a phosphor-coated screen.
- Mechanism: A heated filament (cathode) emits electrons, which are focused and deflected by magnetic fields to sweep across the screen in a raster pattern. When the electrons hit the phosphor, it glows.
- Pros: Excellent color reproduction, high contrast, no native resolution (can display multiple resolutions sharply).
- Cons: Bulky, heavy, high power consumption, flicker, emits small amounts of radiation.
Liquid Crystal Display (LCD)
LCDs replaced CRTs as the dominant display technology. They use liquid crystals to block or allow light to pass through.
- Mechanism: A backlight (usually LEDs or CCFLs) provides light. Liquid crystals are sandwiched between two polarizing filters. Applying an electric charge twists the crystals, changing the polarization of the light and determining how much passes through the second filter.
- Pros: Thin, light, low power consumption, no flicker.
- Cons: Fixed native resolution (scaling looks blurry), limited viewing angles, slower response times compared to CRT/OLED.
Light Emitting Diode (LED)
Modern "LED monitors" are actually LCD monitors that use LEDs for backlighting instead of older CCFL tubes. However, true LED displays (like OLED) exist.
- OLED (Organic LED): Each pixel is its own light source (self-emissive).
- Pros: Infinite contrast (true blacks), extremely thin, wide viewing angles, fast response times.
- Cons: Expensive, potential for "burn-in", shorter lifespan for blue subpixels.
- MicroLED: Uses tiny, non-organic LEDs for each pixel. It aims to combine the benefits of OLED without the drawbacks (no burn-in).
Summary
Understanding the fundamental principles of how images are represented and displayed is crucial for any computer graphics professional. From the mathematical precision of vectors to the grid-based reality of raster images and the physical hardware that brings them to life, these concepts form the foundation of the field.