OpenGL Coordinates from Bezier Curves
Basically, I need to get all the coordinates drawn from a Bezier curve implementation in OpenGL. Specifically, I need the coordinates to move a sphere object (baseball) in my scene along a curved trajectory path. This is what I use to draw my curve: GL2 gl = drawable.getGL().getGL2(); float ctrlpoints[][] = new float[][]{ {0.0f, 0.0f, 60f}, {0.0f, 3.0f, 45.0f}, {0.0f, 2.0f, 15.0f}, {0.0f, 1.0f, 0f}}; FloatBuffer ctrlpointBuf = FloatBuffer.allocate(ctrlpoints[0].length * ctrlpoints.length); for (int i = 0; i < ctrlpoints.length; i++) { for (int j = 0; j < 3; j++) { ctrlpointBuf.put(ctrlpoints[i