更改

跳到导航 跳到搜索
添加27字节 、 2022年4月19日 (二) 09:48
无编辑摘要
第4行: 第4行:  
[[文件:Flocking.png|缩略图]]
 
[[文件:Flocking.png|缩略图]]
   −
== WHAT IS IT(鸟群模型) ==
+
== 鸟群模型 ==
 
This model is an attempt to mimic the flocking of birds. (The resulting motion also resembles schools of fish.) The flocks that appear in this model are not created or led in any way by special leader birds. Rather, each bird is following exactly the same set of rules, from which flocks emerge.
 
This model is an attempt to mimic the flocking of birds. (The resulting motion also resembles schools of fish.) The flocks that appear in this model are not created or led in any way by special leader birds. Rather, each bird is following exactly the same set of rules, from which flocks emerge.
   第36行: 第36行:       −
== HOW TO USE IT(使用教程) ==
+
 
 +
== 算法的实现 ==
 +
 
 +
=== HOW TO USE IT(NetLogo使用教程) ===
 
First, determine the number of birds you want in the simulation and set the POPULATION slider to that value. Press SETUP to create the birds, and press GO to have them start flying around.
 
First, determine the number of birds you want in the simulation and set the POPULATION slider to that value. Press SETUP to create the birds, and press GO to have them start flying around.
   第53行: 第56行:       −
== THINGS TO NOTICE(注意事项) ==
+
=== THINGS TO NOTICE(注意事项) ===
 
Central to the model is the observation that flocks form without a leader.
 
Central to the model is the observation that flocks form without a leader.
   第75行: 第78行:  
有时鸟儿会从鸟群中飞走。这是怎么发生的?为了观察这种现象,您可能需要放慢模型的速度或一步一步地运行它。
 
有时鸟儿会从鸟群中飞走。这是怎么发生的?为了观察这种现象,您可能需要放慢模型的速度或一步一步地运行它。
   −
== 代码实现 ==
+
=== 代码实现 ===
 
[http://www.netlogoweb.org/launch#http://ccl.northwestern.edu/netlogo/models/models/Sample%20Models/Biology/Flocking.nlogo Netlogo Web - Flocking]<syntaxhighlight line="1" lang="lisp">
 
[http://www.netlogoweb.org/launch#http://ccl.northwestern.edu/netlogo/models/models/Sample%20Models/Biology/Flocking.nlogo Netlogo Web - Flocking]<syntaxhighlight line="1" lang="lisp">
 
turtles-own [
 
turtles-own [
第186行: 第189行:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
== THINGS TO TRY(你可以试一试) ==
+
=== THINGS TO TRY(你可以试一试) ===
 
Play with the sliders to see if you can get tighter flocks, looser flocks, fewer flocks, more flocks, more or less splitting and joining of flocks, more or less rearranging of birds within flocks, etc.
 
Play with the sliders to see if you can get tighter flocks, looser flocks, fewer flocks, more flocks, more or less splitting and joining of flocks, more or less rearranging of birds within flocks, etc.
   第201行: 第204行:       −
== EXTENDING THE MODEL(模型的延伸) ==
+
=== EXTENDING THE MODEL(模型的延伸) ===
 
Currently the birds can "see" all around them. What happens if birds can only see in front of them? The <code>in-cone</code> primitive can be used for this.
 
Currently the birds can "see" all around them. What happens if birds can only see in front of them? The <code>in-cone</code> primitive can be used for this.
   第228行: 第231行:       −
== NETLOGO FEATURES(NetLogo默认设定) ==
+
=== NETLOGO FEATURES(NetLogo默认设定) ===
 
Notice the need for the <code>subtract-headings</code> primitive and special procedure for averaging groups of headings. Just subtracting the numbers, or averaging the numbers, doesn't give you the results you'd expect, because of the discontinuity where headings wrap back to 0 once they reach 360.
 
Notice the need for the <code>subtract-headings</code> primitive and special procedure for averaging groups of headings. Just subtracting the numbers, or averaging the numbers, doesn't give you the results you'd expect, because of the discontinuity where headings wrap back to 0 once they reach 360.
  
567

个编辑

导航菜单