Understanding NURBS
All  1  2-7

Previous
Next
 From:  Michael Gibson
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Hamish Mead (HAIRYKIWI)
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

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Hamish Mead (HAIRYKIWI)
7293.5 In reply to 7293.4 
Thanks Michael.

Another idea - what about simply exporting my 'nice' NURB to points (existing script IIRC) and then embedding those points in my script and drawing a 'through points' curve using the existing function? Or am I going to add lumps / loose some smoothness?

-Hamish
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7293.6 In reply to 7293.5 
Hi Hamish, that sounds like it could be a possibility, but yes it can be possible to introduce lumpy shapes using "through points" although if you have regular spacing that could help avoid that.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Hamish Mead (HAIRYKIWI)
7293.7 In reply to 7293.6 
Thanks Michael.
- Hamish
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-7