Пример #1
0
        public override Color PatternAt(Point p)
        {
            var p1 = Pattern1.TransformInverse * p;
            var p2 = Pattern2.TransformInverse * p;

            var c1 = Pattern1.PatternAt(p1);
            var c2 = Pattern2.PatternAt(p2);

            return((c1 + c2) * 0.5);
        }
Пример #2
0
        public override Color PatternAt(Point p)
        {
            var scale  = 0.3;
            var pscale = 0.7;
            var x      = p.x * pscale + noise(p.x, p.y, p.z + 0) * scale;
            var y      = p.y * pscale + noise(p.x, p.y, p.z + 1) * scale;
            var z      = p.z * pscale + noise(p.x, p.y, p.z + 2) * scale;

            return(Pattern.PatternAt(new Point(x, y, z)));
        }
Пример #3
0
        public override Color PatternAt(Point p)
        {
            Color color;

            if ((int)(Math.Floor(p.x) + Math.Floor(p.y) + Math.Floor(p.z)) % 2 == 0)
            {
                p     = Pattern1.TransformInverse * p;
                color = Pattern1.PatternAt(p);
            }
            else
            {
                p     = Pattern2.TransformInverse * p;
                color = Pattern2.PatternAt(p);
            }

            return(color);
        }