Bezier curve principle-Dynamic interpretation

Source: Internet
Author: User

Bezier curve principle

Bezier curves (Bézier curve), also known as Bézier curves or Bézier curves, are mathematical curves applied to two-dimensional graphic applications. The general vector graphics software through it to accurately draw the curve, the Bézier curve is composed of line segments and nodes, the node is a drag fulcrum, the segment like a retractable elastic band, we see in the Drawing tool pen tool is to do this vector curve. Bezier curve is a very important parameter curve in computer graphics, and in some more mature bitmap software, there are Bezier tools, such as Photoshop. There is no complete curve tool in the FLASH4, and the Bezier tool is already available in the FLASH5. The Bezier Curve, 1962, was widely published by the French engineer Pierre Bessel Pierre Bézier, who used the Bezier curve to design the body of the car. The Bezier curve was originally developed by Paul de Casteljau in 1959 using de Casteljau algorithm to find the Bezier curve in a stable numerical way.

Curve action

With the computer drawing most of the time is to manipulate the mouse to grasp the path of the line, and hand-painted feeling and effect are very different. Even a smart painter can easily draw a variety of graphics, to get the mouse to want to do whatever the drawing is not an easy thing. This is the computer can not replace the manual work, so far people can only quite feel helpless. Drawing with the Bezier tool largely compensates for this shortcoming. Bezier curve is the basic tool of computer graphics and image modeling, and it is one of the most basic lines used in graphic modeling. It creates and edits the graph by controlling four points on the curve (the starting point, the terminating point, and the two mutually separated intermediate points). One of the important functions is the control line located in the center of the curve. This line is virtual, and the middle is crossed with a Bezier curve, and the ends are control endpoints. The Bezier curve changes the curvature of the curve (the degree of curvature) when moving the ends of the endpoints, and when moving the middle point (that is, moving the virtual control line), the Bezier curve moves evenly when the start and end points are locked. Notice that all the control points and nodes on the Bezier curve are editable. This "intelligent" vector line provides an ideal tool for the artist to edit and create graphics.

Formula
Linear formulas

given fixed-point P0, P1, the linear Bezier curve is just a straight line between two points. and it is equivalent to linear interpolation . This line is given by the following formula:


Quadratic formula


The path of the quadratic Bezier curve is traced by the function B (t) of the given point P0, P1, P2:

The TrueType glyphs use a two-time Bezier curve that is composed of a Bezier spline.

Three-square formula
P0, P1, P2, P3 Four points are defined in the plane or in three-dimensional space in three square Bezier curves. The curve starts at P0 toward P1, and comes from the direction of P2 to P3. Generally do not go through P1 or P2, these two points are just there to provide direction information. The spacing between P0 and P1 determines the "length" of the curve toward the P2 direction before it turns into P3.


The parameter form of the curve is:

Modern imaging systems, such as PostScript, Asymptote, and Metafont, use a three-time Bezier curve consisting of a Bezier spline to depict the contours of a curve.

Four-time Square diagram:



General parameter Formula
The Chebez curve can be inferred as follows. Given fixed point P0, P1 、...、 Pn, its Bézier curve is:


The above formula can be expressed recursively as follows: a Bézier curve determined by the point P0, P1 、...、 PN.
In normal terms, the Bezier curve of the order, the interpolation between the two-order Bezier curves.

Formula description
1. Starting at P0 and ending with the PN curve, the so-called endpoint interpolation property.
2. The sufficient and necessary condition for the curve to be a straight line is that all control points are bit on the curve. Similarly, the sufficient and necessary condition for a Bezier curve to be a straight line is the control point collinear.
3. The starting point of the curve (the end point) is tangent to the first section of the Bezier polygon (the last section).
4. A curve can be cut at any point into two or any multi-stripe curve, and each sliver curve is still a Bezier curve.
5. Some seemingly simple curves (such as circles) cannot be precisely described by Bezier curves, or segmented into Bezier curves (although each internal control point is divided into four segments of the Bezier curve at the horizontal or vertical distance of the external control points on the unit circle, the maximum radius error of less than 1 per thousand can be approximated to the circle).
6. The curve at a fixed offset (from a given Bezier curve), also known as the offset curve (false parallel to the original curve, such as an offset between two rails) cannot be precisely formed with the Bezier curve (except for some trivial instances). In any case, the existing heuristics can usually give approximate values for practical purposes.



Bezier curve principle-Dynamic interpretation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.