buzz_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
buzz_examples [2016/09/02 13:49] – [Square Pattern Formation] ilpincybuzz_examples [2018/03/18 22:58] root
Line 77: Line 77:
   var accum = neighbors.map(lj_vector).reduce(lj_sum, math.vec2.new(0.0, 0.0))   var accum = neighbors.map(lj_vector).reduce(lj_sum, math.vec2.new(0.0, 0.0))
   if(neighbors.count() > 0)   if(neighbors.count() > 0)
-    math.vec2.scale(accum, neighbors.count())+    math.vec2.scale(accum, 1.0 / neighbors.count())
   # Move according to vector   # Move according to vector
   goto(accum.x, accum.y)   goto(accum.x, accum.y)
Line 162: Line 162:
 } }
 </code> </code>
- 
-===== Wheeled-robot Specific ===== 
- 
-TODO 
- 
-===== Flying-robot Specific ===== 
- 
-TODO 
  • buzz_examples.txt
  • Last modified: 2018/03/18 22:58
  • by root