CSC151 2009F, Class 33: Geometric Art Through Numeric Recursion Admin: * Are there questions on Exam 2? * Yes, you already have five points of extra credit. That's what I get for adding examples at the last minute. * I will reserve time at the start of class for pre-quiz questions. * My oldest son has a sequences problem that I can't answers * Consider the sequence 1, 15, 71, 295, 1191, 4775, ... * One defn: a[1] = 1, a[2] = 15, a[n] = 5*a[n-1] - 4*a[n-2] * Another: a[1] = 1, a[n] = 4*a[n-1] + 11 * A third: a[1] = 1, a[n] = a[n-1] + 14*4^(n-2) * All three seem to define the same sequence. Why are they equivalent? * After you have finished the quiz, start the lab. Overview: * Parallel lines, Concentric Circles, and Beyond. Questions on the Exam * For problem 3, should we use our answers to problems 1 and 2? * If at all possible. (If you were not able to solve problems 1 and 2, you should still do your best to answer problem 3.) Questions in preparation for the Quiz * Is letrec just "let for recursive local procedures"? * Yes, it's fine to think of it that way * And what is named let? * Another mechanism for local recursive procedures * Shorter than letrec * Some people find it clearer (let NAME ((PARAM1 INITIAL_VALUE1) (PARAM2 INITIAL_VALUE2)) BODY) * Scheme thinks of (let ((NAME VAL) (NAME VAL)) ...) and (let NAME ((PARAM VAL) (PARAM VAL)) ...) as being TWO DIFFERENT THINGS