Orienting and Non-Uniform Scale (Sand Dunes) – Example 5.3


This is another script that uses orienting geometry to create forms, and if you were able to figure out Example 5.2 this one should be pretty easy. It uses orients a piece of geometry which is scaled along a curve, in this case using a non-uniform scale mechanism, and then the resulting geometries along each curve are lofted to create the final shape.


Step One – Before starting in Grasshopper, I drew some simple arcs in Rhino that would be the approximate paths of my dunes. These can be refined later. I also drew a typical section through a dune, with one slope being steeper than the other. This shape will be scaled and distorted though, so is only a general guideline to shape.


Step Two – At first, we just need to get our system to work on one of the lines, and then we can make sure it works on multiple lines. Here I reference one curve into a Curve Parameter container, and then use divide curve to establish how may sections I will have. The divide curve will give you the tangents, which can be rotated 90° to serve as the ‘X’ axis for our orientation target planes. The Y axis on the orientation target planes will be equal to the world “Z” axis.

The geometry we will orient is referenced into its own geometry container, with the base point serving as the orientation plane for this geometry. The fourth image above shows the geometry before it is oriented with the target planes, while the fifth picture shows the geometry now properly oriented. Note the position of the X and Y axes in the original and in the target planes.


Step Three – 

The next thing to do is to Scale our sections as we move along the curve. I am going to use a non-uniform scale factor (Scale NU component) that will let us have either broad and flat dunes or tall and steep ones. I am also going to use a graph mapper to give the scaling factor a parabolic shape (at least in the first examples. This will allow the dunes to be tapered at the ends, and to reach their full heigh towards the middle. See the script image to see how this is done. Once I have all my sections oriented and scaled, I put them into a loft component and the surface geometry is generated, from which i can extract contours, etc… Also, if my data is structured right, in this case grafting the initial “Curve” input parameter, I can select an unlimited number of curves drawn in Rhino and the same process will be applied to them. You can see in the image the results of short arcs vs. long arcs, etc.

05_03_variationsHere are several variations I created with minor adjustments to the parameters and the input curves. In the first row, I adjust only the scale factor allowing for fat or skinny dunes. In the second row, I am playing with the graph mappers, using different functions. Some graphs yield interesting results, some don’t work at all…  In the last row I played with various input curves as described. The input curves for example nine will be explained more in the section on vector fields!


Rhino Script