Selected Teaching Samples: Animations, Visual Metaphors, and Interactive Examples

KTR insignia - K, T, R superimposed

Karl Toby Rosenberg

Contact: karltobyrosenberg [-at-] nyu [-dot-] edu

Home Page

Courses Taught at New York University

I tend to extend the curriculum with concepts from interactive systems, creativity tools, human-computer interfaces, visuals, and game programming

Interactive-Flood-Fill (interactive computer graphics)

I tend to motivate concepts by building interactive, playable visual artifacts. This is a flood-fill algorithm visualization that works with an actual animation system that can be paused, fast-forwarded, and reset by live-coding as the program is running. In this case, I can change the starting position of the grid.

Course-Long Project Example - Sketching Application (Interactive Artifact)

I want students to have the experience of learning through making and designing something to have something motivating and "tangible". For example, they build this simple infinite canvas sketching user interface in my version of Data structures, starting with an empty interface they develop throughout the semester as they add more data structures. e.g. Dynamic Arrays for curves, stacks for history/undo-redo, game-programming concepts such as entity component ID systems for objects, 2D camera panning and entity selection.

Piet Mondrian-Inspired Conditional Statements (interactive computer graphics)

I took inspiration from Piet Mondrian's paintings to create an exercise in which students must create conditional structures around the dimensions of rectangles, and check whether the mouse cursor overlaps specific ranges to decide whether to fill a rectangle black. I can also use a version of this example to illustrate recursion.

Thinking by Drawing (Anonymized Student Design Assignment Work)

I believe it's valuable to introduce the idea of drawing and designing ideas first before coding, in preparation for interaction with team-mates. This is an anonymized example collected with a student's permission showing the process of solving a recursive algorithm for exploring a maze featuring time-travel between different versions of the maze in search of a machine to destroy in the past.

Zooming Recursive Count-down (hand-drawn animation)

This visualization for a recursive count-down zoom is something I intend to narrate over in steps to show how as we go deeper into the recursive algorithm, the substructure looks identical as before, but with different data every step as the problem is brokendown. The stop sign is a metaphor for representing the base case as a literal stopping point. I like creating these more playful examples to provide something more memorable and spatial when exploring concepts for the first time before going into specific algorithms or code.

Code as Flow+Data Walk (hand-drawn animation)

I like to explain code as a walk along a path, with parallel visualizations for the flow/journey and the corresponding data behind the scenes

Conditional Branches as Branching Train Tracks (hand-drawn animation)

We can think of conditional branches as routes along a branching railroad track

Quest to Defeat the Dragon (hand-drawn)

Students need to interpret this drawing to create a conditional structure that checks random variables to decide whether the hero can make it through the quest to defeat the dragon or not. I like giving examples that require taking a visual scenario and figuring-out how to express it in code.

Error-handling as Trampolines to Safety (hand-drawn animation)

We can think of error-handling as creating a trampoline beneath a perilous code path, to give the program flow towards a safe way out

Functions and Cakes (hand-drawn animation)

Functions are like configurable ovens that let you bake cakes.

Illustrating 2D Coordinate Grid Iteration (hand-drawn animation)

Walking through how to iterate over a 2D grid