====== Vigo ====== //Vigo::3D, or Vigo for short (pronounced: veeh-goh) is a framework for simulating and visualizing of three-dimensional scenes. Vigo is suited for creating dynamical systems of interacting agents, in which the agents move in a three-dimensional space, and perceive ("see") their neighbours around them.// \\ ^**Homepage** | http://sourceforge.net/projects/vigo | ^**Origin** | University of Calgary | ^**Year** | under devel | ^**Version** | 0.84 | ^**License** | GNU-GPL | ^**Language** | C++ | \\ bool Act() { switch(ActPhase()) { case 0: // move MoveBy(Vector(Point::Random(Point::_0,MAX_STEP_SIZE))); break; case 1: // think // only look for neighbours of your kind Nbr(GrpId(),VISION_RADIUS,m_nearMe,MAX_SHOWN_NBR,true); // determine shade uint ns = m_nearMe.size(); double dn = ((double)ns+1/*myself*/)/MAX_SHOWN_NBR; dn *= NUM_SHADES; uint nn = min((uint)dn,NUM_SHADES-1); // the more neighbours, the darker SetAppearance(Scale()[NUM_SHADES-1-nn]); break; } }