Curve two (Bessel curve)

Posted on Dec. 2, 2022, 5:37 p.m. by Jessica Morales
Category: The front end Tag: webgl

Curve (1)

1. Unnatural in interaction design: the coefficient {a_i} is not geometrically profound in the representation of the shape of the curve. Another point is that a designer often wants to specify termination conditions at the beginning and end of the curve, not just at the beginning
2. The algorithm processing of power base polynomials is only an algebraic expression, without any geometric meaning
3. Mathematically, this is a rather poor expression, and if the coefficients vary very much, the results calculated by this method will be very inaccurate
introduce

The n-order Bezier curve is composed of n+1 control points. The variable u(u∈[0,1])u(u∈[0,1])u(u∈[0,1]) is introduced to characterize the point corresponding to the proportion of u in each line segment in the n lines composed of control points, and then connect the points in proportion, and repeat the steps of line proportion. Find the last first order line segment and describe the corresponding proportional point of U. The trajectory of this point scaled from 0 to 1 is called a Bezier curve

Bezier Curve expression of order N

C(u) represents a Bezier curve function, B represents a Bernstein(Bernstein) polynomial, PiP_iPi, n is order, I =0

Curve and dismantling

Take the second-order Bezier curve shown in the figure as an example

1. There are three control points A, B and C, and the variable U
2. When u is at point D on line AB, the corresponding proportion of line BC is E, and the corresponding proportion of point F on line DE is also F
3. When U completes the movement from 0 to 1, a Bezier Curve is formed by connecting the trajectory of point F
Bernstein Polymerization

In the expression of the n-order Bessel curve, we use Bernstein as the coefficient, why do we use this polynomial, let's first look at the algebraic expression of the 1-3 Bessel curve

Linear Bezier Curve (degree = 1)

$P(u)=P_0+u(P_1-P_0)$

Quadratic Bezier Curve (degree = 2)

$B(u)=(1-u)[(1-u) P_0+uP_1 ]+u[(1-u) P_1+uP_2]$

After the reduction

$B(u)=[(1-u)^2 P_0+2(1-u)uP]_1+u^2 P_2$

Cubic Bezier Curve (degree = 3)

$B(u)=(1-u) B_(p_0,p_1,p_2 ) (u)+uB_(p_1,p_2,p_3 )$

After the reduction

$B(u)=(1-u)^3 P_0+3(1-u)^2 uP_1+3(1-u)u^2 P_2+u^3 P_3$

The above is the common order corresponding expression of Bezier Curve. Below, let's observe Bernstein's general expression

Take n=3 as an example

The relation between the coefficient of Bezier Curve and Bernstein Polymerization can be obtained from the above conclusions

Pay attention to

Degree =3 is a commonly used order. A higher-order Bessel curve is usually composed of several lower-order Bessel curves for fitting. Why not directly use the higher-order Bessel curve for simulation

Search