Rolling sphere along two lines in 3D plane

I am trying to develop a visual representation for a rolling sphere. I have two lines in xyz plane. I have a sphere of radius 'r'. Now the sphere rests 'in between' these lines and rolls along the lines. If at some point distance between the lines is such that sphere cannot 'rest' on them, it falls down to the ground.
Any idea for this algorithm?

Answers (1)

You have said " I have two lines in xyz plane. " This appears to state that the two lines lie in some common plane. With this assumption, the problem is very simple. Let the angle between the lines containing the sphere be called theta. Then when the sphere is at the point where it could "fall", its center would necessarily lie in the same plane and would be located along the angle bisector of the above angle theta. Consequently the distance along each line from their point of intersection must be
r*cot(theta/2)
(Of course the sphere would fall at this point only if the lines are appropriately oriented with respect to a vertical direction;.)
If the original assumption above is not true - that is, that the lines are not coplanar - the problem is more difficult (though not very much more so.)

Asked:

on 6 Sep 2014

Edited:

on 6 Sep 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!