I found the following works for MicroWorlds2:
to dahlia3d
cg ht pd
repeat 16[
setc color + 1
repeat 8[
repeat 90[fd 1 rt 2] rt 135] rt .4]
end
regards,
Ray
-----Original Message-----
From: Yehuda Katz [SMTP:yehuka@beitberl.beitberl.ac.il]
Sent: Sunday, May 18, 1997 4:23 PM
To: JENEVOLD@aol.com
Cc: Logo-L
Subject: Re: LOGO-L> 3-D color effects
JENEVOLD@aol.com wrote:
>
> Julie Clune submitted Simple Flower:
>
> repeat 11 [for [i 0 359] [fd 1 rt (sin :i / 2)]]
>
> which almost, but not exactly, returns to
> its starting position. This fact was exploited by
> Craig Denson and George Mills to produce
> 3-D color effects.
>
> to flower3d
> cs ht clearpalette
> repeat 16 [
> setpencolor (list repcount*256/16 0 0)
> repeat 11 [for [i 0 359] [fd 1 rt (sin :i / 2)]]
> ]
> end
>
> (This works in MSW Logo.)
>
> You can get similar 3-D effects with many patterns
> which do return exactly to their starting positions.
> Simply insert a small offset or angle for each repeat.
>
> For example, take this Dahlia variation by David Eisenstat:
>
> repeat 8 [rt 45 repeat 4 [repeat 90 [fd 2 rt 2] rt 90]]
>
> to dahlia3d
> cs ht clearpalette
> repeat 16 [
> setpencolor (list repcount*256/16 0 0)
> repeat 8 [rt 45 repeat 4 [repeat 90 [fd 2 rt 2] rt 90]]
> rt .4
> ]
Hi,
The above dahlia3d can be considerably shortened in UCBLogo, which
doesn't use the RGB convention for setting the pencolor.
Also it can be seen that inside the "repeat 8" there are TWO turns, RT
45 and RT 90 which can be combined into one turn of 135 deg.
Hence, in UCBLogo, the above dahlia3d can be written as follows:
repeat 16[
setpc repcount
repeat 8[
repeat 90[fd 2 rt 2] rt 135] rt .4]
If you find the drawing too big, replace the FD 2 by FD 1.
Enjoy...
[[Yehuda]]
---------------------------------------------------------------
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.
---------------------------------------------------------------
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