Wednesday, October 29, 2008

Drawing is a success

I was able to replace the movable sphere with an ArrayList of vertices, then draw the vertices as a line list. I initially had some problems, the program would run out of memory, and there would always be stray lines at the beginning and end of the drawing. It turned out that I was setting the vertices whether the wiimotes were receiving a signal or not, causing the ArrayList to bloat up with unused points, and waste memory. This was also the cause of the stray lines.
I also made a modification to the IR pen. It appears that if the LED is pointed directly at the wiimote camera, then the light is refracted causing some erroneous data. Also, the side of the LED was not bright enough, so the solution was to wrap the LED in a couple layers of scotch tape to diffuse the light. The IR pen looks even uglier than before, but it works a little better now.
More pictures and screenshots to follow.

No comments: