From 4ce415d7264d8b6db516a5572815d8d5ffaa3227 Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Mon, 13 Jun 2022 20:30:56 -0400 Subject: ex: 50.rkt: implement counterclockwise-180 --- ex/2/50.rkt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ex/2') diff --git a/ex/2/50.rkt b/ex/2/50.rkt index d2b91a6..6db473d 100644 --- a/ex/2/50.rkt +++ b/ex/2/50.rkt @@ -16,14 +16,23 @@ (sub-vect (m corner1) new-origin) (sub-vect (m corner2) new-origin))))))) + (define (flip-vert painter) (transform-painter painter (make-vect 0.0 1.0) (make-vect 1.0 1.0) (make-vect 0.0 0.0))) + (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 (counterclockwise-180 painter) + (transform-painter painter + (make-vect 1.0 1.0) + (make-vect 0.0 1.0) + (make-vect 1.0 0.0))) -- cgit v1.2.3