I have the following identity mapping expressed by tensor-product B-spline basis functions:
pts = {{-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {0, 0}, {1, 0}, {-1,1}, {0, 1}, {1, 1}};
k = {-1, -1, 0, 1, 1};
nBasis = Sqrt[Length[pts]];
basisU = Table[BSplineBasis[{1, k}, i, u], {i, 0, nBasis - 1}];
basisV = Table[BSplineBasis[{1, k}, i, v], {i, 0, nBasis - 1}];
tensorProductBasis = Table[basisU[[i]] basisV[[j]], {j, 1, nBasis}, {i, 1, nBasis}];
tensorProductBasis = ArrayReshape[%, {1, nBasis^2}][[1]];
map = Sum[pts[[i]] tensorProductBasis[[i]], {i, 1, nBasis^2}];
I have also NURBS representation of a circle:
pts = {{.5, 0}, {1, 0}, {1, 1}, {.5, 1}, {0, 1}, {0, 0}, {.5, 0}};
w = {1, .5, .5, 1, .5, .5, 1};
k = {0, 0, 0, 1/4, 1/2, 1/2, 3/4, 1, 1, 1};
circle = BSplineFunction[pts, SplineWeights -> w, SplineKnots -> k];
I need to substitute the identity map variables $u$ and $v$ by the first and second components of B-spline function representing a circle and get expression depending on one variable only. When I am trying to do like this:
newMap = map /. {u -> circle[t][[1]], v -> circle[t][[2]]};
I get an error:
Part::partw: "Part 2 of BSplineFunction[{{0.,1.}},<>][t] does not exist
I would appreciate any advises.




newMap, differentiate them w.r.t. $t$ and calculate the values of derivatives at a particular point. When I define functionsderX[t_] := (newMap'[t])[[1]]andderY[t_] := (newMap'[t])[[2]]and try to calculate their values at a particular parameter value (e.g.derX[0.5]andderY[0.5]), I get unreasonable results. – S. S. Dec 03 '16 at 19:30