3.5.8 · D1 · HinglishGuidance, Navigation & Control (GNC)

FoundationsQuaternion rotation formula — rotating vector v by quaternion q

2,931 words13 min read↑ Read in English

3.5.8 · D1 · Physics › Guidance, Navigation & Control (GNC) › Quaternion rotation formula — rotating vector v by quaternio

Isse pehle ki tum formula par trust kar sako, uska har piece kuch concrete mean karna chahiye. Yeh page har symbol ko zero se build karta hai — seedhe words mein, phir ek picture, phir reason ki yeh topic uske bina nahi chal sakta. Top se bottom padhte jao; har block uske upar wale par lean karta hai.


0 · Space mein ek arrow — vector

Picture: ek arrow origin (corner ) se nikal raha hai aur tip par khatam ho raha hai. Har axis par jo shadow padta hai woh tumhe , , wapis deta hai.

Topic ko yeh kyun chahiye: poora kaam aisi arrow ko turn karna hai. Agar arrow picture nahi karte, toh "rotate " sirf shor hai. Figure dekho — amber arrow humara hai.

Figure — Quaternion rotation formula — rotating vector v by quaternion q

Arrow ki length (ya norm) likhi jaati hai aur, Pythagoras se 3D mein, Yeh bas "sides wale box ka diagonal kitna lamba hai" hai. Ek rotation yeh length kabhi change nahi kar sakta — arrow ko turn karne se woh stretch nahi hota.


1 · Arrows ke baat karne ke do tarike — dot product aur cross product

Hamilton product (poore topic ka engine) arrows par do chhoti operations se bana hai. Hum inhe pehle, akele, milte hain, taaki baad mein darne wali cheezein na lagein.

Picture: arrow ka shadow arrow par pada. Lamba shadow matlab woh agree karte hain; koi shadow nahi (perpendicular) matlab dot product hai.

Picture: do arrows ek table par flat pade hain; unka cross product seedha table se upar khada hai. Agar do arrows parallel hain, koi parallelogram nahi → cross product zero arrow hai.

Figure — Quaternion rotation formula — rotating vector v by quaternion q

2 · Angle aur axis — turn describe karne ka tarika

Picture: stick par ek globe. Stick hai; surface ka har point uske around se swing karta hai. Stick par ke points bilkul nahi hilte.

Hat kyun? Chhoti hat ka matlab hamesha "is arrow ki length exactly hai", isliye . Hum axis ki sirf direction ki parwah karte hain, uski length ki nahi, isliye hum isse normalise karte hain — apni khud ki length se divide karte hain jab tak yeh unit long na ho jaaye.

Figure — Quaternion rotation formula — rotating vector v by quaternion q

Topic ko yeh kyun chahiye: quaternion literally aur se build hota hai. Axis-angle picture nahi, quaternion nahi.


3 · Trig jo actually kaam aayegi — , , aur half-angle

Quaternion aur store karta hai, isliye hamein clear hona chahiye ki yeh kya mean karte hain aur angle half kyun hoti hai.

Picture: length ki clock hand. Iska horizontal shadow hai; vertical shadow hai. par: . par: .


4 · Imaginary units — "turn" kehne ke teen tarike

Picture: ko teen perpendicular directions sochlo (jaise ). Cyclic order mein do ko multiply karo toh agli milti hai (right-hand rule); unhe backwards multiply karo toh teesri doosri taraf pointing milti hai (minus sign). Yeh "order matters" exactly wahi hai kyun rotations commute nahi karte.

Topic ko yeh kyun chahiye: yeh multiplication rules HI machine hain. Jab tum inhe use karke quaternion product expand karte ho, style terms se dot product nikalta hai aur / style terms se cross product nikalta hai — yahi neeche Hamilton product ki poori shape hai.


5 · Hamilton product — do quaternions ko multiply karna

Isse pehle ki quaternion kisi cheez par act kar sake, humein pata hona chahiye ki quaternions ko multiply kaise karte hain. Yeh ek rule ka engine hai.

Topic ko yeh kyun chahiye: poora formula ek ke baad ek do Hamilton products hain. Bina is rule ke sandwich sirf symbols hai; iske saath, yeh ek concrete calculation hai.


6 · Quaternion khud — scalar + vector

Picture: ek labelled tag jisme do pockets hain — ek pocket mein akela number hai, doosri mein arrow hai. Ek rotation ke liye, (kitna nahi turn karna) aur (axis, scaled by kitna turn karna hai).

Picture: agar "turn about " hai, tab "turn about " hai — forward spin karo, phir back spin karo, ghar wapas.


7 · Symbols ko sandwich mein daalna

Ab parent formula plain English mein padhti hai:

