[racket] SICP picture language: error on affine transformation

From: Alexey Cherkaev (alexey.cherkaev at gmail.com)
Date: Thu Nov 20 01:15:08 EST 2014


I hope the author of the SICP package is on this email list. I have encountered this problem doing affine transformation of the picture:

 (paint ((transform-painter (make-vect 0 0) (make-vect 0.5 0.1) (make-vect 0 0.5)) einstein))

. . ../../../../../../Library/Racket/planet/300/6.1/cache/soegaard/sicp.plt/2/1/prmpnt.scm:376:12: vector-ref: contract violation
  expected: vector?
  given: 0
  argument position: 1st
  other arguments...:

If edge-2 vector is changed to (0 1), there is no problem:

(paint ((transform-painter (make-vect 0 0) (make-vect 0.5 0.1) (make-vect 0 1)) einstein))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141120/e29c1200/attachment.html>

Posted on the users mailing list.