Day 02, Step Two: Defining Attractor Point Relationships

DISTANCE RELATIONSHIPS BETWEEN ATTRACTOR POINT AND THE GRID OF POINTS: The component labeled "Closest Point" will allow us to sort points from the square grid. Using this component we can tell which points are closer to Attractor Point A and to Attractor Point B, respectively. Set the Cloud input on the Closest Point component to both attractor points. Remember to hold down shift to set more than one input and to flatten the Cloud. The Point input on the Closest Point component will be our grid of points.

Now we can find the Distance between the Closest Point output or the Attractor Points and the grid of points. Let's visualize this data using a Panel. The data that we can see in the Panel is called a Data List. The first characteristic to note in this list is that every distance listed has an ascending number to its left. The first number in this column is always zero. Remember that Grasshopper is a visualization of programming language, so right now we are getting a window into the math and numbers behind the components.

Grasshopper Screenshot: Closest Point (middle), Distance and Panel (right)

ADJUSTING THE BOUNDS: We can proportionally change the Domain ( [lower limit] To [upper limit] ). First, input the Distance list into the Bounds component. Flatten the input so that you are finding the lower limit and upper limit of the ENTIRE list as opposed to one branch of the list. Using a Panel, type your new lower limit and upper limit using this syntax: ( [lower limit] To [upper limit] ). Plug your new Bounds panel into the Target input, the Bounds from the original Distance list into Source, and the Distance list into Value.

If we compare the panel of our Distance list and the panel of our Remapped Numbers list, we can compare the proportional relationship at each point on the grid before and after. See what happens when the Distance list is plugged into a Move Component and compare against the Remmapped Numbers values.

Grasshopper Screenshot: Points are moved in the Z direction the same distance as to the attractor point

Output: A grid of points moved in the Z direction the same distance as to the attractor point

Grasshopper Screenshot: The same grid of points adjusted proportionally to a new Remapped domain.

Output: The same grid of points adjusted proportionally to a new domain.