Sunday, May 2, 2010
Status Report 10, or How I Learned to Stop Worrying and Love CV
A Summary of my Time Spent with the Mitosis Game
I started this game in an attempt to teach children about mitosis in a new way that was more interesting than textbook learning. However, in the process I ended up teaching myself a lot about using other people's code, and using Flash in general. Some of the high points:
- Learning how to use the iHart system. This was obviously the major point of this exercise.
- Learning to code and implement my own events and event dispatchers.
- Implementing the refShot() function.
- Untangling all the iHart code to code my own pseudoserver.
The low points, of course, occured in the process of convincing all this to work; however, I think I've learned that with persistence and planning, things will eventually work out the way you want them to. It's been fun, guys.
Wednesday, April 28, 2010
Sunday, April 25, 2010
Status Report 9
Well, that's a relief. Also resolved is one issue in which two DNA bases would sometimes snap to their final positions at once--this occured when two bases whose final positions were adjacent appeared one after the other. To fix this, I moved the bases further apart vertically and changed the hit area so that only the nucleotide itself (not the sugar/phosphate backbone) counts as a "hit." Unfortunately this adds the problem of me not being tall enough to reach the top bases, but assuming we can run this thing from a ceiling-mounted projector that shouldn't be a problem in the long run.
Next week: camera debugging. I do hope we have tall enough chairs.
Sunday, April 18, 2010
Status Report 8
In other news, everything up to and including metaphase works fine with the psuedoserver, so I'm very happy about that. Another problem that has cropped up lately is that if I enlarge the window to run it on the projector, the positions of certain objects get really messed-up. I think I can get around this by hardcoding the coordinates, but there's probably a better option I haven't thought of yet.
Monday, April 12, 2010
Status Report 7.1 - Eureka!
The new problem is that since the server is not lightning-fast, the reference shot that gets sent is a shot of the screen a few seconds before the method call. This is problematic since the only time the method gets called is during a frame change. I guess I could program the Flash side to wait a few seconds before asking for a reference shot, but I'm going to speak to Audrey in a few minutes to see what she thinks.
Sunday, April 11, 2010
Status Report 7
Monday, April 5, 2010
Status Report 5/6
Now for Status Report 6: The G1, S and G2 phases are now totally functional. In addition, I have coded a custom event handler (I'm very proud of myself) to get the game to progress on its own. Unfortunately this also means I can't run it on the projector until I have a convenient way of taking new reference shots. For right now I'm just elated that it works at all.
Monday, March 22, 2010
Status Report 4
Sunday, March 7, 2010
Status Report 3 and some more pictures
MitosisGame: This is the main class for the program. It initializes the CVManager and creates a new Game instance.
Game: The wrapper class for all the different symbols that make up the game. It takes the CVManager in its constructor and proceeds through the different phases by keeping track of the current phase as an int (1 corresponds to G1, 2 to S and so on). It then uses a switch function to add the appropriate symbol.
Frame: The general parent class for all the symbols that make up the game. Each phase has its own Frame implementation. The Frame class takes the CVManager in its constructor, as passed to it by the Game class. Using this parent class allows me to define a variable in the Game class corresponding to the current symbol.
And now, pictures! Keep in mind that most of these are animated, which you can't see in the screenshots. If anyone knows how to embed a Flash animation into a Blogspot page, such information would be most welcome.
Prophase
This is just an informational frame. In the real frame the nucleus enlarges and the chromosomes slowly appear. I may do something interactive with this if I can figure out how.
Not animated at the moment, but it will be in its final incarnation. How I'm thinking of doing this is having the closest centrosome follow the onscreen Hull's x and y coordinates until it reaches an invisible "hit box" around its final position, at which point it snaps into place. This assumes, of course, that there is only one Hull in the area at the time--another possibility is using some sort of motion tween to make the centrosome move toward its final position if there is a Hull over its hit box.
Prometaphase
Also animated--in the real version, the nucleus really does "dissolve" (i.e. its alpha variable decreases).
This shot actually depicts the end result of the frame. The kinetochores start as little dots near the centrosomes and grow out into those things. Again, I'll either have to figure out how to get the CVManager to recognize the same Hull from shot to shot or have the frame react to a Hull in a specified area.
Wednesday, March 3, 2010
Teaser pics!
G1:
S (the interesting bit):
G2:
So there you have it: proof that I have been doing something this whole time. More should be forthcoming.
Monday, March 1, 2010
Status Report 2
What I do have, however, is a mock-up of G1.
Tuesday, February 23, 2010
Timeline/milestone document
Tentative timeline:
3/1: General class structure decided on, skeleton classes written
I will decide on the classes I will need for this project and how they will interact. I will also write skeleton classes (classes with all fields and methods declared but no methods filled in) for each class.
Also: mockups for phases G1, S and G2
These mockups will show what each stage will look like, but will not function. Some very basic functionality using a mouse may be implemented if I have time.
3/8: Mockups for prophase, prometaphase
3/22: Mockups for metaphase, anaphase
3/29: Mockups for telophase, cytokinesis
4/5: Main classes filled in and functional
All method bodies in main classes filled in, main classes run without errors
4/12: Functionality added to G1, S, G2 phases
All the named phases should work properly when tested with a psuedoserver. I may have to tweak Cleo's provided psuedoservers to get something suitable for testing.
4/19: Functionality added to prophase, prometaphase, metaphase
4/26: Functionality added to anaphase, telophase, cytokinesis
Testing and debugging with camera, circumstances willing
5/3: Presentation
Sunday, February 21, 2010
Status Report 1
1.) The CVManager will be instantiated in the main MitosisGame class when the game starts.
2.) The MitosisGame class will add a symbol (hereafter referred to as "Game") as a child of itself. This symbol will contain each minigame as a child within a single keyframe. The Game symbol will take the MitosisGame's CVManager as a parameter in its constructor. In this way the Game symbol will be able to share the CVManager with the main class.
3.) The symbols containing the minigames will all be subclasses of another Minigame class, which will take the Game's CVManager as a parameter in its own constructor. Within these symbols the CVManager will perform its minigame-specific functions.
This should work, if I'm thinking about it right... however, I have a nagging feeling that there is an easier way to do this.
Wednesday, February 17, 2010
Pitch Document
The Mitosis Game will be an interactive lesson to teach children ages 9-14 about mitosis. Mitosis is the process by which living cells divide and reproduce. By interacting with a Computer Vision based Flash movie, children will be able to learn about this process in a more engaging way than with common teaching methods.
A diagram of mitosis taken from https://dbscience3.wikispaces.com/Drew. " The G1, S and G2 phases are part of Interphase.
Core Gameplay
The Mitosis Game will consist of a series of mini-games illustrating the various stages of mitosis. Each game will provide an interactive demonstration of the core function of that stage. The mini-game for each stage will be as follows:
Stage G1: In this stage, the cell grows in size to prepare for mitosis. Children will form holes in front of the projection to "hug" the cell. If the hole intersects the image of the cell on the screen, the cell will enlarge in size. The game will proceed to the next stage once the cell reaches a specific size.
A diagram of DNA, illustrating the two base pairings, from http://www.breakitdownblog.com/bush-signs-the-genetic-information-nondiscrimination-act/. Children will construct a similar structure in the Mitosis Game.
Stage G2: This stage is virtually the same as G1. The cell grows further to ensure it is large enough to divide. Children will have to "hug" the cell again until it reaches its final size.
Prophase: During prophase, the centrosomes of the cell move to opposite sides of the cell. Children will have to move these centrosomes to their correct positions in a similar manner to that described for the nucleotides in the S stage. Once the centrosomes are in their correct positions, the game will proceed to the next stage.
Monday, February 15, 2010
Status Report 0
Pitching ideas
Mitosis Game - A CV-driven game/interactive demo to teach people about mitosis. Each stage of the cell cycle would have a separate "mini-game" to illustrate the concept. Below are the ideas I had for each stage:
G1 - "hug" cell to make it grow to a certain size
S - catch the correct nucleotides to duplicate the DNA
G2 - "hug" cell again
Prophase - move centrosomes to opposite sides of the cell
Prometaphase - wave your hand to dissolve the nuclear envelope
"stretch" kinetochores toward the middle of the cell
Metaphase - line up chromosomes at the center
Anaphase - "stretch" chromosomes apart
Telophase - "stretch" cell some more, create new nuclei
Cytokinesis - "hug" the middle of the cell to pinch the cytoplasm
Google Maps - A Google Maps application that would compute the shortest distance between two points selected by the user. I have already had some experience using Dijkstra's Algorithm to find shortest distances, and I know Jim Teresco has created data sets containing a list of highway intersections. The user could then scroll the map and zoom in and out. The obvious problems here are:
-how to recognize that a user has selected a certain point without selecting every point the user touches
-how to recognize that a hull is moving so that the map can be scrolled and zoomed
Magnets - A game using the 2D physics engine. This would involve a maze with a metallic ball placed at the starting point. The user would control a magnet and try to guide the ball through the maze.