\;=\;\underbrace{q}_{\text{wrap}}\;\underbrace{(0,\mathbf v)}_{\text{arrow}}\;\underbrace{q^{-1}}_{\text{unwrap}}.$$ - $q$ axis $\hat n$ aur **half** angle carry karta hai ($\cos\frac\theta2,\ \sin\frac\theta2\hat n$). - $v=(0,\mathbf v)$ arrow hai jo pure quaternion ke bhes mein chhupa hai. - $q^{-1}=q^*$ right side par undo-wrapper hai, jo isliye chahiye taaki output ek pure quaternion (phir se ek real arrow) rahe. - Dono multiplications **Hamilton products** hain (§5) — aur $q,-q$ same answer dete hain. Upar har symbol ab earned hai. Parent note ki derivation inhi blocks ka sirf motion mein jaana hai. --- ## Prerequisite map ```mermaid graph TD V["Vector v = arrow in 3D"] --> DOT["Dot product = agreement"] V --> CROSS["Cross product = twist arrow"] DOT --> HAM["Hamilton product"] CROSS --> HAM AX["Axis n-hat and angle theta"] --> TRIG["cos and sin plus half-angle"] TRIG --> Q["Quaternion q = w plus vector part"] IJK["Units i j k with ij = k and ji = minus k"] --> HAM IJK --> Q HAM --> Q Q --> INV["Conjugate and inverse"] Q --> DC["Double cover q and minus q"] V --> PURE["Pure quaternion 0 comma v"] Q --> SAND["Sandwich v prime = q v q inverse"] INV --> SAND DC --> SAND PURE --> SAND SAND --> TOPIC["Quaternion rotation formula 3.5.8"] ``` Yeh directly [[Quaternion rotation formula — rotating vector v by quaternion q (index 3.5.8)|parent formula]] mein feed karta hai, aur yahi foundations [[Quaternion algebra & Hamilton product]], [[Rodrigues' rotation formula]], aur [[Rotation matrices & orthogonality]] ko power karte hain. Ek baar solid ho gaye, toh tum [[SLERP — quaternion interpolation]] aur [[Angular velocity & quaternion kinematics $\dot q=\tfrac12 q\omega$]] ke liye ready ho [[Spacecraft attitude determination (GNC)]] mein — aur tum samjhoge kyun [[Euler angles & gimbal lock]] ne engineers ko quaternions ki taraf dhakela. --- ## Equipment checklist Khud ko test karo — right side cover karo aur reveal karne se pehle jawab do. Ek vector describe karne wale teen numbers kya hain, aur yeh kya mean karte hain? ::: $(x,y,z)$ — east, north, up kitna walk karna hai; arrow ki tip. Vector ki length kaise nikalte hain? ::: $|\mathbf v|=\sqrt{x^2+y^2+z^2}$ (3D mein Pythagoras). Dot product kab zero hota hai? ::: Jab do arrows perpendicular hon ($\cos 90^\circ=0$). Cross product kya produce karta hai, aur kab zero arrow hota hai? ::: Dono ke perpendicular ek naya arrow; zero jab do arrows parallel hon. $\hat n$ mein hat ka kya matlab hai? ::: Axis arrow ki length exactly $1$ hai (yeh normalised hai). Unit circle par $\cos\theta$ aur $\sin\theta$ kya hain? ::: Angle $\theta$ par point ki horizontal aur vertical position. Do double-angle identities batao. ::: $\cos\theta=\cos^2\tfrac\theta2-\sin^2\tfrac\theta2$ aur $\sin\theta=2\cos\tfrac\theta2\sin\tfrac\theta2$. Jab $\theta>180^\circ$ ho tab $\sin\tfrac\theta2$ ka sign kaise choose karte hain? ::: Pehle $\theta$ ko $[-180^\circ,180^\circ]$ mein equivalent angle se replace karo, phir half karo; $\cos\tfrac\theta2,\sin\tfrac\theta2\ge 0$ rakho. $ij$ kya hai? $ji$ kya hai? ::: $ij=k$; $ji=-k$ (order sign flip karta hai — non-commutative). Sare chhe unit products do. ::: Cyclic: $ij=k,\ jk=i,\ ki=j$; reverse: $ji=-k,\ kj=-i,\ ik=-j$. $(w_1,\mathbf v_1)$ aur $(w_2,\mathbf v_2)$ ka Hamilton product likho. ::: $(w_1w_2-\mathbf v_1\!\cdot\!\mathbf v_2,\ \ w_1\mathbf v_2+w_2\mathbf v_1+\mathbf v_1\times\mathbf v_2)$. Kya quaternion multiplication commute karta hai? ::: Nahi — $q_1q_2\ne q_2q_1$ in general (cross-product term sign flip karta hai). Quaternion ko scalar-plus-vector form mein likho. ::: $q=(w,\ \mathbf v)$ scalar $w$ aur vector part $\mathbf v$ ke saath. Quaternion ko "unit" quaternion kya banata hai? ::: $\|q\|=\sqrt{w^2+x^2+y^2+z^2}=1$. Pure quaternion kya hota hai? ::: Jiska scalar part zero ho: $(0,\ \mathbf v)$ — ek chhupa hua 3D arrow. Unit quaternion ke liye $q^{-1}$ kya hota hai? ::: Iska conjugate $q^*=(w,\ -\mathbf v)$ (vector part ka sign flip karo). Kya $q$ aur $-q$ same rotation dete hain? ::: Haan — $qvq^{-1}$ mein signs cancel ho jaate hain; unit quaternions rotations ko double-cover karte hain. Rotation angle $q$ ke andar half kyun hoti hai? ::: $q$ $qvq^{-1}$ mein do baar appear karta hai; har copy $\theta/2$ supply karti hai, double-angle identities se recombined.