Project 3: Silly Walking Ants: From Pong to Real Paths
http://www.youtube.com/watch?v=IqhlQfXUk7w
Assignment Day | February 21, 2017 (Tuesday) |
Due Date | March 16, 2017 |
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 futher familiarize yourself with the powerful production scripting language, python. This is challenging project and illustrates real world tool needed by researchers. You should have an introductory experience from your previous project (however this project also includes file I/O. So start early! This project is also a good warm-up for some of the options that will be available for a final project. |
Please navigate through these pages above, there may be some minor differences while navigating. |
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 shoujld be fairly simple to implement - after you got warmed up of PyGame on your previous project.
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/gtaba.
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). While it is uploading, you can look at the youtube linke at the bottom of this page and see what the solution to the project should look like.'
** the above AVI video is not availalble please looks at Russell's youtube video as an alternative.
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:
Either 1 or 2
and then you will need to do 3)
1) Animated gif file of ants moving through x, y space.
2) Video on youtube of your ant tracks (see Russell's solution below).
3) Tracking trail of ants move through time (see How Russel ages his ant paths).
Submitting:
Submitting ()
|
{nike:maria} submit project4ants cs8220 // on nike |
Here is Russell's solution to the problem last time we assigned this project.