Although this is related to programming, I don't want to know the programming end of this, just the math. Based on mouse movement, I want to rotate around the origin and always face it like in Google Earth. In others words, I want to take a 2D vector from the mouse movement, then convert that to a vector that will change my position in 3D. I will always be the same distance from the origin, but my position will change. What is the math to do this?
2026-04-02 03:29:55.1775100595
Rotate along outside of sphere
65 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in MATRICES
- How to prove the following equality with matrix norm?
- I don't understand this $\left(\left[T\right]^B_C\right)^{-1}=\left[T^{-1}\right]^C_B$
- Powers of a simple matrix and Catalan numbers
- Gradient of Cost Function To Find Matrix Factorization
- Particular commutator matrix is strictly lower triangular, or at least annihilates last base vector
- Inverse of a triangular-by-block $3 \times 3$ matrix
- Form square matrix out of a non square matrix to calculate determinant
- Extending a linear action to monomials of higher degree
- Eiegenspectrum on subtracting a diagonal matrix
- For a $G$ a finite subgroup of $\mathbb{GL}_2(\mathbb{R})$ of rank $3$, show that $f^2 = \textrm{Id}$ for all $f \in G$
Related Questions in VECTORS
- Proof that $\left(\vec a \times \vec b \right) \times \vec a = 0$ using index notation.
- Constrain coordinates of a point into a circle
- Why is the derivative of a vector in polar form the cross product?
- Why does AB+BC=AC when adding vectors?
- Prove if the following vectors are orthonormal set
- Stokes theorem integral, normal vector confusion
- Finding a unit vector that gives the maximum directional derivative of a vector field
- Given two non-diagonal points of a square, find the other 2 in closed form
- $dr$ in polar co-ordinates
- How to find reflection of $(a,b)$ along $y=x, y = -x$
Related Questions in 3D
- Visualization of Projective Space
- Approximate spline equation with Wolfram Mathematica
- Three-Dimensional coordinate system
- Volume of sphere split into eight sections?
- Largest Cube that fits the space between two Spheres?
- Is $ABC$ similar with $A'B'C'$, where $A', B', C'$ are the projections of $A, B, C $ on a plane $\pi $.
- Intersection of a facet and a plane
- Distance from center of sphere to apex of pyramid?
- Looking for hints on the below 3D geometry problem.
- Finding the Euler angle/axis from a 2 axes rotation but that lies on the original 2 axes' plane
Related Questions in ROTATIONS
- Properties of a eclipse on a rotated plane to see a perfect circle from the original plane view?
- why images are related by an affine transformation in following specific case?(background in computer vision required)
- Proving equations with respect to skew-symmetric matrix property
- Finding matrix linear transformation
- A property of orthogonal matrices
- Express 2D point coordinates in a rotated and translated CS
- explicit description of eigenvector of a rotation
- Finding the Euler angle/axis from a 2 axes rotation but that lies on the original 2 axes' plane
- How to find a rectangle's rotation amount that is inscribed inside an axis-aligned rectangle?
- Change of basis with rotation matrices
Related Questions in QUATERNIONS
- Intuition behind quaternion multiplication with zero scalar
- Universal cover $\mathbb{S}^3 \rightarrow SO(3)$ through Quaternions.
- Variance of a set of quaternions?
- Finding the Euler angle/axis from a 2 axes rotation but that lies on the original 2 axes' plane
- How many different quaternions $q$ are in a satisfying equation $q^2 = 1$?
- Dual quaternions displacement
- Why quaternions is a group?
- Why does the real part of quaternion conjugation with a pure quaternion stay 0?
- Why does the multiplication in a division algebra depends on every component?
- derive quaternion from rotation matrix, via eigenvector
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
Okay. I am going to approach this by vectors. If you want quaternions, you will have to get it translated (you might examine the quaternion, rotation posts that appear in the "Related" section on the right). I am not comfortable enough with quaternions to do it myself.
First we start with the "frame". This is a rectangle in space that represents the screen the user sees. The plane in which this rectangle lays will have equation $\vec n \cdot \vec v = d$, where $\vec n$ is a unit vector normal to the plane, $d \ge 0$ is the distance from the origin to the plane, and $\vec v$ is any point on the plane. I will assume that the center of the frame is the projection of the origin onto this plane (the point $d\vec n$), which does not change (i.e., at all times the view will be centered on the origin). When talking about in-plane coordinates, I will take this point as the origin (not the upper left corner). You also need a unit vector $\vec u$ parallel to the plane (so $\vec u \cdot \vec n = 0$) pointing in the direction of up. The direction of "right" is determined by the vector $\vec r = \vec u \times \vec n$. As $d$ does not change, we will be concerned with the behavior of $n$ and $u$.
A point $(x, y)$ in the frame under the normal coordinate system for graphics (origin in upper left, positive y points down) corresponds to the space point $d\vec n + \left({h\over 2}-y\right)\vec u + \left(x-{w\over2}\right)\vec r$, where $h$ and $w$ are the height and width of the frame.
Let $\vec v_0$ and $\vec v_1$ be the two vectors corresponding to the first point selected by the user and the point it is dragged to, expressed as space points as above. We are only concerned with the directions here, not the points itself, so we convert them to unit vectors by dividing them by their norms: $\hat v_0 = \frac{\vec v_0}{\|\vec v_0\|}, \hat v_1 = \frac{\vec v_1}{\|\vec v_1\|}$. I am interpreting your description as wanting the rotation that carries $\hat v_0$ to $\hat v_1$. To find this, we need:
The rotation matrix is given by $R = cI + (1 - c)M_T - sM_P$. (Normally for rotations, the final term would be added rather than subtracted, but since we are rotating the view rather than the object, we need the rotation to go the other direction.)
Finally, the vectors defining the frame are rotated by the matrix $R$: $$\vec n_1 = R\vec n, \;\; \vec u_1 = R\vec u, \;\; \vec r_1 = R\vec r$$