You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains a collection of examples for the PyNGL library and used in teaching across a number of NCCA courses.
It is expected you will use uv to run all the python applications. The RunDemos.py will launch all the demos in the repository.
There are two main types of demos in this repository:
OpenGL Demos: These are demos that use Modern core profile OpenGL for rendering.
WebGPU Demos: These are demos that use WebGPU for rendering and in a number of cases are also available as OpenGL demos.
You can see the Source for the PyNGL on GitHub and it can be installed via PyPi Full details of PyNGL and how to use it can be found at https://ncca.github.io/PyNGL/
Each demo lives in its own folder with a README.md explaining it. Click a preview or demo name below to open that folder.
To quickly run all the demos use the smoketest_all.py script which will launch all the demos for a few seconds and then exit, useful for quickly verifying that all demos are working.
The teapot rebuilt from Blinn's swept outlines: Newell 1975, Blinn 1976 and Crow 1987 versions, sweep animation and quarter circle error (OpenGL + WebGPU)
Frank Crow's 1987 wire frame program as constant u / v curves, hidden lines with polygon offset / depth bias and a replay of the plot (OpenGL + WebGPU)
Russ Fish's 2006 SCL rework of the teapot: modelling as a program, his cleaver and butcher block scene, stencil capped sections and Blinn shadows (OpenGL + WebGPU)
Cem Yuksel's 2026 version: the seams made curvature continuous by degree elevation or by splitting, reflection lines and curvature colours, a solid interior with a solid knob, both bottoms (OpenGL + WebGPU)
Retro sci-fi CRT terminal: Unknown Pleasures style wireframe terrain fly-over, clickable buttons, scrolling log and a two-pass CRT post process
AI Usage
This project has use various AI tools (Claude and Codex and OpenCode) to assist with development.
The initial phases were for the full port of NGL9Demos to PyNGL (C++ to Python conversion) and additional testing. Most of the work is shown in the docs section of the repository, and I have also written about various things on my blog here.
There will be a full write-up of my setup and usage of AI on the Blog soon.