public void TestConstantZ() { var pattern = new StripedPattern(_white, _black); Assert.AreEqual(_white, pattern.ColorAt(Tuple.Point(0, 0, 0))); Assert.AreEqual(_white, pattern.ColorAt(Tuple.Point(0, 0, 1))); Assert.AreEqual(_white, pattern.ColorAt(Tuple.Point(0, 0, 2))); }
public void TestVariableX() { var pattern = new StripedPattern(_white, _black); Assert.AreEqual(_white, pattern.ColorAt(Tuple.Point(0, 0, 0))); Assert.AreEqual(_white, pattern.ColorAt(Tuple.Point(0.9, 0, 0))); Assert.AreEqual(_black, pattern.ColorAt(Tuple.Point(1, 0, 0))); Assert.AreEqual(_black, pattern.ColorAt(Tuple.Point(-0.1, 0, 0))); Assert.AreEqual(_black, pattern.ColorAt(Tuple.Point(-1, 0, 0))); Assert.AreEqual(_white, pattern.ColorAt(Tuple.Point(-1.1, 0, 0))); }