LongCut logo

Grasshopper 101: Parameterization | #08 Surface Domain, Parameters, Orientation, Isocurves

By Learn Visual Programming

Summary

## Key takeaways - **Surface Parameters U and V**: A parametric surface is a function of two independent parameters U and V over a two-dimensional domain. Here the domain of the U parameter is 0 to 20 and the domain of the V parameter is also 0 to 20. [00:42], [00:51] - **Re-parameterize for MD Slider**: The MD slider domain is from 0 to 1 while surface domains are 0 to 20, so the point covers just a small portion. Normalize the input surface by re-parameterizing and now the point moves across the whole surface. [03:26], [03:55] - **Reverse U/V Changes Iso Directions**: Reverse U makes the V division start from the opposite boundary. Reverse V makes the U iso curves start from the opposite boundary. [05:55], [06:07] - **Swap UV Flips Iso Curves**: Swap UV option makes the U iso curves represent former V iso curves but the subdivision doesn't change. [06:20], [06:35] - **Trimmed Surfaces Retain Untrimmed Structure**: A trimmed surface retains the structure of the initial untrimmed surface. When using divide domain and isotrim, you still get the untrimmed result. [08:21], [12:37] - **Uneven Domains from Curve Control Points**: Two similar surfaces created the same way but using curves with different numbers of control points: bottom has uneven domain division, top has more even division. These divisions are the direct result of the curve structure. [14:55], [15:07]

Topics Covered

  • Normalize Domains for Full Coverage
  • Reverse Directions to Flip Iso Curves
  • Flip Matrix to Swap Data Rows
  • Join Before Trimming Subsurfaces

Full Transcript

hello in this video we're going to cover the main aspects of parametric surfaces we're going to talk about surface parameter properties domain orientation

and i will also introduce some of the most relevant tools and commands to better understand this tutorial i recommend watching the video on curve

parameterization as many concepts will be reoccurring here as well so let's start by checking surface details in rhino we can see that it's a

single valid open nurbs surface which has four boundary edges a parametric surface is a function of two independent parameters over a two

two-dimensional domain here we have parameters u and v the domain of the u parameter is 0 to 20

and the domain of the v parameter is also 0 to 20.

in the main menu bar under analyze surface we can find some options to change the preview to analyze and better understand surface geometry i'm going to

use the environmental map here so this particular surface is smooth it has no kinks or breaking points currently we do not see any information

regarding surface topology to see surface iso curves we need to turn on the iso curve preview in the display tab now we have a better understanding of

the underlying structure you can also add arbitrary iso curves simply select the surface and type in the command line insert king

we can change the parameter choosing the u or v direction or both i'm going to place some curves on the surface now

and i can also turn on the control point preview so you could see how this would affect modeling possibilities let's move on to the grasshopper and

reference the surface so just like we have a tool to evaluate a curve we also have a similar tool to evaluate a surface the evaluate surface takes a surface to

evaluate and bi-dimensional uv parameters we could use the multi-dimensional slider or md slider here

and we can see a small frame on a surface which is the output of the evaluate surface component it is a tangent plane to a surface at a given point

i'm going to go under display and change the size of the plane preview the evaluate surface component also outputs the point on a surface at the uv

surface normal vector which coincides with the frame z direction and the u and v vectors i'm going to add a vector preview for

clarity as i move the md slider you can see how it covers just a very small portion of the surface because the surface domain is much larger than the domain of the md

slider i'm using the deconstruct two-dimensional domain to see the surface domains which both are from 0 to

20 while the md slider domain is from 0 to 1.

to the curves domain surface domain is not necessarily directly related to the surface dimensions and to illustrate that i will modify the

surface so we can see the changes in the dimensions while the domain stays the same okay so if we'd like the md slider to cover the whole surface we should

normalize the input surface let's right click on the container and choose to re-parameterize and we can see how now the point moves

across the whole surface since the uv input takes points we can simply supply point coordinates with a panel we can also supply a list of

coordinates and quick note when supplying a list of coordinates we would need to separate vector display for u and v directions or

graph the input so that each coordinate is treated as a separate list let's move on to further analysis go

under curve spline and choose iso curve input the surface and the uv coordinates we extract the iso curves separately in

u and v directions note the output is grafted here so you might want to flatten the output if you need the curves on the same list

so we can use manual inputs with a panel but we could also construct a list of points i'm using the range component here constructing points diagonally

and if we need to we can remap the values i'm going to illustrate this with a graph mapper just make sure that the domains match properly

to better illustrate how these points determine iso curve positions on the surface i will also add the curve on surface component let's now talk more in depth about the

iso curves so like any curve an iso curve has a start and an end meaning it has a direction in rhino let's select the surface and

type in dir for direction the first two options universe and v reverse are related to the iso curve direction

let's choose reverse u click enter and we see that the iso curve distribution has changed so now the v division starts from the opposite boundary

let's try reversing the v direction now the distribution of u iso curves starts from the opposite boundary let's select the surface again and this

time choose the swap uv option the u iso curves now represent former v iso curves but the subdivision doesn't change okay it's time to move on and look at

some other tools under surface utilities let's grab the divide surface component input the surface and the u and v count

we get the points on surface normals at those points and also uv parameters so coordinates within the domain i'm going to go back to rhino now and

for clarity reasons choose to color back faces in red so we can see how surface normals point away from the back face

if we use the command flip we flip the surface normal direction in other words its orientation and if we need to construct tangent

