# NURBS vs Rational Bezier Patches

This topic is 2019 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I'm currently working on a raytracing rendering engine for a research project. Since raytracing doesn't need triangle meshes I thought about using curves like NURBS or rational bezier patches. My question is: What do you think is better suiting for this purpose?

I have only worked with bezier curves before and just read a few papers and wiki articles about NURBS. Therefore I have some other questions about them:

1. Is there anything only a NURBS can form and a set of rational bezier patches can not?

I read some thing like: It is possible to convert a NURBS into a set of rational bezier patches and vice versa too, but I'm not sure about it.

2. What exactly is the knot vector of a NURBS and what is it needed for?

A set of rational bezier patches just needs the control points and their weights and a NURBS needs control points, weights and the knot vector. Isn't that redundant data?

3. Are calculations (finding a point, derivative or normal) of a NURBS more time expensive or complex than the ones of bezier patches?

4. NURBS seem to end before actually reaching the first / last control point, bezier curves reach the first and last control point in every case. That is a bit confusing but seems to be natural. Any explanation here?

##### Share on other sites

1) A NURBS can be easily decomposed into a set of Bezier curves with a specified continuity between consecutive curves. That means that a NURBS surface patch can be decomposed into a set of Bezier patches. It does work both ways via knot insertion and knot deletion. (Aside: knot deletion can't always be performed and yield the same curve/surface, so you'll have to know when you can do it)

2) The knot vector affords properties that you don't get with the Bezier formulation. The biggest problems with Beziers are local control and degree increase. For example, adding more control points to a Bezier curve increases your control of the curve shape, but it also increases the degree of the polynomial, increasing your computation time. As well, if you move a Bezier control point, the whole curve changes. The knot vector of the NURBS allows for a collection of multiple Bezier curves of the same degree and the order of the NURBS with local control, because each NURBS control point only influences a certain part of the whole NURBS, not all of it (local control).

Mathematically, the knot vector specifies a parameter interval over which the recursive basis functions act. A better way to picture this is to visualize the knot vector as specifying the start and end parameter values of the constituent Bezier curves. For example, the knot vector [0 0 0 0 1 2 2 2 2] for a 3rd-order NURBS says that the NURBS consists of 2 Bezier curves, one on the interval (0,1) and one on the interval (1,2). Furthermore, the knot vector tells us what the continuity of the curves are. In this case, the curves have C2 continuity at the parameter value 1. If the knot vector was [0 0 0 0 1 1 2 2 2 2], we'd still have 2 Bezier curves at intervals (0,1) and (1,2), but the continuity between the curves would only guaranteed to be C1 (however, if we inserted this knot, then the curves would still be C2). Middle knots (i.e. not the start or end knot values) can have a maximum of multiplicity "n" in the knot vector, and the minimum continuity of the Bezier curves at those parameter values is C^(n-k), where n is the order of the NURBS and k is the multiplicity of the knot. The properties of the knot vector also explain your question (4). Simply put, the knot vector adds a measure of control you don't have when working with Bezier curves.

3) The calculations for finding a NURBS point and normal are certainly more complicated than finding ones for Bezier surface patches. There are techniques for evaluating them more quickly, but you can always decompose the NURBS into Bezier surface patches and get points and normals that way. It's probably about the same amount of work either way.

4) In addition to the info on the knot vector, since the starting parameter value has multiplicity 4 (i.e. since the NURBS in this example is 3rd-order, it's n+1), then we know this NURBS curve passes through the starting control point. The end parameter value is also multiplicity 4, so the curve passes through the end control point. The knot vector doesn't necessarily have to have those "end conditions". The knot vector for a cubic NURBS can be [0 1 2 3 4 5 6 7 8], which means that the curve doesn't pass through the ends, consists of 2 Bezier curves at intervals (3,4) and (4,5) with continuity C2 at t=4.

In my opinion, Bezier surface patches are nicer to work with, but unless you know exactly how to "stitch" the Bezier patches together via control point placement, NURBS patches are probably what you want.

##### Share on other sites

Well, I think I will stick to rational cubic bezier patches, because I can implement a Bounding volume hierarchy built from the convex hull of the control points to accelerate the raytracing, which wouldn't be possible that easy when I would use NURBS. Also I can see no "real" advantage of NURBS except form the modeling, but that shouldn't be a problem since I can convert models of NURBS to bezier patches.

In my opinion, Bezier surface patches are nicer to work with, but unless you know exactly how to "stitch" the Bezier patches together via control point placement, NURBS patches are probably what you want.

If I got it right, than the continuity at the edge between to patches should be given when the three neighbor control points are forming two lines of equal length. So that shouldn't be that complicated to compute and even if I don't solve this problem, I can still convert NURBS models to bezier patches.

So I will start with the bezier patches and then try which method (numerical, approximation, dividing or maybe a mixture of those) is the fastest for my raytracing application.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633705
• Total Posts
3013464
×