pseudo3d navigation
Have you ever wondered what algorithm is used in visualization interfaces, which allows you to rotate an object in three dimensions in a natural manner using your mouse? I have, and I’ve been somewhat shamed by my stupefaction: it seems like such a widespread interface element, available in even the crappiest of 3d applications, that I thought I was overlooking an obvious solution.
Well, I have a vindication of sorts. In compiling some OpenGL demos, I stumbled across the file trackball.c, which implements such an algorithm. From glancing through the code, it seems that it isn’t such a simple problem after all, and there’s no one obvious answer. This particular implementation, which from the familiar feel of the results is a standard one, is based on a projection onto a virtual trackball followed by a hyperbolic deformation— or is that a hyperbolic rotation, which results in a deformation? Whatever. Reading code comments can get you nowhere fast. Luckily the people who wrote the code began with a SIGGRAPH reference:
… lots of ideas from Thant Tesman and the August ‘88 issue of Siggraph’s “Computer Graphics,” pp. 121-129.
So, that’s something for me to look up. In fact, I’m sure the method has been improved upon, so I should probably look for works which reference that also.
Possibly relevant posts:
- Digital Contrast Agent Progess (9/10/2005)
- A readable account of TeX’s math layout algorithm (12/1/2007)
- Submatrix location (1/7/2008)