3 ms·
> Contrary to intuition maybe, the De Casteljau method is actually more expensive than evaluating the Bernstein polynomials directly Both of these proposed met
by jacobolus 8y ago
> Contrary to intuition maybe, the De Casteljau method is actually more expensive than evaluating the Bernstein polynomials directly
Both of these proposed methods are O(n^2). Polynomial evaluation can be done in O(n) in many other choices of basis.
Starting from Bernstein basis one faster evaluation method with apparently decent numerical stability is to take an inverse discrete Fourier transform using O(n log n), then evaluate from the resulting basis in linear time, https://doi.org/10.1016/j.amc.2013.05.079 https://doi.org/10.1016/j.amc.2013.05.079
But it’s also pretty reasonable to convert to some other basis [e.g. Chebyshev basis] in O(n^2) and then evaluate from there in O(n).
[For n = 4 this might not matter so much.]
I’m skeptical that finding the derivatives and then using the proposed forward difference method https://www.scratchapixel.com/lessons/advanced-rendering/bezier-curve-rendering-utah-teapot/fast-forward-differencing https://www.scratchapixel.com/lessons/advanced-rendering/bez... is a practical way to evaluate a polynomial in Bernstein basis at a large number of equispaced points in 2019. It might have made sense a few decades ago when multiplication was substantially more expensive than multiplication. Nowadays floating point multiplication is very fast.