I am finding several problems with this code:
1. When we increase the weights, the curve should get pulled toward the control point. But, it is moving away from the curve and vice versa
2. democurve.m hangs and MATLAB crashes. Just running it without any modification does so.