ATTENTION
The course is still being worked on and is set to release (via Teachable and Udemy) in January 2026
In the meantime you can watch the free content!
Subscribe to get notified when the full course is available:
(please note that when you are subscribed, you will also receive my educational newsletter)

Math for 3D/Games Programmers
Learn comprehensively real-world math used in 3D games programming, with almost a 100 short and easy-to-follow examples made on Unity 3D, to land you a better-paid and more fulfilling job.
Welcome to the website of the “Math for 3D/Games Programmers” course. This is an over 30-hour video course with support that comprehensively covers all the fundamental, and some more advanced, mathematical topics that every programmer of video games and all types of 3D simulations and applications has to be familiar with. All topics discussed are accompanied by compact practical examples. This is really your ultimate course on that subject which covers (to great extent) not only obvious subjects like vectors, matrices or quaternions but also derivatives and integrals, all presented in a practical context!
The course is split into three parts:
- Analytic Geometry (chapters 1-4), available for free
- Linear Algebra (chapters 5-7)
- Calculus (chapters 8-9)
If you have additional questions drop by my Discord server
https://discord.gg/U4fWWQyQRv.
You can also send me an e-mail to wojtsterna(at)gmail(dot)com.
What is this course and who is it for?

Does any of the following describe your feelings?
- Do you want to thoroughly learn 3D mathematics, starting from the basics (such as trigonometry and vectors) and ending with more advanced topics (derivatives/integrals)?
- Do you already have some idea about 3D mathematics, you use it every day in programming, but still everything doesn’t quite come together and you feel/know that you have some gaps?
- You don’t know which book (and the choice is wide) for 3D mathematics will be suitable for you to learn? Moreover, most of them have several hundred pages.
- Do you care about understanding theory and formulas, but at the same time you want to see that this theory has actual, practical application in game/3D programming?
- Does it irritate you when, in various sources on 3D mathematics, authors explain in great detail what vectors are, only to then overwhelm you with equations with partial derivatives or integrals, without discussing them first?
- Vectors, Euler angles, matrices, quaternions, derivatives, integrals… Why, if at all, is all this necessary for games/3D programming?
The “Math for 3D/Games Programmers” course is the result of my many months of work on a video course which, on the one hand, is intended to be very practical, and on the other hand explains how the theoretical background of the topics discussed, including from time to time delving a little deeper into derivation of some mathematical formulas important for game/3D programmers.
On the one hand, there is a lot of very solid and often voluminous books on 3D mathematics for programmers available on the market (requiring a lot of time to work through them), yet they contain few practical examples – reading dry formulas without observing them in action can make them very difficult to understand. On the other hand, we have plenty of free mathematical programming libraries for solving specific programming problems, but whose inner workings can be “dark magic” to us. This course is in the middle – we learn as much theory as needed to understand a given topic, and at the same time we learn this theory on specific sample programs.
Interestingly, in many sources, such as the thick books mentioned above, topics such as vectors and matrices (in general, linear algebra) are explained very carefully, but for unknown reasons these sources assume that the reader is familiar with derivatives and integrals (calculus in general). This is, to say the least, a strange approach – if you need to explain vectors to someone, they certainly don’t know derivatives yet. By contrast, in this course, two large separate chapters are devoted to derivatives and integrals from a practical perspective. The chapter on derivatives, due to its extremely wide applications, is the largest in the entire course.
The sample programs are written in C# on the Unity 3D engine due to its ubiquity and ease of use. Additionally, using Unity 3D frees us from the need to write code that is not important from the point of view of the topics discussed. For example, we do not have to write code that draws 3D objects in a low-level graphics API such as DirectX, we just use the ready-made and basic Unity functionality. This ensures that all demo programs are concise and focus on the mathematical aspects of the problems being discussed. This also means that even though the demo programs are written in C# / Unity, porting them to other languages and engines will not be a major problem.
The course is intended for all programmers who are already involved in or want to be involved in programming video games and 3D applications/simulations. The course assumes that you already have at least a basic understanding of 3D mathematics from high school, and that concepts such as the 2D/3D coordinate system or quadratic equation are familiar to you. I’m also assuming that you already have at least a basic understanding of any game engine like Unity 3D. I strongly encourage you to check the free content before purchasing the course to make sure you have no significant gaps and that the pace and overall form of the course are appropriate for you.
These groups of people will primarily benefit from the course:
- Junior programmers and technical artists, students who have a basic understanding of game/3D programming and who would like to acquire solid mathematical competences in a practical context. If you do not yet work in the video games industry but would really like to, then knowledge from this course will help you in landing your first job.
- Intermediate/specialist/mid programmers and technical artists who are familiar with at least some of the topics covered in the course, but would like to learn more and/or better organize their knowledge.
Senior programmers and technical artists will certainly get the least out of the course (obviously), but I still recommend that they thoroughly familiarize themselves with the course’s contents. It is highly probable that they will find topics of interest there.
Who is the author?

