예제 #1
0
  /**
   * examines solute grid to determine where to move based on attraction/repulsion to/from a solute
   */
  private void chemotax() {

    // 1) get the gradient--this will be the direction the particle
    // should move in or away from

    ContinuousVector direction = chemotaxSolute.getGradient2DNoZ(_location);

    if (repellent) {
      direction.turnAround();
    }

    // 2) scale the gradient set the scaled gradient as _movement
    _movement = this.getScaledMove(_location, direction, distEachRun);
  }