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

Re: LOGO-L> Total Turtle Trip



Chuck Shavit wrote:
> 
> At 07:32 PM 10/27/97 -0500, George Mills wrote:
> 
> >That's exactly what ARC does (actually ARC2)
> >
> >ARC2 :radius :degrees
> >
> >In fact I believe it was Yehuda that has ARCFD and ARCBK in his library
> >or something like that. Note that ARC2 moves the turtle along the arc,
> >ARC draws the circle about the turtle and does not move or turn the
> >turtle.
> 
> Cool indeed.  I think Yehuda has what I had in mind, i.e., an extension of
> FORWARD that goes the specified distance along an arc instead of in a
> straight line.  I don't know what Yehuda implemented, but to be faithful to
> the turtle geometry spirit (at least my understanding of it), ARCFD should,
> in addition to moving the specified distance on the arc, also
> 
>   1. Leave the turtle facing tangent to the arc, so that a second ARCFD
>      would continue the arc,

ARC2 does EXACTLY what you keep describing.
The turtles Direction and Angle is always such that it is tangent to the
ARC.

Here is your ARCFD and ARCBK

TO ARCFD :RAD :DEG
ARC2 :RAD :DEG
END

TO ARCBK :RAD :DEG
ARC2 :RAD -:DEG
END

Draw a Quarter of a PIE returning the turtle back where it started.
Notice how nice the units work together.

ARC2 100 90
RT 90
FD 100
RT 90
FD 100
RT 90

Yehuda used UCBLogo's ARC at the time which draws only from the center.
I later added ARC2 after a long thread with Yehuda (much like this one)
that keeps the turtle tangent to its ARC. I just posted an ARC2 for
UCBLogo which used UCBLogo's built in ARC just a couple weeks ago.

Other flavors exist as well ELLIPSE2, CIRCLE2 and ARC2 all staying
tangent
to it's respective curve all based on what I call ELLIPSA2 (short for
Elliptical ARC from edge, perhaps a T for Tangent would be more
accurate).

When you "spin" these simple curves in 3D you get Eggs, Spheres,
Umbrellas,
Bowls, Saucers etc.

Don't confuse some 3D code that has been posted that has used a
lot of absolute coordinates, you can work in relative or absolute
just as in "2D Turtle Geometry".

> 
>   2. Be consistant with the 3D environment, i.e. move along an arc
>      tangent to the 3D direction vector.
>

There is nothing that has to be done special for ARCs in 3D space.
ARCs always reside on a single 2D plane within 3D space. "2D Turtle
Geometry" works in "3D Turtle Geometry" (as it should) with no change,
that's the beauty of how it's introduced.

REPEAT 36 [ARC2 360 100 DOWN 10] ; Draws a 3D Bagel

The turtle is always tangent to the surface.

> 
> While (1) is relatively easy to implement and maybe was already
> implemented, (2) might be harder.
> 

(2) was a Piece O' Cake once I had the right foundation.

>
> Chuck Shavit
> 
> 
-- 
===============================================================
George Mills (mills@softronix.com)
http://www.softronix.com/
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------
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