Calculate the path of a string wrapped around 2 cylinders in 3d space

3dgeometry

I have 2 cylinders in 3d space. Of each cylinder, I know the origin, the diameter and the normal vector (normal to the circle that defines the cylinder).

Now i wrapp a rope from one cylinder to the other. I know the direction of the wrapp on each cylinder and also the height, where the rope touches each cylinder. Here's a picture of what i'm trying to say:

Rope wrapped around 2 cylinders

The rope is allways wrapped perpendicular on the cylinder, so its actually only 2 circles in space.

I dont know how i would calculate that. My approach was first (remember, the cylinders dont have to be on the same plane, nor look in the same direction) to look at the plane of the first circle, and project the other circle on the same plane. Then i can calcualte the tangents of the circle and the projected ellipse. After that, I intersect the plane, that is formed by the tangent and the normal vector of the first circle, with the second circle. This gives me the starting and endpoint of the rope on each cylinder. Here are some pictures of that:

Tangent of circle 1 and projected ellipse of circle 2

Solution of tangent plane intersected with second circle

But the problem with that is, it doesn't work, when the cylinders are 90° degrees to each other because then, the circle gets projected as a line.

First of all, I'm looking for an idea on how to solve that. But if you have some equations, I would also be really happy.

Thanks for your help

David

Best Answer

Just to explain how I did it in the end:

  1. Create a 2D plane where Cylinder A lays and project it on that.
  2. Project the Center of Cylinder B on that plane. This gives you $P_B$.
  3. Calculate the tangent between Circle A and Point $P_B$. This gives you $P_A$.
  4. Project $P_A$ back to 3D.
  5. Create a 2D plane where Cylinder B lays and project it on that.
  6. Project $P_A$ on that plane.
  7. Calcualte the tangent between Circle B and Point $P_A$. This gives you $P_B'$.
  8. Project $P_B'$ back to 3D

Do that until the residium gets really small

Here's a picture

Notice the picture shows an easy case where this iteration is not need. But that is only because it's easier to draw that way. This algorithm works allways. No matter the orientation of the cylinders to each other.

Related Question