I want to model a behavior of a rolling cube.

So far I managed to calculate the cube position for a given rotation angle. I need to rotate it around the center of gravity, thus I needed to calculate the horizontal and vertical displacement as a function of the current rotation angle.

Rotating cube displacement

When I apply a given rotation I get proper linear movement. Video.

To be honest I was suprised how complicated are equations for these values.

Now I figured it would be nice to give the rotation animation a realistic feeling. By that I mean that the first 45 degrees would be slow at first and accelerating over time, and the second 45 degrees of the rotation would be a free fall.

From what I remember I need to:

  1. Figure out what forces interact with the object. I know there must be gravity, external(moving) force and the friction.
  2. Find out what is the net force rotating the object.
  3. Calculate angular acceleration.
  4. Derive the equation for the angle as a function of time.

First of all, is this procedure correct? Second of all, can you help me get started with the forces part. I don't really know where to begin, how to apply friction(I assume the rotation happens without any slide).

  • Do I hook the gravity force in the center of gravity(I suppose yes)?
  • Do I hook the moving force in the top-left corner or in the center of gravity? If in the corner, how do I take the torque into account?
  • How to I divide these forces into components to calculate net forces in each direction?

I was playing with a carton of juice for half an hour, but I cannot figure out how these forces distribute.

I appreciate all the help.

  • $\begingroup$ Very nice video, the shadows really look well, you might think of a 50 percent reduction in the diagram, (using picresize.com or somesuch) it takes ages to scroll down on a phone and personally, I don't think it needs to be that big. Best of luck with it. $\endgroup$
    – user108787
    Oct 26, 2016 at 0:51
  • $\begingroup$ This is a complicated problem and I've tried to model it myself. Here's just one complication you'll have to accomodate somehow: physics.stackexchange.com/q/217025 . Good luck (I might answer some of your questions later on). Nice video! $\endgroup$
    – Gert
    Oct 26, 2016 at 1:25
  • $\begingroup$ @CountTo10 sorry about that, it's 30kB image, I didn't think it would be a problem. Video generated by 3DS Max with default Shadow Map setting. $\endgroup$ Oct 26, 2016 at 14:48
  • $\begingroup$ Do you assume finite friction, or infinite friction (no-slip)? $\endgroup$ Oct 26, 2016 at 21:05
  • $\begingroup$ Cool video. What did you use for rendering? $\endgroup$ Oct 26, 2016 at 21:06

3 Answers 3


Let's assume that at the angle $\alpha=0$, the cube bounces off the floor with no dissipation of energy. Recall that as you say, the rotation happens without any slide. The energy of the cube (kinetic plus potential) is thus conserved and no external force is needed to maintain its motion.

For this kind of problems, it is convenient to use the Lagrangian formalism of mechanics of constrained systems. Indeed, the problem can be reduced to the motion of the center of mass that is forced to move only along quart-circles; we only need not to forget to consider also the rotational kinetic energy.

Let us introduce the angle $\beta$ which is more natural to the system:

$$\beta := \alpha + \frac{\pi}{4}$$

As the motion is going to be "periodical", we will consider only $\beta \in \big(\frac{\pi}{4}, \frac{3}{4}\pi\big)$, which correspond to the configurations between "lying on the side" and "lying on the adjacent side". This system is actually a physical pendulum, although inverted (with the center of mass above the pivot).

To find the equation of motion, express the vertical and horizontal coordinates of the center of mass in terms of $\beta$ and the side of the cube, $l$:

$$x = -\frac{l}{\sqrt{2}}\,\cos\beta, \quad y = \frac{l}{\sqrt{2}}\,\sin\beta$$

Compute their time derivatives to obtain the square of the velocity: $$\dot{x} = \tfrac{l}{\sqrt{2}}\,\dot{\beta}\sin\beta$$ $$\dot{y} = \tfrac{l}{\sqrt{2}}\,\dot{\beta}\cos\beta$$ $$v^2 = \dot{x}^2 + \dot{y}^2 = \frac{l^2}{2}\,\dot{\beta}^2$$

Knowing the moment of inertia of the cube $$I = \frac{ml^2}{6}\,,$$ express the kinetic and potential energy $$T = \frac{1}{2}\left(mv^2 + I\dot{\beta}^2\right) = \frac{ml^2}{3}\,\dot{\beta}^2$$ $$V = mgy = \frac{mgl}{\sqrt{2}}\,\sin\beta$$ to get the Lagrangian $L = T - V$.

The Lagrange equation for our degree of freedom $\beta$ reads: $$\frac{\mathrm{d}}{\mathrm{d}t} \frac{\mathrm{d}L}{\mathrm{d}\dot{\beta}} - \frac{\mathrm{d}L}{\mathrm{d}\beta} = 0$$

Specifically, $$\frac{\mathrm{d}}{\mathrm{d}t} \left(\frac{2ml^2}{3}\,\dot{\beta}\right) + \frac{mgl}{\sqrt{2}}\,\cos\beta = 0$$

or, in other words

