; ======================================================================
;
; Structure and Interpretation of Computer Programs
; (trial answer to excercises)
;
; 计算机程序的构造和解释(习题试解)
;
; created: code17 08/20/05
; modified:
; (保持内容完整不变前提下,可以任意转载)
; ======================================================================
;; SICP No.2.51
;; a
(define (below painter1 painter2)
(lambda (frame)
((transform-painter painter1
(make-vect 0.0 0.0)
(make-vect 1.0 0.0)
(make-vect 0.0 0.5))
frame)
((transform-painter painter2
(make-vect 0.0 0.5)
(make-vect 1.0 0.5)
(make-vect 0.0 1.0))
frame)))
;; b
(define (below painter1 painter2)
(rotate180
(rotate270
(beside (rotate270 painter1)
(rotate270 painter2)))))