Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 51

Mapping Design Spaces

Recommended resources

Hello! In our previous lesson, we explored how to generate complex parametric surfaces using fundamental techniques like Loft, Sweep, and Revolve. You now have the skills to create the foundational forms of a design. Today, we will learn how to infuse those forms with responsive, data-driven logic.

This lesson focuses on a cornerstone of parametric thinking: defining a design space by remapping numerical domains and ranges. This may sound abstract, but it is the key to making your designs "intelligent"—enabling them to react to their environment, internal rules, or user inputs. We will cover the mathematical concept of a domain, how it's used in Grasshopper, and how to translate, or "remap," one set of numbers into another to control geometry. By the end of this session, you will be able to implement this powerful technique to create dynamic and responsive designs.

What is a Domain? From Mathematics to Grasshopper

From your mathematics background, you'll be familiar with the concept of a domain as the set of input values for which a function is defined. In the context of Grasshopper and computational design, the concept is often simplified to represent a range of numbers. A domain is defined by two numerical extremes, a start and an end. For example, 0 to 10 is a domain that includes all real numbers between 0 and 10.

This concept is so fundamental that Grasshopper has a dedicated data type for it.

GH | Domains Part 1 (Full): Sub-List, Remap Numbers, Bounds, Rectangles

To start, let's watch a clear, practical explanation of what a domain is in Grasshopper and how to create one. This video from the Parametric Philosophy channel will ground the concept.

Watch the section from the beginning that introduces and constructs a domain. The key component here is Construct Domain (Maths > Domain > Construct Domain), which takes a start value (A) and an end value (B).

A domain doesn't just represent abstract numbers; it defines the boundaries of a design space. For example, the allowable height of a tower might be a domain from 50 to 150 meters. The radius of a column could be a domain from 0.3 to 1.2 meters. By defining these ranges, you establish the "rules" and limits within which your parametric model can operate.

This image from a math context illustrates the core idea. A function is evaluated over an input domain (t from 0 to 16), which produces output values for x and y. The resulting x-values occupy a new domain (0 to 4), effectively remapping the range.

Remapping Numbers: The Engine of Parametric Control

The real power of domains comes when you map values from one domain to another. This is called remapping. Imagine you have a list of distances from a series of points to an attractor point. These distances might range from 14.2 to 311.9. Now, suppose you want to use these distances to control the size of window apertures, but the apertures can only be between 0.5m and 3.0m wide. You need a way to translate the distance values into aperture size values.

This is precisely what the Remap Numbers component does. It performs a linear mapping from a source domain (the distances) to a target domain (the aperture sizes).

A number in a source domain is mapped to a new number in a target domain . For a linear mapping, this is essentially solving a simple line equation, and the Remap Numbers component handles all the calculations for you.

Let's look at the documentation to see the component in detail.

Chapter 1: Algorithms and Data - Rhino developer

This guide from the official Rhino developer site explains the core data operations in Grasshopper, including remapping.

Please read the section on Data mapping. Pay close attention to the ReMap component and its inputs: the values to be mapped, the source domain (S), and the target domain (T). The example of reparameterizing a curve to a 0 to 1 domain is a very common and important use case.


Practical Application: Creating an Attractor-Driven Pattern

Now, let's put this theory into practice by building a classic "attractor" script. We will generate a grid of circles whose radii are controlled by their proximity to a single attractor point.

The following two videos provide excellent, step-by-step walkthroughs of this exact process. We'll use the Parametric Philosophy video as our main guide, as it breaks down the logic very clearly.

GH | Domains Part 1 (Full): Sub-List, Remap Numbers, Bounds, Rectangles

This segment of the "Domains" tutorial from Parametric Philosophy is a perfect demonstration of using Remap Numbers to create an attractor effect.

Watch this extensive section from using domains for remapping. The instructor walks through the entire logic: Generate base geometry: A set of points is created within a rectangle. Establish the control source: An attractor point is defined, and the distances from it to all other points are calculated. Define the source domain: The Bounds component is used on the list of distances to find the minimum and maximum values, which define the source domain. Define the target domain: A Construct Domain component is used to set the desired range for the circle radii (e.g., from 20 down to 1). Notice how flipping the domain (20 to 1 instead of 1 to 20) inverts the effect, making closer circles larger. Remap and apply: The Remap Numbers component takes the distances, the source Bounds, and the target domain, and outputs the new radius values, which are then used to create the circles.

To reinforce this process, the following video from Learn Visual Programming offers a slightly different take on building a similar system, this time deforming a mesh. You don't need to build it, but watching it will help solidify your understanding of the workflow.

Grasshopper 101: Parameterization | #01 Intro, Remap Numbers

This video also demonstrates the remapping workflow for an attractor, but with a focus on deforming a mesh instead of sizing circles.

Feel free to watch the core logic being built between mapping values. Pay attention to the consistent sequence: calculate distances -> find Bounds (source domain) -> define target domain -> Remap Numbers -> use remapped values to transform geometry.


Beyond Linear: Non-Linear Control with the Graph Mapper

Linear remapping is predictable and powerful, but sometimes you need more nuanced control. What if you want most circles to be small, with the size increasing exponentially only for the few circles closest to the attractor? For this, we use the Graph Mapper.

The Graph Mapper is a component that allows you to define a custom function graph to control the remapping. It takes input values (which are automatically treated as being in a 0 to 1 domain) and remaps them according to the shape of the curve you draw.

This Grasshopper definition shows a typical workflow. A list of numbers is generated (left). These numbers are fed into a `Graph Mapper`, which applies a non-linear transformation (in this case, a parabolic curve). The output is then remapped to a final target domain to produce the new values (right).

This provides an intuitive, visual way to control the distribution of your output values. You can select different graph types (Bezier, Sine, Perlin, etc.) to achieve a wide variety of effects.

The "Mode Lab Grasshopper Primer" has a practical example where the Graph Mapper is used to create variable divisions on a surface.

[PDF] Mode Lab Grasshopper Primer Third Edition - aae 280 fall 2014

This section of the primer demonstrates using the Graph Mapper to achieve non-uniform spacing.

In the PDF, find the section F.4 Designing With Data Trees and scroll down to the image-heavy steps starting around page 117. You don't need to replicate the whole definition, but review this sequence of steps. Notice how they deconstruct a domain, feed the values through a Graph Mapper, and then reconstruct the domain to create variable-sized segments on a surface. This is a more advanced but very powerful application of the same core idea.


Conclusion

In this lesson, we've unlocked a fundamental technique for parametric control. You have learned how to define a design space by creating and manipulating numerical domains and ranges.

Key Takeaways:

  • A domain in Grasshopper is a range of numbers defined by a start and an end. It sets the boundaries for a parameter's values.
  • Remapping is the process of translating a set of numbers from a source domain to a target domain. This is the engine that connects different data sources to geometric properties.
  • The standard workflow for linear remapping involves using Bounds to find the source domain of your data and Remap Numbers to translate it to a target domain you define with Construct Domain.
  • The Graph Mapper offers a powerful, non-linear alternative, allowing you to visually shape the function that governs the remapping process.

You have now built your first attractor system! This is a pivotal step. In our next lesson, we will expand on this concept, exploring more advanced applications of using attractor points and curves to modulate geometric properties across entire collections of objects, adding even more sophistication to your parametric designs.