コード例 #1
0
        public void NipTest1()
        {
            double[] U      = { 0, 0, 0, 1, 2, 3, 4, 4, 5, 5, 5 };
            int      degree = 1;
            double   N3_1   = NURBS.Nip(3, degree, U, 5.0 / 2.0);

            Assert.AreEqual(1.0 / 2, N3_1);
            double N4_1 = NURBS.Nip(4, degree, U, 5.0 / 2.0);

            Assert.AreEqual(1.0 / 2, N4_1);
        }
コード例 #2
0
        public void NipTest2()
        {
            double[] U      = { 0, 0, 0, 1, 2, 3, 4, 4, 5, 5, 5 };
            int      degree = 2;
            double   N2_2   = NURBS.Nip(2, degree, U, 5.0 / 2.0);

            Assert.AreEqual(1.0 / 8, N2_2);
            double N3_2 = NURBS.Nip(3, degree, U, 5.0 / 2.0);

            Assert.AreEqual(6.0 / 8, N3_2);
            double N4_2 = NURBS.Nip(4, degree, U, 5.0 / 2.0);

            Assert.AreEqual(1.0 / 8, N4_2);
        }