Hello, I would like to program the following animation:
A cube or a cylinder hangs with a belt or a chain below small roller.
The upper roller rotates, turning the belt and also rotating the cube.
In the case of a belt, you could perhaps animate the texture and then “only” have to dynamically change the geometry of the belt. But the belt has to rest against the bottom of the rotating cube.
Maybe someone can help me first how to adjust the geometry of the belt to the rotating cube.
Would be nice, if we find a way to detect the dimensions of the cube, so it is easy to change its size/proportions.
As you have already found out, this is not a trivial problem, if you want to do it correctly. Due to the “chordal action” (German: Polygoneffekt) this setup (circular roller rotating at constant angular velocity) drives a 4-vertex polygon (a cube), this will inevitably result in a varying angular velocity of the driven element. The “unevenness” of the driven element’s angular velocity will be most pronounced, the less corners/vertices/teeth this element has. So with a driven cube you are pretty much at the worst possible end. You will also observe a vertical “bouncing” of the cube, if animated correctly.
Reason for this is, that the effective radius of the driven cube varies with the degree of rotation. The very low and even number of sides of the driven object makes this effect particularly noticeable.
See this, for a more scientific explanation:
I have an older solution with the animation manually made in Blender. But now the whole thing should be made in Three.js in order to be able to change the dimensions/proportions of the elements.
I am basically aware of the problem with the polygon effect. So I would pretend that the belt is a bit flexible to ignore the change in circumference.
I’m alternatively thinking about moving the cube (or cuboid) slightly up and down during rotation to compensate this. I don´t see a problem to capture the rotation angle to realize the up and down movement in a more or less belivable way.
But capturing the edges of the cube/cuboid wil be my callenge and change the belt geometry along this. And furter more, the question how to display the movement/feed of the belt in a realistic way - moving small meshes along the path or moving a texture like in the conveyor belt examples.
Has anybody usable code framents to go a step forward on this long road?
I had to look that one up - had never heard of it before. It seems like Reuleaux polygons are only defined for Polygons having an odd number of sides. Since the TO is specifically asking for a cube (with a square footprint and four sides), I’m afraid Reuleaux polygons will not come to the TO’s rescue.
Someone made a bicycle using Reuleaux Polygon shapes instead of traditional circular wheels. Included is a video where you see him actally riding that bike. Fast-forward to position 05:20 for that part.
You can clearly see, that the behaviour is significantly different from a “perfect circle”. In particular, you will observe a pronounced vertical bobbing motion of the wheel axes …
The perfectly horizontal, flat “mud guards” front and rear illustrate the “constant width” property of Reuleaux Polygons. Which does not imply a perfectly straight trajectory of the wheel axes.
So if you want to use Reuleaux polygons for a belt drive, you have to construct the axles using springs in a vertical guide. In order to maintain parallelism, the two polygons must have identical dimensions.
It would also be interesting to generate it with three.js.
There’s more to it than meets the eye at first glance:
even though the wheels are heavily bouncing, the rider does not get to enjoy a sprung ride! Rider and frame move along a perfectly level trajectory, with the exact same “levelness” as the supporting street.
In fact, the bike does not even have any springs or dampers at all!
The weight of rider and frame is transferred to the wheels and floor via the horizontal rails, which I previously (and erroneously) referred to as “mud guards” or simple lines of reference. While in fact those rails are essential parts of the load-bearing structure. Those rails are made up from a close series of ball-bourne rollers, which allow for the transfer of a vertical (weight) force while at the same time facilitating a relative horizontal movement of the point of contact between rail and wheel.
It helps to view the whole video, and not just the actual ride part …