Multiple attractors: Rotation

Grasshopper Code: Transforming Simple Geometry Grasshopper: Multiple Attractors Transformation
3 minutes
Share the link to this page
Copied
  Completed
Adding rotation to the scaled cones. Rotation is also done in relevance to distance values from the 4 attractors.

Transcript

1 00:00:12,179 --> 00:00:15,299 Unknown: Hey welcome back. We'll continue to build on the code we 2 00:00:15,299 --> 00:00:18,359 started the previous lecture and work on the rotation part in 3 00:00:18,359 --> 00:00:23,099 reference to multiple attractors. Let's begin we will 4 00:00:23,099 --> 00:00:26,759 add the Rotate 3d component and then connected geometry output 5 00:00:26,759 --> 00:00:34,259 from scaling to geometry input in rotate 3d. Now we'll take a 6 00:00:34,259 --> 00:00:38,489 copy of the remapping numbers I mean range sliders, as we did 7 00:00:38,489 --> 00:00:38,999 before. 8 00:00:45,630 --> 00:00:50,370 Changing the domain from zero to 360. This time, as this will be 9 00:00:50,370 --> 00:00:54,870 representing degrees of rotation.

Then we translate the 10 00:00:54,870 --> 00:00:59,010 remap numbers from degrees to radians through using this 11 00:00:59,010 --> 00:01:04,710 component Then connected to the rotation angle in rotate 3d. We 12 00:01:04,710 --> 00:01:07,890 then specify our center of rotation by connecting the base 13 00:01:07,890 --> 00:01:12,510 center of our cones, which is to geometry output from our move 14 00:01:12,510 --> 00:01:19,440 component. The last part of the newly added code is that we want 15 00:01:19,440 --> 00:01:23,460 our cones axis of rotation to be impacted by the vector direction 16 00:01:24,000 --> 00:01:32,010 from grid points towards the attractor point. So we do the 17 00:01:32,010 --> 00:01:35,670 same as we did with distances, but this time with vectors, we 18 00:01:35,670 --> 00:01:37,980 connect the base point to the grid points 19 00:01:45,360 --> 00:01:48,330 and the tip point to each of our four attractors 20 00:01:51,780 --> 00:01:55,710 then we find their minimum.

Now we want to display our vectors 21 00:01:55,770 --> 00:01:58,920 as an easy way to visualize them before connecting to the Rotate 22 00:01:58,920 --> 00:02:02,580 3d component. So we add you to the vector component that's 23 00:02:02,580 --> 00:02:06,570 connected to vector to preview inputs in vector display 24 00:02:06,570 --> 00:02:07,230 components. 25 00:02:15,179 --> 00:02:17,939 As we connect our anchor point to our grid points, 26 00:02:24,450 --> 00:02:28,290 we now connect our minimum value of vectors drizzled to the axis 27 00:02:28,290 --> 00:02:32,790 of rotation in the Rotate 3d component. Then connect geometry 28 00:02:32,790 --> 00:02:35,520 output to be input in solid difference. 29 00:02:42,840 --> 00:02:46,710 Now we have our points moved and scaled according to our for 30 00:02:46,710 --> 00:02:47,970 multiple attractors. 31 00:02:52,980 --> 00:02:57,810 tools do as always, and bake into Rhino by right click bake 32 00:02:57,840 --> 00:03:04,020 choose layer and click OK. And that's the end of our third 33 00:03:04,020 --> 00:03:07,170 code, multiple attractor geometrical transformation code.

34 00:03:07,500 --> 00:03:10,200 Now you will need to get familiar bit with the code by 35 00:03:10,200 --> 00:03:11,730 doing the coming exercise.

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.