I'm creating an application that has to work (to some degree) similarly to Rhino/GH definition provided by artist. It's a webGL stuff. It all revolves around NURBS surfaces. We are experiencing quite visible differences between GH output and our custom application using the same input curves for surface (and hopefully the same surface settings).
Input curves are 4 bsplines, deg3, 7 control points. I'm creating NURBS (uniform weights), which generates 4x7 control points surface. It looks similar to Rhino Loft, yet after close inspection it looks like Loft component used by artist generates NURBS with 6x7 control points (given those same 4 input curves). Basically there are 2 ghost curves added close to the edges (please see the attached image).
This of course alters the way surface looks when comparing to 4x7 surface... What is the logic behind those points? How can I create them manually in my code in separate application to get the same surface (or can I avoid their creation)?
We've tried adding more input curves (6) to cover the low number of control points in vertical direction, but Loft still has n+2 vertical points...
The reason for all this is, that we have initial data created in Rhino, then edited in other app and imported back to rhino for some final touches and so we need to simulate Loft behaviour of Rhino. Is there some documentation or research paper on techniques used there? Or can we create NURBS in Rhino some other way from given set of control points (not using Loft)?
Any insight, help greatly appreciated!
Hi Boris- does your simpler surface actually interpolate the input curves exactly?
Actually no, I create NURBS surface from a set of control points (thus surface is contained in convex hull of given control points, not necessarily running through the points).
I have found out that Loft creates a completely separate set of control points (not using the control points of input curves), is that true?
So I need to create surface that interpolates curves (because that looks more like catmull-rom)? Can you point me to some algorithm I can use?
What are the differences between those styles I can use when creating Loft in Rhino (normal, straight sections)? Does it affect degree of curves and smoothness?
Hi Boris- the 'extra' points from Loft are, I think, from interpolating the curves. What you are making probably resembles Loft with the Loose style. Normal, Tight, and Uniform are all styles that interpolate the input curves (not the points) , with different knot spacing, while Loose does not interpolate the curves at all (Except at the ends), it uses the curve points as surface points. StraightSections creates ruled surfaces between each pair of curves.
So, I do not know how the guts of the interpolation works- probably best in any case to check in with the developers forum- http://v5.rhino3d.com/forum/categories/sdk- They are much smarter over there.
Thanks, Loose style indeed is (or is very similar to) what I'm doing outside of Rhino. I'll discuss with artist whether they can use this as well to have similar results.
And thanks for the link, I'll try to get some more interpolation related info from there!