Scratchapixel 3.0


A free educational site that progressively introduces you to the world of computer graphics.

Our application programming approach guides you through small, easy-to-compile programs.

We’ve dispensed with unnecessary technical jargon in favor of everyday language.

Mathematics for Computer Graphics

Most common mathematical tools/techniques used in computer graphics/computer vision. Go through the lessons of the basic section first, and then eventually start reading these lessons as you go along.

  1. Geometry
  2. Matrix Inverse: Gauss-Jordan Method
  3. Interpolation
  4. Placing a Camera: the LookAt Function
  5. The Mathematics of Shading
  6. Mathematical Foundations of Monte Carlo Methods
  7. Monte Carlo Methods in Practice
  8. Quaternion Demystified
  9. An Introduction to Fourier Transform

3D Rendering for Beginners

Best read in chronological order (top to bottom).

  1. Introduction to Raytracing: A Simple Method for Creating 3D Images
  2. Where Do I Start? A Very Gentle Introduction to Computer Graphics Programming
  3. Rendering an Image of a 3D Scene: an Overview
  4. Computing the Pixel Coordinates of a 3D Point
  5. 3D Viewing: the Pinhole Camera Model
  6. Rasterization: a Practical Implementation
  7. The Perspective and Orthographic Projection Matrix
  8. An Overview of the Ray-Tracing Rendering Technique
  9. Ray-Tracing: Generating Camera Rays
  10. A Minimal Ray-Tracer: Rendering Simple Shapes (Sphere, Cube, Disk, Plane, etc.)
  11. Ray-Tracing: Rendering a Triangle
  12. Introduction to Polygon Meshes
  13. Ray-Tracing a Polygon Mesh
  14. Transforming Objects using Matrices
  15. Introduction to Shading
  16. The Phong Model, Introduction to the Concepts of Shader, Reflection Models and BRDF
  17. Global Illumination and Path Tracing
  18. Introduction to Acceleration Structures
  19. Volume Rendering for Developers: Foundations

3D Rendering for Beginners: Review

Before moving on to the next section (intermediate 3D rendering), let's review the essential concepts that we have learned so far. We will do so through a series of exercises and challenges for you to do (answers/solutions provided). Check the first lesson to read more...

  1. Your Mission, Should You Choose To Accept It...
  2. Let's Review Matrices and Projections
  3. Let's Review Ray-Tracing


Methods to define shapes in computer graphics.

  1. Bézier Curves and Surfaces: the Utah Teapot

Digital Imaging

Saving and reading images to/from disk, image file format, color spaces, color management, and simple image processing.

  1. Introduction to Light, Color and Color Space
  2. Digital Images: from File to Screen
  3. Simple Image Manipulations

Procedural Generation of Virtual Worlds

Pocedural simulation of natural phenomena.

  1. Value Noise and Procedural Patterns: Part 1
  2. Perlin Noise: Part 2
  3. Simulating the Colors of the Sky
  4. Simulating Ocean Waves