MY PYTHON TEACHING CODES

How I develop a calculation
in notebook cells.

I build each calculation in notebook cells. I explain the quantities, write a small part, run it and compare the result with a stated check before continuing. I keep the complete command-line programs available, but the notebooks are the main learning route.

Download the new notebook collection ↓ · Python, Julia and C introductions →

Start with the portrait

In the color portrait lesson, I first read three color channels and check a pixel shuffle. I then define an energy, verify that its minimum is zero, compare one Allen–Cahn and Cahn–Hilliard evolution, and test mean drift. Only after these checks do I save the full animation.

Complete Python examples

Each lesson below contains the code itself. No companion Python script is needed. The results shown on the page come from executed notebook cells. The optional 256³ runs and native VPython windows are separated from the default checks.

Existing step-by-step lessons

I retain the earlier notebooks and their numerical methods. These shorter lessons test one operation before assembling a calculation.

What I checked

I executed all 17 new notebooks from fresh kernels. The portrait, 2D spinodal, diffusion and random-walk notebooks run their original full calculations. Monte Carlo runs short 16² checks. The 3D lessons run small exact-mask checks; their full-volume runs remain optional. The native VPython lessons check the saved route data by default; their scene and event loop require an interactive local Jupyter session. These execution checks do not claim numerical convergence.

Read the execution report →

Website maintenance tools, archive builders and automated test scripts remain ordinary Python files. They are not student calculations. Existing usage terms apply to all notebook code.