Bug introduced in 7.0 and fixed in 9.0
I want to use the built-in BernsteinBasis[]
to learn about Bezier curves. I tried the following code:
Plot[Evaluate @ Table[D[BernsteinBasis[3, k, u], u], {k, 0, 3}], {u, 0, 1}]
I tried many workrounds. Finally, I added PiecewiseExpand[]
before BernsteinBasis[]
, then it works well.
Plot[Evaluate @
Table[D[PiecewiseExpand @ BernsteinBasis[3, k, u], u],
{k, 0, 3}], {u, 0, 1}]
Bug fixed
Evaluated->True
does the trick. You may search this site about it.Plot[Table[D[BernsteinBasis[3, k, u], u], {k, 0, 3}], {u, 0, 1}, Evaluated -> True]
$\endgroup$Plot[Table[D[BernsteinBasis[3, k, u], u], {k, 0, 3}], {u, 0, 1}, Evaluated -> True]
cannot give the result as OP shown. $\endgroup$Evaluated -> True
orPiecewiseExpand
. $\endgroup$