Grasshopper

algorithmic modeling for Rhino

Hello,

I've started to use grasshopper a couple days ago, and I thought what I wanted to do was easy (it may still be so). I want to be able to create two connecting lines in Rhino, then using grasshopper make the lines move in a finger-like fashion using two sliders (one for each line). I was able to get the first line moving using the Rotate3D component, but it's harder to get the second line to rotate as its center of revolution keeps changing (it's the end point of the first line). How can I do this?

Views: 772

Replies to This Discussion

Hi Ibrahim, here is a different approach - whether you like it or not. Rather than compound several rotations, I first defined an allowable range of motion for the end of the finger (Radius = finger length) and then specified the point at which the finger is directed. This defines two circles, one from the tip of the smaller joint and one from the base of the larger joint. Their intersection is two points, one of which I chose to be the "knuckle". The base, knuckle and tip are then used to construct a polyline.

Attachments:

Oh wow that's more complicated than I thought, but it still works and I like that, thanks!

Just apply the transformation of the first line to the second.

Attachments:

I like this very simple version by Daniel, which I simplified a bit further:

'Crv' contains two curves (lines), end-to-end.  The plane that these two curves are in is assumed to be 'World XY', which is why the 'Unit Z' vector works as an axis.

One could write code to determine the plane but it would depend on the two 'Crv' segments not being co-linear.

Attachments:

Same code as before in the bottom group except angles are in degrees.

Top group gives choice of PLANE and sets length of two lines, both passed to bottom group for finger joint transform.

Attachments:

Finally, a simple "Rotate on Z axis" makes this more like an excavator, and knobs for angles:

Attachments:

Thank you for your help I like your idea, it's now working!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service