Introduction
In our last lesson, you successfully translated your design brief into a generative Grasshopper definition, creating the primary form for your parametric pavilion. You now have a script that produces your core geometry. However, a key strength of parametric design lies in its capacity for dynamic variation and exploration.
This lesson focuses on integrating more sophisticated input controls into your design. We'll move beyond simple sliders to explore one of the most expressive techniques in the parametric toolkit: attractors. You will learn the mathematical principles behind them and how to implement them in Grasshopper to modulate geometric properties across a collection of objects. By the end of this lesson, you will be able to add a new layer of complexity and responsiveness to your pavilion model, transforming it from a static object into a flexible design system.
1. The Mathematics of Influence: Remapping Domains
At its core, an attractor system is a function that maps spatial relationships to geometric transformations. Given your background in mathematics and physics, you can think of it as defining a field of influence. An attractor object (like a point or a curve) exerts an "influence" on a collection of other objects, and the strength of this influence is typically a function of distance.
The process involves three main steps:
- Measure: For every object in a given set (e.g., points in a grid), calculate the distance to the nearest attractor. This yields a list of distance values.
- Establish Domains: This list of distances has a natural numerical range, or source domain, from the minimum distance (
d_min) to the maximum distance (d_max). The geometric property you want to control (e.g., the radius of a circle, the height of an extrusion) also has a desired target domain, from a minimum value (r_min) to a maximum value (r_max). - Remap: The final step is to map each value from the source domain to the target domain. This is a linear transformation that finds where each distance value proportionally sits within its range and assigns it the corresponding proportional value in the target range.
The image below perfectly illustrates this logic. On the left, distances are calculated from each point in a grid to the closest of three attractor points. On theright, these distances are remapped to control the radius of circles, creating the visual effect.

This process of remapping numerical domains is a fundamental concept in Grasshopper. The following reading explains the key components involved.
This article from the GSAPP Smorgasbord provides a clear explanation of how to work with numerical domains in Grasshopper. Understanding this is essential for implementing attractor logic.
Please read the section titled Working with Domains. Focus on three key components: Construct Domain: How to define a numerical range using a start and end value. This will be your target domain. Bounds: How to find the minimum and maximum values in a list of numbers and express them as a domain. This will be your source domain. Remap Numbers: The component that performs the mapping from the source domain to the target domain. Pay close attention to the example that combines Bounds and Remap Numbers.
2. Building the Attractor Script in Grasshopper
Now let's translate this mathematical logic into a functioning Grasshopper definition. The following tutorial provides a clear, step-by-step guide to creating a classic attractor effect where points influence the radii of circles in a grid.
Attractor Points in Grasshopper - A Beginner's Guide - Hopific
This guide from Hopific provides a practical walkthrough of building an attractor script. It breaks the process down into four clear steps that mirror the logic we've just discussed.
Read from the section The Logic Behind the Attractor Points Effect up to the end of Step 4. As you read, focus on how the author implements each logical step with specific Grasshopper components: Step 1 & 2: Creating the "field" of objects (Divide Surface, Circle). Step 3: Measuring the distances (Closest Points). Note the author's advice to Graft the input to ensure each point is processed individually. Step 4: Remapping the distances to the circle radii. This section applies the exact Bounds and Remap Numbers components you just read about. Pay special attention to the instruction to Flatten the input to the Bounds component—this is a critical data management step to ensure you get a single domain for all the distances.
The guide also provides a useful visualization technique: drawing a line from each grid point to its closest attractor. This is an excellent way to debug your script and confirm that the distance calculations are working as expected.

3. Advanced Control and Applications
The standard Remap Numbers component creates a linear relationship—a value halfway through the source domain maps to a value halfway through the target domain. For more artistic expression, you can introduce a non-linear transformation using the Graph Mapper component. This allows you to define a custom curve that dictates how the values are remapped.
Furthermore, attractors are not limited to points. You can use curves, surfaces, or even meshes as attractor objects. The following video demonstrates these advanced techniques, showing how to use Graph Mapper for nuanced control and how to apply the attractor logic to a complex 3D surface.
Everything to know about PARAMETRIC ATTRACTOR POINTS (Grasshopper beginner tutorial)
This tutorial by Andrew Friedenberg offers a fantastic overview of both the theory and application of attractors, including advanced control methods.
Please watch these key segments: The Remap-Graph-Remap Workflow: From this section, observe the standard professional workflow. The distances are first remapped to a normalized 0 to 1 domain, passed through the Graph Mapper, and then remapped again from 0 to 1 to the final target domain. This gives you precise, non-linear control over the gradient of the effect. Using a Curve as an Attractor: Watch how a curve is divided into many points, which are then fed into the Closest Point component, from this part. This creates a linear "zone of influence" rather than a radial one. Application on a 3D Surface: Skip to this segment to see how the entire logic can be applied to a freeform NURBS surface, which is highly relevant for architectural forms.
4. Your Task: Integrate an Attractor into Your Pavilion
Now it's time to apply this powerful technique to your capstone project. Open the Grasshopper file containing the primary form of your pavilion. Your task is to integrate an attractor system that modulates a key geometric parameter of your design.
-
Identify a Parameter: Look at your existing script. What numerical parameter could be controlled by an attractor? Examples include:
- The height of a series of arches.
- The scale of rotated profiles along a central spine.
- The control point positions of a lofted surface's cross-sections.
- The extrusion depth of cells on a subdivided surface.
-
Add the Attractor Logic:
- Create one or more
Pointparameters in Grasshopper and reference points from your Rhino scene to serve as attractors. Place them in a way that is meaningful for your design concept. - Build the core attractor logic block:
Closest Point->Bounds(+Flatten) ->Remap Numbers. - For the target domain of the
Remap Numberscomponent, useNumber Slidersso you can interactively control the minimum and maximum extent of the effect.
- Create one or more
-
Connect the Output: Disconnect the static number or simple
Seriesthat was previously driving your chosen parameter. In its place, connect the output of yourRemap Numberscomponent. -
Explore and Refine: Move the attractor point(s) in Rhino and adjust your target domain sliders. Observe how your pavilion's form responds. If you feel confident, try implementing the
Graph Mapperworkflow for more refined control over the effect's gradient.
The goal is to create a more dynamic and responsive version of your primary form, where design variation can be explored intuitively by manipulating attractor objects in space.
Conclusion
In this lesson, you've unlocked a fundamental technique for creating complex and responsive parametric systems. You've seen that the seemingly magical effect of attractors is grounded in a clear mathematical process of measuring and remapping numerical domains.
Here are the key takeaways:
- Attractor logic is a process of mapping spatial relationships (distances) to geometric parameters.
- The core Grasshopper components for this are
Closest Point,Bounds, andRemap Numbers. - Proper data management is crucial:
Graftcan be used to isolate items for individual calculations, whileFlattenis needed to analyze a list of values as a whole (e.g., with theBoundscomponent). - The
Graph Mappercomponent offers a powerful method for non-linear control, allowing you to fine-tune the gradient of the attractor's influence.
You have now endowed your pavilion model with a powerful layer of interactive control. In our next lesson, we will shift our focus from purely geometric exploration to performance. You will learn how to evaluate your design against a specific performance criterion, setting the stage for data-driven optimization.