Multiple attractors: Finding minimum distances

Grasshopper Code: Transforming Simple Geometry Grasshopper: Multiple Attractors Transformation
2 minutes
Share the link to this page
Copied
  Completed
Substituted the sphere with a cone. Adding 3 more point attractors to the previous section code, and for that will find the minimum distance to give "distance value" priority to the attractor closest to each grid point.

Transcript

Hi, in this section I will take you through multiple attractors geometrical transformation code, and we'll add transformation by rotations with this lecture, I'm going to show you how to transform your geometry using multiple attractors. We will use our previous single attractor code and we are going to add to it. First, we are going to substitute our sphere with a cone where its base plane is connected to the geometry in the move component. its radius connected to a slider and its length multiplied by two. The resulting columns are now hollow. So we'll add capital's component to close the app and then we connected to geometry input in the uniform scale component.

We will use this component to measure the distance between each of the four attractor points and our grid points. Then we will find the minimum distances among them. The idea is to find the closest attractor to each grid point and eliminate the rest of attractors impact in terms of movement, scaling and rotation. We now connect our last minimum component traveled to the value tree map input in the movement and scaling components. Then, we will add bounce component to find the minimum and maximum values in order to use it as a source domain in our mapping numbers, components in both movement and scaling components and now we have our points moved on. According to our for multiple attractors.

In the coming lecture, we're going to build on this tutorial, I'm going to show you how to add rotation to our code.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.