Beispiel #1
0
        public static _21.Fractal Rotate(this _21.Fractal f)
        {
            /*
             * .#.   .#.   #..   ###
             * ..#   #..   #.#   ..#
             ###   ###   ##.   .#.
             ###
             ###.#.   #..
             ###..#   #.#
             ###   ##.
             */
            var fR = new _21.Fractal();

            fR.points = new List <_21.Point>();
            int size = f.size;

            foreach (var p in f.points)
            {
                fR.points.Add(new _21.Point()
                {
                    x = (size - p.y - 1), y = p.x, v = p.v
                });
            }

            return(fR);
        }
Beispiel #2
0
        public static _21.Fractal Flip(this _21.Fractal f)
        {
            var fF = new _21.Fractal();

            fF.points = new List <_21.Point>();
            int size = f.size;

            foreach (var p in f.points)
            {
                fF.points.Add(new _21.Point()
                {
                    x = p.x, y = size - p.y - 1, v = p.v
                });
            }
            return(fF);
        }
Beispiel #3
0
        public static _21.Fractal Reverse(this _21.Fractal f)
        {
            var fR = new _21.Fractal();

            fR.points = new List <_21.Point>();
            int size = f.size;

            foreach (var p in f.points)
            {
                fR.points.Add(new _21.Point()
                {
                    x = size - p.x - 1, y = p.y, v = p.v
                });
            }

            return(fR);
        }