http://billsix.github.io/modelviewprojection/intro.html
Learn how to build 3D graphics from the ground up. This codebase demonstrates how to create objects, put them where you want them to go, view the scene with a camera that can move, and how to project that 3D data to a 2D screen.
For further information, such as lighting, shadows, and OpenGL in more explicit detail, consult
- OpenGL redbook/bluebook. (OpenGL superbible v4, because it covers fixed function and shaders)
- Mathematics for 3D Game Programming and Computer Graphics
- Computer Graphics: Principles and Practice in C (2nd Edition)
For RayTracing
- Physically Based Rendering
- Ray Tracing from the Ground Up
This book uses "mistake-driven-development". I show incrementally how to build a more complex graphics application, making mistakes along the way, and then fixing the mistakes.
Use Visual Studio 2019 (Tested on community, but I'm sure it will work on others).
Using Developer Command Prompt
cd book
python -m venv venv
cd venv\Scripts
activate.bat
cd ..\..\
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
python src\demo05\demo.py
Install Python3, glfw via a package manager. Use pip and virtualenv to install dependencies
cd book
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
python src/demo05/demo.py
Python Python3 (via anaconda, homebrew, macports, whatever), and use pip and virtualenv to install dependencies.
cd book
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
python src/demo05/demo.py
Install podman
make
The book is then in the "output" directory