[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> Total Turtle Trip



At 02:00 AM 10/28/97 -0500, you wrote:
>On an Ideal computer going to infinity they are the same.
>
>I think I understand Chucks view and it's much like mine. I don't
>think Chuck has warmed up to you POLY tree huggers yet :-)
>

I wouldn't call myself a POLY tree hugger (:>). The Total Turtle Trip (or
Rule of 360 as I call it in TGLA) is one of many valuable exercises but
certainly not the only one. Here's what I've considered to be the best
definition of a circle. There's a whole family of procedures that go along
with this to draw arcs, slices, etc. These came from a math professor.

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

However, they are still REPEAT 360 [FD whatever RT whatever].

...cut...

>This discussion is also bordering on yet another related thread
>drawing from the center versus the edge. I gave up and put in both
>(ARC and ARC2) and I'm glad I did because both are very useful.
>
>Chucks method of doing
>for [ang 0 360] [PU FD :RAD PD DOT PU BK :RD RT 1]

What's the difference between this and my CIRCLE procedure?

TO CIRCLE :RADIUS
HOME CS PU
REPEAT 360 [FD :RADIUS POINT BK :RADIUS RT 1]
END

TO POINT
PD RT 90 FD 1 
BK 1 LT 90 PU
END

I've simply defined it in two procedures so readers can see the development
more clearly.

>
>will produce exactly what
>
>for [ang 0 360] [pu setxy xcor + :rad*sin :ang xcor + :rad*cos :ang PD
>DOT PU]
>
>will.
>
>The later is what ARC does except it connects the DOTs and calculates
>how many DOTs are needed based on the radius and screen resolution
>(like he mentioned, drawing dots just below the screen resolution).

I agree...ARC and ARC2 are handy, instructional tools. I've used similar
tools for years. However, please pardon my ignorance. To implement an arc
or circle on the computer, how can you get away from the apparent fact that
you have to implement some form of REPEAT 360 [FD whatever RT (or LT)
whatever]? So far, that's all I've seen.

What am I missing?

Regards...Jim



>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>
Jim Muller
jmul@cyberramp.net
The Great Logo Adventure at
http://www.cyberramp.net/~jmul
>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>
---------------------------------------------------------------
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