It's really a pity that the last lecture occured this wednesday. I expect that the last lecture will occure next week,but it is not. How quickly the time passes by! I learnt something interesting in last tutorial course,which is recursive function. The following is what i worked on.
define (vertical-line n)
(line 0 n "black"))
(define (spiral n)(cond
[(zero? n)(vertical-line 10)]
[else(beside/align "bottom"(vertical-line(+ 10(* 2 n)))
(rotate 90 (spiral (sub1 n))))]))
This is what i want to share with you guys. Try on this function, and you will get beautiful pictures!
没有评论:
发表评论