<div dir="ltr">Hi Dr. Thompson,<div><br></div><div>I just learnt the polar form about b-spline (<a href="http://web.archive.org/web/20120227050519/http://tom.cs.byu.edu/~455/bs.pdf">http://web.archive.org/web/20120227050519/http://tom.cs.byu.edu/~455/bs.pdf</a>) which gives a more intuitive explanation for knot insertion. </div><div><br></div><div>As the example you mentioned before, given a knot vector {0,1,2,3} for a 2-degree curve, we will have 3 control points P_0, P_1, P_2. They can be represented in polar form as P(0,1), P(1,2) and P(2,3).</div><div>The control points for the bezier segments for this curve is </div><div>Segment 1: P(0,0), P(0,1), P(1,1)</div><div>Segment 2: P(1,1), P(1,2), P(2,2)</div><div>Segment 3: P(2,2), P(2,3), P(3,3)</div><div><br></div><div>What we need to generate is P(0,0), P(1,1), P(2,2) and P(3,3). From the affine combination property, we can get:</div><div>P(1,1) by interpolating P(0,1) and P(1,2)</div><div>P(2,2) by interpolating P(1,2) and P(2,3)</div><div><br></div><div>for P(0,0) and P(3,3), it seems not that straightforward. It's possible to generate P(0,2) first by interpolation P(1,2) and P(2,3) and generate P(0,0) by interpolation P(0,1) and P(0,2). For P(3,3), first generate P(1,3) by interpolation P(0,1) and P(1,2) and then generate P(3,3) by interpolation P(1,3) and P(2,3). </div><div><br></div><div>Best,</div><div>Lin</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 26, 2015 at 6:09 PM, Lin M <span dir="ltr"><<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What confuses me a lot is the different definition of the knot vector. As in the wiki page "Some modelers that use older algorithms for NURBS evaluation require two extra knot values for a total of (degree+N+1) knots". But how can I get 3 2-degree B-spline basis functions N_{0,2}, N_{1,2} and N_{2,2} from the knot vector {0,1,2,3}? From the knot vector {0,1,2,3}, we can get at most 3 zero-degree B-spline basis functions N_{0,0}, N_{1,0} and N_{2,0} and then we can only get one 2-degree basis function N_{0,2}.<div><br></div><div>The reason why I said the algorithm from the NURBS book would fail is because it use a loop variable start from kSpan - sMult (kSpan is the id of the knot span where the insert knot is, and sMult is the current multiplicity of the insert knot). For the knot vector {0,1,2,3}, if we insert a new knot 0, the kSpan = 0, sMult = 1 and kSpan - sMult = -1 which is not correct.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 26, 2015 at 4:41 PM, David Thompson <span dir="ltr"><<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Lin,<br>
<br>
Knot insertion should not fail when a knot is not repeated. Instead, by inserting the same knot value multiple times we can convert the control polygon to a series of Bézier patches. If you start with a knot vector of {0,1,2,3} for a degree 2 curve, then you can insert knots until the knot vector is {0,0,0,1,1,1,2,3}. The resulting control points for the knot interval [0,1] are a valid Bézier control polygon. You can do the same for other knot values to extract Bézier patches for the intervals [1,2] and [2,3].<br>
<span><font color="#888888"><br>
        David<br>
</font></span><div><div><br>
<br>
> On Jun 26, 2015, at 4:08 PM, Lin M <<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>> wrote:<br>
><br>
> Hi Dr. Thompson,<br>
><br>
> I have a question about the knot vector and the knot insertion.<br>
> Currently the method for knot insertion is based on the algorithm from the NURBS book where it always assumes that the first value and last value in the knot vector repeat p+1 times. This makes the endpoints of the curve always coincide with the first and last control points. As you mentioned before, the knot vector may not always be like this and in such cases the algorithm will fail. Is there any method to deal with this?<br>
><br>
> Best,<br>
> Lin<br>
><br>
> On Fri, Jun 26, 2015 at 1:06 AM, Lin M <<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>> wrote:<br>
> Hi Dr. Thompson,<br>
><br>
> I have added a method in vtkPatchInterpolation to generate triangle strips for surfaces. I tested a cylindrical surface patch from the NURBS book and I think it's correct.<br>
><br>
> Best,<br>
> Lin<br>
><br>
> On Thu, Jun 25, 2015 at 7:32 PM, David Thompson <<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>> wrote:<br>
> Hi Lin,<br>
><br>
> > Your last message is quite informative. I think it is mainly to implement a method in vtkPatchInterpolation which takes in a bezier patch, number of samples and ...<br>
><br>
><br>
> That would be a great start. Eventually it would be nice to have curvature-adapted surfaces, but just accepting a number of samples along each axis will be something we need in any event.<br>
><br>
> > ... return a vtkUnstructuredGrid?<br>
><br>
> I would accept a vtkUnstructuredGrid pointer as input and insert into it so that it is easy to create one grid with triangles from multiple patches.<br>
><br>
>         David<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>