【SICP练习】78 练习2.50



练习2.50

先来定义一个在水平方向上反转画家的函数。

(define (flip-horiz painter)

  (transform-painter painter

                    (make-vect 1.0 0.0)

                    (make-vect 0.0 0.0)

                    (make-vect 1.0 1.0)))

(define (rotate180 painter)

  (transform-painter painter

                    (make-vect 1.0 0.0)

                    (make-vect 0.0 1.0)

                    (make-vect 1.0 0.0)))

(define (rotate270 painter)

  (transform-painter painter

                    (make-vect 0.0 1.0)

                    (make-vect 0.0 0.0)

                    (make-vect 1.0 1.0)))

版权声明:本文为 NoMasp柯于旺 原创文章,如需转载请联系本人。

posted @ 2015-02-22 14:05  nomasp  阅读(104)  评论(0编辑  收藏  举报