<< Previous exercise (2.49) | Index | Next exercise (2.51) >>
;; The other way of doing it ;) (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 1.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)))
Here is lazy method of doing it
(define (rotate180 painter) (rotate90 (rotate90 painter))) (define (rotate270 painter) (rotate90 (rotate90 (rotate90 painter))))
dudrenov