That's it. In fact your method has error O(h^4) which is the same (up to a factor) as using the distance between endpoints and then applying one round of Romberg. The difference is your method uses 4 sqrts at each stange and mine uses 3 (one from the previous lower resolution + 2 from the current split). However, your factor is smaller, so the actual error at each step is slightly smaller in your case. In the example table below the raw length estimate uses the sqrts column number of square roots for that row. The Romberg result needs that row's sqrts plus the previous row's. The double Romberg need sqrts plus the previous two rows. So my method can get to 1 part per billion (ppb) using 56 sqrts (32+16+8), while yours uses 96 (64+32).
Control points (0.000000,0.000000) (0.000000,0.500000) (0.500000,0.500000) (0.500000,0.000000)
sqrts length Romberg Romberg^2 1 0.500000000 2 0.901387819 1.035183758 4 0.975359556 1.000016801 0.997672337 8 0.993857921 1.000024042 1.000024525 16 0.998465633 1.000001538 1.000000037 32 0.999616481 1.000000096 1.000000000 64 0.999904125 1.000000006 1.000000000 128 0.999976031 1.000000000 1.000000000 256 0.999994008 1.000000000 1.000000000 512 0.999998502 1.000000000 1.000000000 1024 0.999999625 1.000000000 1.000000000
sqrts DY length DY Romberg 4 1.000000000 8 1.002470605 1.002635312 16 1.000128079 0.999971911 32 1.000007988 0.999999982 64 1.000000499 1.000000000 128 1.000000031 1.000000000 256 1.000000002 1.000000000 512 1.000000000 1.000000000
1024 1.000000000 1.000000000 2048 1.000000000 1.000000000 4096 1.000000000 1.000000000 [snip]Yes, you are right. Not particularly pathological. The point I was making is that I think there is a lower limit on the path length/distance along control points otherwise the pathlength can approach zero with the control points a finite distance apart.
[snip]
Its a cubic! How much change of curvature are you expecting?
And spend more effort working out which places they are (if any). That doesn't come for free.
But that has little to do with recursion. That I integrated along the path in t order is not the point. I could equally have done it via the curve splitting (had I known how to do it at the time). The point was to show that the Romberg method can reduce the amount of work dramatically without any smarts. In my example above it reduced 1024 sqrts (proxy for work) for 375 ppb error to 56 sqrts for > There aren't any hard curves. It's a cubic.
if this curve turns up a lot then you are using the wrong technology :-)
Yes, a bit harder, particularly if you are looking for ppb accuracy.
That has to be a heuristic until you know how you are calculating the estimates. However, the ratio of the endpoint distance to the sum of control point distances will give some idea. If it i small then curve has turn back on itself. If it's large (approaching 1) then its nearly straight. It can't be nearly straight and highly twisted and still be a cubic...
Peter
Peter