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!
===Computer graphics=== [[Image:Bézier curve in Adobe Illustrator CS2.png|left|thumb|Bézier path in [[Adobe Illustrator]] ]] Bézier curves are widely used in computer graphics to model smooth curves. As the curve is completely contained in the [[convex hull]] of its [[Control point (mathematics)|control points]], the points can be graphically displayed and used to manipulate the curve intuitively. [[Affine transformation]]s such as [[translation (geometry)|translation]] and [[rotation]] can be applied on the curve by applying the respective transform on the control points of the curve. [[Quadratic function|Quadratic]] and [[Cubic function|cubic]] Bézier curves are most common. Higher degree curves are more [[computationally expensive]] to evaluate. When more complex shapes are needed, low order Bézier curves are patched together, producing a [[composite Bézier curve]]. A composite Bézier curve is commonly referred to as a "path" in [[vector graphics]] languages (like [[PostScript]]), vector graphics standards (like [[Scalable vector graphics|SVG]]) and vector graphics programs (like [[Artline (program)|Artline]]<!-- 1990 -->, [[Timeworks Publisher]]<!-- early 1990s -->, [[Adobe Illustrator]], [[CorelDraw]], [[Inkscape]], and [[Allegro (software library)|Allegro]]). In order to join Bézier curves into a composite Bézier curve without kinks, a property called [[Smoothness#Geometric continuity|''G1 continuity'']] suffices to force the control point at which two constituent Bézier curves meet to lie on the line defined by the two control points on either side. [[File:Bezier curves composition ray-traced in 3D.png|thumb|Abstract composition of cubic Bézier curves ray-traced in 3D. Ray intersection with swept volumes along curves is calculated with Phantom Ray-Hair Intersector algorithm.<ref>Alexander Reshetov and David Luebke, Phantom Ray-Hair Intersector. In Proceedings of the ACM on Computer Graphics and Interactive Techniques (August 1, 2018). [https://research.nvidia.com/publication/2018-08_Phantom-Ray-Hair-Intersector]</ref>]] The simplest method for scan converting ([[Rasterisation|rasterizing]]) a Bézier curve is to evaluate it at many closely spaced points and scan convert the approximating sequence of line segments. However, this does not guarantee that the rasterized output looks sufficiently smooth, because the points may be spaced too far apart. Conversely it may generate too many points in areas where the curve is close to linear. A common adaptive method is recursive subdivision, in which a curve's control points are checked to see if the curve approximates a line to within a small tolerance. If not, the curve is subdivided parametrically into two segments, 0 ≤ ''t'' ≤ 0.5 and 0.5 ≤ ''t'' ≤ 1, and the same procedure is applied recursively to each half. There are also forward differencing methods, but great care must be taken to analyse error propagation.<ref name="Xuexiang"/> Analytical methods where a Bézier is intersected with each scan line involve finding [[zero of a function|roots]] of cubic polynomials (for cubic Béziers) and dealing with multiple roots, so they are not often used in practice.<ref name="Xuexiang">{{cite web |title=Complex Quadratic Bézier Curve on Unit Circle |author1=Xuexiang Li |name-list-style=amp |author2=Junxiao Xue |publisher=School of Software, Zhengzhou University |location=Zhengzhou, China |url=https://www.atlantis-press.com/php/download_paper.php?id=12403}}</ref> The rasterisation algorithm used in [[Metafont]] is based on discretising the curve, so that it is approximated by a sequence of "[[rook (chess)|rook]] moves" that are purely vertical or purely horizontal, along the pixel boundaries. To that end, the plane is first split into eight 45° sectors (by the coordinate axes and the two lines <math> y = \pm x </math>), then the curve is decomposed into smaller segments such that the ''direction'' of a curve segment stays within one sector; since the curve velocity is a second degree polynomial, finding the <math>t</math> values where it is parallel to one of these lines can be done by solving [[quadratic equation]]s. Within each segment, either horizontal or vertical movement dominates, and the total number of steps in either direction can be read off from the endpoint coordinates; in for example the 0–45° sector horizontal movement to the right dominates, so it only remains to decide between which steps to the right the curve should make a step up.<ref>Parts 19–22 of {{cite book |last1=Knuth |first1=Donald E. |author-link=Donald Knuth |title=Metafont: The Program |date=1986 |publisher=Addison-Wesley |isbn=0-201-13438-1}}</ref> There is also a modified curve form of [[Bresenham's line algorithm|Bresenham's line drawing algorithm]] by Zingl that performs this rasterization by subdividing the curve into rational pieces and calculating the error at each pixel location such that it either travels at a 45° angle or straight depending on compounding error as it iterates through the curve. This reduces the next step calculation to a series of [[integer]] additions and subtractions.<ref name=Zingl>{{cite report|last=Zingl|first=Alois|title=A Rasterizing Algorithm for Drawing Curves|year=2012|url=http://members.chello.at/~easyfilter/Bresenham.pdf}}<br>HTML abstract and demo: {{cite web |date=2016|last=Zingl|first=Alois|title=Bresenham |url=http://members.chello.at/easyfilter/bresenham.html |website=members.chello.at}}</ref>
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