Problems, solutions and ideas for the future

This is a discussion of some of the difficulties I encountered while preparing this project, the way I handled those problems, and the several ideas I came up with along the way for future improvements.


The spinning function probably caused me the biggest problems because it was difficult to figure out the axis of rotation and the precise rotation matrix. The figure rotates around the y-axis, but both stereo halves of the Mask rotate as one entity around an axis on the right of the screen, not in the middle of the screen. For that reason the figure also shifts horizontally as it rotates. To attempt to fix that problem, I added an x-offset and a z-offset to the rotation equations. These two variables can be changed as all other parameters in the program, to discover the "perfect" value. Unfortunately, I did not find a good value for the two offsets that would shift the axis of rotation to the center of the screen.

It was also difficult to attempt to incorporate all the code for the rotation function with the main program, mainly because the two programs implement the Mask differently. The rotation function only draws a set number of points with no further calculations, while the main program draws a set number of points continuously in a loop, recalculating the points each time (that accounts for the flickering that is seen). Therefore, the main program simply calls the rotation program when 's' is pressed -- I found that to be much more doable than to attempt to combine the code for the two programs. For that reason, since the new spinning Mask is in effect a distinct program, it appears in a new window.

I came up with several new ideas and extensions that could be done with future work on the Mask. It would certainly be better to combine the rotation function and the main function. That way a lot of code would not need to be repeated (much of the code of the two functions is the same) and everything would be more efficient. Likewise the rotation axis should be moved more toward the center of the screen so the Mask does not shift horizontally at it spins. It would also be better to have the movie function respond to keyboard input so it can be paused, restarted or ended manually. Another very interesting idea is to have the Mask change colors as it evolves, to make it more aesthetic and even more interesting to learn from.

Home