2012年11月9日星期五

Project 1

    I have few tests this week and  I feel a little bit exhausted...Today is the due day of project one and I still have few things to do. I hioe that I can do it well~~

    I find that the second question of project 1 is really hard for me. We need to fix the definition of clarify-image.It is related to map and map image.  Our TA helped us a little and the solution is
(check-expect (clarify-image (circle 10 "solid" (make-color 250 250 250 255)))
              (circle 10 "solid" (make-color 250 250 250 0)))
;
(define (clarify-image im) (map-image clarify-color im)).
W also need to create two (check-expect ...) expressions for set-up-hand. To make it move , we should write like that:
(check-expect (set-up-hand BAR 90)
               (overlay/align
                "middle" "top"
                (rotate -90 BAR)
                (circle
                 (image-width BAR)
                 "solid"
                 (color 255 255 255 0))))
;
(define (set-up-hand im deg)
  (overlay/align
   "middle" "top"
   (rotate (* -1 deg) im)
   (circle
    (image-height (rotate (* -1 deg) im))
    "solid" (make-color 255 255 255 0))))
 I think I should practice more...

没有评论:

发表评论