Change Contents of the Bubble
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Homeworks-Spring 2006

All homework are due by 10 pm on the due date!

HW1: Implement one new image method in Picture


DUE DATE: Fri 20 Jan

Create a new method in the class Picture that implements some kind of image manipulation. You must use a for loop in your method! The picture that gets manipulated should be the target that receives the method (i.e., this). For example, if you implement the method "mytweak()", then you'll use it on some picture somePicture.mytweak(), and you'll expect the picture somePicture to change. (Don't bother returning a DIFFERENT picture for this method.)

What manipulation that gets implemented is entirely up to you: Increasing blue while decreasing red, flipping vertically, posterizing, etc. You must implement something NOT already implemented in the class Picture. You can use the methods that are there as examples.

Turn your implementation of the class Picture via WebCT. Name your method something that makes sense for what it does. Put your method at the bottom of the class definition, with a comment before it indicating your name and what your method does.

Did you make an interesting picture with your first method? Please consider sharing it in the Gallery HW1: First picture method-Spring06

Ask Questions on HW1-Spring06 here.



HW2: Create a Picture collage


DUE DATE: Friday 27 January

Implement a class with a static public void main() method that, when executed, creates and shows a collage of pictures. You need to have one picture appear four times: The original time, then three other times with some image manipulation. You're welcome to add additional pictures if you'd like. Mirroring the canvas horizontally or vertically often improves the composition of the collage, but is not necessary. You must use a Turtle to do some of your drawing.

Your method can call FileChooser.setMediaPath() and then use FileChooser.getMediaPath() to access pictures.

Turn in your PictureCollage class, any additional pictures that you add to your media folder to create your collage, and your Picture class if you end up adding any additional methods to it. Turn in via WebCT.

Please consider sharing your collage on the Gallery HW2: Picture collage-Spring06

Ask Questions on HW2-Spring2006 here.


HW3: Create a dance, complete with music


DUE DATE: Friday 3 February

Using Sampled Sounds and the Turtles, create a musical dance. Play music (sounds at least?) while the turtles move in patterns.

Extra Credit: Up to 10 points extra credit if you also use JMusic for generating some of the music for the dance. Use the class Play and the method midi, as in Play.midi(myPhrase,false) to play MIDI without notating it. (You'll need false to make it work.) 2 points of extra credit are for using JMusic at all, 5 more points for using it musically with more than one instrument, and 3 more points for having two parts at once. You may also need Play.waitCycle(someScore) to get the program to pause for synchronization. EACH JMusic instrument you use counts for ONE of your four different sounds.

Implement your dance and sounds in a TurtleDance class in a main method.

Turn in your TurtleDance Java file via WebCT. Comments are important here! Include comments with:
  1. Your name and GT-email address
  2. Explaining what you're doing – help your TA figure out what's going on!

Please consider sharing your song and dance in the Gallery HW3: Turtle Dance-Sp06. Mail your code to Mark Guzdial and I can turn it into a movie for you.

Ask Questions on HW3-Spring2006 here.


HW4: Use Weaving and Repeating to Create Music


DUE DATE: Fri 17 February

Using the methods developed in class to play with linked list of music, create a song.

You only have to use SongNode and have a single part with a single instrument.
For +2 points extra credit, use the SongPart class and create your song with more than one part and instrument.

For +5 points extra credit, implement a new kind of repeat or weave – maybe one that weaves two copies each time it does an insert? Include your modified SongNode or SongPart classs in your turnin. Maybe even get a start on HW5?

You will create a class (with some cunning name like MyWovenSong) with a main that will assemble your song, then open it with showFromMeOn (or show–whatever you need to do open up the notation View on your masterpiece). Please put comments in your class:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

Please consider sharing your song (by saving out the MIDI) in the Gallery HW4: Woven Music-Spring06

Ask Questions on HW4-Spring2006 here.

HW5: New Picture List Manipulations


DUE DATE: Fri 24 Feb

Using any of the linked lists of pictures that we created (where ordering represented linearity, or layering, or using turtles to walk the list), implement three additional methods (where firstpicturinlist is a node, not actually a picture):

You must also provide a class named PictureTest that has a main() method which utilizes all three of your new methods. When the grader executes the main(), it should (a) show a background with three or more pictures in it, (b) then show a new picture after weaving a new element into it, and (c) a third picture with some new pictures inserted at the end, then (d) a final fourth picture after using findAndReplaceRepeat.

Extra Credit 5 points: Make some of your methods work with PositionedSceneElement, and use them to create a long pattern of smallish images via weaving and repeating, in order to create an interesting tiling on a long picture (e.g., at least 50 really-scaled-small nodes long). Say "dog, dog, house, dog, dog, tree–repeat a few dozen times." Show a fifth picture of some long picture with the tiling pattern appearing on it.

Please put comments in your class before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing:

Turn in to WebCT:

Ask Questions on HW5-Spring2006 here.


HW6: Create an animation with sound effects


DUE DATE: Friday 3 March

You must write HW6 using Pair Programming. Announce your pair at Student229. Not working in a pair is a 5% score penalty (i.e., you lose five points from the start.)

Note: This is a big program. Don't leave it for the last minute!

Create an animation with sounds associated with frames.
THERE MUST BE AT LEAST 20 FRAMES IN YOUR ANIMATION.

Here's how you need to do it:

You can use and modify any of the data structures that we've described in class. You can create new data structures if you'd like.

You will also need to create a class (maybe AnimationRunner?). Your TA will create an instance of this class (AnimationRunner ar = new AnimationRunner()).

From here on, there are SEVERAL ways to handle the animation.
Here's one:

For 5 points extra credit, use both Sound play() and blockingPlay() in your animation play() – but NOTE that you still can't CREATE any new sounds in your animation play() method. All the sounds still have to be in some kind of linked list data structure before you get started.

For 10 points extra credit, create a new kind of linked list of sounds where there is a variable that indicates whether the sound should be (a) play()-ed or (b) blockingPlay()-ed. Still have one sound per frame, but some sounds will be starting a background sound (those of type (a)) and others will be playing a synchronization sound (those of type (b)).

Please put comments in your classes and before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

If you send me (Mark Guzdial) your files when you're done, I'll create a movie from your animation and post it at Gallery HW6: Animation with sound-Spring06. If you want to do it yourself, here's one way of doing it:

Ask Questions on HW6-Spring2006 here.

HW6.5: Make a walking character using circular linked lists


Due date: March 10

This assignment is worth 25 points EXTRA CREDIT!. It is not necessary to do this assignment, and it's not necessary to do it in pairs, though you can if you want.

Create a walking character like this:
External Image
http://coweb.cc.gatech.edu/cs1316/uploads/82/lindsay.avi

Create a class WalkingCharacter which we can use like this:
WalkingCharacter myPerson = new WalkingCharacter(); // Do whatever setUp() you need in the constructor
myPerson.show(); //Open up the FrameSequence or whatever else you're using for showing
myPerson.walk(20); //Take 20 steps


You can use the code from class (with modifications, since the way that you use it isn't exactly the same), but you can not use the doll images I gave you. Make your own, or figure out how to use your own.

Please put comments in your classes and before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

Ask Questions on HW6.5-Spring2006 here.


HW7: Build a Graphical User Interface (GUI) for Creating Music


DUE DATE: Fri March 17

You must write HW7 using Pair Programming. Announce your pair at Student229. Not working in a pair is a 10% score penalty (i.e., you lose ten points from the start.)

Build a class named MusicTool with a main() that simply constructs a MusicTool, e.g. MusicTool mt = new MusicTool, which should open your Music creation tool. Now, give the user some options for repeating and weaving patterns.

For +5 points extra credit: Provide a text area for entering a filename, and a Save button, then write the created MIDI out to a file. Use Write.midi(myPartOrScore,"filename.mid") to write out the music from JMusic.

Hint: If you need to convert the String from a text field into an Integer for repeats, you can use Integer.parseInt(String) like this:
> Integer.parseInt("123")

123

In last terms, people showed off their cool tools. Feel free to take a picture of your tool and share it here: Gallery HW7: Music Tools-Spring06

Please put comments in your classes and before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

Ask Questions on HW7-Spring2006 here.


HW8: Simulate an ecology around Wolves and Deer


DUE DATE: Fri 14 April

You must write HW8 using Pair Programming. Announce your pair at Student229. Not working in a pair is a 20% score penalty (i.e., you lose twenty points from the start.)

Using the Simulation Package developed in class, create a simulation of immigration behavior.

Setup

When running
Let's consider a timestep to be about a week. Run the simulation for 2 years (104 timesteps). Here are the starting rules.

Experimentation
You need to build Agent and Simulation subclasses to implement this scenario. But you have to explore and try different things in your simulation.

Things that you might want to try changing in your rules:
Initial countsShould there be more Corn, or fewer Deer? Would culling the herd help more survive? Would more Wolves create better equilibrium?
RangesShould Deer or Wolves smell only closer, or farther? Should they not be able to jump to Corn or Deer in a single time step?

For +5 Extra Credit: Implement male and female Deer. Every 12 weeks, the female Deer can become pregnant if there is a male Deer within smell range. (You decide if the female jumps to the male, or the male jumps to the female.) Pregnancy lasts for 6 weeks, during which time the female will die if she doesn't get corn every THREE timesteps. At the end of six weeks, a new Deer is produced (randomly selected gender).

In addition to your program, you are to produce a Word file with graphs of all NINE of your runs – that's three runs of each of three sets of variables. Show all three variables – Wolves, Deer, and Corn per timestep for all three of the scenarios that you explored. Explain what you changed in each scenario and why you think the results differed from the other scenarios.

Generate this simulation as a series of JPEG frames, so that we can create a movie from them! You can upload your movies to Gallery HW8: Ecosystem Simulation-Spring06

Please put comments in your classes and before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

Ask Questions on HW8-Spring2006 here.

HW9: Simulate Chasing and Avoiding


You must write HW9 using Pair Programming. Announce your pair at Student229. Not working in a pair is a 20% score penalty (i.e., you lose twenty points from the start.)

DUE DATE: Fri 21 April

Using the simulation package developed in class, and replacing the turtle with character images, create a simulation of the running of the Bulls in Pamplona.

SetUp

During the Simulation
Let's imagine that a time step is a minute. Run the simulation for 30 minutes. You decide on the parameters like max speed and ranges to create a good looking simulation.

Generate this simulation as a series of JPEG frames, so that we can create a movie from them! You can upload your movies to Gallery HW9: Running of the Bulls-Spring06

Please put comments in your classes and before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

EXTRA CREDIT: There is no requirement to have different types of runner, but I'll offer up to 5 points extra credit for having two or more types. One type of villager might look younger and move faster, another might look older and move slower. One might be TRYING to get hit by the bulls. Mark Guzdial

Ask Questions on HW9-Spring2006 here.

Links to this Page