This topic covers the fundamentals of computer graphics, including the history, basic principles, and the role of computer graphics in various industries.
Introduction to Computer Graphics
Key concepts, terminology, and foundational techniques
| Aspect | Description |
|---|---|
| Definition | The creation, manipulation, and representation of visual data using computers. |
| Goal | Transform data into images that can be displayed on screens, printed, or used in virtual environments. |
| Main Domains | 1. 2‑D Graphics – UI design, vector illustration, raster imaging. 2. 3‑D Graphics – Modeling, animation, rendering, virtual reality. |
| Typical Applications | Video games, movies, scientific visualization, CAD, UI/UX design, AR/VR, medical imaging, simulation. |
Visualization
![Simplified graphics pipeline diagram] (imagine a flowchart from Modeling → Display)
| Topic | Why It Matters | Typical Use |
|---|---|---|
| Vectors & Points | Represent positions, directions, and colors. | Vertex coordinates, normals, light vectors. |
| Matrices | Encode linear transformations (rotate, scale, translate). | Model, view, and projection matrices. |
| Homogeneous Coordinates | Allow translation to be expressed as matrix multiplication. | 4×4 transformation matrices. |
| Dot & Cross Products | Compute angles, projections, and normals. | Lighting calculations, back‑face culling. |
| Interpolation | Smoothly vary values across primitives. | Gouraud shading, texture mapping. |
| Linear Interpolation (LERP) | Blend between two values. | Animation blending, morph targets. |
| Barycentric Coordinates | Express a point inside a triangle as a weighted sum of vertices. | Texture mapping, rasterization. |
| Concept | Description | Common APIs |
|---|---|---|
| Raster Images | Grid of pixels; each pixel stores color (RGB, RGBA). | HTML5 Canvas, GDI+, Pillow (Python). |
| Vector Graphics | Geometry defined by mathematical equations (lines, curves). | SVG, PDF, OpenVG. |
| Color Models | RGB, CMYK, HSV, HSL, YUV. | Color manipulation, blending. |
| Alpha Blending | Combine foreground/background using transparency. | Porter‑Duff compositing. |
| Transformations | 2‑D translation, rotation, scaling, shear. | CSS transforms, Canvas setTransform. |
| Clipping | Restrict drawing to a defined region (viewport). | Scissor test, CSS clip-path. |
| Representation | Typical Data | Pros / Cons |
|---|