public static final Geo[] approximateArc(Geo pc,Geo p0,Geo p1,double err){
  double theta=angle(p0,pc,p1);
  if (Double.isNaN(theta)) {
    return new Geo[]{p0,p1};
  }
  int n=(int)(2.0 + Math.abs(theta / err));
  Geo[] result=new Geo[n];
  result[0]=p0;
  double dtheta=theta / (n - 1);
  double rho=0.0;
  for (int i=1; i < n - 1; i++) {
    rho+=dtheta;
    result[i]=Rotation.rotate(pc,2.0 * Math.PI - rho,p0,new Geo());
  }
  result[n - 1]=p1;
  return result;
}

public static final Geo [ ] approximateArc ( Geo pc , Geo p0 , Geo p1 , double err ) { double theta = angle ( p0 , pc , p1 ) ; if ( Double . isNaN ( theta ) ) { return new Geo [ ] { p0 , p1 } ; } int n = ( int ) ( 2.0 + Math . abs ( theta / err ) ) ; Geo [ ] result = new Geo [ n ] ; result [ 0 ] = p0 ; double dtheta = theta / ( n - 1 ) ; double rho = 0.0 ; for ( int i = 1 ; i < n - 1 ; i ++ ) { rho += dtheta ; result [ i ] = Rotation . rotate ( pc , 2.0 * Math . PI - rho , p0 , new Geo ( ) ) ; } result [ n - 1 ] = p1 ; return result ; }
compute a polygonal approximation of an arc centered at pc , beginning at p0 and ending at p1 , going clockwise and including the two end points .
