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 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.

  • 1
    $\begingroup$ It's still centered, it just does not fit in the initial box anymore. $\endgroup$
    – lightxbulb
    May 4 '20 at 16:42
  • $\begingroup$ 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 $\endgroup$
    – Thomas
    May 14 '20 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.