<p>I am just trying to rotate my pointcloud object which is inside the unit cube ([-1,1] in all x,y,z axis). What I did is use the basic rotation matrix from <a href="https://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations" rel="nofollow noreferrer">wiki</a> and extend it to homogenuous 4x4 matrix (with 0 everywhere in 4th row and 4th column except in [4,4] position where  I put 1). When I did multiplication of object by rotation matrix and normalized points by their 4th value like this:  <span class="math-container">$$(x,y,z,k) -&gt; (x/k,y/k,z/k, 1)$$</span>
I see that my pointcloud object is no longer inside the unit cube and since I know that rotation is shape and length preserving transformation, I want to know how can I shift my pointcloud object back to unit cube in a way it is centered in (0,0,0) as before.</p>

CC BY-SA 4.0
2020-05-04T16:42:35.753Z
It's still centered, it just does not fit in the initial box anymore.
lightxbulb
CC BY-SA 4.0
2020-05-14T12:32:40.073Z
when using a rotation matrix (4x4) where the 4th column and row is zero (except the [4,4] cell is 1) you will get a rotation around the center (0/0/0). Beware, that if you have a point at (1,1,1) and you rotate it, it can lie outside the [-1,1] area
Thomas
<transformations><projections><affine-transformations>
Does rotating object inside unit cube [-1,1] by homogenous matrix move it outside unit cube
GreatDuke
# Does rotating object inside unit cube [-1,1] by homogenous matrix move it outside unit cube

(Asked by: username_0 on 2020-05-04)

I am just trying to rotate my pointcloud object which is inside the unit cube ([-1,1] in all x,y,z axis). What I did is use the basic rotation matrix from [wiki](https://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations) and extend it to homogenuous 4x4 matrix (with 0 everywhere in 4th row and 4th column except in [4,4] position where I put 1). When I did multiplication of object by rotation matrix and normalized points by their 4th value like this: $$(x,y,z,k) -> (x/k,y/k,z/k, 1)$$
I see that my pointcloud object is no longer inside the unit cube and since I know that rotation is shape and length preserving transformation, I want to know how can I shift my pointcloud object back to unit cube in a way it is centered in (0,0,0) as before.

**Tags:** transformations, projections, affine-transformations

> **Comments:**
> **username_1**: It's still centered, it just does not fit in the initial box anymore.  
> **username_2**: when using a rotation matrix (4x4) where the 4th column and row is zero (except the [4,4] cell is 1) you will get a rotation around the center (0/0/0). Beware, that if you have a point at (1,1,1) and you rotate it, it can lie outside the [-1,1] area  

---

## 0 answers

