Skip to main content

CSC 151.01, Class 15: Drawings as Values

Overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Extra credit
    • Questions
  • Lab

News / Etc.

  • New partners!
  • Please turn in your exam cover sheets to the mentors.
    • Diagram of appropriate cover sheet format is on the whiteboard.
    • If you forgot your random number, I’ll deal.
  • Sorry for the confusion on writeup 10 (?). If the grader said something like “Where is irgb-average?”, and had no other concerns, don’t worry, you got credit for the writeup.
  • The grader has returned HW2 (but forgot to cc me).
  • Advance notice: In the interests of keeping Friday’s class efficient, I will not take questions before the quiz. Ask Q’s in advance.

Friday’s quiz topics

  • Drawings as values (today’s topic)
  • Documentation
  • Testing
  • (Past topics, as appropriate)

Reminders

  • Visit mentor sessions! We have mentor sessions on Wednesday and Thursday evenings from 8:00-9:00 p.m. in the CS Commons. Wednesdays will be more Q&A, Thursdays will include sample quizzes.
  • Visit review sessions! I run review sessions on Thursdays at 9am in this room.

Upcoming Work

Extra credit (Academic/Artistic)

  • Thursday extras, Thursday, 16 Feb 2017, 4:15 p.m., Science 3821: 4-1 joint BA/MSC program with UIowa.
  • NEW CS Table, Tuesday at noon, 21 Feb 2017. Net neutrality. Reading packets should be available outside Curtsinger’s office or Orsera’s office.

Extra credit (Peer)

  • Friday-Saturday-Sunday, 17th-19th, Swimming and diving conference championships. (You can only get credit for two of the three days; staying for an hour counts.)
  • Saturday the 18th, Symphony Concert. 2-4 p.m. Sound painting and more! In Sebring-Lewis.
    • He conducts all kinds of people.
    • The gestures are universal. Drawers, dancers, musicians, …. Vulcan mind meld!
  • Art house print making and cookie decorating event. Saturday February 18th, 1-3PM on JRC 227.
  • NEW Active bystander training tonight at 5:45 pm in JRC 209.
  • NEW Serenade by Noteworthy

Good things to do

  • Women’s basketball (Senior day) next Saturday at 1pm.
  • Men’s basketball (Senior day) next Saturday at 3pm.
  • Slavic coffee house, Saturday, 5:30-7:00 p.m. Bucksbaum Rotunda.
  • NEW Grinnell Equestrian Club Drill Team bake sale, 20 February 2017, 11am-2pm and 4pm-9pm.
    • Am I the only one who reads “Club Drill Team” and thinks of the Flintstones?
  • NEW Ready to Run: Campaign Training for Women, Friday, 9am-noon, Harris. (You will need to take the quiz on Thursday, but I will excuse you from class.)
  • NEW French movie at Strand, with subtitles for those of us who are not as cultured as the rest of you.

Questions

Lab

  • Note: The unit circle as a diameter of 1 and therefore a radius of 0.5.
  • When doing exercise 1, scale before shifting (so put the call to scale-drawing inside the call to hshift-drawing)
  • The first number in the drawing representation is the color of the drawing, in integer-encoded RGB form.
    > (color->irgb "blue")
    255
    > (recolor-drawing "red" drawing-unit-circle)
    '(drawing ellipse 16711680 "" -0.5 -0.5 1 1)
    > (color->irgb "red")
    16711680
    
  • Every drawing has an implicit “bounding box” to enclose the drawing. drawing-left gives the x coordinate of the left edge of that box, drawing-top gives they y coordinate of the top-edge of that box.
  • drawing-scale creates a new drawing with not just the width and height scaled, but also the left and top. Why? It makes sense, in the abstract.
    • Sam draws an example of a really simple car. If we scale each shape in place, it no longer looks like a car. If we shift, it still does.

Writeup

Write up exercise 6 from the lab on drawings as values.

Send your solution to csc151-01-grader@grinnell.edu.

Title your email CSC 151.01 Writeup for Class 15 (YOUR FULL NAMES).