Exemplo n.º 1
0
 public Points.Point PointAt(double u, double v)
 {
     if (!DomainU.Containts(u) || !DomainV.Containts(v))
     {
         return(null);
     }
     return(Function(u, v));
 }
Exemplo n.º 2
0
            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);
            }