3
votes

I know that Posit calculates the translation and rotation between your camera and a 3d object. the only problem i have right now is, i have no idea how the coordinate systems of the camera and the object are defined. So for example if i get 90° around the z-axis, in which direction is the z axis pointing and is the object rotating around this axis or is the camera rotating around it?

Edit: After some testing and playing around with different coordinate systems, i think this is right: definition of the camera coordinate system: z-axis is pointing in the direction, in which the camera is looking. x-axis is pointing to the right, while looking in z-direction. y-axis is pointing up, while looking in z-direction.

the object is defined in the same coordinate system, but each point is defined relative to the starting point and not to the coordinate systems origin.

the translation vector you get, tells you how point[0] of the object is moved away from the origin of the camera coordinate system. the rotationmatrix tells you how to rotate the object in the cameras coordinate system, in order to get the objects starting orientation. so the rotation matrix basically doesnt tell you how the object is rotated right now, but it tells you how you have to reverse its current orientation.

can anyone approve this?

1
This isn't a complete answer but this is a good link to check out: math.stackexchange.com/questions/82602/…Isaac

1 Answers

1
votes

Check out this answer.

The Y axis is pointing downward. I don't know what do You mean by starting point. The camera lays in the origin of it's coordinate system, and object points are defined in this system.

You are right with the rotation matrix, well, half of. The rotation matrix tells You, how to rotate the coordinate system to make it oriented the same as the coordinate system used to define model of the object. So it does tell You how the object is oriented with respect to the camera coordinate system.