The plot is sped up substantially if you use Evaluate
:
ParametricPlot[
Evaluate[ Total@MapIndexed[NBSpline[First@#2 - 1, p, knots, u] #1 &, pts]] ,
{u, a, b}, opts]
(I only looked a trial 1 , but I think your other try have the same issue )
It helps a little more if you remove the Simplify
from NBSpline
and simplify the whole thing:
ParametricPlot[
Evaluate[Total@
MapIndexed[NBSpline[First@#2 - 1, p, knots, u] #1 &, pts] //
Simplify], {u, a, b}, opts]
Your original form is a sum of piecewise expressions. The outer Simplify
condenses the whole thing into a single piecewise.