The sole author of this course is me – Wojtek Sterna. You are now on my homepage :).
I have been professionally programming game engines and 3D graphics for over 10 years. I have worked for companies such as: NVIDIA, id Software, CD PROJEKT RED and Flying Wild Hog – check out my MobyGames profile to find out which productions I have worked on. I’ve written code in C/C++, C# and shaders in both proprietary game engines and the most popular ones – Unreal Engine and Unity 3D.
In order to be able to perform my job effectively and with satisfaction, as well as to find my way into the above-mentioned companies, a solid knowledge of 3D mathematics was necessary. I acquired this mainly by studying thick books on 3D mathematics and then implementing their content in my own 3D engines and video games. This course is, in a sense, a “summary” of this knowledge in such a way as to present as much practice as possible, while retaining explanations of the most important theoretical parts.
Why did I decide to create this course? There are at least two reasons. The first is that I had the impression that there are few materials on general 3D mathematics that would be very comprehensive, but at the same time set in a practical context – hence my desire to fill this gap. The second reason is a bit more personal – I have always liked sharing knowledge and by sharing this course I have the opportunity to do so. I have previously written several books and articles about programming. This is my first video course.
What is the content?

When you buy the course you will receive:
- Access to video recordings (over 30 hours).
- Access to PDF files with presentations. At the end of each chapter there is a list of exercises to complete on your own.
- Access to all programs covered in the course.
- Access to private Discord rooms where you can get direct help from me.
Working with the course is as follows. You watch videos from which you learn the concepts presented. You have access to the programs discussed so you can test and experiment. You solve exercises at the end of each chapter. If you have a problem with something, something is unclear – you ask on Discord.
Table of Contents (the expansions include chapter descriptions and the names of all programs):
1. Trigonometry
1h 46min, 31 slides
Trigonometry is a branch of mathematics that deals with trigonometric functions, in particular: sine, cosine and tangent. This topic is so important that it will accompany us throughout the entire course. Most likely, you already have knowledge on this topic, but if not, this chapter can help you catch up or just remind yourself of a few things.
Even if you are familiar with trigonometric functions, do not skip this chapter! You will also find here a discussion of several interesting topics and problems that you might not necessarily have encountered before, such as polar and spherical coordinates, as well as algorithms for generating points on a circle and a disk.
Chapter contents:
- Trigonometric Functions
– (UnityProgram) Functions - Generic Sine Function
– (UnityProgram) SineWave - Polar Coordinates
– (UnityProgram) PolarCoords
– (UnityProgram) PolarCoordsMovement - Generating Points on Circle
– (UnityProgram) CirclePointsGeneration - Spherical Coordinates
– (UnityProgram) SphericalCoords - Generating Points on Sphere
– (UnityProgram) SpherePointsGeneration
2. Complex Numbers
38min, 17 slides
Complex numbers themselves are not particularly useful in game/3D programming. However, they are the foundation for at least one topic that is very useful – quaternions (chapter 7). In addition, complex numbers appear occasionally when solving certain equations (chapter 8).
This chapter covers only the most basic properties of complex numbers and also discusses their various representations. The minimum amount of information we need to discuss certain topics in chapters 7 and 8 is presented.
Chapter contents:
- Definition
- Operations
– (UnityProgram) ComplexNumbers - Trigonometric Form
- Exponential Form
3. Vectors
2h 14min, 44 slides
You probably know what vectors are and you deal with them every day. The purpose of this chapter is similar to that of chapter 1 on trigonometry – to review the topic, as well as to introduce some important concepts and algorithms that may be new to you. For example, checking whether a point is inside a triangle (in 2D) or effective compression of normal vectors.
Chapter contents:
- What is a Vector
- Vector Creation from Two Points
– (UnityProgram) VectorCreation - Vector as a Point
- Addition
– (UnityProgram) VectorsAdd - Subtraction
- Linear Interpolation
– (UnityProgram) VectorsLerp - Vector Length
- Normalization
– (UnityProgram) VectorNormalize - Normal Vector
- Perpendicular Vectors in 2D
– (UnityProgram) VectorsPerpendicular2D - Dot Product
– (UnityProgram) VectorsDot - Vector Projection
– (UnityProgram) VectorProjection - Cross Product (Perpendicular Vector in 3D)
– (UnityProgram) VectorsCross - Point in Triangle (in 2D)
– (UnityProgram) PointInTriangle2D - Normalized Vector Compression
– (UnityProgram) NormalizedVectorCompression
4. Geometrical Objects Equations
5h 4min, 87 slides
Objects in virtual worlds are usually made of triangles. We often also need to be able to describe an object, or its parts, using more general figures such as a circle, sphere or plane. We can describe each of such objects mathematically using formulas.
In this chapter, we will learn the mathematical descriptions (formulas) of the figures mentioned above and, above all, of the line and the ray – one of the main topics that is discussed is finding the points of intersection of the ray with various objects. Moreover, we will usually learn at least two different representations of each mathematical object – parametric and implicit – each of which has its own significant advantages and disadvantages.
This chapter is largely based on vectors and trigonometry.
Chapter contents:
- Line
- Line Equation
– (UnityProgram) LineLinear
– (UnityProgram) LinearMapping - Implicit Equation
– (UnityProgram) LineImplicit - Parametric Equation
– (UnityProgram) LineParametric
– (UnityProgram) LineParametricDistanceToPoint
- Line Equation
- Circle
- Implicit Equation
– (UnityProgram) CircleImplicit - Parametric Equation
– (UnityProgram) CircleParametric
- Implicit Equation
- Sphere
- Plane
- Implicit Equation
– (UnityProgram) PlaneImplicit
– (UnityProgram) PlaneMovement - Parametric Equation
– (UnityProgram) PlaneParametric
- Implicit Equation
- Triangle
– (UnityProgram) PointInTriangle3D- Barycentric Coordinates
– (UnityProgram) TriangleAndBarycentrics
- Barycentric Coordinates
- Equations Optimization
– (UnityProgram) CircleImplicitOptimized
5. Matrices and Transforms I
Matrices, along with vectors, form the foundations of a field of mathematics that is sometimes called “linear algebra with analytical geometry”. Matrices allow you to conveniently represent and combine transformations. In this chapter, we will learn their basic properties and the operations we can perform on them, in particular multiplication and inverse calculation.
Transformations are the operations that 2D/3D objects undergo when we want to move, rotate or project them from the 3D world onto the screen plane. In this chapter, we discuss basic transformations, both with and without matrices, to better understand the importance of matrices.
Chapter contents:
- Matrices
- Transforms
– (UnityProgram) Transforms - Transforms and Matrices
– (UnityProgram) MatrixTransforms - Image Rotation on GPU
– (UnityProgram) MatrixFigureRotation
– (UnityProgram) MatrixImageTransform - Point Projection onto a Plane
– (UnityProgram) ProjectionDirectional
– (UnityProgram) ProjectionPoint
6. Matrices and Transforms II
This chapter is an extension of chapter 5. Here we go deeper into the subject of matrices and transformations. We will talk, among others, about the scale-rotation-translation (SRT) system and hierarchies, camera and projection matrices, as well as about bases and transitions from one base to another. All these concepts will allow us to go “a level higher” in understanding of how matrices and 3D transformations work.
Chapter contents:
- Rotation Matrix About Any Axis
– (UnityProgram) RotateAxisAngle
– (UnityProgram) RotationGizmoEmulator - Column and Row Order
– (UnityProgram) ColumnAndRowOrder - Scale-Rotate-Translate (SRT) and Hierarchy
– (UnityProgram) EulerAnglesEmulator
– (UnityProgram) SRT
– (UnityProgram) SRT2
– (UnityProgram) SRT3
– (UnityProgram) MatrixToTransform
– (UnityProgram) Hierarchy - Camera and Projection Matrices
– (UnityProgram) CameraSpace
– (UnityProgram) WorldToScreen
– (UnityProgram) ScreenToWorld
– (UnityProgram) TextureProjection - Basis and Basis Change
– (UnityProgram) EulerAnglesBasis
– (UnityProgram) PositionAndOrientation
– (UnityProgram) PositionAndOrientation2
– (UnityProgram) PositionAndOrientation3
– (UnityProgram) BasisHandedness
– (UnityProgram) BasisChange
– (UnityProgram) BasisChange2
– (UnityProgram) BasisChange3
– (UnityProgram) BasisDeflection - Normal Vector Transformation
– (UnityProgram) NormalVectorTransformation - Plane Transformation
– (UnityProgram) PlaneTransformation
7. Quaternions
So far, rotations in 3D have been discussed – in the previous two chapters – only in the context of matrices. However, a matrix is not the only mathematical object that allows you to represent rotation in 3D. The second very popular such object is the quaternion.
A quaternion is an extended version of a complex number. It allows rotations to be represented in 3D in the same way as rotation matrices. Quaternions have several significant advantages over matrices, which is why they are very widely used in virtually every respectable 3D engine. In this chapter we will discuss these advantages, but also the disadvantages of using quaternions.
Chapter contents:
- What is a Quaternion
- Rotation About Any Axis
– (UnityProgram) QuaternionRotateAxisAngle
– (UnityProgram) QuaternionRotateAxisAngle2
– (UnityProgram) QuaternionRotationGizmoEmulator - Quaternion, Matrix and Euler Angles
– (UnityProgram) QuaternionEulerAnglesEmulator
– (UnityProgram) QuaternionConversions
– (UnityProgram) DeltaTransform - Slerp – Spherical Linear Interpolation
– (UnityProgram) VectorsSlerp
– (UnityProgram) QuaternionsSlerp
– (UnityProgram) QuaternionsSlerp2 - Gimbal Lock
– (UnityProgram) GimbalLock
– (UnityProgram) EulerAnglesXY
8. Derivatives
The topics presented in Chapters 1-7 are collectively part of the field “linear algebra with analytical geometry.” Chapters 8 and 9, in turn, constitute the foundations of “calculus” (sometimes referred to as “mathematical analysis”).
For some strange reason, in many textbooks about mathematics in game/3D programming, the authors painstakingly explain terms like vector and matrix, while occasionally throwing out derivative concepts as if they were completely basic and obvious. I believe, on the contrary, that derivatives are a more difficult topic than vectors and require a separate, relatively extensive discussion.
The derivative is a mathematical tool that allows us to extract a lot of important information about a given function. In particular, thanks to the derivative, we can find out for which arguments the function reaches its largest/smallest values, how the function values change depending on the change of arguments, and in what direction the function values increase/decrease.
The answers to these questions allow us to solve a whole range of problems, such as the problem of inverse kinematics, and they also lie at the basis of neural networks and deep learning. Derivatives also allow us to generate tangent vectors at a point, so we can generate a vector normal to any surface – as an example in this chapter we will see how to generate normal vectors of a water surface, procedurally generated using the sine function.
Chapter contents:
- What is a Derivative
– (UnityProgram) TangentLine - Numerical Calculation
– (UnityProgram) DerivativeNumerical - Analytical Calculation
– (UnityProgram) DerivativeAnalytical - Function Extrema
– (UnityProgram) Extrema
– (UnityProgram) ExtremaLinePointDistance
– (UnityProgram) ExtremaParabolaPointDistance
– (OctaveProgram) ExtremaParabolaPointDistance - Derivative of Parametric Function
– (UnityProgram) DerivativeParametric - Partial Derivatives and Gradient
– (UnityProgram) PartialDerivatives
– (UnityProgram) Gradient - Derivative of Implicit Function
– (UnityProgram) DerivativeImplicit - Least Squares Method
– (UnityProgram) LeastSquares - Gradient Descent Algorithm
– (UnityProgram) GradientDescentLine
– (UnityProgram) GradientDescentCircle
– (UnityProgram) GradientDescentParabolaPointDistance
– (UnityProgram) GradientDescentIK - Tangent Space
– (UnityProgram) TangentSpace
– (UnityProgram) TangentSpaceWaterSurface
9. Integrals
Integrals are the inverse of derivatives. Interestingly, while integrals are almost always discussed after derivatives and their (analytical) computation is clearly more difficult, conceptually the integral is a very simple tool. Integrals allow us to sum the values of a given function on a specified area.
The above-mentioned summing of values may come down to, for example, calculating the distance covered by a physical object, where the summed values are the object’s velocity vectors at individual points in time. Similarly, the summed values can be the amount of light falling on a given surface point from many different directions, which allows us to calculate the total amount of light falling on that surface. It is on such examples that we will learn about integration from the practical side.
Chapter contents:
- What is an Integral
- Numerical Calculation
– (UnityProgram) IntegralNumerical - Analytical Calculation
– (UnityProgram) IntegralAnalytical - Motion Equation Integration
– (UnityProgram) PointMassMotion - Double Integral
– (UnityProgram) DoubleIntegralNumerical - Analytical Integration Example
– (UnityProgram) CameraVelocityIntegration - Numerical Integration Example
– (UnityProgram) AmbientOcclusion
What is the price?

