Tuesday, January 6, 2009

Last night's examples, compose-vertical

The examples from last night's lecture are now on the web site. Follow the link from the syllabus page.

You should look particularly at compose-vertical.ss . The code we had last night was wrong: it composed the images in the wrong order-- something I couldn't tell because I had used bad names-- rect1 and rect2 instead of red-rect and green-rect. Had I used better names for the test data I would have seen immediately that the images were appearing in an order opposite from what I had intended. (Test everything! (and examine your tests closely!)).

I've also included a function compose-vertical-scene, which does the same thing for scenes. Look at the documentation for the World teachpack to learn about scenes. You'll need to do this for the problem set anyway.

--Prof. Wand

No comments:

Post a Comment