Understanding NURBS

 From: Hamish Mead (HAIRYKIWI) 9 Mar 2015  (1 of 7)
 Just when I thought I was beginning to better understanding some of the inherit behaviour of NURBS, I wasn't really expecting to see the results of this experiment: First draw a multi-point (>4) 'Through points' curve, then draw a 'Control points' curve by sequentially picking the start+intermediate+end control points of the first curve. Below: 'Through points' curve (blue), 'Control points' curve (red). The control points of both are turned on and are coincident. I don't understand why I would want - or need - the weightings of each curve type to be different. AFAIU, different weightings for NURBS DO exist, (much the same as Rho value alters a conic segment). This page has some interesting reading on the topic: http://www.pilot3d.com/NurbSecrets.htm Any enlightening info appreciated. Thanks, Hamish Attachments:

 From: Michael Gibson 9 Mar 2015  (2 of 7)
 7293.2 In reply to 7293.1 Hi Hamish, there's another mechanism in NURBS called the "knot vector" which is what is different between your 2 curves, it's a separate thing from control point weights. In both of your cases there, the control points are unweighted (meaning weight has a value of 1.0), but when you do a "through points" curve, the parameterization of the curve will be calculated from the spacing between the through points, while with a control point curve it creates a uniform knot vector where the knots are evenly spaced. So anyway it's the knot vector that you would want to look at to understand the differences between those 2 curves, some information on that here: http://www.rhino3d.com/nurbs http://en.wikipedia.org/wiki/Non-uniform_rational_B-spline The relative spacing of the values in the knot vector also has a different kind of weighting effect on the curve and alters the basis functions. If you try to do curve interpolation (the "Through points style") with a uniform knot vector the curve does not tend to behave well with different spacings between the points. So when you do an interpolated curve the knot vector is adapted to the spacing between the points so that you don't get things like curly-cues with there being a bunch of excess length of curve trying to squeeze in to a smaller space between points. Being able to have differently spaced knots is the "NU" (Non-Uniform) part of NURBS. Being able to have different weight values for each control point is the "R" (Rational) part. This tends to be confusing because they can kind of have a similar effect of adjusting how much influence a control point has on the curve. But the knot vector also defines the parameterization of the curve, when you hear about "evaluating a curve at a given parameter value", the parameter value is a value that is inside that knot vector numerical range. Having a non-uniform knot vector comes into play a lot more often in regular NURBS mechanisms than changing the weights do - the primary reason why weights exist is that having them set to specific values allows the curve to have the shape of exact conic sections like an exact circle. - Michael

 From: Hamish Mead (HAIRYKIWI) 9 Mar 2015  (3 of 7)
 7293.3 In reply to 7293.2 Hi Michael, Many thanks - your explanation and the links helps my understanding a little more at least. I can't help thinking though, that being able to play with a mathematical model of a NURBS curve, where all the parameters can be interacted with, would really help. Are you aware of anything equivalent to this Cubic Splines example on desmos.com, for a NURBS curve? ...some time later...BINGO - these interactive NURBS example should help a lot: http://geometrie.foretnik.net/files/NURBS-en.swf http://ibiblio.org/e-notes/Splines/NURBS.htm http://ibiblio.org/e-notes/Splines/None.htm I found this page also helpful: http://www.miaumiau.cat/2010/04/nurbs-in-flash-part-1/ (These were the previous closest I came to finding anything useful, [left in because they look interesting] but they're all 'only' NURBS libraries, not interactive examples: http://verbnurbs.com/ http://threejs.org/ http://libnurbs.sourceforge.net/) Where this is all leading ultimately, is that I think I want to be able to take a NURBS curve I've drawn in MoI that matches my requirements graphically, then convert/export/derive the mathematical expression of it and embedded that a MoI javascript. Why, because I'm struggling to achieve what I want using a polynomial expression, and I still need the javascript to further deform the geometry, regardless of whether the geometry is expressed as a polynomial or NURBS function. Any ideas/suggestions appreciated. Thanks again, Hamish EDITED: 9 Mar 2015 by HAIRYKIWI

 From: Michael Gibson 9 Mar 2015  (4 of 7)
 7293.4 In reply to 7293.3 Hi Hamish, well trying to do a full NURBS evaluator in self contained script code is fairly complicated, if you can deal with a limited number of control points it would probably be a lot easier to just focus on doing Bezier evaluation, that's a lot simpler. In the future I do want to make evaluation of curves at specific parameter values available to script but currently it is not part of the script interface. - Michael