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

LOGO-L> colour in MSWLogo



;Hello George Mills
;I should like to thank you very much for your advice for fixing my
;last code to use colour in MSWLogo.
;Realy I am starting to enjoy MSWLogo; few weeks ago I was comfortable
;with UCBLogo only. Actually both of them are Great gifts to the Logo
;community thanks to you and to Brian Harvey.
;After writing the code for all known surfaces of revolution,some fractals
;on the sides of a cube some cubes inside cubes (which idea was your's)
;and also for the "Dodekaeder"; I feel that the 3-D extensions are great.
;Here is the coloured and revised code for a box which I have sent two
;days ago to Olga Tuzova.
;Hoping that some body in the logo-l will enjoy it.
;With Best Regards.
;Mhelhefny 
;---------------------------------------------------------- 

to colour :f
make "s [[255 0 0][255 255 0][0 255 0][0 0 255][200 100 200]
[200 0 200][255 150 90]]
op item :f :s
end

to fil
pu rt :a fd :size*.7 pd fill pu bk :size*.7 lt :a pd 
setfc colour :lev 
end

to go 
turnon3d cs lt 90 ht
repeat 4[repeat 3[side fd 247] down 90] rr 90
repeat 3[pu setxyz -247*3 247 -247*(repcount- 1) pd repeat 3[side fd 247]]
end

to poly_star :size :n :lev
if :lev =0 [stop]
repeat :n [fd :size/ 4 
poly_star :size/3 :n :lev-1 fd :size/ 2 rt 360/ :n] 
setfc colour repcount 
fil
end

to side 
make "n 5 make "lev 2
make "c 180/ :n make "a 90- :c    
square 247 fd 48 poly_star 200 :n :lev bk 48  
end

to square :a
repeat 4[fd :a rt 90]
end

to turnon3d
; This can be a library procedure
perspective
setturtle -1
setxyz 1500 1500 1700
setturtle 0 
end
;------------------------------------------------------
---------------------------------------------------------------
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