Shading
What is it?

This project shows a technique for projecting light onto a sphere and rendering the resulting shading pattern. Watch as the turtle "sun" moves around the sphere and makes the light pattern change across its surface.

How to Use It
The SETUP button clears the screen, sets up the turtle "sun" and renders an initial sphere. The GO forever button moves the sun around the screen, rerendering the light pattern on the sphere for each step it takes.

 

Explorations
 

Can you control the sun with the mouse? Write a procedure that sets the sun's position to the position of the mouse-xcor and mouse-ycor.

Can you shade a different shape other than a sphere? What if the shape has corners? How do you render shadows?

 

 

We welcome your feedback and suggestions! Please send us email