Grasshopper

algorithmic modeling for Rhino

hey guys, I guess this is a no brainer..which probably sais something about my brain :)

I'm trying to create an attractor point only where the distance is smaller I want the higher value and when the distance is longer I want the smaller value..instead of having it shrink from the attractor point and on I want it to increase from the attractor point and on..

I thought maybe a reverse list for the distance..but that didn't really do anything..any ideas?

Views: 906

Replies to This Discussion

One formula that works quite well is a / distance. a is just a number. You can also then add a little extra amount to "distance", just in case distance=0, so that you do not have a division-by-0 impossibility (exception). The formula then is a / (distance + c). a / c is then the theoretical maximum number that you can get.

Also, (maximumDistance - distance + c) is good. You can use the "Bounds" component to get the maximum number in a list. To separate minimum and maximum, you can use the "Domain components" component.

- Giulio
from what I inderstand this is a normal attractor point formula.I'm trying however to reverse the outcome, meaning instead of the object closer to the point being small and then growing as it gets further, have the obkect cloder to the point become bigger.I attached a picture of what I was able to do..and I want the reverse of it.
I'm trying to reverse the outcome of the original attractor opint, meaning the cloder the object is to a point, the BIGGER it will become and not like the original formula where it becomes smaller.I attached a picture of what I have now which is the opposite of what I"m trying to do.maybe you can help out
Attachments:
Ehm, both possibilities above are meeting the requirement... :) In the definition of the screen capture you attached, just put the distances at the denominator (B) of the division component. The slider with 90, then, should be connected to A and is the "a" in the previous post, first sentence.

Hope it helps,

- Giulio
thanx,although I must admit I didn't really understand the differrence..I'm not an expert at this..:) can you perhaps show me on the original file I upload? your help is greatly apriciated.
Attachments:
Here the first possibility in components (right click, save as...).
- Giulio
Attachments:
thanx so much amico..you really helped me out..
p.s: why does adding 0.1 to each distance value reverse the outcome??
Notice the order of division is inverse: not "distance / a", but "a / distance"...

- Giulio

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service