At 06:00 AM 10/28/97 -0600, Jim Muller wrote:
>Since you're getting picky one me (:>), try this one...
>
>TO CIRCLE :CENTER :RADIUS
>PU SETPOS :CENTER
>SETX XCOR - :RADIUS SETH 0 PD
>REPEAT 360 [FD (:RADIUS * 2) * PI/360 RT 1]
>PU SETPOS :CENTER PD
>END
Looks very good.
Call me picky, but I can't help making two comments:
1. You converted a relative function a.k.a. turtle-geometry
to absolute. That's OK, but there is also a need for a
function which draws a circle relative to the turtle's
position. In essence, if you want a circle of a given
radius, you bring the turtle there and call that function.
2. The RADIUS argument is not really the radius of the circle.
The actual radius is a bit different. It might be an
interesting excersize for students to explain why, and
to debate whether the real radius is bigger or smaller
than RADIUS. Advanced students can correct the above
function by adjusting the step size to account for the
polygon approximation.
Chuck
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org. Mail
questions about the list administration to logofdn@gsn.org. To
unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home