Saturday, April 19, 2008

SA: ClassNotes 2008.4.19

Three levels of complexity: data structures, functions, classes.

For data structures, we focussed on strings firstly, then lists. We'll get to dictionaries (hash tables) next time.

For functions I started bridging to sphere packing already, with triangular numbers (def triangle(n): return n*(n+1)/2), plus your basic parabola (def f(x): return x * x).

For classes I start with my Biotum (one template, many selves), with eat and poop methods, using a stomach list as a queue.

We spent a rather long time at the POV-Ray site, looking at that office scene in particular (this was in part owing to having no logins at first, staff scurrying to secure them).

Whereas a Dutch master might've known to put in those Venetian blind reflections or whatever, in ray tracing we just combine geometry and optics and let the computer figure the consequences, meaning the artist is as excited as anyone to see what comes out the other end, maybe after a long night of rendering (if doing animation especially -- many frames).

We also imported "star" (meaning everything) from visual (from visual import *) and ginned up a gray ball -- kinda boring but good foreshadowing for what's coming, plus shows how core Python plus the Standard Library plus 3rd Party stuff (including mine) makes for a generously endowed math learning environment.

We're using IDLE on Windows in a university computer lab -- and yes, I clued them about the Monty Python connection (e.g. Eric Idle).

Small class, about six, the way we like it in Saturday Academy -- means lots of individualized attention.