# Why the difference/distortion?

I’m in the process of designing a vase-type shape for 3D printing. Thanks (again) to H S Kim for showing how to trim the results of the Maelstrom component so it can be used to make a nice linear array. I used such an array to map/morph onto a simple surface of revolution.

Here is my simplified GH script for making the vase, with some additions to demonstrate my question. Note that I have internalized the Maelstrom geometry in the grid object, and also the 2D points for generating the Nurbs curve in the Nurbs V input variable.

Initially I used the Nurbs curve to make the vase shaped surface because I created the curve from manually placed points, and Nurbs always generates a nice smooth curve. The Revsrf created exactly what I was expecting, but the SrfMorph component did not. The results of this are on the right in the following screenshot.

Note that the top and bottom rows are distorted by being stretched vertically, while the 2 middle rows are compressed vertically. This is not what I wanted and I spent some time trying to figure out why it happened. What I finally discovered was that if I converted the Nurbs curve to an Interpolated one, the distortion disappeared. The IntCrv version is on the left and it’s easy to see the difference, which I think is actually pretty dramatic.

So that’s my question: why is there a difference? My guess is it has to do with how the RevSrf actually calculates it’s shape, and how that then affects the way SrfMorph maps it’s input geometry onto that shape.

distortion-test.gh (903.4 KB)

Rebuild the curve and create the surface with it. In this way you have a parametrically uniform surface.

Thanks Dani - that works. But why should the Rebuild be necessary? And why only for the Nurbs curve and not the Interpolated one? And what does “parametrically uniform” really mean?

In GH, try to create a nurbs curve, in a straight line, distributing the control points in areas of high concentration and low, like:
ooo-o-o-o–o--o–o—o---o----o-----o
And now evaluate a point on it within the curve domain, you’ll see that it takes longer to move (changing the curve parameter with a slider) where there is more concentration of control points. The middle of the domain might not give you a point in the middle of the curve. Now try evaluating the curve using a Range, you will see that they are not distributed evenly, but there will be more where there is more concentration of control points. In short, when evaluating the position of a point on a nurbs curve it uses the control points in a way that affects position evaluation. The same goes for nurbs surfaces. Then you need to distribute the control points evenly to avoid these “distortions”.

The rebuild first divide uniformly the curve N times and with that points it creates an interpolated curve. Now try the test above but with a interpolated curve with the same input points.

As you have seen with the interpolated curve test, evaluating a point on this curve does not seem to be as influenced by the control points as in the nurbs curve. This also happens with surfaces, and the importance of evaluating a point on a curve/surface here is that SrfMorph uses it to map on the surface.

2 Likes

What a fascinating and illuminating explanation - many thanks. The inner workings of Rhino’s curves and surfaces has always been a mystery to me, and your explanation is a great help in understanding what is really going on “under the covers.”

As a 3D printing hobbyist I am a totally self-taught user of GH & Rhino and consequently have never actually understood why some things happen the way they do. Here’s an example of something I printed quite a while ago that shows the kind of “stretching” you so aptly explained:

And here’s how my current print looks @ 73% complete:

It certainly helps to know what’s actually happening. I’m thinking I might make a couple of parts that use a square grid mapped onto a curvy surface to demonstrate the nature of the surface warping/deformation that happens with parametrically uniform and non-uniform surfaces.

Thanks again for shining a light on this previously mysterious subject.