I have a point in a 3D space rotated by a quaternion. The point has a fixed length from the rotation itself (shown in image). What I'm trying to achieve is to rotate my point towards a goal position represented here by another point. if I just have the target position, the position of the rotated point, the length of the offset form my rotation origin, and the rotation (represented by a quaternion) and the rotations position (see orange sphere in picture) is it possible to find a quaternion to aim/point/translate my point towards the target position/point?
2026-03-30 16:48:48.1774889328
find quaternion to rotate a point towards another point in 3d space
391 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
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?

Let's say that the point around which to rotate ${\color{Orange} o}$ has coordinates $\left( {\color{Orange} o_{{\color{Red} x}}},\, {\color{Orange} o_{{\color{Green} y}}},\, {\color{Orange} o_{{\color{Blue} z}}} \right)$, that the point to rotate ${\color{Purple} v}$ has the coordinates $\left( {\color{Purple} v_{{\color{Red} x}}},\, {\color{Purple} v_{{\color{Green} y}}},\, {\color{Purple} v_{{\color{Blue} z}}} \right)$ and thus the Quaternion Representation ${\color{Purple} v} ~\widehat{=} \begin{pmatrix} {\color{Purple} v_{{\color{Black} w}}}\\ {\color{Purple} v_{{\color{Red} x}}}\\ {\color{Purple} v_{{\color{Green} y}}}\\ {\color{Purple} v_{{\color{Blue} z}}} \end{pmatrix} \widehat{=}~ {\color{Purple} v_{{\color{Black} w}}} + {\color{Purple} v_{{\color{Red} x}}} \cdot \mathrm{i} + {\color{Purple} v_{{\color{Green} y}}} \cdot \mathrm{j} + {\color{Purple} v_{{\color{Blue} z}}} \cdot \mathrm{k}$ has, that the point is rotated to ${\color{Purple} v_{\text{rotaded}}}$ has coordinates $\left( {\color{Purple} v_{\text{rotaded},\, {\color{Red} x}}},\, {\color{Purple} v_{\text{rotaded},\, {\color{Green} y}}},\, {\color{Purple} v_{\text{rotaded},\, {\color{Blue} z}}} \right)$ and thus has the quaternion representation ${\color{Purple} v} ~\widehat{=} \begin{pmatrix} {\color{Purple} v_{\text{rotaded},\, {\color{Black} w}}}\\ {\color{Purple} v_{\text{rotaded},\, {\color{Red} x}}}\\ {\color{Purple} v_{\text{rotaded},\, {\color{Green} y}}}\\ {\color{Purple} v_{\text{rotaded},\, {\color{Blue} z}}} \end{pmatrix} \widehat{=}~ {\color{Purple} v_{\text{rotaded},\, {\color{Black} w}}} + {\color{Purple} v_{\text{rotaded},\, {\color{Red} x}}} \cdot \mathrm{i} + {\color{Purple} v_{\text{rotaded},\, {\color{Green} y}}} \cdot \mathrm{j} + {\color{Purple} v_{\text{rotaded},\, {\color{Blue} z}}} \cdot \mathrm{k}$ and that the target point ${\color{Cyan} a}$ has the coordinates $\left( {\color{Cyan} a_{{\color{Red} x}}},\, {\color{Cyan} a_{{\color{Green} y}}},\, {\color{Cyan} a_{{\color{Blue} z}}} \right)$ and thus has the quaternion representation ${\color{Cyan} a} ~\widehat{=} \begin{pmatrix} {\color{Cyan} a_{{\color{Black} w}}}\\ {\color{Cyan} a_{{\color{Red} x}}}\\ {\color{Cyan} a_{{\color{Green} y}}}\\ {\color{Cyan} a_{{\color{Blue} z}}} \end{pmatrix} \widehat{=}~ {\color{Cyan} a_{{\color{Black} w}}} + {\color{Cyan} a_{{\color{Red} x}}} \cdot \mathrm{i} + {\color{Cyan} a_{{\color{Green} y}}} \cdot \mathrm{j} + {\color{Cyan} a_{{\color{Blue} z}}} \cdot \mathrm{k}$.
Since the only thing that differentiates ${\color{Purple} v_{\text{rotaded}}}$ and ${\color{Cyan} a}$ is the absolute distance to ${\color{Orange} o}$, which we can normalize: $$ \begin{align*} {\color{Purple} v_{\text{rotaded}}} &= ||{\color{Purple} v_{\text{rotaded}}}|| \cdot {\color{Purple} v_{\text{rotaded},\, 0}}\\ {\color{Cyan} a} &= ||{\color{Cyan} a}|| \cdot {\color{Cyan} a_{0}}\\ {\color{Purple} v_{\text{rotaded},\, 0}} &= {\color{Cyan} a_{0}}\\ ||{\color{Purple} v}|| &= ||{\color{Purple} v_{\text{rotaded}}}||\\ {\color{Purple} v_{\text{rotaded}}} &= ||{\color{Purple} v}|| \cdot {\color{Cyan} a_{0}}\\ {\color{Purple} v_{\text{rotaded}}} &= ||{\color{Purple} v}|| \cdot \frac{{\color{Cyan} a}}{||{\color{Cyan} a}||}\\ \end{align*} $$
Thus, the target point ${\color{Purple} v_{\text{rotaded}}}$ in the form of the point to be drawn ${\color{Cyan} a}$ and the origin point can be represented ${\color{Purple} v}$.
The easiest way I could think of to do this would be to bring the orange dot to the center of the coordinate system and then use the classic formula for $3$D rotation of a vector via quaternions.
Then we can take ${\color{Orange} o}$ as the coordinate origin by subtracting the components of ${\color{Orange} o}$ from the points and thus moving everything relative to to the center: $$ \begin{align*} \mathrm{v} &= \begin{pmatrix} 0\\ {\color{Purple} v_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ {\color{Purple} v_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ {\color{Purple} v_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} \widehat{=} \left( {\color{Purple} v_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}} \right) \cdot \mathrm{i} + \left( {\color{Purple} v_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}} \right) \cdot \mathrm{j} + \left( {\color{Purple} v_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \right) \cdot \mathrm{k}\\ \mathrm{v}_{\text{rotaded}} &= \begin{pmatrix} 0\\ {\color{Purple} v_{\text{rotaded},\, {\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ {\color{Purple} v_{\text{rotaded},\, {\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ {\color{Purple} v_{\text{rotaded},\, {\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} \widehat{=} \left( {\color{Purple} v_{\text{rotaded},\, {\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}} \right) \cdot \mathrm{i} + \left( {\color{Purple} v_{\text{rotaded},\, {\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}} \right) \cdot \mathrm{j} + \left( {\color{Purple} v_{\text{rotaded},\, {\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \right) \cdot \mathrm{k}\\ \mathrm{v}_{\text{rotaded}} &= \begin{pmatrix} 0\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} \widehat{=} \left( \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}} \right) \cdot \mathrm{i} + \left( \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}} \right) \cdot \mathrm{j} + \left( \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \right) \cdot \mathrm{k}\\ \mathrm{a} &~= \begin{pmatrix} 0\\ {\color{Cyan} a_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ {\color{Cyan} a_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ {\color{Cyan} a_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} \widehat{=}~ \left( {\color{Cyan} a_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}} \right) \cdot \mathrm{i} + \left( {\color{Cyan} a_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}} \right) \cdot \mathrm{j} + \left( {\color{Cyan} a_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \right) \cdot \mathrm{k}\\ \end{align*} $$
We can apply this to the standard formula for quaternion rotation $\mathrm{v}_{\text{rotated}} = \mathrm{q} \cdot \mathrm{v} \cdot \overline{\mathrm{q}}$ and get:
$$ \begin{align*} \begin{pmatrix} 0\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} &\widehat{=} \begin{pmatrix} q_{w}\\ q_{{\color{Red} x}}\\ q_{{\color{Green} y}}\\ q_{{\color{Blue} z}} \end{pmatrix} \cdot \begin{pmatrix} 0\\ {\color{Purple} v_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ {\color{Purple} v_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ {\color{Purple} v_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} \cdot \begin{pmatrix} q_{w}\\ -q_{{\color{Red} x}}\\ -q_{{\color{Green} y}}\\ -q_{{\color{Blue} z}} \end{pmatrix}\\ \begin{pmatrix} 0\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ \frac{||{\color{Purple} v}||}{||{\color{Cyan} a}||} \cdot {\color{Cyan} a_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} &\widehat{=} \begin{pmatrix} \cos\left( \frac{\varphi}{2} \right)\\ q_{{\color{Red} x}}\\ q_{{\color{Green} y}}\\ q_{{\color{Blue} z}} \end{pmatrix} \cdot \begin{pmatrix} 0\\ {\color{Purple} v_{{\color{Red} x}}} - {\color{Orange} o_{{\color{Red} x}}}\\ {\color{Purple} v_{{\color{Green} y}}} - {\color{Orange} o_{{\color{Green} y}}}\\ {\color{Purple} v_{{\color{Blue} z}}} - {\color{Orange} o_{{\color{Blue} z}}} \end{pmatrix} \cdot \begin{pmatrix} \cos\left( \frac{\varphi}{2} \right)\\ -q_{{\color{Red} x}}\\ -q_{{\color{Green} y}}\\ -q_{{\color{Blue} z}} \end{pmatrix}\\ \end{align*} $$
So what you are looking for is probably the quaternion $q = q_{w} + q_{{\color{Red} x}} \cdot \mathrm{i} + q_{{\color{Green} y}} \cdot \mathrm{j} + q_{{\color{Blue} z}} \cdot \mathrm{k}$ where $\varphi$ is the angle between ${\color{Cyan} a}$ and ${\color{Purple} v}$ to ${\color{Orange} o}$.