The price of the course is $197.
Ask the company you work for (e.g. HR department) whether they will finance or subsidize the course for you. The company can likely write-off it as an expense, which will make its actual price lower. Many companies today offer development funds to their employees and it is quite possible that this course would qualify.
Is it worth its price?

This course is a video course with presentations (which include important mathematical formulas with explanations), interactive demonstration programs, and additionally gives you direct contact with the author. Thanks to this approach, you will certainly complete this course much faster than, for example, a 600-page book covering similar topics.
If you are a junior, gaining knowledge from this course will greatly help you become a specialist. The difference in earnings between a junior and a specialist/mid can easily be at least a thousand USD per month. Even if you pay for the entire course yourself, its price will be only a fraction of the amount by which your monthly salary will increase when you are employed as a specialist.

The better finances you can count on are just one very tangible benefit of diligently studying the content of this course. With a solid understanding of mathematics, game/3D programming simply becomes much more enjoyable and rewarding.
Free content

You can get chapters 1, 2, 3 and 4 of this course for free. All you need to do is to subscribe to this website and in the welcome e-mail you will receive a link to that content (remember to check out your spam/offers folders in case you don’t see the welcome e-mail!):
(please note that when you are subscribed, you will also receive my educational newsletter)
Here you can grab all the example programs that are demonstrated in the free chapters:
https://github.com/maxest/MathFor3DGamesProgrammersFREE
Watching the free content will give you a better idea of how the entire course is organized and will help you make the right decision whether it is worth buying the full version.
I want to buy the full content

Do you? That’s great! You can get it here:
[[[ WORKING ON IT ]]]
The course’s content includes: video recordings, presentations, example programs and a link to a private Discord support server.

30-day satisfaction guarantee. If you purchased the course and honestly believe that it did not meet your expectations, please send me a message via email or on Discord. Briefly describe what you didn’t like (I may be able to take your feedback into account for the next edition of the course), and I will refund your money (just please write within 30 days from the date of the purchase).
Contact

Do you have doubts? Second thoughts? Questions?
Visit my Discord server
https://discord.gg/U4fWWQyQRv
or
write me an e-mail to wojtsterna(at)gmail(dot)com.