[MWForum]re: HELP on rotating turtles and shapes

Wendy Petti mwforum@lists.mathcats.com
Thu, 29 Aug 2002 17:23:47 -0500


Turtles can rotate; the shapes they are wearing cannot.  A shape will always be in a fixed orientation.  MWPro has no advantage over MW 2.0_ in this regard.  (We can save the MWPro vs MW 2.0_ discussion for another message.)  However, you can create the illusion of rotating shapes.  Do you really need degree-by-degree rotation? You've already received some helpful advice but here is how I handled it when I created a project in which one can rotate pattern blocks by clicking on them (a very similar situation to the one you describe):

1) As Harvey suggested, I created a set of shapes for each piece.  However, I did not use the MWPro shapes editor; I was using MW 2.0_ at the time.  Instead, I instructed the turtle to turn and redraw the original shape at each needed angle, then colored and copied and pasted each of these rotated shapes into the shapes center, closely cropping each shape.
	One pattern block shape, the trapezoid, required 12 shapes to be able to fit properly with all other shapes; I rotated the turtle 30 degrees between drawing each shape.  The diamond and crystal required 6 shapes (drawn after rotating 60 degrees).  The triangle required 4 shapes (drawn after rotating 90 degrees).  The hexagon required 2 shapes (drawn after rotating 30 degrees).  The square required 3 shapes (drawn after rotating 30 degrees).  (Note:  the square of course does not need to be rotated in order to tessellate with just itself but it needs different angles in order to nestle up against any side of the other pattern block pieces.)

2) I've created different solutions for getting each turtle to change to the next rotation of its shape with each mouse click.  The less elegant solution, but which is easier for newbies to understand, is to write a procedure for each turtle/puzzle-piece, then set the turtle's instruction to that procedure name.  As an example, here is my procedure for turning the "crystal" turtle by having it put on, one click at a time, shapes 13 - 18:

to turn.crystal
if shape > 17 [ht setsh 12]
setsh shape + 1 st
end

(I temporarily hid the turtle because otherwise in changing from shape 18 to shape 13 it momentarily flashed shape 12, the last trapezoid shape.)

The more elegant solution involves using "turtlesown," but that's another message!

You can see this pattern blocks project in action here:

http://www.mathcats.com/microworlds/patternblocks.html

Of course, using the project offline is more satisfying because then you can select and copy a stamped cluster of shapes and paste it over and over again.  It is possible in this way to fill a page with a tessellating pattern in a minute or two.

After visiting the page, the pattern blocks project will be cached in your Temporary Internet Files, if you want to move it into another folder and look at the shapes and full set of procedures.

Wendy Petti
Math Cats
http://www.mathcats.com
MicroWorlds in Action
http://mia.openworldlearning.org


> In order to tessellate the  plane [ the Mw page
> > ]the students should, ideally, be able to rotate each tile 
> by clicking on it
> > [ ie.e., by clicking on the turtle-wearing-the-tile ] so 
> that they can
> > rotate it degree by degree if necessary in order to make 
> the tessellation
> > work. However, this is where I'm 'stuck' - I don't know how 
> to make the
> > turtle-as-a-tile rotate by clicking on it ! This of course 
> is not an issue
> > if the turtle is 'wearing' say a  square tessellation-tile 
> because it does
> > not have to be rotated in order to tessellate. [IS THIS 
> MAKING SENSE ??]
> Can anyone help please?
> > 
> >   We are currently using Microworlds v 2.03 and I'm 
> wondering if the issue I
> > mention above would be non-issue if we were using 
> Microworlds Pro.  That is
> > to say, would I be able to programme the turtle/tiles to 
> rotate without any
> > problems if we were working in the MwPro environment. Is 
> this the case?
> > 
> >   In several weeks our school will be moving from Win 98  
> to Win XP and I'm
> > also wondering if we should at the same time move on'up to 
> MW Pro? Does anyone have any thoughts on this? 
> > 
> > Graham Williams
> > 
>