▦ MATRIX THINKING

PYTHON · NUMPY · PYGAME

Think in numbers.
Build whole worlds.

A matrix can become an image, a playing field, or a world seen through a camera. Learn to build them — and understand what makes them work.

A number matrix becomes a cubic blue and yellow python projecting a block game and a wireframe aircraft
01 / REPRESENT02 / TRANSFORM03 / CREATE

ONE IDEA. MANY WORLDS.

See the data.
Understand the picture.

Start with something you can see. Represent it with numbers. Change those numbers, watch what happens, and explain why.

01 Predict02 Try03 Explain04 Change

Small, traceable steps connect Python fundamentals to array-based games, classes, transformations, and three-dimensional graphics.

THE FIRST EXPERIMENT

A few numbers.
A different picture.

Choose a slice. Predict which pixels will change.
Then apply it and compare.

01 / SELECT YOUR OPERATION

Rows 2–5 and columns 2–5. The stop index is excluded.

Choose a color

Make a prediction, then try it.

Interactive JavaScript model of these NumPy operations. Python is not executed here.

02 / THE MATRIXrow ↓ column →
0 · paper1 · blue2 · yellow

Each cell is one pixel. Click a cell to cycle its value.

03 / THE IMAGE

Explain this operation

The first index selects rows; the second selects columns. In 2:6, index 2 is included and index 6 is excluded. Four rows × four columns gives 16 selected cells.

GAME LABORATORIES

Play the game.
See the data behind it.

THE LEARNING PATH

One journey.
Three printed volumes.

Or explore the complete book in a single EPUB.
Publication is in preparation.

Volume 1 cover

VOLUME 01 · MODULES 0–10

From Numbers to
Array-Based Worlds

Build your foundation in Python and NumPy. Turn arrays into pictures, movement, and your first games.

Volume 2 cover

VOLUME 02 · MODULES 11–18

Images, Classes, and
Matrix-Based Games

Organize growing programs with classes. Work with images and build games including Tetris and Xonix.

Volume 3 cover

VOLUME 03 · MODULES 19–23

Geometry, Cameras, and
Three-Dimensional Worlds

Connect trigonometry and transformations to wireframe flight, raycasting, and perspective projection.

KEEP EXPLORING

The book is a beginning.
The experiments are yours.

Find the companion code, follow the project steps, and make your own changes.

Companion repositoryExamples, project steps, and solutions↗

INSIDE THE BOOK

Change one number.
Understand the difference.

Read the opening experiment from Module 0. Create a colored window, make a prediction, and see how data controls the result.

FOR READERS

Everything you need
to keep going.

ABOUT THE AUTHOR

Oleg Gornov, PhD

An educator and author of teaching materials with more than 25 years of experience in education. The course behind this book developed through teaching and individual tutoring with students aged 8–19.

His approach connects abstract ideas with understandable actions and visible results.