# Determining the Point and Angle of Rotation

1. Jun 10, 2012

### Ashraf_Robot

I've an irregular box that is set on a fixture. The fixture is capable to translate and rotate the box. The original position of the box is known, by probes located at each side. If the box is translated and rotated to a new known location, with same probes. How do I determine the point and the angle of rotation that leads to this new location?.

2. Jun 11, 2012

### Simon Bridge

Welcome to PF.
You know the initial and final positions of the probes don't you?
I don't understand your difficulty.

3. Jun 11, 2012

### Ashraf_Robot

Yes, old and new point coordinates (x, y, z) are known. My problem is how to map or to relate old and new data in order to extract the point and angles of rotation and translation.

4. Jun 11, 2012

### Simon Bridge

Yes I realize what you hope to achieve, I don't understand, given that you have a complete description of the state (position and orientation) before and after the motion, what it is you find difficult about this. Where are you stuck?

For instance, you may relate the two positions/orientations via translation and rotation matrixes.... or just by differences as in: the object has moved distance d and rotated A degrees about axis (x,y,z).

For instance - I could have an object with three rods sticking out which point to a common center ... plotting the ends of these rods will let me track the position and orientation of the object using coordinate geometry.

5. Jun 12, 2012

### Ashraf_Robot

The case is that body (box) is set, initially, randomly on a fixture where the cartesian coordinates (x, y, z) of certain points are recorded. According to these readings the final reading (the new position and orientation) are designed. To Achieve this goal (final position and orientation), a translation and rotation command is given to certain jacks in order to get the designed location. Note: Rotation point is not known. So, is it possible, mathematicaly to solve this problem? Thank you.

6. Jun 12, 2012

### HallsofIvy

That's like asking "Pierre goes form Paris to Lyon. What route does he take?" There are a large number of possible routes and no way to determine one just knowing the first and last positions. There is no unique answer.

7. Jun 12, 2012

### Ashraf_Robot

May you give me one of these solutions in steps of symbol math?

8. Jun 12, 2012

### chogg

Here's how I'd try approaching the problem: break it into steps.

1) Find the rotation angle and plane (or axis, in 3D)

You can do this by looking at a fixed-body reference frame before and after the rotation. Suppose the old frame is e, and the new frame is f. Each new basis vector is a linear combination of the old ones,
$$f_i = R_i^{~j} e_j$$
and I believe the matrix elements are given by
$$R_i^{~j} = f_i \cdot e^j$$
where $e^j$ is the j'th reciprocal basis vector.

(Of course, you can choose an orthonormal frame so that $e^j = e_j$.)

Once you have your rotation matrix, it should have one real eigenvalue of 1. Solve it for the corresponding eigenvector; this is your rotation axis.

To get the angle, one way might be to find a vector orthogonal to the axis (i.e., in the plane of rotation). Then, rotate it by this matrix, and take the dot product with its unrotated self. This should give you cos theta.

2) Find your translation.

The most general 3D motion consists of a rotation about an arbitrary point, plus a translation along the rotation axis. Now that you know the rotation axis, you can find that translation directly: it's the projection of the displacement of the center of mass along the rotation axis.

So if your axis is $\hat{r}$, your displacement will be $t\hat{r} = ((x'-x)\cdot\hat{r})\hat{r}$, where $x' (x)$ is your final (original) center of mass.

3) Find the point of rotation.

You now know the axis and angle. Find the distance (projected onto the plane of rotation!) that the center of mass has moved. The initial point $A=x$, the projected final point $B=x'-t\hat{r}$, and center of rotation C form an isosceles triangle. The angle ABC is the rotation angle, and the side AB is the projected distance your center of mass has moved. You can now solve for r, the distance of the center of mass from the center of rotation.

DISCLAIMER: I don't really know if this approach is correct, since I haven't tried it. Anything I said could be flat-out wrong. But I hope it gives you some ideas. :)

9. Jun 12, 2012

### Simon Bridge

yeah - I was going to say ... the initial and final sets of points can be related by a matrix transformation. In the absence of detail it is probably easiest just to pick the shortest path.

You can only track the relative positions of the points you have data for .... depending on the kind of data, you may be able to work out an (x,y,z) coord for the object for the purposes of translation - a kind of geometric center.

Your description implies that you know more than you are letting on (or "realize" perhaps?) The translation and rotation instructions are given to some jacks which can reliably get the box from one position and orientation to another. So you have to give instructions along the lines of "move this much x y and z then rotate about some axis by so many degrees?

[So your problem is more like - "Pierre wants to go from Paris to Lyons, what instructions should he give the cab driver?" The answer depends on the constraints on the cab - maybe it's an aircraft? In your case - the constraints are given by how the jacks move.]

That tells you the framework you need to construct the matrixes (or whatever form your instructions and analysis needs to take). It allows you to pick an appropriate basis e that chogg talks about.

You can also see the box in question right? So you know the relationship the tracked points have to the geometry of the box?

This is why I kept asking you about where the difficulty lies.
What are you stuck on?

You just keep re-describing the setup. I cannot see the situation. Unless you can articulate your problem, I cannot help you.