|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
G1 continuityWhat is G1 continuity? --AxelBoldt Continuous curves with tangents pointing in the same direction. Used by graphics/font workers http://www.google.com/search?q=g1.continuity What is the point on the cubic curve in the recursive algorithm? What does "A truly parallel Bézier curve cannot be derived mathematically" mean?
Wow, if only there was an explanation for the layman. Someone below claims this is it: I did maths to the end of school and have no idea about this, and in particular the use of these curves in Illustrator remains a mystery to me. Please help! Merging Bezier curve & Bernstein polynomialI want to merge Bézier curve and Bernstein polynomial. I do not care what the resulting article is called. The two article are talking about the same subject and so there is a lot of duplicated material and inconsistent notation. Any comments ?MathMartin 12:52, 19 Sep 2004 (UTC) I changed my opinion. The material should stay on separate pages, although the notation should be more consistent. What is the term for splines that are patched together using polynomials in Bézier form ? And what exactly is a Bezigon ? Is the term common ? What I was trying to do when rewriting Bézier curve and Bernstein polynomial was to make the connection between the two topics clearer. At the moment I think the articles should be structured like this
It is not clear to me what the last two pages should be called, perhaps someone with more knowledge can propose some naming. MathMartin 10:20, 20 Sep 2004 (UTC) Removed from page
I removed the following two paragraphs from the page. The first does not contain information, and the second is a bit obscure. MathMartin 17:09, 19 Sep 2004 (UTC)
You misunderstood me, perhaps because my comment was too cryptic. I understand the sentence
I put the mathematical definition at the top, so there is no need to generalize form the cubic case to higher order curves. Stating that only low order curves are used in the industry without any reason is not very useful.
Now that is a good reason not to use high order Bezier curves, you should have put it in the article. I intend to expand the article in the next few days and will include it. Just a short correction, even roots of a fifth order polynomial can generally not be found analytically.
I understand the need to patch together low degree Bezier curves to form splines, and that one must observe certain smoothness conditions when patching the curves together. But I think Bezier curve article is the wrong place to talk about splines, (to some extend I already talked about splines in the introduction) and the paragraph was very badly written. What is the direction C-D ? What is G1 continuity ? You do not have to explain those terms to me, I know them or can guess them. But for the reader who does not know the material, who just wants to look up some information, the paragraph is obscure. To sum up the gist of my arguments. Yes I am a mathematician. I believe there should be formal mathematical definition even if they scare the laymen. But there should be real world explanations and examples too. But the math definitions and the laymen explanations should not be mixed, they should be put in separate sections. In an encylopaedia it is better to provide a general definition and then give examples then to give an example and then generalize form this example. On a different note perhaps you can shed some light on the notation used on the page. What is the deal with the upper case Bézier coefficients (A, B etc.) written in bold ? Why not call them p_0, p_1 ..?MathMartin 10:20, 20 Sep 2004 (UTC) Removed some more paragraphsPoints on a quadratic Bézier curve can be computed recursively:
The points on a Bézier curve can be quickly computed using a recursive procedure which uses division by two as its fundamental operation and avoids floating point arithmetic altogether;
D:=(C+D)/2,
C:=(B+C)/2, D:=(C+D)/2,
B:=(A+B)/2, C:=(B+C)/2, D:=(C+D)/2 (No language in particular)
I removed the above paragraphs from the article. They don't make any sense to me. MathMartin 15:00, 20 Sep 2004 (UTC)
Is it possible to return structures in C? (Haven't tried testing the code.) Here's something like what I'd write (which isn't quite as long), to do the same thing. Haven't tested. Not sure whether 2 multiplies or 6 add/subtracts are faster.
#define ComputeBezier(a,b,c) computebezier((float *)(a),(b),(float *)(c))
void computebezier(float *cp, int n, float *res) {
float s, s2, s3, t, t2, t3, st2, s2t, ds;
float ax, ay, bx, by, cx, cy, dx, dy;
ax=*cp++; ay=*cp++; bx=3**cp++; by=3**cp++; cx=3**cp++; cy=3**cp++; dx=*cp++; dy=*cp;
ds=1./(n-1);
s=0; t=1;
while(n--) {
s+=ds; s2=s*s; s3=s*s2;
t-=ds; t2=t*t; t3=t*t2;
st2=s*t2; s2t=s2*t;
*res++=ax*t3+bx*st2+cx*s2t+dx*s3;
*res++=ay*t3+by*st2+cy*s2t+dy*s3;
}
}
Κσυπ Cyp 11:03, 21 Sep 2004 (UTC)
DimensionJust a short note on the introduction. Generalizations of Bézier curves to three (or more) dimensions are called a Bézier surface and a Bézier triangle. This is not a very clear formulation. In mathematics a curve is a 1 dimensional object because it depends on one parameter t. A Bézier surface would be a 2 dimensional object because it depends on 2 parameters. Consider this explanation: a curve can be drawn in a 2 dimensional space or in a 3 dimensional space (or any dimension for this matter) but it still is a curve, a 1 dimensional object. For me this is clear. But other people may not know this. Perhaps someone can reformulate the sentence to make it clearer. Until then I will just remove the exact dimension number and speak about higher dimension. MathMartin 12:22, 21 Sep 2004 (UTC)
Mathematically the bezier curve may be one dimensional, but intuitively it's two dimensional because it produces a point (x,y). I rewrote the defininition to clear this up. How many points the curve produces is dependend on the dimension of the control points. If I choose control points in 3 dimensional space I get a curve in 3 dimensional space. If this is not clear I will expand the material in the article. mathematicians (who will have better references to work from than this) You should not make assumptions about the audience :) Even mathematicians need to look stuff up, and start from the beginning when learning a new topic. Most math books are crap because they do not contain enough examples and motivation. An encyclopaedia should be accessible to a wide range of people. I think at the moment the article is well balanced. The laymen can read and understand the history section (should be expanded) and the applications in computer graphics sections. The programmer can grab the examples and implement them. And the mathematician (or any person with some training in math) can lookup the definition. I believe it's easier to relate the code to the maths in the article than your example, which is no doubt faster... we must remember that this is an encyclopaedia, not a code text book - maybe even C is too technical here, a BASIC (shudder) or Pascal example might be better for readability I agree. The code should match the math in the article and perhaps C is not the best choice. But as far as I know there is no standard computer language on wikipedia for examples, so whoever writes the code gets to choose the language. In my opinion code should only be used the make algorithms clearer. Complete implementations should be put at http://wikisource.org/en/Wikisource:Source_code and linked form the article. MathMartin 12:11, 22 Sep 2004 (UTC) source codeshould be put here http://wikisource.org/w/index.php?title=Beizer_Curve&action=edit preferred language should be Python cause it's a high level, easily readable, used by mathematicians worldwide language that has bright future (pascal/fortran/basic are dead)
The correct coefficients should be (easily expanded from the parametric form): a = − A + 3B − 3C + D
B(t) = at3 + bt2 + ct + A The code for generating this (in Java) is:
private Point pointOnCubic(float t) {
Point res = new Point();
float t2 = t * t;
float t3 = t2 * t;
// cp[] is an array of Point's specifying the control points
float ax = -cp[0].x + 3*cp[1].x - 3*cp[2].x + cp[3].x;
float bx = 3*cp[0].x - 6*cp[1].x + 3*cp[2].x;
float cx = 3*cp[1].x - 3*cp[0].x;
float ay = -cp[0].y + 3*cp[1].y - 3*cp[2].y + cp[3].y;
float by = 3*cp[0].y - 6*cp[1].y + 3*cp[2].y;
float cy = 3*cp[1].y - 3*cp[0].y;
res.x = (int) ((ax * t3) + (bx * t2) + (cx * t) + cp[0].x);
res.y = (int) ((ay * t3) + (by * t2) + (cy * t) + cp[0].y);
return res;
}
-- netd
HistoryThe history section says that Pierre Bézier just used the curve, but here I found that he actually discovered the curve independently: "This set of curves was discovered around the same time by two people: Bezier and de Casteljau. Bezier discovered it using the Berstein polynomials, while de Casteljau found a geometric representation". Is it right? Rodrigo Rocha 02:05, 16 Jun 2005 (UTC)
00Am I missing something or should we adopt the convention that 00 = 1? Say we need to calculate the following Bernstein polynomial (for a given n, with i=0 and t=0): Here we have 00.
Dropped roots commentI dropped "and there is no analytic formula to calculate the roots of polynomials of degree 5 and higher" for 2 reasons : Firstly, in most cases numerical approximations can be used instead of analytical solutions. But more importantly, it is seldom necessary to compute t. The most frequent operation is to compute the coeficients with Gaussian elimination if not directly. -- Nic Roets 09:18, 30 July 2005 (UTC) I'd second dropping that phrase. There is no *algebraic* formula for the roots of a quintic, but there is a closed form solution in terms of hypergeometric functions (which are analytic). That is, there is no formula for the roots in terms of the coefficients using a finite number of additions, multiplications, and root takings (for quintic and higher order polynomials). There is, however, a formula involving a finite number of additions, multiplications, root takings, and evaluations of hypergeometric functions (for polynomials of degree greater than five, one needs generalizations of the hypergeometric functions). -- jimbo 00:44, 12 October 2005 (CDT) Circle descriptionSome curves that seem simple, like the circle, cannot be described by a Bézier curve or a piecewise Bézier curve If there is some difference in radius, no matter how miniscule, then the curve cannot describe the circle. Dysprosia 10:24, 1 January 2006 (UTC) Constructing Bézier curvesI've added a section on constructing Bézier curves including some animated GIFs, because I think it helps to visualise Bézier curve formulae. I thought about adding a derivation so you can see from the construction how the Bézier formula comes about because someone was complaning "Wow, if only there was an explanation for the layman". For example something like this for a quadratic curve:
So doing some substitution...
I decided this was more appropriate to a high school textbook than an encyclopedia so I left it out. Twirlip 16:43, 27 August 2006 (UTC)
In main page I have change these formulae:
Correct formulae (Bézier curve is an interpolation between two degree n − 1 Bézier curves):
AnimationsThe animations for the curves are too fast for anyone who actually wants to study them. Perhaps slow them down by about fifty percent or so. Radical 05:34, 10 September 2006 (UTC)
These animations are great! Someone should nominate one as a featured animation. I never really understood bézier curves as fully as I should have before, but all the math is clear, without even reading the math. --jacobus (t) 17:53, 12 October 2006 (UTC)
As it turns out, the animations seem to indicate that the figures made with nails and string, as shown, for example, at http://www.stitchingcards.com/section.php?xSec=25 make the contour of a Bezier curve. (You'll probably think the next think I'll do is promote lava-lamps in articles related to convection or materials density change with temperature) As for the layman understanding of what Beziers curves are or why are they so useful, I would like to suggest to change the order of the article so the explanations easier for the laymen go first. After all, few of us would have never learned there was something called a Bezier curve if it wasn't for their simple construction. --DevaSatyam 12:07, 19 August 2007 (UTC) New linksI added a few links to my pages on how to construct Bezier curves geometrically. If you want to incorporate that into the main article, go right ahead. -SharkD 21:45, 30 October 2006 (UTC) a bit of doubt... would be thankfull if answeredwell.. i'm into high school, so i don't really have much understanding about bezier curves. But i was trying to plot a bezier curve in PowerToy Calc. I used the formula given in the talk section "Construction Bezier curves". This was what i used: B(t) = ((1 - t)^2)*p + (2*t*(1 - t))*q + (t^2)*r here, p, q and r were integral variables which i gave different values later. Now my doubt was.. whatever it is that i'm doing, is it right?? coz the curves which were plotted.. didn't really seem like bezier curves to me. If i'm not doing it right.. how is it done right?? i'd be grateful for the help. Rohan2kool 10:47, 11 April 2007 (UTC) In order to get a curve, p,q, and r need to be 2 dimensional vectors (i.e. points). If you just use scalar values, you'll probably end up with a parabola. I'm not familiar with PowerToy Calc, so I don't know what kind of support it has for parametric equations. Hope that helps. mistercow (talk) 01:11, 26 January 2008 (UTC) Reference link in doubtThe first reference Bézier curves, [1], redirects to [2], which is about Bézier surfaces. I wonder if perhaps this page [3] on Bézier curves was intended.--Jwwalker 18:11, 10 August 2007 (UTC) The code for renderingThe C code we give for rendering cubic Béziers is very inefficient. Why don't we present the standard technique of repeatedly dividing the curve into two until each part is sufficiently close to a straight line? --P3d0 14:55, 19 August 2007 (UTC)
Cubic beziers in fontsShould say that one reason that cubic beziers are convenient in fonts (such as in PostScript Type 1 etc.) is that you can require that a cubic curve has two specified endpoints, and a specified tangent angle at each endpoint, and still have some further control over the shape of the curve between the endpoints. By contrast, if you use quadratic beziers, then specifying two endpoints and two corresponding tangent angles completely specifies the shape of the curve -- if you then want to change the shape of the curve, the only way is to recut it (using different endpoints), and this may have a further chain-reaction effect on neighboring quadratic curve segments (the dreaded non-locality problem when attempting to edit Truetype fonts in native format, i.e. without converting them). AnonMoos 18:47, 1 September 2007 (UTC) PostScript?Considering the Bezier curve was digitally popularized prior to Illustrator, etc. with PostScript, doesn't PostScript deserve a mention? Particularly as PostScript offers first-class citizen language entities for defining these curves. —Preceding unsigned comment added by 70.68.70.186 (talk) 00:20, 16 August 2008 (UTC) |
| All Right Reserved © 2007, Designed by Stylish Blog. |