Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm/Take-Home-Oxford Sum04

This exam is take-home and is due Monday, 19 July, at 5 pm Oxford-time. You may not collaborate with anyone on this exam! It is open-book, open-JES, and open-Web – you are welcome to use any resources that you can find except asking anyone for help. You are welcome to ask questions here on the CoWeb for clarification only. Do not post any part of your answers on the CoWeb, please.

You are to submit your answers to the below questions as a Microsoft Word document. All program code solutions are to be pasted into the document. Please put your name at the top of the document and name the document with your name, e.g., wells-midterm.doc Please state clearly where Parts 1, 2, 3, and 4 are in your answer. Mail it to guzdial@cc.gatech.edu by 5 pm Monday 19 July.

PART 1:

We have discussed in class that an algorithm is a description of a process, and that description goes beyond any language, any particular program, or even a particular medium.

(a) Name one example of an algorithm (process) that can be applied to both pictures and sounds.

(b) Implement two programs (write two functions that do this algorithm), one for sounds and one for images. Use media via getMediaPath from the CD in your examples. (It's okay if these programs come from the book – you just have to pick out two good examples, make them run, then paste the programs into your Word file.)

PART 2:

Below is the base image that you are to manipulate. (You'll need to download this picture and store it in your media directory. Right click on this picture, choose "Save As," then save it in your media directory.)

Uploaded Image: square.jpg


You are to turn it into this:

Uploaded Image: color4square.jpg

(You may notice that the square has a gradient, so that when all four squares are assembled together, a faint image of a circle can be seen in the center of the four squares.)


You will do this by:


PART 3:

Answer these questions as short-essays, please.

(a) The book presents two different programs that convert from color to gray scale. What's the difference between them? Are they the same algorithm or different?

(b) RGB is a color model that uses 8 bits for each of the Red, Green, and Blue components of a color, providing 24 bits total. Those 24 bits can represent over 16 million patterns, which represent 16 million different colors. CMYK is another color model, popular with printers. Imagine that we used 8 bits to represent each of Cyan, Magenta, Yellow, and blacK in a picture. How many possible colors could we represent in this implementation of the CMYK color model?

(c) What's the difference between vector-based and bit-mapped graphics formats? Please identify one of each.

PART 4:

Write a function that inputs a sound and turns to silence the LAST second of the sound. You may assume that the sound is at least three seconds long. Remember that a sample value of zero is silence, and the sampling rate tells you the number of samples in one second of a sound, and that getLength tells you the total number of samples in a sound, from one to the end.

Paste your resultant function (once it's working) into your Word file.

Turn it all in, and you're done.

Links to this Page