Exemplo n.º 1
0
        public override PointColor Transform(PointColor input)
        {
            var inY = input.Y;

            inY = inY % 1.0;
            inY = Math.Abs(inY);

            var outColor = _gradient.GetColorAtValue(inY);

            input.Color = outColor;

            return(input);
        }
Exemplo n.º 2
0
        public override PointColor Transform(PointColor input)
        {
            double inX = input.X - 0.5;
            double inY = input.Y - 0.5;

            inX = inX % 1.0;
            inY = inY % 1.0;

            double dist = Math.Sqrt(Math.Pow(inX - _originX, 2.0) + Math.Pow(inY - _originY, 2.0));

            dist = dist % 1.0;

            var outColor = _gradient.GetColorAtValue(dist);

            input.Color = outColor;

            return(input);
        }
        public override PointColor Transform(PointColor input)
        {
            double tempOriginX = RandomNumberProvider.GetDouble() * _originX;
            double tempOriginY = RandomNumberProvider.GetDouble() * _originY;

            double inX = input.X - 0.5;
            double inY = input.Y - 0.5;

            inX = inX % 1.0;
            inY = inY % 1.0;

            double dist = Math.Sqrt(Math.Pow(inX - tempOriginX, 2.0) + Math.Pow(inY - tempOriginY, 2.0));

            dist = dist % 1.0;

            var outColor = _gradient.GetColorAtValue(dist);

            input.Color = outColor;

            return(input);
        }