Information Technology Reference
In-Depth Information
“Good idea, Laurie. That's a lot simpler,” said Tinker. “I was worried you were going to fill
my shop with circles!”
“You know, the turtle is drawing really slowly. Not like when it was drawing the square,” she
said.
It was true. The turtle would crawl all the way to the edge of the circle, then make a mark,
then crawl all the way back to the center, 360 times. With small circles it wasn't too bad, but
big circles took a lot longer.
“Hmm,” Tinker said. “It spends a lot more time running back and forth than it does making
marks. Do you think you can reduce the running time?”
It makes sense, but it isn't sensible. Laurie thought and doodled, and doodled and thought,
but she couldn't figure out how to make it more sensible. The turtle has to go back to the
center, right? How else could it know where the edge of the circle was?
Laurie let her eyes wander around the room. Xor was staring at a moth that was flying in lazy
loops around a lightbulb. His skin was slowly fading from red to yellow and back to red. The
moth went around and around. It was hypnotic. Around and around and around and . . .
Oh! If the moth doesn't have to go to the center of the lightbulb to fly around it in a circle,
then why does the turtle need to go back to the center to draw one?
Laurie reached for a fresh piece of paper before the idea got away. Don't let a new thing out
of your sight without a name.
MOTH-CIRCLE ( how-big? ):
Go forward how-big? inches,
make a mark,
turn right one degree,
repeat three hundred sixty times.
Make a MOTH-CIRCLE ( one ).
The turtle went bzzaap and zzzrbt and whuzzzsh and then it started to draw. It moved one
inch, made a dot, then turned a tiny bit, then moved one inch, then made another dot . . .
“Whoops. It's making a huge circle! Let me try a small number.” Laurie didn't have a small
number handy, so she borrowed one she had heard from Tortoise: one thirty-second of an
inch.
“That's better,” Laurie said.
“Let me see,” Tinker said. “Wow, look at the little guy run!”
Search WWH ::




Custom Search