[x3d-public] NurbsPositionInterpolator example problem

vmarchetti at kshell.com vmarchetti at kshell.com
Thu Sep 27 07:14:50 PDT 2018


An issue here is that the  NURBS specification , http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/nurbs.html#CommonGeometryFieldsAndCorrectness <http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/nurbs.html#CommonGeometryFieldsAndCorrectness> ,
refers to "uniform knot vector" without defining this terminology. 

Andreas proposed:
> A working knot vector would be
> knot='0 0 0 .25 .5 .75 1 1 1'
for this example, while freewrl makes a different choice, shown below.

Referring to the Ancient Book Of Wisdom (i.e. "The NURBS Book", by L. Piegle and W. Tiller, 2nd ed.) there is a definition given at the end of section 2.4, which agrees with
the choice that freewrl makes for the default "uniform knot vector". This makes sense, the way NURBS (splines in general) with user-specified knot values are used in practice, the complete
list of knot value start with {order} values of the minimum parameter range, and end with {order} value of the maximum of the parameter range. This choice has the useful property that
the curve start on the first control point and ends on the final control point. {order} is the integer value of the order of the curve, {order} = 2 for linear segments, {order} = 4 for cubic curves

> On Sep 27, 2018, at 9:40 AM, GPU Group <gpugroup at gmail.com> wrote:
> 
> CONFIRMED with freewrl, which console complains:
> bad knot vector, replacing with:
> [0]=0.000000
> [1]=0.000000
> [2]=0.000000
> [3]=0.000000
> [4]=0.500000
> [5]=1.000000
> [6]=1.000000
> [7]=1.000000
> [8]=1.000000
> -Doug Sanden
> 
> On Thu, Sep 27, 2018 at 7:33 AM Andreas Plesch <andreasplesch at gmail.com <mailto:andreasplesch at gmail.com>> wrote:
> The NurbsPositionInterpolator in the example at
> 
> http://www.web3d.org/x3d/content/examples/Basic/NURBS/NurbsPositionInterpolatorExampleIndex.html <http://www.web3d.org/x3d/content/examples/Basic/NURBS/NurbsPositionInterpolatorExampleIndex.html>
> 
> does not have enough knots. The knot field only has 5 entries but it
> needs to have number of control points plus order entries, eg. 5 + 4,
> 9 entries, according to the last paragraph about the knot field in
> 
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/nurbs.html#CommonGeometryFieldsAndCorrectness <http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/nurbs.html#CommonGeometryFieldsAndCorrectness>
> 
> The example still works but in a limited fashion in NURBS supporting
> browsers because in the case of an incorrect number of knots, the
> browsers will compute a default uniform knot vector. The problem then
> is that the replacement vector is not guaranteed to span the 0 to 1
> range, or whatever range the original knot vector had.
> 
> A working knot vector would be
> knot='0 0 0 .25 .5 .75 1 1 1'
> 
> -Andreas
> 
> -- 
> Andreas Plesch
> Waltham, MA 02453
> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org <mailto:x3d-public at web3d.org>
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org <http://web3d.org/mailman/listinfo/x3d-public_web3d.org>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180927/c409118a/attachment.html>


More information about the x3d-public mailing list