From the course: Grasshopper and Rhino: Python Scripting
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Attractors
- [Instructor] A common method of patterning for sides is through the use of an attractor script. This is achieved by scaling for side elements based on their distance to an object, or what we call an attractor. Let's try creating our own attractor function from within Python, which scales the surfaces based on their distance to an attractor which we'll use a point for. To start, let's remove the list item components and we'll place a new Python component. We'll change the x input for this to panels, which will be a type of list and a type of surface. In the last video we sorted a list of surfaces and output them from the output sortedP. So let's plug that into the panels input. Next, we're going to need a point which will act as the attractor. So working in Rhino, let's simply create a point using the single point command. And as you can see, I've got Project selected in the object snaps. And then I'm gonna select somewhere near the surface and this ensure that it's on the x, y…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Evaluating surfaces9m 45s
-
(Locked)
Creating panels5m 13s
-
(Locked)
Splitting11m 35s
-
(Locked)
Sorting8m 49s
-
(Locked)
Attractors10m 2s
-
(Locked)
Transforming11m 49s
-
(Locked)
Lofting9m 46s
-
(Locked)
Analysis12m 35s
-
(Locked)
Accessing the Rhino document2m 33s
-
(Locked)
Baking form13m 56s
-
(Locked)
Adding text9m 3s
-
(Locked)
Animating form6m 7s
-
(Locked)
Animating renders8m 22s
-
(Locked)
-