public static void ccDrawQuadBezier(GL10 gl,CGPoint origin,CGPoint control,CGPoint destination,int segments){
  FloatBuffer vertices=getVertices(2 * (segments + 1));
  float t=0.0f;
  for (int i=0; i < segments; i++) {
    float x=(float)Math.pow(1 - t,2) * origin.x + 2.0f * (1 - t) * t* control.x + t * t * destination.x;
    float y=(float)Math.pow(1 - t,2) * origin.y + 2.0f * (1 - t) * t* control.y + t * t * destination.y;
    vertices.put(x);
    vertices.put(y);
    t+=1.0f / segments;
  }
  vertices.put(destination.x);
  vertices.put(destination.y);
  vertices.position(0);
  gl.glDisable(GL10.GL_TEXTURE_2D);
  gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
  gl.glDisableClientState(GL10.GL_COLOR_ARRAY);
  gl.glVertexPointer(2,GL_FLOAT,0,vertices);
  gl.glDrawArrays(GL_LINE_STRIP,0,segments + 1);
  gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
  gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
  gl.glEnable(GL10.GL_TEXTURE_2D);
}

public static void ccDrawQuadBezier ( GL10 gl , CGPoint origin , CGPoint control , CGPoint destination , int segments ) { FloatBuffer vertices = getVertices ( 2 * ( segments + 1 ) ) ; float t = 0.0f ; for ( int i = 0 ; i < segments ; i ++ ) { float x = ( float ) Math . pow ( 1 - t , 2 ) * origin . x + 2.0f * ( 1 - t ) * t * control . x + t * t * destination . x ; float y = ( float ) Math . pow ( 1 - t , 2 ) * origin . y + 2.0f * ( 1 - t ) * t * control . y + t * t * destination . y ; vertices . put ( x ) ; vertices . put ( y ) ; t += 1.0f / segments ; } vertices . put ( destination . x ) ; vertices . put ( destination . y ) ; vertices . position ( 0 ) ; gl . glDisable ( GL10 . GL_TEXTURE_2D ) ; gl . glDisableClientState ( GL10 . GL_TEXTURE_COORD_ARRAY ) ; gl . glDisableClientState ( GL10 . GL_COLOR_ARRAY ) ; gl . glVertexPointer ( 2 , GL_FLOAT , 0 , vertices ) ; gl . glDrawArrays ( GL_LINE_STRIP , 0 , segments + 1 ) ; gl . glEnableClientState ( GL10 . GL_COLOR_ARRAY ) ; gl . glEnableClientState ( GL10 . GL_TEXTURE_COORD_ARRAY ) ; gl . glEnable ( GL10 . GL_TEXTURE_2D ) ; }
draws a quad bezier path since v0 . 8
