Course Outline
CS 106

Introduction to Computer Programming 2


A continuation of the introduction to computer programming begun in CS 105. The use of programming, in conjunction with libraries, as a means of solving practical problems in art, design, and data processing. Basic text processing, manipulation of images and sound, handling and visualization of tabular and hierarchical data. Introductions to user interfaces, physical simulation, and object-oriented programming.


The goal of CS 106 is to apply programming idioms in a practical context, using functionality available in built-in functions, libraries that come shipped with Processing, and libraries that can be added on to it. Topics include input/output, user interface programming, physics and animation, procedural content generation, object-oriented programming, and text and structured data processing.


Lectures include multiple clicker questions for participation and the guage learning.

There are almost weekly labs (typically 10) to practice programming concepts.

There are almost weekly individual programming assignments (typically 10).

A 110-minute midterm exam and a 150-minute final exam.


Typical Breakdown

  • Participation: 5% (clicker responses)
  • Labs: 5%
  • Assignments: 30%
  • Midterm: 20%
  • Final exam: 40%

Note you must pass the weighted exam portion to pass the course.


There are 3 hours of scheduled lab time each week to work on labs and assignments and get individual help from lab instructors.

Usual Textbook: Daniel Shiffman's Learning Processing, second edition.

Typical Topics


Processing recap

A review of programming concepts from CS 105, in terms of the basic structure of the Processing language: types, declarations, expressions, statements, and functions.


Input and output

Loading files in various formats (text, images, illustrations) into Processing, writing files.


User interfaces

The model-view-controller architecture. Direct manipulation interfaces. User interface toolkits. The ControlP5 library in Processing.


Physics and animation

The basic principles of naturalistic physical motion through Newton’s laws of motion. Inertia, acceleration, drag, collisions. The Fisica library for rigid body dynamics in Processing.


Geometric context

The use of translate(), rotate(), and scale() to modify a program’s coordinate system. Building a hierarchy of transformations using pushMatrix() and popMatrix(). Order of operations.


3D Graphics

Basic APIs for loading and displaying 3D models in Processing.


Image processing

Querying individual pixels. Simple colour manipulation. Filtering. Halftoning. Using webcams as a source of input.


Text processing

Decomposing text into tokens. Regular expressions. Unicode. Working with dates and times.


Structured data processing

Dealing with table-structured (CSV) and tree-structured (XML) data. Processing live data acquired from web APIs (JSON).

Even more details?

CS 106 course website