CIS 252   —   SPRING 2008

A Patch for Homework 1


Thompson, Exercise 2.4 (rephrased slightly)

How do you produce the following three pictures?
.......##...#######..###
.....##..#..#####..##.##
...##.....#.###..#####.#
..#.......#.##.#######.#
..#...#...#.##.###.###.#
..#...###.#.##.###...#.#
.#....#..##.#.####.##..#
..#...#.....##.###.#####
...#...#....###.###.####
....#..#....####.##.####
.....#.#....#####.#.####
......##....######..####
#######..###.......##...
#####..##.##.....##..#..
###..#####.#...##.....#.
##.#######.#..#.......#.
##.###.###.#..#...#...#.
##.###...#.#..#...###.#.
#.####.##..#.#....#..##.
##.###.#####..#...#.....
###.###.####...#...#....
####.##.####....#..#....
#####.#.####.....#.#....
######..####......##....
.......##...#######..###
.....##..#..#####..##.##
...##.....#.###..#####.#
..#.......#.##.#######.#
..#...#...#.##.###.###.#
..#...###.#.##.###...#.#
.#....#..##.#.####.##..#
..#...#.....##.###.#####
...#...#....###.###.####
....#..#....####.##.####
.....#.#....#####.#.####
......##....######..####
###..#######...##.......
##.##..#####..#..##.....
#.#####..###.#.....##...
#.#######.##.#.......#..
#.###.###.##.#...#...#..
#.#...###.##.#.###...#..
#..##.####.#.##..#....#.
#####.###.##.....#...#..
####.###.###....#...#...
####.##.####....#..#....
####.#.#####....#.#.....
####..######....##......
.......##...#######..###
.....##..#..#####..##.##
...##.....#.###..#####.#
..#.......#.##.#######.#
..#...#...#.##.###.###.#
..#...###.#.##.###...#.#
.#....#..##.#.####.##..#
..#...#.....##.###.#####
...#...#....###.###.####
....#..#....####.##.####
.....#.#....#####.#.####
......##....######..####
####..######....##......
####.#.#####....#.#.....
####.##.####....#..#....
####.###.###....#...#...
#####.###.##.....#...#..
#..##.####.#.##..#....#.
#.#...###.##.#.###...#..
#.###.###.##.#...#...#..
#.#######.##.#.......#..
#.#####..###.#.....##...
##.##..#####..#..##.....
###..#######...##.......

Thompson, Exercise 2.5

Give another variant of the `horse' pictures in the previous question, and show how it could be created. Note: a nice variant is:
.......##...#######..###
.....##..#..#####..##.##
...##.....#.###..#####.#
..#.......#.##.#######.#
..#...#...#.##.###.###.#
..#...###.#.##.###...#.#
.#....#..##.#.####.##..#
..#...#.....##.###.#####
...#...#....###.###.####
....#..#....####.##.####
.....#.#....#####.#.####
......##....######..####
######..####......##....
#####.#.####.....#.#....
####.##.####....#..#....
###.###.####...#...#....
##.###.#####..#...#.....
#.####.##..#.#....#..##.
##.###...#.#..#...###.#.
##.###.###.#..#...#...#.
##.#######.#..#.......#.
###..#####.#...##.....#.
#####..##.##.....##..#..
#######..###.......##...

Back to the CIS 252 Homepage
Jim Royer /