public void zoomAt(double x,double y,double z,double zoomValue){
  double[] diff={targetXoff - x,targetYoff - y,z - targetZoff};
  double length=Math.sqrt(diff[0] * diff[0] + diff[1] * diff[1] + diff[2] * diff[2]);
  if (length == 0) {
    length=1;
  }
  double[] normalized={diff[0] / length,diff[1] / length,diff[2] / length};
  double percent=zoomValue / normalized[2];
  moveToPosition(-(float)(targetXoff + normalized[0] * percent),-(float)(targetYoff + normalized[1] * percent));
  zoomToCamera((float)(targetZoff + normalized[2] * percent));
}

public void zoomAt ( double x , double y , double z , double zoomValue ) { double [ ] diff = { targetXoff - x , targetYoff - y , z - targetZoff } ; double length = Math . sqrt ( diff [ 0 ] * diff [ 0 ] + diff [ 1 ] * diff [ 1 ] + diff [ 2 ] * diff [ 2 ] ) ; if ( length == 0 ) { length = 1 ; } double [ ] normalized = { diff [ 0 ] / length , diff [ 1 ] / length , diff [ 2 ] / length } ; double percent = zoomValue / normalized [ 2 ] ; moveToPosition ( - ( float ) ( targetXoff + normalized [ 0 ] * percent ) , - ( float ) ( targetYoff + normalized [ 1 ] * percent ) ) ; zoomToCamera ( ( float ) ( targetZoff + normalized [ 2 ] * percent ) ) ; }
move the eye in straight line toward the given world position , reducing ( or augmenting ) the distance between eye and point of zoomvalue .
