- CodedShapes
- Posts
- Understanding Surfaces in Grasshopper
Understanding Surfaces in Grasshopper
In the previous article, we looked at Curves which are the connection between points. Today, we are taking a look at Surfaces in Rhino. Which are the connection between curves. And similarly enough, surfaces can be manipulated through the control points of their control curves.
Surface Definition
Much like how curves are made from control points, surfaces are made from control curves which are known as isocurves. Similar to the X and Y axis, surfaces have a U and a V isocurve.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/760f8bd6-e2b3-4e8e-85ae-4661e7370dc3/041810fe-f5c5-4b62-ae2d-4d19f01081b4_1434x760.jpg)
But for most modeling software out there lRhino, we normally don’t have to create these isocurves ourselves. They get generated as part of any surface creation function.
Surface Creation in Rhino
Rhino offers a lot of methods to create a surface that we will come to know better when we look at modelling workflows in the future. But for now, let's just take a look at two surface creation functions that I personally use the most. The Loft and PlanarSrf command.
Loft
The Loft command lets you create a surface between two curves in Rhino. Take these two curves for example.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d6edaed7-73fb-4613-aa8a-8acd08a77b1d/6cfbd59b-ecf0-4e6e-b4e8-4c91e1bf1728_1916x1072.jpg)
Simply select two curves and type loft whshould prompt you with this message along with a preview of what the generated surface would look like.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ffe7e2ce-71fa-4624-adf1-eb15cf6097b3/e99964a4-18b9-482a-8931-08be806e6422_1920x1080.jpg)
These loft options give you some controlr how the surface is generated which will be handy later on but for now, the default option is good enough. After clicking on OK you should have something like this.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ac002db5-ed35-4f4b-acf2-9b0451cd89e1/84beee04-4847-46ce-b4c3-4b80f1868dad_1918x1080.jpg)
Be sure, to change your viewport settino Shaded to be able to better see the surface.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6014cce4-11bc-4325-8a36-985e66d02d6c/f3fd585d-d67d-466e-9ddf-b3657bb82e9c_1335x751.jpg)
You should have also noticed that there arw a lot more curves in between the two original curves that you selected to loft, those are the generated isocurves.
Planar Surface (PlanarSrf)
This is a command I find myself using the most because it is the quickest and simplest way to create a surface in Rhino.
Rhino allows you to create a surface from a closed planar curve which is a curve that is closed and flat on a plane. It doesn't have to be the world plane, but it does have to be flat on a plane. Take this curve, for example, it’s flat on the YZ Plane.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/70a3508d-1c8e-42a2-a3bf-7dd403acc6a7/9b29ea65-739f-4297-b4fa-bac65d37ea3d_1918x1080.jpg)
Select the closed curve and then type planarsrf which shogive you a surface like this :
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/1cc1f1b3-dcca-4512-8db8-9566a9241554/24464b0c-46f1-4ea9-84c8-70669373fb02_1917x1078.jpg)
The one thing you will immediately notice is that isocurves that are shown in the view do not represent the surface at all. It at first seems like using the planarsrf command gives you weird isocurves that go against what we just learned about the definition of surfaces.
If we were to recreate this surface using the Loft command instead, the surface would look the same but the Isocurves representing the surface would look very different. Let’s explore that difference to get a better understanding of what is going on.
Loft Vs PlanarSrf
Now, we can just split the curve and loft between the left and rightmost sides.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/4c2dd763-2706-468b-86f6-0320879a94bf/3331b390-4c7a-4bae-8a1d-8631f9cfc43c_1389x903.jpg)
You can see that lofting will actuagive us the same results together with the isocurves we expected. This happens because of a special type of surface that Rhino has called a trimmed surface.
Trimmed vs Untrimmed Surface
In what I believe is an attempt to optimize the performance and storage of the program, Rhino has further separated surfaces into two categories. Trimmed and Untrimmed surfaces.
An untrimmed surface is where all the control points meet the vertices of a surface. When any operation is made onto the surface like a trim or a split, instead of redefining the surface, Rhino actually "hides" a portion of the surface.
let's look at an example
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/faa40ef6-deb9-4b50-aa28-7146b2896136/89739e7f-729d-45bd-9eac-ab44bebbd55a_1918x1080.jpg)
and I cut this surface with some curve.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/74fe89d3-21ab-407b-be7b-a607a203bc8e/e8f676a3-df9f-4fed-86e1-5bdf7197c1f3_1917x1080.jpg)
I can do this by first selecting the rectangle, then typing t, and finally selecting the cutting curve. I am then going to delete the right half of the rectangle, which leaves us with:
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d8662418-cdf7-410f-a5a8-80e8695fb0e8/d69c2020-c8f5-4901-8c58-cd7e421dc381_1918x1080.jpg)
If I then select the shape and run the PointsOn command, to the control points.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/18cd8989-0b19-4db5-8a30-aa488fbbbd73/65b24cd2-b8b6-430c-9316-b85327d2f8be_1919x1080.jpg)
You should see that the control point or the Iso curves didn’t ce at all. This is because Rhino has stored the surface as a Trimmed surface. This is important to know because if we move the control points of the shape, we are moving the control points of the Untrimmed Surface and not the surface that we see in the view itself.
I think that this allows Rhino to store a lot less data for a surface but it also means we have to be wary about any future operations on this surface.
We can even restore the original rectangle by running the Untrim command. We could even force Rhino to get rid of those outer control points and redefine the surface using the RefitTrim command.
But to demonstrate the function of the RefitTrim command, I have to first increase the number of control points that this surface has. This is because the RefitTrim command uses the existing information of the surface to redefine the surface. At the moment, this surface has only 4 control points which are not enough to represent the curvy edge.
To increase the number of control points on the surface, we can use the rebuild command that works similarly to Curves and then run the RefitTrim command.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/0d6eb6ce-1fcb-440b-b69c-cf9a925d7b5f/fdc4eab6-aea6-4fe4-aaa3-48e7a48c3df5_1922x1080.jpg)
Rhino will then redefine the surface and re-generate the isocurvor the trimmed surface.
Modifying a Surface
Similar to curves, the way we manipulate a surface is through its control points. But what we are actually doing is changing the control points of the control curves that define the surface.
We can also use the rebuild command to add degrees and points to the control curves as we did before with the RefitTrim command.
If we take our rectangle from before and run the rebuild command on it.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6e0587b2-9bb6-4b4b-8d6f-6913d7c4da55/b0842ab9-c15e-44e2-8a50-1ce41251dd9e_1920x1080.jpg)
We are presented with a very similar set of options but we now have tout the number of points and degrees in two directions, the U and the V direction.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/22111160-b9e9-4bbb-b12e-cdf20398d88f/966b78bb-1d72-487e-a160-941571c70450_1922x1080.jpg)
The same best practices from curves apply to surfaces. A high-qualsurface is one that requires the least amount of degrees and points to maintain its definition.
Final Thoughts
Surfaces are a step up from curves in terms of complexity but they still follow a very similar logic to curves. I hope this post has helped you better understand surfaces but as with everything so far, the more you use them, the more intuitive it will be.
You will also have plenty of time to understand surfaces as we get into modelling workflows in the later editions of the Newsletter.
This article is part of a 6-part series on Grasshopper geometry types. Where the aim is to use Grasshopper more effectively by understanding how Grasshopper processes geometry data.
Part 4 - Understanding Surfaces in Grasshopper
P.S. I also made a Youtube video that walks through this article that might better show what is going on in Rhino itself.