function fish_center(f) {
      angle = (f.ar + (f.t - f.ot) * Math.PI + Math.PI/2);
      rcos = Math.cos(angle);
      rsin = Math.sin(angle);
      centerx = f.x - (24 * rcos); // font is 48 so half of it is 24
      centery = f.y - (24 * rsin);
      return [centerx, centery];
}
// compute the center of a fish
compute the center of a fish
compute the center of a fish
function fish_center(f) {
      angle = (f.ar + (f.t - f.ot) * Math.PI + Math.PI/2);
      rcos = Math.cos(angle);
      rsin = Math.sin(angle);
      centerx = f.x - (24 * rcos); 
      centery = f.y - (24 * rsin);
      return [centerx, centery];
}
function fish_center ( f ) { angle = ( f . ar + ( f . t - f . ot ) * Math . PI + Math . PI / 2 ) ; rcos = Math . cos ( angle ) ; rsin = Math . sin ( angle ) ; centerx = f . x - ( 24 * rcos ) ; centery = f . y - ( 24 * rsin ) ; return [ centerx , centery ] ; }
compute the center of a fish
compute the center of a fish
// font is 48 so half of it is 24