Smoothly interpolating a subdivided box through a set of closed curves to get a parametric and smooth subdivision mesh.
int num = nprimitives(1);
vector pos[] = {};
vector p = prim(1, 'P', 0);
append(pos, p);
for(int i = 0; i < num; i++){
p = primuv(1, 'P', i, v@uv);
append(pos, p);
}
p = prim(1, 'P', num - 1);
append(pos, p);
v@P = spline('bspline', v@uv[1], pos);