$$\ddot{\beta} = -\frac{3}{2\sqrt{2}}\frac{g}{l}\,\cos{\beta}$$

This is essentially the equation of the mathematical pendulum. It can be integrated to reduce the order by one: $$\dot{\beta}^2 + \frac{3}{\sqrt{2}}\frac{g}{l}\,\sin\beta + C = 0$$

and solved either explicitly using special functions, or numerically.

Edit: In order for the cube to get over the edge and actually roll instead of rocking, one needs to choose sufficiently high initial velocity, encoded in C.

  • 1
    $\begingroup$ Very impressive looking, but from your equations for $x$ and $y$, this cube appears not to be rolling but rocking backwards and forwards. The first sentence of the question asks for rolling cubes. $\endgroup$ Oct 26, 2016 at 4:32
  • 1
    $\begingroup$ In order for the cube to get over the edge and actually roll instead of rocking, one needs to choose sufficiently high potential velocity, encoded in $C$. As stated in the answer, the solution is valid only in the region $\beta \in \big(\frac{\pi}{4}, \frac{3}{4}\pi\big)$ that corresponds to the configurations between "lying on the edge" and "lying on the adjacent edge". $\endgroup$
    – trosos
    Oct 26, 2016 at 12:44
  • 1
    $\begingroup$ This is 'nice math' based on unworkable assumptions. And your edit is a silly cop out. This is misinformation, nicely packaged. -1 from me. $\endgroup$
    – Gert
    Oct 26, 2016 at 14:16
  • 1
    $\begingroup$ @SuzuHirose: Thank you, I think I see your point: I had swapped vertical and horizontal directions. Now it should be correct. $\endgroup$
    – trosos
    Oct 26, 2016 at 14:18
  • 1
    $\begingroup$ "Indeed, the problem can be reduced to the motion of the center of mass that is forced to move only along quart-circles"... Except of course that that doesn't happen. See the link in my comment to the question. $\endgroup$
    – Gert
    Oct 26, 2016 at 14:18

This is a complex problem, so rather than try an suggest an all encompassing solution, let's just look at the forces in play:

Rolling cube

In red is the force vector we'll make to act as the driving force $F$, in black gravity, in green the Normal force and in purple the friction force (none are to scale).

Firstly, with no other forces acting in the $y$-direction (vertical), the Normal force is always the floor's reactive force (needed to prevent the cibe from sinking into the floor) to gravity:


Friction will now resist movement in the $x$-dirrection (horizontal) and it's usually modelled as:

$$F_F=\mu F_N=\mu mg,$$ where $\mu$ is a friction coeficient.

In order to prevent sliding:

$$F_F>F\implies \mu>\frac{F}{mg}$$ $F$ and $mg$ now exert opposing torques about the pivot point $P$, with net torque:


If $\tau_{net}>0$ then clockwise angular acceleration will occur.

This allows us also to further define $\mu$, as the limit case is:

$$F=\mu mg \:\text{and }F=\frac{mg}{2}$$

So the minimum value is:


The angular acceleration is more easily treated as a conservation of energy problem, as the work done by $\tau_{net}$ is equal the change in (rotational) kinetic energy $\Delta K$:

$$W=\int_{\pi/2}^0\tau_{net}(\alpha)d\alpha=\Delta K$$

From trigonometry:

$$\tau_{net}(\alpha)=F\sqrt{2}a\sin\big(\alpha +\frac{\pi}{4}\big)-mg\frac{\sqrt{2}}{2}a\sin\Big(\alpha-\frac{\pi}{4}\Big)$$

On integrating we have:

$$W=\sqrt{2}aF=\frac12 I\omega^2$$

(The $mg$ term drops out because there's no change in potential energy $U$ over $\pi/2\to 0$)

So at the end of the 'tumble':


But as the cube now has kinetic energy and the tangential velocity vector is pointing straight down, the cube has to rebound. Neither friction nor the force $F$ can prevent that.

  • 1
    $\begingroup$ Note that as the cube rises up there is a vertical acceleration of the CofM so the normal force increases... and once it goes past vertical it accelerates down and the normal force decreases. So your calculation of the minimum coefficient of friction required is not complete. $\endgroup$
    – Floris
    Feb 23, 2017 at 23:11
  • 1
    $\begingroup$ The behavior will depend on elastic properties of the surface, correct? If we agree on this, isn't it true that the problem is ill-posed without specification of properties of the surface? In this solution, what are the assumptions for the surface properties? $\endgroup$ Mar 27, 2017 at 22:25
  • 1
    $\begingroup$ The assumption is a perfectly hard surface. $\endgroup$
    – Gert
    Mar 28, 2017 at 23:15

Something like this:

  1. Accumulate the rotation of the center of mass.
  2. Compute tip or slip. If it slips, then it won't accumulate rotation but will slide instead.
  3. After the rotation, convert it all back into translation for the next tip or slip computation (where it will reconvert back into possible rotation again) (that gets the sliding ruler problem.)

But this is only approximate thinking, however, its nice and you could apply it to any shape in general.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.