Rotate From variable line length


I can rotate a line generated by GH using a slider. But now I’m looking to rotate that same line by pushing the end of it with another line… sort of like a connection rod to a crank shaft. I want to adjust the length of the rod with a slider so I can see what angle I get on the line it’s connected to.


I think you should take a look at Bongo Animation, which makes Rhino “come alive”. (Rhino isn’t in itself an animation tool). here some Sample models :

// Rolf


Man! Now we’re talking! First GH, then Kangaroo, now Bongo. But wait… this is for PC only.

Are you sure nothing like this can be done in GH or Kangaroo?


I use PC only, knowing nothing about Mac. My son uses Mac, and so I pretend to not know him either. :slight_smile:

But regarding GH I can say in general that anything can be done, that can be done in GH / Kangaroo. But some things are easier to do than other things. You actually can do almost anything in Rhino - if you do some scripting.

All this only means that wherever there is scripting capability, there you can do almost anything. And Rhino can be scripted, and GH can be scripted.

GH is special in that it’s focus is on simplifying trigonometry and math a bit, by providing a visual way of doing the scripting. Kangaroo also provides you with some “already-done- math” in physics, which also helps a bit. So it is with tools, they’re there to help, to simplify. But if you know all the math, and how to script, then you don’t need no Gh, and no Kangaroo. And no Rhino either.

Real men do all the coding on his own, from scratch. :slight_smile:

Just joking. Bongo does the job for you in that it is a specialized tool for animations. GH can animate too, but it’s not specialized for doing that (but not too tricky I think). Anyway, it’s all about how helpful the different tools are for what you want to do.

But if you want to do animation, it is not a bad idea to look into an animation tool. Bongo is an animation tool for Rhino. But if you are a Mac user, then who can help you? :slight_smile:

// Rolf


in grasshopper, you can animate a slider : (17.1 KB)


This is stunning. I’m going to have to examine this a little.



it’s mostly using the Expressions component to determine where the rod should be…
a² + b² = c² finds where the rod should be along the X axis…
sin = opposite/hypotenuse is determining the angle.

that could probably be streamlined a little further into using one Expression instead of two. :wink:


Ok, I’m almost there. How can I generate a point on an ARC based on the distance from a reference point?

So I have a reference point in my project, and far off to the side I have an ARC. The ARC is positioned in a way that no two points on the ARC can share the same distance to the reference point (the arc is perpendicular to the reference point).

I would like to know where on the ARC is the 100mm position from the reference point. I was using the Evaluate Curve function but it came up with an error. Something about a parameter being outside the domain of something.


initial thought just using geometry would be :

draw a circle with radius 50 using the point as center… where it interests the other arc is the point you’re looking for.

that said, there may be a better way :wink:


This is great for 2D. However, in 3D the circle will have to be on the same plane as the arc. As it turns out, these don’t work when I have a slider for positioning of the arc and the circle.

I think I have an extremely clunky solution to this. So my reference point now has a sphere centred on it. Then I feed the sphere into a Brep so I can use the Brep/Curve intersect function. With a slider driving the diameter of the sphere, I can move the intersection point on the ARC at a precise distance from the reference point. Then I can use that point to draw a line. It’s super clunky because I have to hide the sphere just to see the effect I need. I feel it’s like using a shoe as a hammer and a butterknife as a screwdriver.

Are there any math / trig gurus out there who can clean this up?

(David Rutten) #11

In 3D, use a sphere.


Yes, That’s what I did. But it seems super clunky.


that’s not necessarily an indicator of clunkiness (imo)

if you do it in a way without using the sphere & intersections, you’re either going to end up with a highly complex equation (if the equation is possible to begin with)… or some sort of form finding setup which can automatically test the distance at various points along the arc and return the best-fit solution.

grasshopper’s Galapagos does this… (though i’m not convinced this is the best way to approach this particular scenario)