Deborah R. Fowler
Wrangle Node
Example - Candy Roof
Posted on Feb 12 2018
Updated Mar 11 2018
Suppose that you have made a roof using the add node method as seen here. What if you wanted to add candy (or shingles/tiles) to the roof?
There are many ways to approach this problem. I will briefly describe a few here and their pros and cons:
- isolate the face and subdivide for point locations - offers little control over spacing
- isolate the line that created the roof and populate the line along the depth - this works well, until you try to randomize with a point jitter
- create the rows/columns on the flat plane, point jitter if necessary, rotate after (requires point wrangle to compute the angle) - this allows more control and variation
- analogous to the above approach, you could create a grid and scatter points, then rotate after (requires point wrangle to compute the angle)
Note that beside calculating the angle, I also calculate the length of the hypotenuse to be used to make the placement evenly distributed on the surface. (It is distance not len function, as len gives the length of a vector).
Note that you do not have to set this to a point attribute. You could leave it as a details attribute and retrieve it using the detail function
detail("../pointwrangle1", "angle", 0)
This is seen in my other example file here.