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

LOGO-L> wordtree



Here is a fractal tree made with the letters T-R-E-E.
It is based on a design in Scott Kim's marvelous
book named "Inversions".

to bigtree ; for big screens
cs pu bk 220
wordtree 60 1
end

to smalltree ; for small screens
cs pu bk 160
wordtree 40 1
end

to wordtree :s :m
; Fractal tree made with the word "TREE"
; based on a design from Scott Kim's "Inversions".
; :s = size
; :m = mirror (1 or -1)
(local "p "h "sf)
make "p pos make "h heading
; Draw letter T or E
pd
lt 90 * :m bk :s fd 2 * :s
lt 90 * :m fd :s
lt 90 * :m fd :s bk :s
lt 90 * :m fd 2 * :s
rt 90 * :m fd :s
pu
if :s < 4 [stop]
make "sf .65 * :s
setpos :p seth :h
fd :s + :sf
; Draw letter R
pd
lt 90 * :m bk :sf fd 2 * :sf
rt 120 * :m fd 4 * :sf / 3
rt 120 * :m fd 4 * :sf / 3
lt 120 * :m fd 4 * :sf / 3
pu
; Draw branch 1
setpos :p seth :h
fd :s + (4 * :sf)
rt 90 * :m
wordtree :sf (-:m)
; Draw branch 2
setpos :p seth :h
fd :s + (7 * :sf)
lt 90 * :m
wordtree :sf :m
setpos :p seth :h
end

- Keith Enevoldsen

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