CSC151.02 2013F, Class 05: Drawings as Values ============================================= _Overview_ * Preliminaries * Admin. * Quiz review. * Quiz. * About HW2. * Representing images. * Thinking about drawings through composition/decomposition. * The underlying representation. * Lab. * Pure approaches vs impure approaches (Optional). _Admin_ * No clicker questions today! * Quiz today! * EC Opportunities: * Humanities Center Speaker Sarah Hendron Wed., Sept. 11, 7:30 p.m., JRC101 Waking the Machines: Art, Design, and Adaptive Technology * CS Table next Friday (Reflections on Trusting Trust; NYT on NSA) * Men's Soccer (Home, Sunday, 4pm) * We have football players, so EC for football at Carleton (1pm Sat) * Mentor sessions are Thursdays and Sundays at 7:30 pm * I misspoke about individual and small-group tutors. First, please make sure that using the evening tutors and mentor sessions doesn't suffice. If that's the case, let me know. But give it a week or two. * _We start new partners today._ * I have made randomized same-sex partner choices this week. We can talk about why. * We will continue today's lab on Monday. * Reading for Monday (we probably won't use it until Tuesday) Writing Your Own Procedures _Quiz Review_ * You have ten minutes to ask me any questions you think will be relevant to the quiz. * Question: Why did we get the strange results for the square root of 2? Racket can't get an exact value for the square root of two, so it apprxoximates. When you square it, you get an approximatino. * Question: ANyone with any sense can tell that (* (sqrt 2) (sqrt 2)) is 2, without ever calculating the square * Racket (almost) always follows the same approach to evaluation: * First evaluate the parameters * Then apply the function (* (sqrt 2) (sqrt 2)) Whoops ... need to evaluate the parameters (sqrt 2) Whoops ... need to evaluate the parameters 2. Done. Apply sqrt function (* 1.41... (sqrt 2)) * How do we know how it's repesented? * If there's a decimal point, it's inexact * Question: Why do we get such a strange denominator for 1.4? * Racket reprsents every decimal(real) number as a sum of powers of 2 1.5 = 1 + 1/2 1.4 = 1 + 1/4 + 1/8 + 1/32 + ... You'll find that the denominator of 1.4 is 2^51 (I think) * Is DrRacket is there a number that's real but not rational? * Not that I can find. _Quiz_ * You have ten minutes to take the quiz. _About HW2_ * Only about 1/4 of you have filled in the prologue. I'd like to see more fill it out soon! * Are there questions? * Ask questions on Monday Representing images ------------------- * We solve problems in many domains, so why not in the domain of image making * You need a model of what the computer knows how to do * We will visit four+ models of images Thinking about drawings through composition/decomposition --------------------------------------------------------- * Drawings as value: That is, drawings are a type * What should we know about new types * The values * What operations * How to notate * Unit square + Unit circle (and things built from them). And things built with the operators. * Notate: drawing-unit-square drawing-unit-circle * Operate * scale * stretch * combine * change color * shift * display The underlying representation ----------------------------- _Skipped_. Lab --- _Started_. Anticipate finishing on Monday. Pure approaches vs impure approaches (Optional) ----------------------------------------------- _Skipped_.