making a jigsaw
    I'll go to any lengths to sneak in a photo of Sheba!
I reduced the original photo to 240 x 240 pixels and then cut it up into nine 80 x 80 squares. This was probably the hardest part of the project. You can use my pieces if you like.
    The basic idea is very simple - there are 9 turtles and each turtle carries one of the jigsaw pieces.
I called my pieces sheba1.jpg, sheba2.jpg, ... and they are in my projects directory. To load the shapes:
    loadshape  "c:\projects\sheba1.jpg  1
    loadshape  "c:\projects\sheba2.jpg  2
    ... and so on ...
    
Check they all loaded correctly by looking in the Shapes Centre: Sheba shapes in the Shapes Centre

hatch a new turtle "Hatch" eight new turtles and give
them each a jigsaw shape:

    t1,setshape  1
    t2,setshape  2
    ... and so on ...
    
And this is all there is to my mix procedure:
    everyone  [setx random 100 sety random 100]
    
and the sort procedure is almost as easy:
    t1, setpos [-79 79]
    t2, setpos [0 79]
    ... and so on ...
    
You can download my whole project if you like.

HOME turtle project tutorials