• Create Account

Member Since 28 Feb 2013
Offline Last Active Dec 05 2013 03:33 PM

Posted by on 20 November 2013 - 09:31 AM

Sorry for my misleading picture. The blue curve is a curve generated by the middle control points. As apatriarca said, it is NOT on the Bezier surface, however, the middle control point for any v-isoparameter curve will be on that blue curve. This is analogous to the first and last control points being on the edge curves of the Bezier surface, and these edge curves are generated by the left and right control points at the edge of the control net.

The idea is that you can treat the columns of the control grid as separate Bezier curves and evaluate them at a specific v. Then, those evaluated points can become another Bezier curve (a v-isoparameter curve) that you can evaluate at a specific u. Then, that evaluated point is on the surface. You can do the same thing with the rows of the control grid to get a u-isoparameter curve, and then evaluate that at a specific v to get the point on the surface.

HTH

Posted by on 19 November 2013 - 09:20 AM

Apatriarca's right on. Each point on the Bezier surface corresponds to a (u,v) parameter. You can get what's called an isoparametric curve by holding one of the parameters constant. In your example, you're holding v = 0.7, which does yield a curve like you've drawn. The control points of that curve can be found by evaluating the Bezier curves in that direction at v = 0.7. I've modified your drawing to show what I mean:

The blue curve is just the Bezier curve defined by the 3 middle control points. The point on that curve at v = 0.7 is the middle control point for the orange curve, just like the end control points for the orange curve are the surface edge Beziers evaluated at v = 0.7. Mathematically, the Bezier surface is defined like this:

$S(u,v) = \sum_{j=0}^n \sum_{i=0}^m P_{ij} B_{i}^m(u) B_j^n(v)$

where m and n are the degrees in the u and v directions, respectively, and $$B_i^n(t) = \binom{n}{i} (1-t)^{n-i}t^i$$. If you hold a parameter constant (in this case, we'll hold $$u = u_0$$), and group the inside terms like so:

$S(u,v) = \sum_{j=0}^n \left [ \sum_{i=0}^m P_{ij} B_{i}^m(u_0) \right ] B_j^n(v) = \sum_{j=0}^n Q_j B_j^n(v)$
you can see that $$Q_j$$ are control points for an isoparametric curve at $$u = u_0$$. The above picture shows how this works graphically. I hope that helps to back up what apatriarca was saying.

@apatriarca: I think the forums use MathJax, like the articles do. You can use \ [ and \ ] to enable LaTeX and \ ( and \ ) for inline typesetting. I had to add spaces between the slashes and brackets above to stop MathJax from rendering them as LaTeX.

Posted by on 18 November 2013 - 08:48 AM

With Bezier curves, the only control points that are guaranteed to be on the curve are the endpoints. Bezier surfaces are like Bezier curves, where the corner control points of the Bezier patch are guaranteed to be on the surface. In a biquadratic Bezier surface patch, you'll have 9 control points, but every point but the center one will control the edges of the Bezier patch. In the example below, the surface is a bicubic patch, but as you can see, the edges are controlled by all the control points at the edges of the patch, not just the corners. The control points at the corners are on the surface, but none of the others are.

I don't quite understand what you mean with all your talk about infinities. It might be better to explain what you're using the Bezier patch information for so others here can help you devise a good strategy for solving your problem.

### #5100184NURBS / line intersection

Posted by on 10 October 2013 - 08:39 AM

You can do NURBS/line intersection, but it's not easy. Bezout's theorem states that the number of intersection points of 2 polynomials is equal to the product of their degrees, but you have to count intersection points at infinity, intersection points with a multiplicity greater than 1, and so on. For example, 2 lines (degree-1 polynomials) intersect at one point. Even if the lines are parallel, they intersect at infinity. So what you have is a NURBS of degree p intersecting a line with degree 1, so they intersect p times.

One way is to use implicitization and resultants to find common roots of the curves. This will be quick for NURBS of degree 3 or less, but for greater degrees you should use subdivision methods. A good link to study implicitization and resultants is http://cagd.cs.byu.edu/~557/text/ch17.pdf. You could also just get a polyline of the NURBS and do line-line intersection tests.

### #5067116NURBS vs Rational Bezier Patches

Posted by on 03 June 2013 - 09:52 AM

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.

### #5044932Ordinary Differential Equation ?

Posted by on 20 March 2013 - 10:49 AM

It really depends on what kind of modeling you want to do. Like it's been said many times above, to achieve more physical realism you'll have to resort to ODEs sometime. I think taking a course on ODEs before numerical methods would probably be useful. Numerical methods are what you're going to need if you ever want to actually apply your ODE knowledge, but understanding what it is that the numerical methods are actually doing is important.

and ODEs like the heat and wave equations are themselves solved by eigendecomposing a linear operator (the sines/cosines are its eigenvectors).

Not to be too nitpicky, but as far as I remember, the heat and wave equations are second-order PDEs, not ODEs.

### #5039098Matrix inversion

Posted by on 04 March 2013 - 12:15 PM

Matlab has a lot of algorithms it uses to solve problems where matrix inversion might be used. Which one it uses depends on its own analysis of the input matrix to determine what answer is most correct. In fact, Matlab tells you not to use the result of inv(A) to solve an Ax=b problem because of numerical error, probably because inv(A) is a quick naive Gauss elimination algorithm.

Looking at your matrix, it could be using a sparse matrix algorithm because a lot of the entries are zero, but the size of the matrix makes me think it's not. If you're not explicitly using a specific algorithm in your code, I think there is a command for it to tell you which algorithms it's using to solve your problem. By the way, which command are you using to get the inverse in Matlab?

For your information, naive Gaussian elimination is not numerically stable because of the mathematical roundoff errors that arise from the precision in the computer. Even though you might be calculating with double precision, tiny errors due to roundoff can compound to throw off the entire result if not checked. Partial pivoting checks these small errors so they don't become big. Complete pivoting does this even better, but takes more computations to do this. However, if you're trying to solve an Ax=B problem, don't use matrix inversion. There are better techniques for this, such as LU decomposition.

PARTNERS