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

LOGO-L> pure glass shapes in UCBLogo



;Hello KW Melvin
;here is the code for a pure glass shape. It will run under UCBLogo.
;Also with the addition of a simple colour procedure it will run
;under MSWLogo
;Best Regards
;Mhelhefny
;-----------------------
to col
ifelse xcor>0 [setpc 3][setpc 5]
end

to go
cs ht pu
grid1 150 grid2 150
pu setxy -90 -180 pd label (se "PURE "GLASS "to "KW "MELVIN)
end

to grid1 :a
for [theta 0 180 15][for [fi 0 180 5][col sppos :a* sin(:theta*4) :fi :theta
pd]pu]
end

to grid2 :a
for [fi 0 180 5][for [theta 0 180 15][col sppos :a* sin(:theta*4) :fi :theta
pd]pu]
end

to mysetxyz :a :b :c
;isometric transform
setxy (:a- :c)*cos 30 :b- (:a+ :c)*sin 30
end

to sppos :r :fi :theta
;spherical co-ordinates
mysetxyz :r*(sin :theta)*cos :fi :r*cos :theta :r*(sin :theta)*sin :fi  
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