Search code examples
3dgrasshopper

Use attractor point with a vector to change size of small cubes


I'm learning right now GrassHopper and I'm in front of a problem.

I'm trying to use the concept of attractor point in such way that the size of my elements will be different, according to if I'm close or not from my attractor-point.

This is for now, what I managed to do:

For now what I have

So as you can see, the cube is already generated. What I would like is let say to select the point at the bottom left and the closer I will be from this point, the smallest the cube will be (and reciprocally, if I'm far, the cube is bigger) Somehow as on this picture:

What we need

Because I'm learning step by step, I would like to limit myself to only few components. I saw on internet that people managed to perform what I want with only a point, a vector and some multiplication with the shape they want to transform.

Components useable

The problem with all of this it that, I tried to plug them in many way but none of them is working. The closest I get is that the size of all the cubes where getting smaller/bigger according to a scalling-factor, but this not really what I would like to obtain.

Thanks in advance for your help, Best Regards.


Solution

  • Ok somehow I managed to answer my own question with this schema of pluggin

    Schema solution

    And with such schema, you can obtain the final result as follow:

    Result