For basic 3d graphics rasterization concepts and implementation check out 500 lines C++ TinyRenderer and its wiki here:
https://github.com/ssloy/tinyrenderer and the 100 lines Python version (only numpy dependency) here: https://github.com/rougier/tiny-renderer
Raytracing in a weekend is also useful: https://raytracing.github.io/