planes at the division points we could do that using the surface frames component let's go back under surface utilities

and choose the offset surface input the surface and the distance value so by default the offset coincides with the surface's normal direction

we can flip the surface in grasshopper with a native flip component for now let's input the surface and reconnect so we can witness that the

surface was flipped if we need to offset multiple surfaces with possibly different normal directions we could use the guide surface option

and if you are having any issues here you can also try using a separate more primitive surface as a guide the offset surface component also has a

trimmed option so currently this surface isn't trimmed and it has four boundaries an example of a trimmed surface could be

one cut out of the untrimmed one a trimmed surface retains the structure of the initial untrimmed surface we're going to talk more about trimmed

surfaces a bit later but for now i'd like to go back to the divide surface component and focus on the output data structure for visual purposes i'm going to create

polylines from points on the surface in this instance polylines are created along the u direction we see them as rows in the preview

if we swap the original surfaces uv in rhino we'll see the polylines as columns but still along the u direction notice also that surface point

subdivision is swapped as well i'm going to undo the swap commands go under sets tree and take flip matrix

this tool swaps rows with columns of the matrix like data tree so in this instance we create polylines along the v direction seen as columns in

the preview notice the point distribution stays the same because we are only manipulating the data tree not the surface let's now move on to extracting

subsurfaces under math domain pick the divide domain input the surface and then the u and v count

the output is a list of surface sub-domains so we need to use an additional component here under surface utilities find the isotrim tool

input the surface and then the domains to extract we get a list of untrimmed subsurfaces if we deconstruct these subsurfaces we

can extract surface division points as a separate list per piece i'm using polylines again to illustrate data tree structure here so in this instance i get closed polylines which

could then be used to create straight line boundary surfaces i'm gonna join and bake the geometry and then use the environmental map

preview in rhino to show that these serp surfaces are not necessarily planar let's go back a bit and see how we could construct and extract a specific

subdomain under math domain pick construct two-dimensional domain from four numbers so the four numbers are specified bounds

the start and the end values for u and v domains since i'm using a normalized surface the bounds for the subdomain are 0 to 1.

ok it's time for the question how would you extract parts of multiple surface subdomains please pause the video and think through

the steps before continuing i'm gonna simply add another isotrim component and use it to extract parts from the subset surfaces

i get an error because the input surface domains do not match the constructed subdomain so i need to normalize the subset surfaces i'm going to turn off unnecessary

previews and change the domain bounds to illustrate different slicing possibilities we could also add additional pieces and

extrude or modify them in other ways a quick note here currently in the top preview we see that the surface division grid is perpendicular and regular

surface subdivision strongly depends on surface topology so if i'd move some of the control points i would distort the subdivision grid and surely i would also change the

initial surface geometry up until now we focused on an open and trimmed surface it's time to talk a bit more about a trimmed surface subdivision

as i have mentioned before a trimmed surface retains its untrimmed structure so when i use the divide domain and

isotrim i still get the untrimmed result when subdividing or paneling trimmed surfaces we need to know how we'd like to solve the trimmed boundary and we

might need to use additional tools and algorithms to illustrate the issue here are a few examples of creating a mesh from a trimmed surface

from these few examples you can see that there are many ways to subdivide trimmed surfaces but of course we could also simply trim the panels at the boundaries

so let's try to do that in the grasshopper component palettes under intersect shape you will find tools for brep splitting in this instance the trim solid tool

will suffice connect the subsurfaces and make sure that the trimming shapes are solids so the splitting worked but we have some

leftovers there are a few ways to solve that in this case i'm simply going to join the subsurfaces before trimming them and afterwards if i need to access the

segments separately i can deconstruct brep and extract its faces so these are the basic concepts behind

subdividing trimmed surfaces next on our list are closed surfaces if i create an extrusion using a periodically closed curve i get a

periodic surface that has continuous curvature so we can freely move the seam around if we have a closed but non-periodic

surface the seam position is fixed this means there are kinks or breaks in the curvature or some control points coincide with the surface seam

in a case of more than one seam we would actually get a closed and trimmed poly surface and depending on the tools you are using you might need to subdivide

the constituent surfaces separately let's look a bit deeper into the surface topology here i have two very similar surfaces

created the same way but using curves that have different numbers of control points so the bottom surface has visibly uneven domain division and the top surface has

a more even division these divisions are the direct result of the curve structure and it's worth having in mind that you could solve some topology issues simply

by rebuilding the input curves or changing the surface creation method alternatively we could manipulate surface topology by remapping the

domains i'm not going to dive into a thorough explanation of each component here just going to show you how this could be done so we can deconstruct the

two-dimensional domain into four numbers and then remap the values using the graph mapper for instance the issue here is that the graph mapper has only one

input while the deconstruct domain has four and we need at least two values to be remapped i'm gonna go under sets tree and grab

the entwine tool i'm only gonna combine and remap the v domain and you can see the remapped values

now we need to construct domain from the remapped values keeping the u domain the same and input the new v domain and for

that we need to explode the data tree to access the branches separately so this could be a way of fixing uneven topology issues without recreating the

surface finally i'd like to mention that in these tutorials we focus on the innate grasshopper tools but there are a lot of

great plugins that could be very useful i recommend checking out the lunchbox buffer fish and also air guns especially if you're

working not only with surfaces but with meshes too so this is it for this tutorial let us know if you have enjoyed it in the next

video we're gonna continue covering surface properties join me there

Loading...

Loading video analysis...