algorithmic modeling for Rhino


Is there a goal that acts like a spring (Length Line goal) but gives more strength to one side of the line?

For example I want the desired "rest" length to be 0 but the end result not on the middle of the line but on the end point of the line.

It would almost be like a "pull point to point" goal if that makes sense?

I do not want to use an anchor on one side as my system is non-linear and might have one side moving too.

Many thanks,


Views: 2756

Replies to This Discussion

Maybe you can anchor the point you want to stay stationary.

Hi Arthur,

Yes - it is possible to make a goal act asymmetrically on 2 points using a custom goal. I'll post an example shortly.

If I understand correctly, you are talking about a completely 1-way relationship between the points, where A follows B, but B is not affected by the position of A.

Bear in mind that this would violate Newton's 3rd law (equal and opposite reactions). Not that this is necessarily a problem - although Kangaroo is physically based we can choose to break the laws of physics in certain ways to get desired geometric results.

Theoretically I think a system where you had lots of such forces without balancing reactions could become unstable and fail to converge, but probably having a few in an otherwise balanced system won't be a problem.

An alternative approach which stays physics-based is to give the 2 particles different masses. The ends will pull towards the centre of mass, and if one particle is more massive, the centre will be closer to that end. As one mass tends to infinity, the centre of mass will be at that end, but also means that end becomes an anchor, which you say do not want.

Hi Daniel,

Thanks so much - Adding different strengths to anchors on both ends of line worked well (screenshot below).

I had to add a lot of strength to line goal for the points to meet at the same location though.

When no anchors are assigned and line goal is set to length of 0 the output becomes invalid, is that normal?

If I understood correctly, the strength of an anchor assigns a mass to the particle and if all anchors have same strength then their mass is infinite (black hole??). 

Update: it seems like the anchor points are always null in the output (have tried different strengths for each goals). This is OK in this case as I can use end points of spring but might not be ideal if spring reached a length of 0 which probably explains the invalid output described above?

I said giving the particles different masses, not using anchors with different strengths, as this is not the same thing.

An anchor in K2 actually behaves like there is a target particle of infinite mass (ie a point which always remains absolutely fixed), to which the input point is attached by a zero-length spring. The strength input of the component controls the stiffness of this spring, not the mass of the target point.

In K1 anchors were slightly different in that the specified particle itself was directly fixed absolutely without any weighting factor.

Currently the only way to alter particle masses in K2 is through scripting custom goals. I will in time bring back easier ways to set per-particle masses, probably at the same time I reintroduce the option of keeping momentum.

As promised - here is an example of a very simple custom goal which produces a one-way interaction between a pair of points - the second is pulled towards the first, but there is no corresponding reaction force on the first point.


Hi Daniel,

Thank you so much and sorry for the troubles - I've applied the custom goal to the definition and it works well. The problem is that the lead point doesn't seem to follow the spring it sits on. At first glance on gif below, could it be something I did wrong or is it because of what you said regarding the "end becoming an anchor" in the custom goal - am I attempting the impossible? 

What geometry are you actually trying to achieve?

If you want the end points of the lines to lie on/slide along the other lines, then the goal I posted above isn't what you need.

For that you could use the CoLinear component.

Thank you so much for answering on a Saturday. We're trying to create a "Zollinger-like" reciprocal joint but on your Rheotomic grid (We is Tobias Power, Toby Burgess and Format Engineers  for the Burning man festival - pic below but much more irregular as you know).

In the step shown in previous reply, we're creating an offset of 50 mm minimum between members at each node. This doesn't require Kangaroo as it is mostly geometrical relationships.

The tricky last step (which is the one documented here) is to bring back the offsets to their target lines as all members depend on eachother.

We used CoLinear thanks to your suggestion but still needed a force that pulls the lines to the member whilst keeping the 50mm distance of the original offset.

Combining the co-linear with the custom goal seems to be much better although since the points now slide on the member we had to add a spring preserving the offset which sometimes struggles with the Co-Linear force. This should be good enough for us to proceed, thanks a lot Daniel.

Cleaned definition attached from Tobias and Arthur :) Thank you for your generosity Daniel.







  • Add Photos
  • View All

© 2018   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service