Java StarLogo
2.0
english
`turtle`
patches-own [chemical]

to setup
setxy 0 0
fd random 10
setc orange
end

to go
rt int 4 * chemical
fd 1 + chemical * chemical / 60
set chemical chemical + 2
end


`observer`
to setup 
ca
crt number
ask-turtles [setup]
ask-patches [set chemical 0]
end

to go
ask-turtles [go]
ask-patches [set chemical chemical * 0.99]
diffuse chemical .01
ask-patches [scale-pc yellow chemical 4 15]
end


`information`
WHAT IS IT? 

This project illustrates how bees create honeycombs. Each bee moves around randomly, dropping a chemical behind itself as it moves. The amount of chemical present on the  bee's current patch determines how far the bee turns and  moves.   

HOW TO USE IT 
Select the number of bees you wish to create by adjusting the number slider. Click on setup to set the bees up. Then click on go to run the simulation.   

THINGS TO NOTICE 
The bees begin in the center of the screen and gradually spread out. As the simulation runs you will notice shapes appearing -- first circular and then hexagonal honeycombs appear. The honeycomb shape emerges out of the interactions between bees and the chemical trails the bees leave behind.   

EXPLORATIONS 
Whether or not the honeycombs are formed depends on the number of bees. Try changing the number of bees to see what happens to the honeycombs.  As the simulation runs, try changing the number to see  what how bee "birth" or "death" effects the honeycomb formation.   

This project is based on "beehive," a project posted to starlogo-users by David Clark Little (email: 19521952@xs4all.nl).


`interface`
SLCanvas
top-left 5 233

SLButton
turtle-or-observer? observer
top-left 67 61
width-height 114 45
name "button2"
line-to-run "go"
forever? true
button-number 3
show-name? false
whichip 4

SLButton
turtle-or-observer? observer
top-left 11 16
width-height 96 42
name "button1"
line-to-run "setup"
forever? false
button-number 2
show-name? false
whichip 5

SLSlider
top-left 21 127
width-height 85 25
name "slider0"
variable "number"
min-value 0
max-value 999
current-value 427
slider-number 0
show-name? false


`turtle shapes`
[encoded data, 5200 characters]
DhUAABUO2Q==

`template`
null

`settings`
patch-size 4
num-shapes 256
screen-half-width 50
screen-half-height 50
interface-window-xcor 278
interface-window-ycor 74
interface-window-size 643 417
output-window-xcor 0
output-window-ycor 0
output-window-width 300
output-window-height 219
info-window-xcor 87
info-window-ycor 105
info-window-width 500
info-window-height 419
control-center-xcor 12
control-center-ycor 82
control-center-width 345
control-center-height 491
turtle-command-center-height 140
observer-command-center-height 143

`string table`
H4sIAAAAAAAAAGNgYGAAABzfRCEEAAAAAAAABA==

`symbol table`
H4sIAAAAAAAAAGNgYGAAABzfRCEEAAAAAAAABA==

`double table`
[encoded data, 30290 characters]
//ys/we3piDR3FoAAAAAWtw=

`list table`
H4sIAAAAAAAAAGNgYGBlYGBgZgQSMAwEnCCaiYE7HCYGZEcAcSSUzwLE/AwQGqaP
CygfBdULE2dEkreB0kxQOxgA4Gxa1XwAAAAAAAB8

`bytecodes`
H4sIAAAAAAAAAHVRSw6CMBCd4VNUjDRBEklcILrzBq6MJyEqcScmwMI76p2cwpQC
kSbtm87nzZsW/Oz6rvJbcc/L7Awftb4AIMAt86p+kRlDt1La2Jp4oGPjAFjq5gJ4
Ci2Ta9PeC3YJrkNGcoYO5xAGioC8j4LOo+EYcNsT3AujKcSuD0rrfy9kggbpvtM8
PvtcRtHj8xhnAGsx0o3mqQIjEftIRyQ6OSjJjpZGSiSZyuInSCd5MIRmNJRbqovN
iMyl4no0navHQklxamV6i16+18b0mKHNmmzwL3VVFc9TkjTi5qN/0Qr5XwLBQQdW
XaF+IF0zWCr3B9YncHCIAgAAAAACiA==

`observer world`
H4sIAAAAAAAAAGMQSMhPKk4tKkstUiguSSxJTXBggAMrBq6CnPyS8syU9NQSIJ+F
gS0nNS+9JAPI5mBgB8kVpOaBlXKDNSPJQgAjCAMA+OWZc2QAAAAAAABk

`patch world`
[encoded data, 51220 characters]

`turtle world`
[encoded data, 14885 characters]
9iNGM14AAAAAXjM=

