# Get relative translation and rotation of two models

**URL:** https://discourse.slicer.org/t/get-relative-translation-and-rotation-of-two-models/8064
**Category:** Support
**Created:** [August 16, 2019, 5:59pm UTC](https://discourse.slicer.org/t/get-relative-translation-and-rotation-of-two-models/8064 "2019-08-16T17:59:34Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [March 11, 2021, 4:24am UTC](https://discourse.slicer.org/t/get-relative-translation-and-rotation-of-two-models/8064/10 "2021-03-11T04:24:59Z")

</div>

The same orientation can be encoded using many different combinations of rotations, even Euler angles have many variants. The code snippet above uses ZXY rotation order - see complete conversion between matrix and Euler angles representation in this post:

> [@Reformat module Values not resetting](https://discourse.slicer.org/t/reformat-module-values-not-resetting/15873/2):
>
> The sliders are used only for relative rotations. See more details here: [Is the rotation of the 3D Slicer's Transform module Euler or Quaternion? - #2 by lassoan](https://discourse.slicer.org/t/is-the-rotation-of-the-3d-slicers-transform-module-euler-or-quaternion/11944/2) We should reset them to 0 more often to make sure users don’t mistake it for Euler angles or something similar. Euler angles (and similar representations that rely on successive rotations along multiple axes) are not well suited for representing arbitrary orientations, as it suffers from gimbal lock and there are multiple parametrizat…

---

_[View the full topic](https://discourse.slicer.org/t/get-relative-translation-and-rotation-of-two-models/8064)._
