Development Note: On Zooming

Here is the derevation of the mathematics behind zooming with respect to the current mousepointer:

adZooming.jpg

In this sheet the problem is solved just for one axis. It has to be applied to both axes in the end.
Nomenclature:
  • "Ausgangslage" (engl.: initial position):
    • "World": min/max denote the borders of the world area (one dimensional) before zooming
    • "Device": b/e denote begin and end of the device area (one dimensional) before zooming
  • "Gezoomt" (engl.: zoomed):
    • "World'": min'/max' denote the borders of the world area (one dimensional) after zooming

Further symbols:
  • z is the zoom factor
  • epsilon is the relative position of the mouse pointer in the range [0, 1]:
    • 0 ... the mouse pointer is exactly over the begin of the device area (b)
    • 1 ... the mouse pointer is exactly over the end of the device area (e)

Result of the calculation:
  • min'/max' the borders of the world area after zooming

--

Last edited Sep 23, 2013 at 11:09 PM by Baula, version 4

Comments

No comments yet.