Skip to content

A simple software renderer in Python using Gouraud shading

Notifications You must be signed in to change notification settings

mdoege/dancing_teapot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utah_teapot

A simple software renderer in Python using Gouraud shading

The input file has to be Wavefront .OBJ with vertex normals ("vn") and all faces have to be triangles. The scaling factor "s" on line 23 needs to be adjusted for different model dimensions.

How to run

Make sure Pillow is installed.

py3d.py expects two rotation angles and a frame number on its command line.

The fastest way to create the animation is by piping the command for each frame into GNU Parallel:

python3 driver.py | parallel

The GIF can then be created with ImageMagick:

convert -delay 5 img*.png -loop 0 teapot.gif

Releases

No releases published

Packages

No packages published

Languages