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

ExercisesQuaternion rotation formula — rotating vector v by quaternion q

2,282 words10 min read↑ Read in English

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

Do conventions jo hum is poore page par reuse karte hain:

Yahan ka matlab hai ek unit axis (length 1). Chhota hat bas ek reminder hai "is arrow ki length one hai." turn angle hai, aur woh half-angle hai jo ke andar rehta hai kyunki ko sandwich mein do baar use kiya jaata hai.


Level 1 — Recognition

Kya aap ek quaternion padh kar yeh bata sakte ho ki woh kaunsi rotation encode karta hai?

Recall Solution L1.1

HUM KYA KARTE HAIN: se match karo. Scalar part hai , toh aur Vector part hai . Kyunki , axis hai — yani -axis. Answer: ke around rotation.

Recall Solution L1.2

Ek rotation quaternion ki length honi chahiye. Compute karo: Toh nahi, yeh valid nahi hai. Length se divide karke normalize karo: Ab -axis ke around.

Recall Solution L1.3

Unit quaternion ke liye, inverse = conjugate = sirf vector part ka sign flip karo: Geometric read: , ke around rotate karta hai; , ke around rotate karta hai — yani undo.


Level 2 — Application

Actually vectors ko rotate karo.

Recall Solution L2.1

Rodrigues use karo ke saath (), , .

  • (toh last term vanish ho jaata hai),
  • . Dikhta kya hai: arrow quarter-turn counter-clockwise ghoom ke par aa jaata hai (neeche figure dekho).
Figure — Quaternion rotation formula — rotating vector v by quaternion q
Recall Solution L2.2

Yahan axis ke along point karta hai.

  • , . Unchanged. ke around spin karne se kuch jo already ke along point kar raha hai, move nahi ho sakta.
Recall Solution L2.3

: , . , .

  • .
  • .

Term by term: Add karo: Dikhta kya hai: body-diagonal ke around turn cyclically map karta hai ; sach mein . ✓


Level 3 — Analysis

Structure ke baare mein sochna, sirf numbers plug karna nahi.

Recall Solution L3.1

Sandwich hai . Kyunki (har entry flip karne se inverse bhi flip hota hai), Dono minus signs cancel ho jaate hain. Numerically dono L2.1 se dete hain. Matlab: aur same physical rotation hain — quaternions rotations ko double-cover karte hain.

Recall Solution L3.2

, .

(a) pehle . ko ke around rotate karo: , , . Phir ke around : , . Result (a): .

(b) pehle . ko ke around rotate karo: yeh on-axis hai ⇒ hi rehta hai. Phir ke around : . Result (b): .

order matter karta hai. Single-quaternion form mein yeh clearly dikhta hai: (a) hai , (b) hai , aur .

Recall Solution L3.3

Product ka conjugate lo (yeh order reverse karta hai): . Unit ke liye: , toh aur . Ek pure quaternion satisfy karta hai . Substitute karo: Jo quaternion apne conjugate ke minus ke barabar hota hai, uska scalar part aisa hota hai ki . Isliye pure hai — ek legal 3D vector. ∎


Level 4 — Synthesis

Kai ideas combine karo ya scratch se quaternion banao.

Recall Solution L4.1

Axis: dono vectors ke perpendicular ⇒ unke cross product ka direction. , already unit hai. Angle: aur ke beech angle hai (dot product ). Half-angle build: L2.1 se check karo: yeh sach mein bhejta hai. ✓

Recall Solution L4.2

, . Hamilton product with , , :

  • scalar: .
  • , ,
  • vector part: .

Toh . Norm check karo: ✓. Axis–angle: ; vector length , toh Read: do turns milkar ek turn bante hain ke around.

Recall Solution L4.3

Pehle lagao phir : combined quaternion (rightmost first) hai . Lekin , identity quaternion. Tab Har vector ghar wapas aata hai. Isliye literally "undo" rotation hai.


Level 5 — Mastery

Edge cases, limits, aur real GNC ke tools.

Recall Solution L5.1

: identity (koi rotation nahi). Vector part hai , toh aur axis undefined hai — tum zero se divide nahi kar sakte. Interpretation: zero-angle rotation ka koi preferred axis nahi hota; har axis kaam karta hai kyunki kuch move nahi hota. Software ko yeh special-case karna padta hai (jaise identity axis return karo) zero se divide karne ki jagah.

Recall Solution L5.2

, , toh — ek pure quaternion (zero scalar). Yeh woh borderline hai jahan aur ko alag karna sabse mushkil hota hai, aur jahan scalar koi angle info nahi deta; axis poori tarah vector part mein rehta hai. ke saath, Rodrigues: , : ke around half-turn ko kar deta hai. ✓ (Figure dekho.)

Figure — Quaternion rotation formula — rotating vector v by quaternion q
Recall Solution L5.3

L2.3 se, . Usi cyclic symmetry se, .

  • Lengths: , — preserved.
  • Dot product: — abhi bhi perpendicular. Kyun aisa hona hi chahiye: dot products preserve karta hai (yeh ek orthogonal transformation hai), toh angles aur lengths untouched rehte hain — yahi cheez isse genuine rotation banati hai na ki stretch. Yeh quaternion route hai Rotation matrices & orthogonality ki taraf.
Recall Solution L5.4

Constant ke saath ke along, ka solution ek steady rotation hai jiska angle ke roop mein ke around badhta hai: par yeh hai ✓. Half-angle phir se dikha — rate ke andar hai lekin body physically par turn karti hai. Yeh connect hota hai > Angular velocity & quaternion kinematics $\dot q=\tfrac12 q\omega$ aur > Spacecraft attitude determination (GNC) se.


Recall Poore page ka ek-line summary

half-angle se banao, sandwich se rotate karo (ya Rodrigues full angle ke saath), composition mein order respect karo, aur degenerate () aur axes ko special-case karo. Related: Rodrigues' rotation formula, SLERP — quaternion interpolation, Euler angles & gimbal lock, Quaternion algebra & Hamilton product.