[MWForum]random numbers, filling

Karen Randall mwforum@lists.mathcats.com
Sun, 8 Feb 2004 11:23:27 -0600


--============_-1135861486==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

Greetings,

Would one of you be kind enough to comment on our class conclusions 
about a couple small programming problems?  Is there a more elegant 
way around them?

1. The kids want to have random number inputs to setting turtle 
coordinate locations.  We've been able to do this using setx and sety 
separately, but not setpos followed by something such as [random 20 
random 20].  Is this correct?  Can you help us understand why one 
works but not the other?

2.  When trying to fill shapes, we're adding the extra commands to 
get the turtle inside the shape and off the line it drew getting 
there so the fill command works, and then sometimes there is still 
something not cooperating.  Lifting the pen before moving the turtle 
inside the shape helps a little, but is there an easier way to get 
solid color shapes (via the turtle and not the graphics tools)?

Thanks!

ps.  I wrote a bit ago asking for resource leads for integrating 
intermediate level Logo into my math class.  I'm finding Mathematics 
and Logo by Kathleen Martin and Donna Bearden (1985) very helpful for 
the geometry part.
--============_-1135861486==_ma============
Content-Type: text/html; charset="us-ascii"

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>random numbers, filling</title></head><body>
<div>Greetings,</div>
<div><br></div>
<div>Would one of you be kind enough to comment on our class
conclusions about a couple small programming problems?&nbsp; Is there
a more elegant way around them?</div>
<div><br></div>
<div>1. The kids want to have random number inputs to setting turtle
coordinate locations.&nbsp; We've been able to do this using setx and
sety separately, but not setpos followed by something such as [random
20 random 20].&nbsp; Is this correct?&nbsp; Can you help us understand
why one works but not the other?</div>
<div><br></div>
<div>2.&nbsp; When trying to fill shapes, we're adding the extra
commands to get the turtle inside the shape and off the line it drew
getting there so the fill command works, and then sometimes there is
still something not cooperating.&nbsp; Lifting the pen before moving
the turtle inside the shape helps a little, but is there an easier way
to get solid color shapes (via the turtle and not the graphics
tools)?</div>
<div><br></div>
<div>Thanks!</div>
<div><br></div>
<div>ps.&nbsp; I wrote a bit ago asking for resource leads for
integrating intermediate level Logo into my math class.&nbsp; I'm
finding<i> Mathematics and Logo</i> by Kathleen Martin and Donna
Bearden (1985) very helpful for the geometry part.&nbsp; </div>
</body>
</html>
--============_-1135861486==_ma============--