Introduction to C++
Jonah Warrenjonah AT parsons DOT edu
http://www.feedtank.com/2005/cpp
Homework 5
(Please email me if you have any questions.)- Read Chapter 7. Functions.
- Review class code here.
- Complete the ASCII game from last week along with any other unfinished business. Add at least one additional feature to the game, like it states at the bottom of the assignment.
- Create 5 unique patterns using the code we went over in class. Save your files as .RAW files, download them to your computer, and open them up in Photoshop. Save each as a GIF and post them on your HW page, along with your code. No need to zip your files. Make your images at least 40x40. Look at the class code for examples / techniques. (Food for thought: All dots, all lines, quadrents of different patterns / gradients, other mathematical techniques (sin, cos, tan... look them up in the book)... be creative).
- Think about how you might take a photo as input (RAW format), and output an ASCII character for each pixel to create an ASCII photo. The end of Chapter 6 goes over reading input from files. We will go over this next class. Can you see my Ronald below?
++................................................................++++++++oooooo ................................................++++++++++++......++++++++oo@@oo ..............................................++++oooooooooo++++..++++++++++@@oo ......................................++++..++++++oooooo++++oo++....++++++++oo@@ ..........++++++++++++................++++++oo++..oo@@oooooooo++....++++++++oo@@ ........++oooooooooo++++++............++++++oo++++oooooooooo++........++++++++oo ......++oo++oooooooo++oooo................++++++oooooooo++++..........++++++++oo ......++oo++++oooooo++oo++........................++oooo..............++++++++oo ........++oooooooooooo++..............................++................++++++oo ..........++oooooo++......................................................++++++ ............++++..........................................................++++++ ............................................................................++++ ............................................................................++++ ..............................++++oooooo++++++................................++ ............................++oooooooooooooooo++++++............................ ..........................++oooooooooooooooooooooo++++++........................ ........................++oooooooooooooooooooooo++++++++++++.................... ........................++oooooooooooooooo++++++++++++oo..oooo++++++++++++...... ++................++......++++++oooooooo++++++++++oo@@@@@@@@@@..++++++++++...... ++..............++++++............++++++++++++oooo@@@@@@@@@@@@@@++++++++++...... ++............++oo@@oooooo++++++++++++oooooo@@oooooooo@@@@@@@@@@++..++++++...... oo++........++++oo@@..oooooooooooooooooooooooooooooooooooo@@@@@@++..++++........ @@++....++..++++@@@@oooooooooooooooooooooooo++++....++oooo@@@@@@++........++++.. @@oo....++....++@@@@@@@@@@oo++++++++++++++......++oo@@@@@@oo@@@@++........++++.. oooo++....++++++oo@@@@@@@@++............++++oooo@@@@@@@@@@oo@@oo++..++....++++.. @@@@++..........++oo@@oooo@@oooooooo@@@@@@@@@@@@@@@@@@@@@@oo@@oo++......++++++.. @@@@oo............++@@oooo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@oooooo........++++++.. oo@@@@++..........++oo@@oooo@@@@@@oooooooooo@@@@@@@@@@oooooooooo......++++++++.. ++oooooo............++oooooo@@@@oooooooooooooo@@@@oooooooooooo++......++++++++.. ++++++..++............++oooooooooooooooooooooooooooooooooooooo++....++++++++++.. ++++++++++++..........++oooooooooo++++oooo++++oooooooooooooooo......++++++++++.. ..++++++++++............++oooooooooooooooooooooooooooooooooooo......++++++++++.. ......++++++..............oooooooooooooooooooooooooooooooooo++......++++++++++.. ........++++..............++oooooooooooooooooooooooooooooooo++....++++++++++++.. ........++..................oooooooooooooooooooooooooooooooo......++++++++++++.. ............................++oooooooooooooooooooooooooooo++......++++++++++++.. ..............................++oooooooooooooooooooooooo++......++++++++++++++.. ................................++oooooooooooooooooooo++......++++++++++++++.... ..................................++oooooooooooooo++++........++++++++++++++..++ ........................................++++++................................++