Skip to content

Software rasterizer with keyboard and mouse controlled camera.

Notifications You must be signed in to change notification settings

willjgh/Rasterizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rasterizer

Software rasterizer implemented in python using pygame to render 3D objects with keyboard and mouse controlled camera.

Objects defined as vertices and triangles, explicitly or via .obj files, are transformed from model space to world space, to view space, projected onto clip space and scaled to screen space where there are draw in order of depth, following the painters algorithm. Bounding spheres are used to efficiently ignore objects that are out of view, and backface culling uses normals to ignore triangles facing away from the camera.

As an example the Utah teapot is shown, with simple directional lighting:

screenshot

Stable performance is shown for a grid of randomly oriented cubes:

screenshot

About

Software rasterizer with keyboard and mouse controlled camera.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages