geopro:pedro:vigo
Essa é uma revisão anterior do documento!
Vigo
Vigo::3D is a library for multi-agent simulation and visualization in 3D space. Vigo is under development.
| Homepage | http://sourceforge.net/projects/vigo | Vigo |
|---|---|---|
| Origin | University of Calgary | |
| Year | under devel | |
| Version | 0.84 | |
| License | GNU-GPL | |
| Language | C++ |
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.
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;
}
}
geopro/pedro/vigo.1183436623.txt.gz · Última modificação: 2007/07/03 04:23 (edição externa)
