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

Re: LOGO-L> Sierpinski re-visited



Gary Frederick wrote:
> 
> Can you post the code for your examples? They are really nice.
> 
> Gary


Thank you, Gary.
Please, here it is:

=====================
to main ; Sierpinski
ct cs ht rt 30
pu setxy -230 -170 pd
pr[What depth? (1-7)]
do 460 rc
end

to do :size :depth
if :depth=0[stop]
repeat 3[draw rt 120]
fill_it
end

to draw
do :size/2 :depth-1
setpc 7
fd :size
end

to fill_it
rt 30 pu fd .6*:size
setpc :depth fill
bk .6*:size pd lt 30
end
=====================

Enjoy it,

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