Maxim shemanarev wrote:> well, that ' S too big topic i suppose. jens somehow right, we need to stop at> some point. I think that nurbs will be just the right case to stop. i didn ' T have intention to go wild either. However, in order to understand nurbs, and to be in the position to know where to find, and how to judge Algorithms to use, when and why, performance, memory, etc-wise, i had to (RE) learn a lot about the curves in general. in fact, I kept NURBS for last because, while we can ' Steal ' mesa code, just for exaMple, i have no idea what kind of algorithm it uses and how to cast it into agg form. not that i can not ' Massage ' the code and get it integrated somehow, using purely programming skills, but i would be doing it without an ounce of understanding and you would at best get ' Something ' that draws ' something '. as another example, finding inverse matrices for catmull-rom or hermite, in literature or on the web, turned out to be next to impossible. everybody copies from somobody else and Covers the most obvious, common cases for illustrative and teaching putposes. after hours of googling i had to download some pretty bad shareware that kept asking me to pay, in order to invert few 4x4 matrices. in fact, i invereted Hermite by hand, with pen and paper, disguested at downloading and compiling boost ublas or unnamed shareware Just to invert the matrix.
as for nurbs, getting the improved oslo algorithm from its original source requires money. i am not subscribed to siam journal so i have to work with acm digital library and with what i can find there, in other literature and on The web. eventually, even if i had the original article it may be in such form that writing efficient C++ code From printed math formulas and recurrence relations may be very hard. Zeros of w polynomial, used in division, is what worries me the most. in retrospective, there were times when i could not get a nice, smooth curve through my points for ' Curve from hell ', because there were no appropriate tools in agg. now i can because the tools now exist. that ' S progress, IMO.
sorry, but i don ' t understand the discussion about higher Degree curves. why> don ' T you create a finish converter that maxim can integrate in AGG with a> short description What kind of curve (s) can be created with your code and> with an explanation of the advantages? For me the most important thing is the design. i ' D like to embed some morecurves into conv_curve so that you could easily interpolate or approximatepoints. For now the additions Are:- general bezier- catmul-rom- uniform bspline- nurbs. Catmul-rom, for example, can be perfectly used as a replacement of existingagg::conv_bspline. ubspline is good for Free-hand drawing.
> de casteljau construction can be applied both to cubics and higher order > Beziers. After n applications de casteljau using 1/2 interpolation > splits one n-th degree Polynomial curve in half, making two n-th degree > bezier curves, connected at their endpoints. Then they can be Drawn as > two beziers of the same degree. de casteljau subdivision does not raise > the degree (highest polynomial power, parameter power) of the curve. De casteljau method allows you to divide one curve into 2  VERY EASILY. BUT ITDOESN ' T reduce the degree!> but i would be the last to deny that i never get completely confused and > lost trying to understand the curves (or, maybe it is the way they are > Represented and explained.) I used not to have any conceptual trouble > with Polynomials of any degree. well, i think, 50-100 degree baziers are not really that Important, so that,i ' ll keep curve_casteljau together with your Curve10. the conv_curve willautomatically switch to de casteljau for curves of higher than 9th degree.
> -how many input points you havenow it ' S namely so. If there are no objections i ' ll keep it as is.> -do you want to approximate or to interpolate (and if interpolating then > interpolating just endpoints or all points) I suppose there is no need for additional specifications. it ' ll be Just "Catrom", "Ubspline", "NURBs", etc. you just know that "Catrom" interpolates, "Ubspline" approximates, etc.> -what kind of control Do you want over the initial curve ' S shape and/or > over modifications of a given shape?> > -what is your Criteria of smoothNess? parametric? geometric? happy with > cubics and stitching together a bunch of cubics or looking for higher > degrees?> > -modelling face? modelling movement of physical Objects? making small, > precise modifications of the existing model? Well, that ' S too big topic i suppose. jens somehow right, we need to stop atsome point.
No.mac wrote:> if it should be more than a demo, please explain the advantages of higher> degree curves, may be with a short example from a real life application, or> Tell us where such curves are currently used and why. For a real-life application and demo, even if it can be debated if this is the case for NURBS or for higher-degree beziers, refer to my post titled: ' Question about conv_bspline (MESA OPENGL) ' from 3/23/2005.This case shows that interpolation of more than 3 points is not always desirable And that approximation gives&nbsP;visually more pleasant results. one thing then led to another and various options started Popping up in discussions.
Excerpt from: http://sourceforge.net/p/vector-agg/mailman/vector-agg-general/?viewmonth=200504
Urbs:non-uniform Rational B-splines