# Is it possible for a single torque to rotate a sphere of uniform density at rest from one arbitrary orientation to another?

If I had an object at rest in some arbitrary rotational position, is it possible to apply a single force to it in order to rotate it to a second rotational position? This would be assuming the object is effectively a sphere and there are no other forces acting on it. The object would also obviously continue rotating past the target rotational position which is fine, as long as it matches the position at some point.

For context, I'm trying to control a rigid body in a game engine using torque. I need to interpolate between two rotations using forces but trying to interpolate more than one axis at once is proving difficult. I have a suspicion that this problem is actually impossible, but not if I allow for one of the axes to be unconstrained. For example, I suspect that I could use a single force to rotate the object so that its "front" is facing the same direction as the target, but its rotation around the "front" facing axis might be wrong. This is actually acceptable if that is the case, but having perfect rotation would be better.

Finding relevant information on this problem is difficult because search results are full of questions asking how much torque is required to achieve a certain angular velocity, but I want to know what direction the force should be applied in to rotate a 3d object to an arbitrary position. I also don't know if this type of problem has a specific name that would be more searchable, I can only describe it, so if anyone knows a more specific search term that would also be super helpful.

• I think your title doesn't really match your question. Better might be "Is it possible for a single torque to rotate a sphere at rest from one arbitrary orientation to another?" Commented May 28, 2023 at 17:30
• I suppose. I tried to make the title as general as possible and leave the details to the actual post body, but I'll update it. Commented May 28, 2023 at 22:50

I am going to assume you want to know the axis to rotate around to move from one orientation to another, and when you say "This would be assuming the object is effectively a sphere and there are no other forces acting on it" we can assume that the moment of inertia is the same about any axis, so the rotation axis is the same as the axis of the torque. A general rigid body with different principle moments of inertia gives a much more complicated motion, with the angular momentum and axis of rotation potentially in different directions (look up the tennis-racket theorem and see the videos of the Dzhanibekov effect). I would suspect the answer in that case isn't going to be simple, but someone here may consider it an interesting challenge. If you really want to ask about non-uniform moments of inertia (it could still be a sphere, but with a non-uniform density), you will need to clarify your question.

First, assuming your initial and final orientations are represented by rotations $$R_1$$ and $$R_2$$ from a standard position, the rotation you need to get from the first orientation to the second is $$R_2R_1^{-1}$$.

You don't say how you are representing your rotations (matrices, axis-angle, quaternion, Euler angle, etc.). Assuming you are using rotation matrices or can convert to them, the inverse of a rotation matrix is the same as the transpose: $$R_1^{-1}=R_1^T$$. You multiply the matrices $$R_2$$ and $$R_1^T$$ and then convert the result to axis-angle format. This gives you an axis to rotate around, that takes you from one orientation to the other.

The matrix of a proper rotation $$R$$ by angle $$\theta$$ around the axis represented by a unit vector $$\mathbf{u}=(u_x,u_y,u_z)$$ is given by:

$$R=\pmatrix{\cos\theta+u_x^2(1-\cos\theta) & u_xu_y(1-\cos\theta)-u_z\sin\theta & u_xu_z(1-\cos\theta)+u_y\sin\theta \\ u_xu_y(1-\cos\theta)+u_z\sin\theta & \cos\theta+u_y^2(1-\cos\theta) & u_yu_z(1-\cos\theta)-u_x\sin\theta \\ u_xu_z(1-\cos\theta)-u_y\sin\theta & u_yu_z(1-\cos\theta)+u_x\sin\theta & \cos\theta+u_z^2(1-\cos\theta)}$$

If we subtract each off-diagonal element from its transpose element we get $$R_{32}-R_{23}=2u_x\sin\theta$$, $$R_{13}-R_{31}=2u_y\sin\theta$$, and $$R_{21}-R_{12}=2u_z\sin\theta$$.

Hence $$(u_x,u_y,u_z)=(R_{32}-R_{23},R_{13}-R_{31},R_{21}-R_{12})/2\sin\theta$$.

You might also wish to look up the SLERP (spherical linear interpolation) algorithm. That interpolates one vector to another using rotation, rather than one orientation to another - this is the situation you mentioned where you said "I suspect that I could use a single force to rotate the object so that its "front" is facing the same direction as the target, but its rotation around the "front" facing axis might be wrong." SLERP is often implemented as a standard function in game engines.

