Grasshopper

algorithmic modeling for Rhino

What I want to do is simulate a pulley by running a segmented line over/through some sort of object that collides with it.

Sounds fairly simple right? I checked out the drape example on the kangaroo page, and some times I managed to get the drape to "fall through" a sphere.

So I figured there must be some factors to consider for it to be "stable", the density of the points but also the density of the collision-mesh.

I found out the primitive sphere just work excellently well for colliding with just about anything, but from there it is all downhill. I started with a cylinder next because it seemed such a fitting shape for a pulley simulation, however, points fell right through whatever the density of the points in the line. When subdividing the cylinder however, it seems to work perfectly. My thoughts were that since the cylinders have vertices only on the sides, a line would not hit any mesh points? (is that even required?)
Anyway so I'm not sure that was it, but I was happy that it worked.

Now a pulley in my case also needs sides, to keep the line from slipping off if angled. I made a custom surface that was meshed, but regardless of the density, nothing would collide with it.

So I made one in 3dsmax, a nice elegant mesh topology, same result, just fell through.

Then I recalled the spheres working so excellently, so I made one with a sphere in the middle and two bigger ones to the side which were a bit squashed in 1-axis. This worked perfectly with a line going over it with only vertical loads. As soon as any horizontal load was applied, it would slip in between two spheres.

I realized a brilliant thing to do was to use a torus and run the wire through that, always works! I used a component I think from lunchbox, that makes a torus, but meshing it resulting in zero collisions.

The thoughts went a bit crazy here but led me to my best one so far, again I introduced the damn spheres because magically they seem to be the only thing working consistently well so far. So I made a circle and populated it with spheres and then mesh unioned them. This works pretty well, except when moving it sometimes, it suddenly loses it's ability to collide somehow.

So to me, the whole process has been more like alchemy than science, funny but frustrating too. What were your experiences? Does someone know what are the actual parameters that make it work? The inner workings? Why does it sometimes refuse to collide?

I recognize the 'slipping/fallin halfway through' vs. 'refusing to collide', the first seems to be a density issue, the other I have no clue.


Any help, insight, greatly appreciated.

Views: 896

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service