public void ApplyingAPatternTransformation()
        {
            var transformation = Transform.Translation(1, 2, 3);
            var pattern        = new TestPattern
            {
                Transform = transformation
            };

            Assert.AreEqual(transformation, pattern.Transform);
        }
        public void APatternWithAPatternTransformation()
        {
            var shape   = new Sphere();
            var pattern = new TestPattern
            {
                Transform = Transform.Scaling(2, 2, 2)
            };
            var c = pattern.PatternAtObject(shape, new Point(2, 3, 4));

            Assert.AreEqual(new Color(1, 1.5, 2), c);
        }
        public void APatternWithBothAnObjectAndPatternTransformation()
        {
            var shape = new Sphere
            {
                Transform = Transform.Scaling(2, 2, 2)
            };
            var pattern = new TestPattern
            {
                Transform = Transform.Translation(0.5, 1, 1.5)
            };
            var c = pattern.PatternAtObject(shape, new Point(2.5, 3, 3.5));

            Assert.AreEqual(new Color(0.75, 0.5, 0.25), c);
        }
        public void TheDefaultPatternTransformation()
        {
            var pattern = new TestPattern();

            Assert.AreEqual(Matrix.Identity(4), pattern.Transform);
        }