Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Bézier curve
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Specific cases== A Bézier curve is defined by a [[set (mathematics)|set]] of ''[[Control point (mathematics)|control points]]'' '''P'''<sub>0</sub> through '''P'''<sub>''n''</sub>, where ''n'' is called the order of the curve (''n'' = 1 for linear, 2 for quadratic, 3 for cubic, etc.). The first and last control points are always the endpoints of the curve; however, the intermediate control points generally do not lie on the curve. The sums in the following sections are to be understood as [[Affine space#Affine combinations and barycenter|affine combinations]] – that is, the coefficients sum to 1. ===Linear Bézier curves=== Given distinct points '''P'''<sub>0</sub> and '''P'''<sub>1</sub>, a linear Bézier curve is simply a [[straight line|line]] between those two points. The curve is given by :<math>\mathbf{B}(t)=\mathbf{P}_0 + t(\mathbf{P}_1-\mathbf{P}_0)=(1-t)\mathbf{P}_0 + t\mathbf{P}_1,\ 0 \le t \le 1</math> This is the simplest and is equivalent to [[linear interpolation]].<ref>{{cite book |url=https://books.google.com/books?id=Wq7QEAAAQBAJ&pg=PA33 |page=33 |title= Stepping into Virtual Reality |author1=Mario A. Gutiérrez |author2=Frédéric Vexo |author3=Daniel Thalmann |publisher=Springer Nature |year=2023|isbn=9783031364877 }}</ref> The quantity <math>\mathbf{P}_1-\mathbf{P}_0</math> represents the [[displacement vector]] from the start point to the end point. ===Quadratic Bézier curves=== [[File:Quadratic Beziers in string art.svg|thumb|upright|Quadratic Béziers in [[string art]]: The end points ('''•''') and control point ('''×''') define the quadratic Bézier curve ('''⋯''').]] A quadratic Bézier curve is the path traced by the [[function (mathematics)|function]] '''B'''(''t''), given points '''P'''<sub>0</sub>, '''P'''<sub>1</sub>, and '''P'''<sub>2</sub>, : <math>\mathbf{B}(t) = (1 - t)[(1 - t) \mathbf P_0 + t \mathbf P_1] + t [(1 - t) \mathbf P_1 + t \mathbf P_2],\ 0 \le t \le 1</math>, which can be interpreted as the [[Linear interpolation|linear interpolant]] of corresponding points on the linear Bézier curves from '''P'''<sub>0</sub> to '''P'''<sub>1</sub> and from '''P'''<sub>1</sub> to '''P'''<sub>2</sub> respectively. Rearranging the preceding equation yields: : <math>\mathbf{B}(t) = (1 - t)^{2}\mathbf{P}_0 + 2(1 - t)t\mathbf{P}_1 + t^{2}\mathbf{P}_2,\ 0 \le t \le 1.</math> This can be written in a way that highlights the symmetry with respect to '''P'''<sub>1</sub>: : <math>\mathbf{B}(t) = \mathbf{P}_1+(1 - t)^{2}(\mathbf{P}_0 - \mathbf{P}_1) + t^{2}(\mathbf{P}_2-\mathbf{P}_1),\ 0 \le t \le 1.</math> Which immediately gives the [[derivative]] of the Bézier curve with respect to ''t'': : <math>\mathbf{B}'(t) = 2 (1 - t) (\mathbf{P}_1 - \mathbf{P}_0) + 2 t (\mathbf{P}_2 - \mathbf{P}_1),</math> from which it can be concluded that the [[tangent]]s to the curve at '''P'''<sub>0</sub> and '''P'''<sub>2</sub> intersect at '''P'''<sub>1</sub>. As ''t'' increases from 0 to 1, the curve departs from '''P'''<sub>0</sub> in the direction of '''P'''<sub>1</sub>, then bends to arrive at '''P'''<sub>2</sub> from the direction of '''P'''<sub>1</sub>. The second derivative of the Bézier curve with respect to ''t'' is : <math>\mathbf{B}''(t) = 2(\mathbf{P}_2 - 2 \mathbf{P}_1 + \mathbf{P}_0).</math> ===Cubic Bézier curves=== Four points '''P'''<sub>0</sub>, '''P'''<sub>1</sub>, '''P'''<sub>2</sub> and '''P'''<sub>3</sub> in the plane or in higher-dimensional space define a cubic Bézier curve. The curve starts at '''P'''<sub>0</sub> going toward '''P'''<sub>1</sub> and arrives at '''P'''<sub>3</sub> coming from the direction of '''P'''<sub>2</sub>. Usually, it will not pass through '''P'''<sub>1</sub> or '''P'''<sub>2</sub>; these points are only there to provide directional information. The distance between '''P'''<sub>1</sub> and '''P'''<sub>2</sub> determines "how far" and "how fast" the curve moves towards '''P'''<sub>1</sub> before turning towards '''P'''<sub>2</sub>. Writing '''B'''<sub>'''P'''<sub>''i''</sub>,'''P'''<sub>''j''</sub>,'''P'''<sub>''k''</sub></sub>(''t'') for the quadratic Bézier curve defined by points '''P'''<sub>''i''</sub>, '''P'''<sub>''j''</sub>, and '''P'''<sub>''k''</sub>, the cubic Bézier curve can be defined as an affine combination of two quadratic Bézier curves: :<math>\mathbf{B}(t) = (1-t)\mathbf{B}_{\mathbf P_0,\mathbf P_1,\mathbf P_2}(t) + t \mathbf{B}_{\mathbf P_1,\mathbf P_2,\mathbf P_3}(t),\ 0 \le t \le 1.</math> The explicit form of the curve is: :<math>\mathbf{B}(t) = (1-t)^3\mathbf{P}_0+3(1-t)^2t\mathbf{P}_1+3(1-t)t^2\mathbf{P}_2+t^3\mathbf{P}_3,\ 0 \le t \le 1.</math> For some choices of '''P'''<sub>1</sub> and '''P'''<sub>2</sub> the curve may intersect itself, or contain a [[Cusp (singularity)|cusp]]. Any series of 4 distinct points can be converted to a cubic Bézier curve that goes through all 4 points in order. Given the starting and ending point of some cubic Bézier curve, and the points along the curve corresponding to ''t'' = 1/3 and ''t'' = 2/3, the control points for the original Bézier curve can be recovered.<ref>{{cite web |author=John Burkardt |url-status=dead |archive-url=https://web.archive.org/web/20131225210855/http://people.sc.fsu.edu/~jburkardt/html/bezier_interpolation.html |url=http://people.sc.fsu.edu/~jburkardt/html/bezier_interpolation.html |title=Forcing Bezier Interpolation |archive-date=2013-12-25}}</ref> The derivative of the cubic Bézier curve with respect to ''t'' is : <math>\mathbf{B}'(t) = 3(1-t)^2(\mathbf{P}_1 - \mathbf{P}_0) + 6(1-t)t(\mathbf{P}_2 - \mathbf{P}_1) + 3t^2(\mathbf{P}_3 - \mathbf{P}_2) \,.</math> The second derivative of the Bézier curve with respect to ''t'' is : <math>\mathbf{B}''(t) = 6(1-t)(\mathbf{P}_2 - 2 \mathbf{P}_1 + \mathbf{P}_0) + 6t(\mathbf{P}_3 - 2 \mathbf{P}_2 + \mathbf{P}_1) \,.</math>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Bézier curve
(section)
Add topic