Add the rest of university notes

This commit is contained in:
John Gatward committed 2026-10-04 14:02:35 +01:00
1 parent c1b84c7f7d
commit d0f27f276b
366 files changed
+9844 -110

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
# 2D to 3D
#### Spaces and Transformations
![1646763917.png](img/1646763917.png)
- **Model Space**
- Model space is relative to an individual model which is made up of vertices.
- A cube has one vertex at each corner which are positioned relative to the centre of the cube
- In model space there is no information about where a model is relative to anything in the world, there is only information about the relative positions of the vertices which make up the model
- **World Space**
- World space is relative top a larger coordinate system
- Vertices are positioned in model space and then all moved to the appropriate position in the world
- **View Space**
- View space has all vertices from the perspective of the viewer
- Vertices aren’t defined in view space. The world is moved relative to the viewer position
- **Clip space**
- Clip space is an intermediate space after vertices have been projected to what is going to be drawn to the screen
- **Normalised Device Coordinate space**
- NDC space is almost identical to the pixels on the screen.
- Vertices inside the NDC space will be rendered at those positions
- **Screen space**
- Screen space maps directly to the pixels on the screen
- From now vertices can be used to construct triangles, which are rasterised and the appropriate pixels are coloured
- Model Transform
- The transformation of vertices from model space to world space
- View transform
- The transform of vertices from world space to view space
- Projection transform
- The projection of vertices from view space to clip space
- Perspective Division
- The division of each component by its homogeneous $w$ component
- Viewport Transformation
- The mapping of normalised coordinates to vertices at screen pixel coordinates
#### View Space with Frustum
![1646764884.png](img/1646764884.png)
Everything outside the frustum isn’t rendered