These are the NumPy operations I use in the graphics lectures and labs, worked through as seven marimo lessons and a solutions notebook.
| Notebook | Covers | Examples behind the lesson |
|---|---|---|
| 1: arrays and vertex data | dtype, byte sizes, sampling, ufuncs, structured records, casting | FirstTriangles, TriangleGrid |
| 2: shapes, views and grids | reshape, views, array combinations, broadcasting, meshgrid, strides, connectivity | TriangleGrid |
| 3: transformations | matrix products, homogeneous points, order, tolerances, perspective division, matrix bytes | Points, IntroductionToNumpy |
| 4: images and colour | RGBA axes, masks, where, byte overflow, alpha, packed pixels | Image, ImageUint32, BlitMT |
| 5: random points and particles | seeded generators, sphere sampling, reductions, axes, Euler integration, masks, bounds | Points, Emitter |
| 6: a lit mesh | deformation, winding, normals, inverse transpose, diffuse light, UVs | UpdateMesh, FlatShaded |
| 7: an interactive WebGPU mesh | vertex layouts, WGSL, depth, browser rendering, mouse camera controls | MarimoDemos/WebGPU |
Exercise solutions contains runnable answers to all 36 exercises, numbered to match the lessons. It generates its own data and includes optional WebGPU checks.