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

Re: LOGO-L> Recursive Stars



RAY CATZEL wrote:
> 
> Hi Yehuda,
> could you please send me the code for the recursive stars. It looks ideal for
> MicroWorlds using sliders as variable inputs. I will publish my results on the
> web so that you can play with it. I will even include credits to you.
> Thanks,
> Ray


Here it is:

========================--============
to main          ; Stars, Nov 30, 1997
cs ht
pr[Input number of points, cute 
                angle, size and level]
do rw rw rw rw
end

to do :points :cute_ang :size :level
if :level<1[stop]
rt 180
repeat :points[shape rt turn_ang]
rt 180
end

to shape
rt turn_ang fd :size lt :cute_ang/2
do :points :cute_ang .4*:size :level-1
lt :cute_ang/2
bk :size
end

to turn_ang
op(360/:points+:cute_ang)/2
end
======================================

Try it with inputs like:

	5 30 70 4
	6 25 60 3

I believe that the program will run as-is on any Logo version.

Regards...

[[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.



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