>>14166In that case you will need a bunch of linear algebra as background. Well, maybe not "need", but... okay story time:

Back in the olden days nobody had figured out the "correct" way to render 3D graphics and a bunch of different approaches were flying around. From raytracing used by Pixar, to portal based ray marching used by Id for Wolfenstein and Doom to voxel rendering, curved surface building, distance fields, infinite planes and so forth.

But there was one aproach that was in its nature stricly tied to a well known field of math and that was the polygon based rasterizer. In effect every single computation could be expressed through a single vector operation and vectors were something that was well understood.

Note here that a vector is not (x, y, z) etc, a vector is an element of a vector space and you need the definition of a vector space to know what a vector is. For example: Three real numbers are a vector in R^3, but a 3x3 matrix is also a vector in the vector space over 3x3 matrices. In fact, functions (as you know them from calculus) are vectors. And the set of all possible concatenations of functions is again a vector space where a vector consists of concatenations of functions.

To understand why everything in 3D graphics today is a vector operation is to understand that the approach lends itself very well to abstraction. And if you can abstract things enough such that almost every entity in your calculation can be treated as a vector, you can separate the computation of almost everything from each other, allowing a hyperparallel approach. And that is the point where polygonal rasterizers turned out to be the winner over all other techniques, at least for real time computation.

The first graphics cards were developed that allowed parallel transformation of hundreds of vertices and parallel depth tests for hundreds of pixels. At the beginning there was no unified API to talk to these cards and shit was messy. Then OpenGL, originally developed to be a fun project for learning how software renderers worked, was recognized as some sort of industry wide accepted API. Long before DirectX, mind you.

Now the combination of the APIs (OpenGL, DirectX, Vulkan, ...) with the GPUs presents the fastest and most stable aproach to hyperparallel linear algebra computation.

To get a better understanding of the mathematical backgrounds I can highly recommend the videos from 3blue1brown called The Essence of Linear Algebra:

https://www.youtube.com/watch?v=fNk_zzaMoSs&list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_abThen, for the combination of that knowledge with 3D graphics, there is a good introduction by the developers of the Godot engine:

https://docs.godotengine.org/en/stable/tutorials/math/vector_math.htmlAnd now excuse me, I feel the strong urge to continue working on my own engine :3