back to math cats love MicroWorlds
MicroWorlds index
Swarm of Bees Overview
Go to the swarm of bees project!
Get the MicroWorlds Web Player
so you can use the project

screenshot of swarm of bees (inactive buttons)

To use this project, you need the free MicroWorlds Web Player, but you do not need to know anything about MicroWorlds.

In this project, five bees swarm around the boy wherever he goes. Their speed is controlled by the speed slider. For this animation, the computer chooses four random numbers:
1) a random number from 0 to 359, to set the heading (direction) of the boy;
2) a random number less than half of the number set on the speed slider, to set the speed of the boy's gliding after each change of direction;
3) a random number from 0 to 179, to set the heading of each bee after it has moved towards the boy and passed him;
4) a random number less than 70, to set the distance that each bee will glide after receiving its new heading.

If you own MicroWorlds and would like the create the project yourself from scratch, here are the procedures:

* * * * * * * * * *

procedures for SWARM OF BEES

Please refer to the screenshot to see
the button, slider, and turtles needed.

* * * * * * * * * *

to bee-sting
t1, forever [seth random 360 glide 200 3 + random int speed / 2]
ask [t2 t3 t4 t5 t6] [launch [forever [sting!]]]

to sting!
towards "t1 glide int 1.3 * distance "t1 speed
rt random 180 glide random 70 speed

© copyright 2000 -   Wendy Petti of Math Cats.   All Rights Reserved.