예제 #1
0
        public void GetPoint()
        {
            BSplineSegment1F b = new BSplineSegment1F
            {
                Point1 = 1,
                Point2 = 3,
                Point3 = 7,
                Point4 = 8,
            };

            Assert.Less(1, b.GetPoint(0));
            Assert.Greater(8, b.GetPoint(1));
        }
예제 #2
0
        public void GetPoint()
        {
            BSplineSegment1F b = new BSplineSegment1F
              {
            Point1 = 1,
            Point2 = 3,
            Point3 = 7,
            Point4 = 8,
              };

              Assert.Less(1, b.GetPoint(0));
              Assert.Greater(8, b.GetPoint(1));
        }
예제 #3
0
 public void GetLength()
 {
     BSplineSegment1F bSymmetric = new BSplineSegment1F
       {
     Point1 = 1,
     Point2 = 3,
     Point3 = 7,
     Point4 = 9,
       };
       Assert.IsTrue(
     Numeric.AreEqual(
       bSymmetric.GetLength(0.5f, 0, 100, Numeric.EpsilonF), bSymmetric.GetLength(0.5f, 1, 100, Numeric.EpsilonF)));
 }
예제 #4
0
        public void GetLength()
        {
            BSplineSegment1F bSymmetric = new BSplineSegment1F
            {
                Point1 = 1,
                Point2 = 3,
                Point3 = 7,
                Point4 = 9,
            };

            Assert.IsTrue(
                Numeric.AreEqual(
                    bSymmetric.GetLength(0.5f, 0, 100, Numeric.EpsilonF), bSymmetric.GetLength(0.5f, 1, 100, Numeric.EpsilonF)));
        }
예제 #5
0
 public void Flatten()
 {
     BSplineSegment1F s = new BSplineSegment1F
       {
     Point1 = 1,
     Point2 = 3,
     Point3 = 7,
     Point4 = 8,
       };
       var points = new List<float>();
       s.Flatten(points, 1, 1);
       Assert.AreEqual(2, points.Count);
       Assert.IsTrue(points.Contains(s.GetPoint(0)));
       Assert.IsTrue(points.Contains(s.GetPoint(1)));
 }
예제 #6
0
        public void Flatten()
        {
            BSplineSegment1F s = new BSplineSegment1F
            {
                Point1 = 1,
                Point2 = 3,
                Point3 = 7,
                Point4 = 8,
            };
            var points = new List <float>();

            s.Flatten(points, 1, 1);
            Assert.AreEqual(2, points.Count);
            Assert.IsTrue(points.Contains(s.GetPoint(0)));
            Assert.IsTrue(points.Contains(s.GetPoint(1)));
        }
예제 #7
0
        public void GetTangent()
        {
            BSplineSegment1F b = new BSplineSegment1F
              {
            Point1 = 1,
            Point2 = 3,
            Point3 = 7,
            Point4 = 8,
              };

              Assert.Less(0, b.GetTangent(0));
              Assert.Greater(8, b.GetTangent(1));

              BSplineSegment1F bSymmetric = new BSplineSegment1F
              {
            Point1 = 1,
            Point2 = 3,
            Point3 = 7,
            Point4 = 9,
              };
              Assert.IsTrue(Numeric.AreEqual(bSymmetric.GetTangent(0), bSymmetric.GetTangent(1)));
        }
예제 #8
0
        public void GetTangent()
        {
            BSplineSegment1F b = new BSplineSegment1F
            {
                Point1 = 1,
                Point2 = 3,
                Point3 = 7,
                Point4 = 8,
            };

            Assert.Less(0, b.GetTangent(0));
            Assert.Greater(8, b.GetTangent(1));

            BSplineSegment1F bSymmetric = new BSplineSegment1F
            {
                Point1 = 1,
                Point2 = 3,
                Point3 = 7,
                Point4 = 9,
            };

            Assert.IsTrue(Numeric.AreEqual(bSymmetric.GetTangent(0), bSymmetric.GetTangent(1)));
        }