The second day of internship in Suzhou

Source: Internet
Author: User

Maybe some people will think I this is moan, but personally think it is a daily record, summed up the good

0x01 morning looked at OSG documents, no role, 10 points received task book, Draw Bezier Curve, a face, look at the data, roughly understand Bessel formula, code is also used in the second-order formula, but there are some problems, finally there is a jumping point. We find that the problem is the point of precision problem, solve tomorrow.

Attached: Baidu Encyclopedia formula

The linear formula gives the fixed point P0, P1, and the linear Bezier curve is just a straight line between two points. This line is given by the following formula: And it is equivalent to a linear interpolation. Quadratic Formula Two The path of the Bezier curve is traced by the function B (t) of the given point P0, P1, P2: The TrueType font uses a two-time Bezier curve consisting of a Bezier spline. The three-square formula P0, P1, P2, P3 Four points in the plane or in three-dimensional space defined three square Bezier curve. 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 parameters of the curve are as follows: modern imaging systems, such as PostScript, Asymptote, and Metafont, use a three-time Bezier curve consisting of a Bezier spline to depict the contour of a curve. The general parametric formula Order Bezier curve can be inferred as follows. Given fixed point P0, P1 、...、 Pn, its Bézier curve is: As above formula can be recursively expressed as follows: by means of the point P0. P1 、...、 PThe Bézier curve as determined by N. In normal terms, the Bezier curve of the order, the interpolation between the two-order Bezier curves. Equation Description 1. The curve starting at P0 and ending at PN, 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. 0x02 lunch back to continue drawing, evening overtime to continue drawing, 9 o'clock left nano-city. One day harvest is a general understanding of the Bezier curve, as well as in the sample program has been modified, C + + is not familiar, continue to learn the basis of it. Not much to say.

The second day of internship in Suzhou

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.