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

Re: LOGO-L> Re: Logo Contest Entry



jstclair@omsd.cerf.fred.org wrote:
> 
> Please reply to Craig Denson <denson@epgc001.sdd.hp.com>  or
> logo-l@gsn.org   NOT   logo-list@gsn.org  or  me.
> 
> -John
> --Message below re-posted by <jstclair@omsd.cerf.fred.org>
> Date - 08 May 1997 09:03:05 -0700
> >From - Craig Denson <denson@epgc001.sdd.hp.com>
> To - jcstclair@omsd
> Subject - Re: LOGO-L> Re: Logo Contest Entry
> Usenet: comp.lang.logo
> ------------------
> Post Usenet mail to comp-lang-logo@ucbvax.berkeley.edu
> ------------------
> 
> Keith
> 
> > Translating from MicroWorlds to MSW Logo:
> > repeat 11 [for [i 0 359] [fd 1 rt (sin :i / 2)]]
> >
> > This is interesting. Why does the line appear to
> > match up exactly after drawing 11 petals?
> > I think it is not really a mathematically exact
> > match, but it looks perfect on the screen.
> 
>   try this:
> 
>   repeat 100 [ setpencolor 1 + random 8
>               repeat 11 [for [i 0 359] [fd 1 rt (sin :i /  2)]]]
> 
>   what you can't tell from this is what the source of the error
> is. but i looks way cool
> 
> craig

to xxx
repeat 100 [setpencolor 1 + random 8 repeat 11 [for [i 0 359] [fd 1 rt
(sin :i / 2)]]]
end

xxx
setpencolor doesn't like 3 as input  in xxx
[repeat 100 [setpencolor 1 + random 8 repeat 11 [for [i 0 359] [fd 1 rt
(sin :i / 2)]]]]

setpencolor is not a single index it's a list of [red green blue]

I personally do not like much code on one line because it's too hard to
read and debug. You had 1 to many "]"'s also.

to xxx
repeat 100~
   [
   setpencolor (list random 255 random 255 random 255)
   repeat 11~
      [
      for [i 0 359] [fd 1 rt (sin :i / 2)]
      ]
   ]
end

But again I find organized colors much more appealing

to xxx
repeat 16~
   [
   setpencolor (list repcount*256/16 0 0)
   repeat 11~
      [
      for [i 0 359] [fd 1 rt (sin :i / 2)]
      ]
   ]
end

-- 
===============================================================
George Mills
email: 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