小编Sah*_*har的帖子

创建颜色酿造器并获得其平均值

我试图在每次孵化时在两个不同的盒子中为我的海龟分配一个颜色酿酒师,并找到每个孵化中海龟的平均颜色.

我可以用托盘扩展轻松完成它,但它没有为Netlogo 5.1更新,因此,我使用渐变扩展,使用RGB颜色([ n n n])作为输入和输出,因此,我找不到颜色的平均值.

这是我的代码的相关部分:

hatch 1 
[ set generation generation + 0.1  
  ifelse ( tlake = "A" )
    [ set color gradient:scale [ [255 0 0 ] [255 255 0] [0 0 255] ] (generation) 0 500 ]
    [ set color gradient:scale [ [255 0 0 ] [255 255 0] [0 0 255] ] (generation) 500 0 ]                
  set AVEA mean [color] of (turtles with [tlake = "A"])
  set AVEB mean [color] of (turtles with …
Run Code Online (Sandbox Code Playgroud)

gradient colors netlogo

6
推荐指数
1
解决办法
164
查看次数

标签 统计

colors ×1

gradient ×1

netlogo ×1