Friday, 16 September 2011

Not as easy as anticipated , how original

A week since my last post and I am still stuck on the viewpoints gibberish. Unfortunately I am stuck at a crossroads, with no idea where to go (self -confusion and the internetz to blame mostly).

Whilst reading throughout the papers, I have been neglecting the limitations of my understanding, and have stumbled on a problem. When a drawing is rotated, the space itself is being rotated as opposed to the individual line segments (I also use this rotation as a form of user input to find the best viewpoint manually). When calculating the 2D projection of the 3D drawing, the coordinates used are those held in each vertex, which are the same as before, however, the viewpoint has changed, so in the ideal world, I would calculate the angle of the viewpoint, and calculate the change in position of each vertex/line segment... no.

Behold, in theory, there is an easier method. I could use the projection matrix used by OpenGL project the drawing to the 2D viewing area, to determine the line segments and run the various tests upon those. Woefully, I cannot find a method of doing so.

Another method I have just though up, would be to reverse engineer what's happening within OpenGL and use this. Unfortunately, I am less keep on the mathematics of it all, but it doesnt look like I have much choice.

I cant help but feel there is something I am missing in this, some easy method of doing this that I am overlooking. I am aware there is a test for occlusions within OpenGL, which may help testing Eades et al. 'Finding Best Viewpoints for 3D Graph Drawings'. I am sure I will find out soon enough, but I am still disappointed as I did not want to spend so long on something which is not a (notable) concern in previous papers.

I will update again next week, for now, have a good weekend.

No comments:

Post a Comment