Exercise 2.49. Use segments->painter to define the following primitive painters: a. The painter that draws the outline of the designated frame. b. The painter that draws an ``X'' by connecting opposite corners of the frame. c. The painter that draws a diamond shape by connecting the midpoints of the sides of the frame. d. The wave painter. ———————————————————————————————————————————————————————————————————————— (define outline (segments->painter (list (make-segment (make-vect 0 0) (make-vect 0 1)) (make-segment (make-vect 0 1) (make-vect 1 1)) (make-segment (make-vect 1 1) (make-vect 1 0)) (make-segment (make-vect 1 0) (make-vect 0 0)) That is inexcusably verbose. Better would be a function that just takes a list of numbers, and treats each group of four as a new segment. (define big-x (segments->painter (list (make-segment (make-vect 0 0) (make-vect 1 1)) (make-segment (make-vect 1 0) (make-vect 0 1))))) (define diamond (segments->painter (list (make-segment (make-vect 0 0.5) (make-vect 0.5 1)) (make-segment (make-vect 0.5 1) (make-vect 1 0.5)) (make-segment (make-vect 1 0.5) (make-vect 0.5 0)) (make-segment (make-vect 0.5 0) (make-vect 0 0.5))))) (define wave booooring)