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

LOGO-L> two bulbs



;Hello everybody
;here is the code to draw two intersecting bulbs
;Best regards.
;Mhelhefny
;-----------------
to fly
repeat 72[ask -1[fd 100 down 5]polyview]
end

to go
   cs ht
   make "c .6 
   perspective
   grid
   ask -3[setxyz 100 200 10]
   polyview ;fly 
end

to grid
for [t -60 280 10][for [u 0 360 10][if :t= 100 [make "t 130]
polystart pd
              s 
make "t :t+10 s 
make "u :u+10 s 
make "t :t-10 s 
make "u :u-10 s 
polyend]pu]
end

to r
op -.7 + (sin :t)*(cos :t)
end

to s
setxyz x*140 y*140 z*140
end

to shade :f :g :h
ask -3[setxyz :f :g :h]
polyview
End

to x
op (-:c* sin :u)* r
end

to y
op cos :t 
end

to z
op (-:c* cos :u)* r
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