• Yes, that is what I meant about it being a sphere, I don't believe the game engine actually supports objects of non-uniform density. I might look into that for much larger objects later, but I won't need to apply this function to them and I'll probably just cheat and use some sort of finite element strategy and subdivide them anyway. Commented May 28, 2023 at 23:18
• I didn't say what way the rotations are represented because I assumed I'd need to use a different representation to do the math in the first place anyway, and I figured I'd try and find out how to convert them on my own if I were told to use a different kind. The rotations are currently represented as YXZ-Euler rotations, but I suspect this is not ideal. It wouldn't be the first time it's caused me problems. Commented May 28, 2023 at 23:18
• I don't fully understand the part where you write equations using R₁₂ or R₂₃, I don't understand where the large subscripts came from all of a sudden or what they are supposed to represent. I can see they are all combinations of 1, 2, and 3, but there seems to be no R₃ so I'm not sure what these are. Is "R₃" the same as "proper rotation R?" Commented May 28, 2023 at 23:18
• There is a slerp function I can use and I have tried to use it, but slerp isn't immediately compatible with YXZ-Euler rigid bodies. It would be useful if I weren't using physics forces, and it would be fine if I were only rotating vectors, but I'm not. It might be useful if I convert to a different rotation format, but it seems like you are saying I can get better results the other way so I'll look into that first. Commented May 28, 2023 at 23:19

If the moment of inertia is scalar (equivalently, is a scalar multiple of the identity matrix), and the initial and final orientations are given by quaternions $$q$$ and $$r$$, then the axis around which you should rotate is the imaginary part of $$r/q$$ ($$=rq^{-1}$$).

If the moment of inertia isn't scalar then it's a much harder problem, and I don't know the answer, but I would think it's been researched since it would have applications in orienting spacecraft.

This is more of a math problem than physics, but here goes anyway.

Any rigid motion of a sphere that leaves the center fixed is a rotation. This may or may not be obvious to you. If you are willing to assume it, here is how you can find the axis that rotates the sphere from its old orientation to its new orientation.

Choose an arbitrary point on the sphere. Reorient the sphere and find the position of the point in the new orientation. Draw an arc from the old position to the new position. Find the midpoint of the arc. Draw a great circle around the sphere that passes through the midpoint and is perpendicular to the arc. (Caveat: on Earth, the north pole doesn't move as the Earth rotates. Don't choose a point like this.)

Another fact that may or may not be obvious: Choose any axis through the center of the sphere that passes through the circle. You can rotate the sphere around that axis so the old position winds up at the new position. Example 1: Choose the axis that passes through the midpoint of the arc. Rotate $$180^o$$. Example 2: Choose the axis perpendicular to the first axis. That axis defines an equator. The new and old position are on the equator. Rotate the sphere so the old position travels along the equator to the new position.

So each axis that passes through the great circle permits a rotation that gets at the point from its old location to its new location.

Choose a second point on the sphere and repeat this process to find a second great circle. These define a set of axes that permit a rotation of a different point from old to new position. (Caveat: you could choose a second point where you find the same great circle as before. Don't do this.)

Any two distinct great circles intersect at two points. The points of intersection define an axis that permits a rotation that gets the first point to it new location, and another that gets the second point to its new location.

Third possibly non-obvious fact: These two rotations are the same. So a torque around that axis will do the job.

• So I actually tried this solution using a single point. It sort of worked but not very well. I'm glad to see that my intuition was good but my implementation must need work. It did not occur to me thought that ANY axis through that second circle would work, though it would produce a curved path for the point to travel. This is a very useful observation. The same goes for being able to find the intersection point of two circles, this was a very useful visual description of what is happening and I appreciate that. Commented May 28, 2023 at 23:56
• It's interesting that you say not to choose points that do not move during the rotation such as the earth's poles. I understand why you would say that, but if the difference in position between the starting and ending point is zero then that point IS the axis of rotation, and I can skip some calculations in that instance. At least, it is if the second point's movement is non-zero. If they are both zero then there's no movement, and if they are the same then I also already know the axis. Could be useful to optimize the process in edge cases. Commented May 29, 2023 at 2:23
• Yes. I didn't want to distract from the main point by going into the edge cases too much. Glad you saw it. Commented May 29, 2023 at 4:21