The books
Paul Orland’s Math for Programmers: 3D Graphics, Machine Learning, and Simulations develops math by writing programs. Part 1 of this path draws most directly on chapter 2 for 2D vectors, chapters 4 and 5 for transformations and matrices, chapter 8 for rates of change, and chapter 9 for motion. The examples on this site are new teaching examples; they are not copied from the book.
Oleksandr Kaleniuk’s Geometry for Programmers supplies a geometric vocabulary for programming. The most relevant parts here are chapter 2, section 2.1 on points and vectors; chapter 4, sections 4.1–4.2 on translation, scaling, rotation, and affine transformations; chapter 5, section 5.1 on derivatives; and chapter 9, section 9.1 on vector operations. Later chapters go far beyond this introductory path.
Public references
- MDN, Drawing shapes with canvas explains the screen grid and the upper-left origin used in the first lesson.
- Godot Engine, Vector math connects coordinates, offsets, direction, length, normalization, and the dot product to game development.
- Godot Engine, Matrices and transforms explains the structure behind translation, rotation, and scale.
- Godot Engine, Viewport and canvas transforms shows why local, canvas, and screen coordinates can differ.
- Godot Engine, Interpolation covers lerp and smooth movement.
- Godot Engine, Random number generation covers random ranges, seeds, and shuffling.
- OpenStax Precalculus 2e, section 5.1 introduces radians and converting between degrees and radians.
- Fisher–Yates shuffle describes the fair shuffle and why the naive version is biased.
- Red Blob Games, Introduction to the A* algorithm is an interactive explanation of breadth-first search, Dijkstra’s algorithm, and A*.
How to read the lessons
A worked example demonstrates a mathematical rule under the assumptions stated beside it. It is not a claim that every graphics tool uses identical units or screen directions. Code samples are written for Godot 4 and kept short for clarity; check the engine’s current documentation when you apply an idea in a project.
