• Create Account

### #Actualcephalo

Posted 29 November 2013 - 10:28 AM

These papers would be so much more useful if they had some example code. English is a very ambiguous language for describing mathematical concepts.

I'm looking at the paper linked by LorenzoGatti, Triangular NURBS Surface Modeling of Scattered Data and I'm trying to understand the calculation of the basis functions.

In section 2, they describe how many knots are needed per vertex and how they can be shared among adjacent triangles, then they take 5 of the 9 knots, and arrange them in 6 configurations which seems to be every possibility of a combination of 5 knots. They say nothing of how the extra knots are discarded or if that matters. Each of the 6 scenarios requires a basis function defined from each 5 knot set K as:

B(u|K) = a0B(u|K\v0) + a1B(u|K\v1) + a2B(u|K\v2)

'u' is a point in the 2D domain (cartesian or barycentric?) and 'a' is related? to the barycentric coords. In the context of an arbitrary collection of multiple triangles, I don't know what that means. Then there is a bit about how the last term in the above equation can either be 1 if the 'u' point are in the triangle formed by the three vertex knots and 0 if it is not.

I can't begin from this to understand how to put this in code.

EDIT: by the way, for some context regarding my intentions, my surface patch is a triangle with 10 control points forming 9 sub-triangles like so:

[attachment=18991:np2.gif]

### #1cephalo

Posted 29 November 2013 - 10:17 AM

These papers would be so much more useful if they had some example code. English is a very ambiguous language for describing mathematical concepts.

I'm looking at the paper linked by LorenzoGatti, Triangular NURBS Surface Modeling of Scattered Data and I'm trying to understand the calculation of the basis functions.

In section 2, they describe how many knots are needed per vertex and how they can be shared among adjacent triangles, then they take 5 of the 9 knots, and arrange them in 6 configurations which seems to be every possibility of a combination of 5 knots. They say nothing of how the extra knots are discarded or if that matters. Each of the 6 scenarios requires a basis function defined from each 5 knot set K as:

B(u|K) = a0B(u|K\v0) + a1B(u|K\v1) + a2B(u|K\v2)

'u' is a point in the 2D domain (cartesian or barycentric?) and 'a' is related? to the barycentric coords. In the context of an arbitrary collection of multiple triangles, I don't know what that means. Then there is a bit about how the last term in the above equation can either be 1 if the 'u' point are in the triangle formed by the three vertex knots and 0 if it is not.

I can't begin from this to understand how to put this in code.

PARTNERS