Coordinate Transforms for Google Street View like UI

39 Views Asked by At

Google Street View allows you to explore a 3D space using mouse drag. You essentially drag your mouse across the screen and the UI changes the orientation of a virtual scene camera.

Assume you have a function $f$ that converts a mouse drag represented by the start pixel position $(x_1, y_1)$ & end pixel position $(x_2, y_2)$ of a mouse drag into a 3D rotation (Euler angles) for the virtual scene camera.

$f: R^4 \to R^3$

Now a few questions about $f$.

  1. What are the possible ways to define $f$?
  2. With the definition chosen in 1, is $f$ a continuous function?
  3. With the definition chosen in 1, is $f$ a surjective function?
  4. With the definition chosen in 1, is $f$ an injective function?