|
@@ -3,6 +3,7 @@
|
|
(import (turtle turtle3)
|
|
(import (turtle turtle3)
|
|
(turtle vector)
|
|
(turtle vector)
|
|
(scheme case-lambda)
|
|
(scheme case-lambda)
|
|
|
|
+ (only (scheme inexact) acos)
|
|
(scheme base))
|
|
(scheme base))
|
|
(export forward back right left up down
|
|
(export forward back right left up down
|
|
fd bk rt lt pu pd
|
|
fd bk rt lt pu pd
|
|
@@ -11,7 +12,7 @@
|
|
show hide draw-line home reset-tilt
|
|
show hide draw-line home reset-tilt
|
|
repeat xcor ycor setx sety
|
|
repeat xcor ycor setx sety
|
|
clear-screen max-recur face
|
|
clear-screen max-recur face
|
|
- distance angle)
|
|
|
|
|
|
+ distance angle circle)
|
|
(begin
|
|
(begin
|
|
(define current-tilt 0)
|
|
(define current-tilt 0)
|
|
(define (tilt)
|
|
(define (tilt)
|
|
@@ -85,5 +86,9 @@
|
|
(define (angle A B C)
|
|
(define (angle A B C)
|
|
(radians->degrees
|
|
(radians->degrees
|
|
(vector-angle (vector-difference B A)
|
|
(vector-angle (vector-difference B A)
|
|
- (vector-difference B C))))))
|
|
|
|
-
|
|
|
|
|
|
+ (vector-difference B C))))
|
|
|
|
+ (define (circle r)
|
|
|
|
+ (define pi (* 2 (acos 0)))
|
|
|
|
+ (repeat (40)
|
|
|
|
+ (fd (* 2 pi r 1/40))
|
|
|
|
+ (rt 9)))))
|