CSC151.02 2016S, Class 07: Transforming Images
==============================================

* New partners!  You should know the drill.

_Overview_

* Preliminaries.
    * Admin.
    * Upcoming Work.
    * Extra Credit.
    * Questions.
* Quick Summary.
* Lab.

Preliminaries
-------------

### Admin

* Yes, I forgot to update the lab page.  Sorry.  Should be fixed now.

### Reminders

* Office hours: MTWF 10-11, Tu 1-2.
    * Sign up at <http://rebelsky.youcanbook.me>.
    * Also feel free to stop by when my door is open.
    * Or to email me for an appointment.
* Tutor hours
    * Sunday, 3-5 p.m.
    * Sunday-Thursday, 7-10 p.m.
* Weekly review sessions:
    * Wednesday at 8pm in the CS Commons with Sarah
    * Thursday at 10am in this room with SamR
    * Thursday at 8pm in the CS Commons with Kumar

### Upcoming Work:

* Quiz Friday
    * Topics
        * Scheme's order of evaluation and sequencing.
        * Definitions (in Scheme).
        * Arithmetic operations, including things like `max`, `min`,
          `floor`, `ceiling`, `round`, `quotient`, and `remainder`.
        * RGB colors, and the operations on integer-encoded RGB colors.
        * Basic RGB transforms (although we will remind you of what they do):
          `irgb-redder`, `irgb-greener`, `irgb-bluer`, `irgb-darker`,
          `irgb-lighter`, `irgb-complement`, `irgb-rotate`, `irgb->string`
        * Function composition.
    * Form
        * Closed book
        * Possibly: "evaluate this expression (or series of expressions)"
        * Possibly: "using composition, write a procedure to compute ..."
        * Possibly: "given this definition, what does this procedure do?"
* Readings for Friday:
    * [Writing Your Own Procedures](../readings/procedures-rgb-reading.html)
    * [How Scheme Evaluates Expressions (v2)](../readings/scheme-eval-2.html)
* [Assignment 3](../assignments/assignment.03.html) due next Tuesday
  at 10:30 p.m.  (Your assignment partner is your partner from today.)
* Lab Writeup: Exercise _____
    * Send email titled __CSC 151 Lab Writeup _ (Your Names)__
    * Do not include the underscores.
    * Send to <CSC151-02-grader@grinnell.edu>
    * Due before class on Monday.

### Extra Credit

_If you know of other events, please suggest them! (I might not always agree,
but it never hurts to ask.)_

Send email to <rebelsky@grinnell.edu> with a subject of 
"CSC 151 Extra Credit (Your Name)"

I try to respond within a week.  You'll have a report of grades by next
Monday.

#### Academic

* 4 pm Thursday in this room: LaTeX
* 4 pm Thursday in JRC 209 - Funding for unfunded internships
* Next week's Rosenfield Symposium on Campaign Finance Reform.
* noon Tuesday in the White PDR: Bowie, Mickey, and more: Copyright in
  the 21st century (copies of the reading outside Sam's office)
* 7:30 pm next Tuesday in ARH 131 - Funding for unfunded internships

#### Peer

* Track and Field Grinnell Invite February 6. (10 a.m.)
* Swimming February 6 vs. UN and IAState.  (1 p.m.)

#### Regular Peer

* Social Dance Workshop Tuesdays 7:00-8:00 in Bucksbaum Dance Studio
  (starting next week)
* Pun club Saturdays at 4pm in Younker (max 2)
* Socrates Cafe' Saturdays (max 2)
* Electrronic Potpourri on KDIC Frridays at Five

### Questions

_Why do you have so many web pages?_

> To clarify or confuse or both

_Why so many links at the top of each page?_

> Once you're used to it it speeds navigation.

Quick Summary
-------------

What are the important topics from yesterday's class and today's class?

Monday

* Colors are represented in Scheme as combinations of red, green, and
  blue which are put together into a single integer that most of us
  can't read.
     * (by multiplying
       the red component by 256*256, multiplying the green component by
       256, and then adding the three values together.)
* We can preview colors with things like (image-show (color-palette ...))
* When you nest operations, you get things in one neat line and the
  work is done inside-out

Yesterday

* Colors can be transformed by complementing the components (the
  pseudocomplement of a color, when added to a color, gives you 255 for
  each); enhancing the red, green, or blue component; and more.
* We can make colors lighter by increasing all three components.
* We can build new functions by composing other functions.  If we write
  `(define irgb-evan (o irgb-complement irgb-bluer irgb-complement))` 
  `irgb-evan` makes a color less blue.

Today

* You can load images and play with them by applying a color
  transformation to all of the pixels, using `image-variant`.
* We have this magic thing called sectioning that builds functions
  from other functions by filling in some of the parameters to
  the procedure.
* For example, we can eliminate red, green, or blue components  
* For example, if we write `(define st (section expt <> 3))`,
  `st` ...

Lab
---

Lab writeup:
