Hello everybody,
First of all I'd like to thank Mhelhefny for his wonderful
contributions. Great work!
Trying to understand what is happening with a shade on
the surfaces, I played a little with Mhelhefny's beautiful shells,
though having damaged them to the shape of the sphere. The source of
the light was moving around the sphere. I expected to get somewhat
different results. (The codes are below) What's wrong there?
Thank you,
Olga.
--------------------
to go
cs ht pu setsc 0
setpc [0 0 128]
perspective
sphere 50
animate.shade 50
end
to animate.shade :a
for [alf 0 1000 10]~
[shade 5*:a*(cos :alf) 100 5*:a*(sin :alf) ]
end
to shade :c :d :e
ask -3 [setxyz :c :d :e]
polyview
end
to sphere :a
for [theta 0 360 10][for [fi 0 360 10][
polystart
pd
sppos :a :fi :theta
sppos :a :fi :theta+10
sppos :a :fi+10 :theta+10
sppos :a :fi+10 :theta
polyend
]pu]
end
to sppos :r :fi :theta
setxyz :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