Project 5: Silly Walking Ants:
http://www.youtube.com/watch?v=IqhlQfXUk7w
Assignment Day | April 06, 2010 (Tuesday) |
Due Date | April 15, 2010 (Thursday) |
Collaboration Policy - Read Carefully
You must work on this project individually, but you may discuss this assignment with other students in the class and ask and provide help in useful ways, preferable over our email list so we can all benefit from your great ideas. You may consult (but not copy) any outside resources you including books, papers, web sites and people (but no penguins or sea urchins).
If you use resources other than the class materials, indicate what you used along with your answer.
Objective and Resources:
The main objective for this assignment is to familiarize yourself with a a powerful production scripting language, python. This is challenging project and illustrates real world tool needed by researchers. So start early! |
Overview:
Your assignment is create a light weight play back application of of ants moving through time. The input for your program is a set files (.btf files) that describes ant tracks through time. Each .btf stores a time-varying feature of the data (x and y coordinates of the ant).
The output of our program a set of frames or each time step with the sprites in the proper location and orientation specified by the log file. Then, it would combine all of the frames into a single animated .gif file, and save that with the given outfile name.
The challenging part is to understand and to parse the multiple input files and process them (this will require some thought). The rest is fairly simple to implement - after a tutorial by Cole Sherer on PyGAme on Thursday.
BTF Data Files:
The input for your program is a set files (.btf files) that describes ant tracks through time. Each .btf stores a time-varying feature of the data (x and y coordinates of an ant, for example).
timestamp.btf: has the time in milliseconds from the beginning (each frame occurs every 33.33ms) and corresponds with the same line in the other files
id.btf: has the ant id. Often there are multiple ids corresponding to the same timestamp. This means there are multiple ants visible at that time.
ximage.btf and yimage.btf have the x and y coordinate of the ants.
timage.btf - has the orientation of the ants in radians.
Each line in the file correspond to a specific ant. So if line 5, in id.btf is a 3, it corresponds to the third ant, line 5 in ximage.btf and yimage.btf describes the x, y position of ant 3, and line 5 in timestamp.btf corresponds to the time when the ant 3 is located in the x, y position and finally ant's 3 orientation is described in timage.btf.
Rar file of all the files describing the track are available: here.
Directory listing the files separately in plain text are available here.
To get an idea what the track look like you can download TeamView (a heavy weight version of your project) to view this data. There are HOWTO videos for working with .btf data here: http://www.cc.gatech.edu/cpl/projects/gtabas
The video that corresponds to this data is available here:
http://www.cvpr2009.org/gtabas/338small3_BBYG_cinepak.avi
(it will finish uploading in 30 minutes).
A more simplified version of what the playback may look like (this does not correspond to the track).
Caveats:
- Line N in each file corresponds to line N in each other file.
- The numbers in the timestamp file are monotonically increasing.
- There is not always the same number of lines for each time stamp.
- Tracks appear and disappear -- e.g., track 10 (id #10) may not appear
until half way through the log, and track 5 might end part way through.
Requirements:
Animated gif file of ants moving through x, y space.
Bonus: tracking trail of ants move through time
Submitting:
Submitting
|
{atlas:maria} submit x500_program5 |