public Points.Point PointAt(double u, double v) { if (!DomainU.Containts(u) || !DomainV.Containts(v)) { return(null); } return(Function(u, v)); }
public Points.Point PointAt(double u, double v) { if (!DomainU.Containts(u) || !DomainV.Containts(v)) { return(null); } double den = 0; var knot = GetSortedKnot(); var result = Points.Point.GetZero(ControlPoints.Dimension); for (int i = 0; i < uCount; i++) { for (int j = 0; j < vCount; j++) { var a = Functions.DeBoorCoxAlgorithm(i, degreeU, u, knot) * Functions.DeBoorCoxAlgorithm(j, degreeV, v, knot) * GetControlPoint(i, j).Weight; den += a; result += a * GetControlPoint(i, j).Point; } } return(result / den); }