You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// `knots` and `mult`. In practice changing the knot values doesn't have a strong effect on the curve, so it usually suffices
49
49
// to use a uniform knot vector, which is the default. The major exception to this is repeated knot values.
50
50
// At generic points in the NURBS, the curve is infinitely differentiable, but at a point that
51
-
// corresponds to a knot, a NURBS with degree $d$ will have a $(d-1)$th derivative that is continuous.
51
+
// corresponds to a knot, a NURBS with degree $d$ will have a $(d-1)\mathrm{th}$ derivative that is continuous.
52
52
// However, if a value repeats in the knot vector that creates a knot with a multiplicity larger than 1, and each
53
53
// repetition decreases the smoothness of the curve at the corresponding NURBS point by 1. This means that
54
-
// if the multiplicity equals the degree then the curve has a corner at the knot point. Using the `mult` parameter
54
+
// if the multiplicity equals the degree then the curve is not differentiable: it has a corner at the knot point. Using the `mult` parameter
55
55
// without giving `knots` allows you to give a vector of multiplicities, which produces a knot vector that is uniform
56
56
// except it has some repeated knots. A value of 1 in the `mult` vector means the knot is not repeated; a value of 2 means it is
57
57
// repeated twice. The multiplicity can be as large as the degree but no larger. (A special exception is at the ends for open
58
-
// NURBS.) When you specify the multiplicity vector the total number of knots is the sum of that vector. You can also list
59
-
// the knots explicitly yourself. The knot values you give can cover any range; they will be scaled to correspond properly
60
-
// to the NURBS parameter space: rgardless of the knot values you give, the domain of evaluation
58
+
// NURBS, where multiplicity degree+1 is permitted.) When you specify the multiplicity vector the total number of knots is the sum of that vector. You can also list
59
+
// the knots explicitly yourself. The knots exist in the parameter space of the NURBS, but the knot values you give can cover any range;
60
+
//they will be scaled to correspond properly to the NURBS parameter space: regardless of the knot values you give, the domain of evaluation
61
61
// for u is always the interval [0,1], and it will be scaled to give the entire valid portion of the curve you have chosen.
62
62
// .
63
63
// For an open spline the number of knots must be `len(control)+degree+1`. For a clamped spline the number of knots is `len(control)-degree+1`,
@@ -455,7 +455,9 @@ function is_nurbs_patch(x) =
455
455
// parameter between the knots, ensuring that a sample appears at every knot. If you instead give u and v then
456
456
// the values at those points in parameter space will be returned. The various NURBS parameters can all be
457
457
// single values, if the NURBS has the same parameters in both directions, or pairs listing the value for the
458
-
// two directions.
458
+
// two directions. If you want uniform knots in one direction and specified knots in the other you can
459
+
// give `undef` as the knot vector, e.g., `[undef,vknots]` to have uniform knots in the first dimension and
460
+
// specified knots in the second one. You can do the same thing with the `mult` parameter.
459
461
// Arguments:
460
462
// patch = rectangular list of control points in any dimension
461
463
// degree = a scalar or 2-vector giving the degree of the NURBS in the two directions
@@ -464,8 +466,8 @@ function is_nurbs_patch(x) =
464
466
// u = evaluation points in the u direction of the patch
465
467
// v = evaluation points in the v direction of the patch
466
468
// mult = a single list or pair of lists giving the knot multiplicity in the two directions. Default: all 1
467
-
// knots = a single list of pair of lists giving the knot vector in each of the two directions. Default: uniform
468
-
// weights = a single list or pair of lists giving the weight at each control point in the patch. Default: all 1
469
+
// knots = a single list or pair of lists giving the knot vector in each of the two directions. Default: uniform
470
+
// weights = a matrix whose size corresponds to `patch` giving the weight at each control point in the patch. Default: all 1
469
471
// type = a single string or pair of strings giving the NURBS type, where each entry is one of "clamped", "open" or "closed". Default: "clamped"
470
472
// Example(3D,NoScale): Computing points on a patch using ranges
0 commit comments