Considering the rapid progress made on Friday, all of Saturday was spent trying to implement the advanced graphics features needed for the application - interactive panning and zooming.

From the beginning it was obvious this should be a "service" provided by the infrastructure and should be done correctly and robustly once, allowing simple use later with functions such as centerScreenOnTarget(x) or even fillScreenWithComponent(x). This was the basic idea. However before automatic zooming and panning was implemented, manual controls had to be implemented, in such a way that allowed the components to still believe they had not moved, and to figure out where the mouse was in relation to the objects, accounting for any zooming/panning currently in effect.

It turned out this was no simple task. The basic interactive zooming and panning was done quite quickly however an entire hour was lost figuring out some bugs causing the image to flicker and jump around. With this out of the way it was time to figure out where the mouse's "world coordinates" were based on its position in the window and the zoom/pan properties of the camera. Once again a few hours were lost, this time due to having to go back and review Computer Graphics formulas for camera-world view transformations, implementing them, and then finding out we had a mistake in our math and the order the transformations were being applied to the mouse coordinates to work back to world coordinates. 

Whit both zoom and pan were working, the application now gives a very good idea of what the final product will be like. Only the problem of adding information text in the circles on selection remained, and this was done on Sunday.

Some photos of the final product for this weekend of coding:


Leave a Reply