CSC151.01 2014F, Class 38: On Two-Dimensional Design
====================================================

*No partners!  Sit wherever you'd like.*

_Overview_

* Preliminaries.
    * Admin.
    * Upcoming Work.
    * Extra Credit.
    * Questions.
* Background: About the project.
* Sample project.
* General elements of design.
* Relationships between elements.
* Broader design principles.
* Some examples.

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

### Admin

* Extended/modified office hours continue this week.
* Due to oral examinations in my other class, I was unable to get the
  quizzes graded.  I hope to have them done for Tuesday.

### Upcoming Work

* No lab writeup.
* Readings for Tuesday:
    * [Project Ideas](../readings/project-ideas-reading.html)
    * [Project Ideas: Color Trees, Revisited](../readings/project-color-trees-reading.html)
    * [Project Ideas: Fractals](../readings/project-fractals-reading.html)
* [Exam 3](../assignments/exam.03.html) due Tuesday
    * *Required* epilogue due Wednesday night.
      <http://bit.ly/151-2014F-exam3epi>

### Cool Upcoming Events on Campus 

* Peace studies talk today at 4:15 in JRC 101.
  "With All the World’s Violence, Where is Peace?"

### Extra Credit Opportunities

#### Academic

* Scholars' Convocation, noon, Nov. 12: Dean Latham.

#### Peer Support

* Karan's radio show 11pm Thursday nights on KDIC
* Evan's radio show 5pm Friday nights on KDIC
* Donna's radio show Sunday midnight on KDIC

### Exam Notes

_On the exam, should we have *all* of our procedures check preconditions?  
 E.g., should `str-rot13` check that `str` is a string containing only 
 capital letters, or should 'shift-up' check that its input is an integer 
 between 0 and 25, etc.?_

> `str-rot13` should check its preconditions.  The problem 3 procedures
  need not check their preconditions.  Problem 1 says to check preconditions.
  On the others, it's somewhat up to you.

_Does the procedure in problem 7 do anything sensible? It just seems like 
 it has a lot of `let` expressions that define variables as the null list._

> Yes, it does something sensible.  The one `let` expression you see seems
  to be a named let.

_Can I solve problem 3 using 65 as the collating sequence number for #\A?_

> No.  You may not hard-code the 65.  But that doesn't mean that you can't
  write concise and general code that will work equally well if the
  collating-sequence number for `\A` is 65, or 200, or 11, or whatever..

> You know that `(shift-down (char->integer #\A))` has to be 0, 
  `(shift-down (char->integer #\B))` has to be 1, and so on and so forth.

> You also know that the letters are in sequence.  So the collating sequence 
  number for `#\B` is one higher than the collating sequence number for
  `#\A`, the collating sequence number for `#C` is one higher than the
  collating sequence number for `#B`, and so on and so forth.

_Is #7 the only one that requires documentation?_

> Apparently.

### Other Questions

Background: About the project
-----------------------------

* Write a procedure, `(image-series n width height)`
    * Make an image that is width wide and height and height high
    * Different n values give different images, but part of a coherent
      set.  (At least 1000 different images.)
    * Images should be interesting/compelling
    * Images scale correctly - same n, same image, except for scale
* Preferably work in teams *that you select*

Two examples
------------

You can find these in [`examples/project`](../examples/project).

`ellipses.rkt` - straightforward, but makes compelling images

* Divide the image into n+1 columns
* In the ith column, put i+1 equal size ellipses
* Fill the ellipses with a color blend
* Observation: Divides width equally
* Observation: Use image-compute for the color blend.
    * Sam: Maybe use image-recompute!
* Question: How do we draw an ellipse?
    * `image-select-ellipse!` and then something else
* Implementation
    * Recursive procedure, keeps track of where you are, makes one
      column at a time.
    * A second recursive procedure to make a column.
    * Contrast recursion with `for-each`

`mandelbrot.rkt` - Mandelbrot set

* More complex
* Not necessasily interesting

Questions and notes

* How much code?  It's not how much, it's its success at meeting project
  goals plus normal issues (design, efficiency, clarity, documentation, etc.)
* Read the rubric!
* Try different widths and heights and ratios early on.
* Extend something you've found interesting.

General elements of design
--------------------------

Relationships between elements
------------------------------

Broader design principles
-------------------------

More examples
-------------

