Talk:Bézier curve: Difference between revisions
Sven nestle2 (talk | contribs) |
Sven nestle2 (talk | contribs) |
||
Line 580: | Line 580: | ||
[[File:Bezier-spline-3d.gif|thumb|bezier-spline-3d.gif]] |
[[File:Bezier-spline-3d.gif|thumb|bezier-spline-3d.gif]] |
||
The materials above are incomplete compared to font glyphs. No effort was made to specify size meters, the number of curves to splice together to make (a letter), nor a way to use a dictionary of them. Font glyphs are overly involved to get right for all languages. |
The materials above are incomplete compared to font glyphs. No effort was made to specify size meters, the number of curves to splice together to make (a letter), nor a way to use a dictionary of them. Font glyphs are overly involved to get right for all languages. Another issue is that computer hardware or software offering vector graphics preset which beziers can be used and how. |
Revision as of 02:00, 7 October 2013
This is the talk page for discussing improvements to the Bézier curve article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Computer graphics B‑class Mid‑importance | ||||||||||
|
Mathematics B‑class Low‑priority | ||||||||||
|
G1 continuity
What 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?
- Good question... I have no idea. Κσυπ Cyp 21:59, 15 Sep 2004 (UTC)
- It means you can't derive a second curve that is parallel to the first by mathematical operations on the control points of the first. It works for some cases, but not in general. Maybe the phrasing could be better, but it seemed clear enough to me.Graham 22:57, 15 Sep 2004 (UTC)
- Well strictly speaking parallel refers to straight lines or planes, so if we are speaking strictly, then 'parallel curves' is an oxymoron. However, in everyday language it should be clear what this means - a second curve that maintains a constant distance from the first at every similar point, like a pair of railway tracks rounding a bend. If there is a "proper" word for this I don't know what it is. The ability to do this is actually rather important in the real world, where bezier curves are not just mathematical curiosities but are a practical way of implementing computer graphics, etc. Creating a curve 'parallel' to another is often needed, but coming up with an algorithm for it requires some cunning, because of the mentioned limitation of the curve's essential properties. I made a stab at rewording the sentence, but 'parallel' is still in there ;-) Graham 23:47, 15 Sep 2004 (UTC)
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 polynomial
I 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
- Bernstein polynomial mathematical treatment of Bernstein polynomials.
- Bézier curve a Bernstein polynomial restricted to [0,1], cubic and quartic curves as examples
- Bezigon or ?? a spline composed of polynomials in Bezier form, application in industry
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)
Done. Currently there are 3 articles exactly as you suggested. The article about "a spline composed of polynomials in Bezier form" is titled Bézier spline, with Bezigon as a redirect to that article, which I think is appropriate. --DavidCary (talk) 04:48, 21 February 2013 (UTC)
Removed from page
- Generalizing the cubic case leads to higher order curves which require more than four control points. The use of high order Bezier curves and surfaces has been limited to a few highly specialized and expensive surface modeling and industrial design applications.
- For most applications, complicated curves are pieced together from cubic curves to form bezigons: the first Bézier curve has control points A, B, C, and D, the second has control points D, E, F, and G, and if G1 continuity (i.e. smoothness of the curve) at D is required, then the direction of C-D needs to equal the direction of D-E.
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)
- I would hazard a guess from your user name that you're a mathematician rather than one who soils his hands on real-world applications ;-) If that's the case then I'd gently put you straight about the second part being "a bit obscure". This is how bezier curves are almost always used in practice for computer graphics, etc. Cubic curves are relatively fast to compute, higher order ones are not, so chaining the cubic segments together to form a desired shape is done in every case I've ever come across. And to ensure a smooth "join" between segments, the end point tangents are made the same, which is what that statement is saying. Another reason higher order curves ar not generally used is because most graphics programs need to implement the "find closest point on the curve to an arbitrary point" functionality, and that requires finding the roots of a fifth order polynomial - which can be done. But higher orders have no known algorithm. I really think that the article would be of most interest and use to BOTH mathematicians and as in an introduction for graphics. Therefore these real-world aspects should definitely be included.Graham 23:50, 19 Sep 2004 (UTC)
You misunderstood me, perhaps because my comment was too cryptic. I understand the sentence
- Generalizing the cubic case leads to higher order curves which require more than four control points. The use of high order Bezier curves and surfaces has been limited to a few highly specialized and expensive surface modeling and industrial design applications.
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.
- Another reason higher order curves ar not generally used is because most graphics programs need to implement the "find closest point on the curve to an arbitrary point" functionality, and that requires finding the roots of a fifth order polynomial - which can be done
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.
- For most applications, complicated curves are pieced together from cubic curves to form bezigons: the first Bézier curve has control points A, B, C, and D, the second has control points D, E, F, and G, and if G1 continuity (i.e. smoothness of the curve) at D is required, then the direction of C-D needs to equal the direction of D-E.
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 paragraphs
Points on a quadratic Bézier curve can be computed recursively:
- Let A, B and C be the startpoint, control point and endpoint of the curve respectively.
- Let D be the midpoint of the line AB.
- Let E be the midpoint of the line BC.
- Let F be the midpoint of the line DE. F is a point on the curve.
- Recurse with A = A, B = D and C = F.
- Recurse with A = F, B = E and C = C.
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;
- or
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)
- Not sure who wrote what in there (know I wrote the matrix), but reading it (the removed paragraphs, that is) now, it doesn't make any sense to me either... It was supposed to mean that, given a Bézier curve with points A, B, C, D, the Bézier curve can be cut into two separate Bézier curves, one with points A', B', C' and D', and the other with points 'A, 'B, 'C and 'D, where and . (Equivalent of substituting t:=2t and t:=2t-1. (Where := is assignment.)) Instead of using matrices, it is possible to cut the curve in half by setting the points to the average of neighbouring points several times in the right order, where the talk of a mysterious division by two comes in. Κσυπ Cyp 01:00, 21 Sep 2004 (UTC) and 00:27, 21 Sep 2004 (UTC)
- The article is much better for Martin's edits I think. I didn't follow the mtraix stuff either since there's no context for it - I've added a simple C example in the applications section which does give a practical method for computing a cubic curve. I hope it's not too long, and reasoanably correct (untested). Feel free to fix any bugs! Graham 00:36, 21 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)
- It's for quadratic curve? Here is example in Java. Method draws quadratic curve on specified Graphics object in n steps.
private void bezier(Graphics g, int n, double x1, double y1, double x2, double y2, double x3, double y3){ double sx1=(x2-x1)/n, sx2=(x3-x2)/n, sy1=(y2-y1)/n, sy2=(y3-y2)/n; for(int i=0;i<n;++i){ g.drawLine((int)(x1+i*sx1+i*i*(sx2+sx1)/n), (int)(y1+i*sy1*2+i*i*(sy2-sy1)/n), (int)(x1+(i+1)*sx1+(i+1)*(i+1)*(sx2+sx1)/n), (int)(y1+(i+1)*sy1*2+(i+1)*(i+1)*(sy2-sy1)/n)); } }
- You can return structs at least from ANSI C 99, not sure when this came in, I know that old dialects couldn't. My code is meant to serve as a clear example, not necessarily what a software engineer would actually write as optimum code. 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.Graham 23:46, 21 Sep 2004 (UTC)
Dimension
Just 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)
- Again this may be a layman vs. mathematician situation. Mathematically the bezier curve may be one dimensional, but intuitively it's two dimensional because it produces a point (x,y). I agree that the maths should be rigorous but I also think we musn't lose sight of the audience - which in general are not other mathematicians (who will have better references to work from than this), or even computer graphics programmers, but just people who are interested and looking for a simple introduction to the topic, but with enough info to go away and do something useful with it if they want to. That's my opinion anyway. Graham 23:52, 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/wiki/Wikisource:Source_code and linked form the article.
MathMartin 12:11, 22 Sep 2004 (UTC)
source code
should 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)
- Well feel free to do that then. However, I think you'll find that C is more universally understood by programmers since most other languages that are commonly used now are based on it - C, C++, Java, Javascript, etc etc. Perhaps Python is for all I know but I don't know Python - but I do know C which is why I wrote the Bezier code in that language. I think we should guard against just using a language because it's "flavour of the month" - let's give it a chance to establoish itself as C has in the last 30+ years. Graham 06:24, 26 Dec 2004 (UTC)
The coefficients for the cubic curive are calculated wrong in the example source code given. This can easily be verified by drawing lines between the control points and see that the points on the curve calculated by the example code goes outside the lines between the control points.
The correct coefficients should be (easily expanded from the parametric form):
such as:
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
- I will check it and try and set up a place where I can actually run it. The code is derived from some I'm using in a project and it draws Bezier's correctly - as far as I can see it looks right here but I may be missing something. Certainly the actual code I'm using (which is far too complex to use directly as an example here) does not draw outside the control point bounds.
- Please note that when adding comments to a talk page, you should always add them to the bottom of the page (not the top) if they are a new toic, or appended to an existing section if it's an already open topic. You should always sign and date your comment using four tildes (~) following the comment, otherwise it's very hard to see whan something was added. I had to use the history and diffing the file to pick out your comment, so you're lucky I even noticed it. I have moved it to the right place on the page. Graham 00:51, 17 Apr 2005 (UTC)
- I have just now tested the code posted here exactly as given. It works exactly correctly as far as I can see, and does not draw outside the control point tangent lines. This isn't much of a surprise, since I've been using very similar code for quite a while with no problems, but it might help to reassure others who don't trust it having read the above. While I don't necessarily dispute the analysis, I'm a practical guy and the code as given works well. I stick by it! Graham 04:06, 26 October 2005 (UTC)
History
The 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)
- It is right. Due to the fact they didn't come from the same engenieer school, it is still a French issue to know who found that the first one. Generally people say that Bezier discovered the mathematical form and de Casteljau invented the algorithm - the only reason which made bezier surfaces so usefull -. Celui from french wikipedia.
00
Am 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.
- Of course 00 = 1 !!
00 = 0*0-1 = (1-1)*0-1 = 0-1-0-1 = 0
=> 0=1
(Which would be a valid argument if 0-1 were an element of *any* number field...)94.0.147.195 (talk) 04:11, 23 September 2010 (UTC)
Dropped roots comment
I 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 description
Some curves that seem simple, like the circle, cannot be described by a Bézier curve or a piecewise Bézier curve
I have a different opinion. If you create a cubic Bezière curve which starts at [0,1],goes through [sqrt(1/2),sqrt(1/2)] and ends at [1,0] (its control points are [0,1],[x,1],[1,x],[1,0] where x=0.552285), the resulting curve is equivalent to a circle - the point distance from radius only differs in tenths of permille of the radius.--janndvorakk 10:13, 1 January 2006 (UTC)
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)
- The Bézier spline article and its corresponding talk page is a better place for describing a Bézier spline that looks like a circle. --DavidCary (talk) 22:03, 8 August 2011 (UTC)
Constructing Bézier curves
I'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)
- Wow, your section rocks. The article was understandable enough, but your section really finished the deal (especially the sexy animations.) Thank you JakeParker 02:07, 2 September 2006 (UTC)
In main page I have change these formulae:
Correct formulae (Bézier curve is an interpolation between two degree Bézier curves):
Animations
The 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)
- How's that? Twirlip 20:15, 12 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)
I agree, the animations are incredibly helpful. 70.22.140.232 22:09, 3 February 2007 (UTC)
- I also agree, and have suggested the animations for WP:FPC at WP:PPR (Wikipedia:Picture peer review/Bézier curve animations). --Lph 01:09, 11 February 2007 (UTC)
- This animations finally helped me understand what is so special about Bezier curves. The small size of the sample C code also gives a hint to its importance, they are much easier than the formula that appear so prominent at the beginning of the article. I would even add that I was lucky to skip over those formula and got to the animation and code section before dismissing the article and remain in the dark.
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 links
I 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 answered
well.. 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 doubt
The 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 rendering
The 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? --Doradus 14:55, 19 August 2007 (UTC)
- I have removed it. De Casteljau's algorithm is much more efficient. --Doradus (talk) 01:22, 14 December 2007 (UTC)
Cubic beziers in fonts
Should 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)
Yeah, just one more example of how PostScript just *might* be one of the most underrated and overlooked of all computer languages. Toddcs (talk) 06:13, 31 August 2009 (UTC)
Cubic Bezier, corrected formula
Hello, I corrected(niels@degooier.net) the Bezier Cubic formula from: B(t) = (1-t)3P0 + 3t(1-t)2P1 + 3t2(1-t)P2, t3P3, tE[0,1] to: B(t) = (1-t)3P0 + 3t(1-t)2P1 + 3(1-t)t2P2, t3P3, tE[0,1] Greetings from Holland :) —Preceding unsigned comment added by 212.29.183.137 (talk) 12:30, 30 December 2008 (UTC)
Names of the Curves
Hi, is the headings for cubic and quadratic curves backwards? —Preceding unsigned comment added by 81.167.94.214 (talk) 19:24, 7 May 2009 (UTC)
- You missed a heading, so I added one. No, the names are not backwards, although it does sound like they are. The equations are polynomials, and the names come from their degree - linear, quadratic, cubic, quartic etc. I can see how "quadratic" sounds like it should mean "of degree 4", but it doesn't, it means "of degree 2". To quote the Wikipedia disambiguation page:
192.171.3.126 (talk) 11:55, 12 May 2009 (UTC)In mathematics, the term quadratic describes something that pertains to squares, to the operation of squaring, to terms of the second degree, or equations or formulas that involve such terms. Quadratus is Latin for square.
Low Importance?
I don't think that this should be low importance- it is both heavily visited and important to Grasphics Editors like Inkscape and GIMP.Resident Mario (talk) 18:55, 18 January 2009 (UTC)
- It's the math project that has rated it low, meaning it has a low priority with respect to the goals of the project. Other projects are free give it a different priority.--RDBury (talk) 22:25, 6 June 2010 (UTC)
Please illustrate concepts a bit more.
For example:
To guarantee smoothness, the control point at which two curves meet must be on the line between the two control points on either side.
It would be nice to actually show "2 curves meeting" and the control point "at which they meet". Smoothness may possibly be intuited after illustrating the above.
I do see an illustration captioned "Example of two cubic Bézier curves patched together..", but it is not clear that there are 2 curves within. Am I just slow?
Jgsack (talk) 20:07, 30 June 2009 (UTC)jim
Derivative
The following text was removed: "In other words, the tangents in P0 and P2 both pass through P1". However that text is correct. The tangent lines to the Bezier curve at each of the end-points are lines through P1. Please explain why you think this is not true. −Woodstone (talk) 00:05, 13 April 2010 (UTC)
Spiro Spline
Is a spiro spline a special bézier curve?--92.227.184.234 (talk) 16:45, 21 July 2010 (UTC)
Removed section
Closed form for quadratic 2D bezier
Using , and , the 2D bezier can be written in the form of:
and
or
and
where
and
We can find from the above equations:
By filling in into one of the two equations we find for the closed form:
or
I just removed the above section as it has a number of problems. It's a straightforward piece of algebraic manipulation, but even in the simplest case results in a far more complex expression for the curve that loses information from the x(t), y(t) form, such as the points given by t = 0, t = 1, etc., And is hardly worth doing as it's only one special case: 2D and quadratic. Therefore I suspect it's not from any source but is OR. It's unencyclopaedically written (too much first person mostly) and has at least two errors: trivial one in the first line and a more serious one that it doesn't handle a number of cases. There could be more as I can't check any source and can't be bothered to reproduce the steps for the last overly complex expression (which isn't even fully expanded which would make it even more complex). --JohnBlackburnewordsdeeds 14:30, 13 August 2010 (UTC)
- Well, it's useful for showing that a quadratic Bezier curve is a segment of a parabola, since the discriminant of the conic section is 0. And since any 3 points lie on some plane, even in higher dimensions, we can find a plane that the 3 points as well as the quadratic Bezier curve lie on, so the properties still hold. --24.130.148.132 (talk) 21:07, 27 April 2013 (UTC)
closed form
I added a closed form solution for a quadratic bezier curve. However within minutes JohnBlackburne reverted my contribution as: Rv unsourced, non-notable result (OR?), unencyclopaedically written with trivial and non-trivial errors.
Let me comment to that.
Unsourced: It is unsourced as i derived it myself, seeing as i couldnt find the solution on the web. I can provide some more solution such that even you might be able to follow it.
Non-notable: Might be so, but nowhere on the internet I could find the solution or a clue to the solution. So at least I was looking for the answer. So there might be other ppl as well, so i thought id help other ppl out. Also you cannot both say its unsourced and non-notable. If its non-notable it shouldnt need a source.
unencyclopaedically written with trivial and non-trivial errors: Well unechyclopaedical maybe, maybe not. If you think you can improve my piece go ahead; trivial and nontrivial errors, please point em out to me or correct them.
On a side note, what is it with ppl that if they see some new addition that they want their mark as "I know what is best" and immediately remove it...Geez I try to contribute to the community and it gets removed within minutes. Next time i wont bother. Thank you very much. Good job —Preceding unsigned comment added by 88.159.78.227 (talk) 14:34, 13 August 2010 (UTC)
- See my comments above for my expanded reasons. You say it is unsourced and you derived it yourself. That would make it original research and Wikipedia has a very clear policy on original research, at Wikipedia:No original research. By non-notable I mean even though you've not provided a source I don't think I'd be able to find one as it looks unlike anything anyone would bother doing and publishing. The errors also indicated that.
- Any of us could do mathematics and add it to Wikipedia: I could derive a rather more complex formula for e.g. cubic curves, and add it. Then another editor could add another self-derived result, then another, etc.. To stop this, which would cause chaos in many articles, editors should only add content to articles that appears reliable sources. They should use their own words, and can do simple calculations of their own where appropriate, but lengthy algebraic derivations like this must be sourced. --JohnBlackburnewordsdeeds 14:46, 13 August 2010 (UTC)
- Better yet, lengthy algebraic derivations like this should be avoided altogether. This is an encyclopedia, not an algebra exercise sheet.—Emil J. 14:55, 13 August 2010 (UTC)
- I agree any of us could do it and in no way would i publish this in a scientific journal, hence its not OR, it was meant as a helpful adittion. Sorry, that i added the derivation, thought it might help somebody. And to be honest a lot of this page has trivial expansions ("examination of cases", n=5 example in "generalization", "degree of elevation" etc) that are still useful. But if needed I can provide a one line version. About it being not useful. It was useful to me, for calculating line intersections. And Im sure if it was helpful to me, it will be helpful to somebody else. Also the 3D case can be easily found. Higher than quadratic can also easily be done in the same way. I just posted the 2D quadratic as this show the method. About the first person form, well thats a matter of style. A _Lot_ of research is written in the "we" form. You must know that. Generally it is thought that the "we" form reads more easily, but it is matter for debate.
To conclude, if you think its "own research" then fine leave it out. If you think its not-useful then thats your oppinion, somebody else might have another one. I think the closed form at least deserves a mention. —Preceding unsigned comment added by 88.159.78.227 (talk) 15:35, 13 August 2010 (UTC)
Awesome animations
- I've logged on just to stay that Twirlip's animations are simply awesome. Kudos for your contributions, Twirlip. Great stuff indeed. -- Mecanismo | Talk
- You're welcome :) Twirlip (talk) —Preceding undated comment added 19:05, 24 February 2011 (UTC).
External Links
I added the external link to my free Web e-book. It is a more complete treatment of piecewise interpolation for those new to the subject and aimed at graphics. I'll add references to other related Wiki pages in the future.
My e-book is both a study of the fundamentals described in simple terms as well as a reference showing many types of Polynomial Interpolation -both common types and some developed by the author. It also shows some techniques not seen elsewhere. Linear interpolation is looked at carefully and shown is as the basis for all more advanced types using only Algebra. Only after understanding how adding squared and cubed terms cause smooth curves, are the more advanced curves examined such as Bezier, Catmul-Rom, b-spline, and Hermite. More advanced mathematical concepts and notations are kept to a minimum. Some additional techniques that are suggested by the mathematics and that the author has not seen elsewhere are examined. A reference is also included with all the most common curve drawing methods and includes drawings to allow comparison with other types.
WHY: I had hoped, but failed to find a book explaining polynomial interpolation basics and thought that one must certainly exist with a collection of interpolation types. I found either purely mathematical tests or advanced graphics texts. Several years later, I started reading the original Internet Usenet "groups", comp.graphics.algorithms, and did lots of searching on the net. I saved whatever I found related to splines and curves, but did not look at it or try to understand any of it until early in 1996, I decided to look at what I had collected, and started to figure things out. I begin recording my thoughts for future reference and this is the result. The very book I wanted originally is now freely available for others.
I do not believe this has any issues with the Wiki self cite guidelines. -- Steve -- (talk) 22:50, 28 August 2011 (UTC)
Bezier curve in Universe
After reading through the comments I want to know if an example of 3D Bezier curve is possible. To my mind a helix is an example of 3D Bezier curve, my other observation suggests to me that all lines in the universe (space) are 3D Bezier curves and so can I say that there is no straight line possible in space? This is based on my understanding that a point in this Universe has always three dimensions. Comments please. Pathare Prabhu (talk) 03:35, 3 April 2012 (UTC)
- Yes 3D Bézier curves are possible. Their definition is identical to the ones given, but the vectors Pi should then be points in 3D space. A circle, or part thereof cannot be written as a Bézier curve, so neither can be a helix. On the contrary, a straight line segment can be represented by a Bézier curve of any order, by having all control points on the line. −Woodstone (talk) 08:51, 3 April 2012 (UTC)
Easy and Full Graphing Example
Permutations: ways to take n things r at a time. 3! is 3*2*1
P[n_, r_] := n!/(n - r)!;
Combinations: (removed repeats in P, ie AB==BA)
C[n_, r_] := P[n, r]/r!;
bernstein[n_] := Table[C[n, i]*t^i*(1 - t)^(n - i), {i, 0, n}];
. is dot product (also scalar, inner)
bezier[pts_] := bernstein[Length[pts] - 1].pts;
quadradic
bernstein[2]
{(1 - t)^2, 2*(1 - t)*t, t^2}
cubic
bernstein[3]
{(1 - t)^3, 3*(1 - t)^2*t, 3*(1 - t)*t^2, t^3}
a cubic bezier spline needs 4 (x,y) points
bernstein[3].{{1, 1}, {2, 2}, {3, 3}, {4, 4}}
{(1 - t)^3 + 6*(1 - t)^2*t + 9*(1 - t)*t^2 + 4*t^3, (1 - t)^3 + 6*(1 - t)^2*t + 9*(1 - t)*t^2 + 4*t^3}
substitute a distance along curve to get each point along curve
% /. t -> 2
{7, 7}
bezier[{{1, 1}, {2, 2}, {3, 3}, {4, 4}}] /. t -> 2
{7, 7}
using (x,y,z) as input, a 3D spline (space curve) results
bezier[{{0, 0.2, 0.2}, {-5, 4.7, .2}, {7, 0.2, .2}, {10, 2, 5}}]
{-15*(1 - t)^2*t + 21*(1 - t)*t^2 + 10*t^3, 0.2*(1 - t)^3 + 14.1*(1 - t)^2*t + 0.6*(1 - t)*t^2 + 2*t^3,0.2*(1 - t)^3 + 0.6*(1 - t)^2*t + 0.6*(1 - t)*t^2 + 5*t^3}
The plot of f(t) shows the effect of "control points" is that the curve f(t) appears to be a straight line which control points have pulled toward them. (cp red, the inputs to bezier)
The materials above are incomplete compared to font glyphs. No effort was made to specify size meters, the number of curves to splice together to make (a letter), nor a way to use a dictionary of them. Font glyphs are overly involved to get right for all languages. Another issue is that computer hardware or software offering vector graphics preset which beziers can be used and how.