Home > Software engineering >  Three times bezier, generation X and Y
Three times bezier, generation X and Y

Time:09-17

Recently wrote a small game, there are square mobile animation, linear animation seem to be some hard, want to use Bessel nonliner animation,
Such as the site here: http://cubic-bezier.com/#.43,. 04,. 11,1.42

But encountered a problem:
The above website here, is based on the x axis represents time, y is the location of mobile
Check the Bessel formula is:

problem 1: the formula of t exactly is what?

Diagrams and formula in the website, seemed to a is two-dimensional, one is one-dimensional,

question 2: can understand so, url shown above, is the result of two Bessel formula?

question 3 (main) : I want to here, such as the site in generation into the x value and the corresponding y value, how should do? Give an algorithm
I mainly want to, respectively in 0.1 0.2 0.3... 1.0, the position of Chinese animation block, 10 frames,

CodePudding user response:

in the mathematics of the bezier



CodePudding user response:

reference 1st floor zgl7903 response:
in the mathematics of the bezier

Post I watched a lot, still do not understand, may be I not mathematical foundation, is no on the junior high school graduation, a great god can give an algorithm?

CodePudding user response:

PolyBezier


CodePudding user response:

The
reference 3 floor zgl7903 response:
PolyBezier

You don't have a serious look at my description? I need not draw curve, not need survival curve, I need to specify the four points x and y values, into the y value of x value and the corresponding
As shown in figure:

CodePudding user response:

calculated by the given point, the Bezier curve

CodePudding user response:

See:
The application of the third order Bessel curve Interpolator

CodePudding user response:

T - & gt; Time ratio rate density etc...
Bezier curve is not a point, but o n the linear combination of equation,
X, y & gt; A linear combination of the x + y,
Bessel equation has nothing to do with n, it is independent of the equation, so can't through the x and y,

CodePudding user response:

For example: x=a, x1=a1

The bezier:

X1 | | x +=(x1 - x) (1 - t) ^ n + n (x1 - x) t ^ 0 +... + (x1) x (1 - t) ^ (n - 1) + n (x1 - x) t ^ (n + 1)=P (x)

CodePudding user response:

I met the same problem, just search in this post, I want to see

Formula p (t)=(1 - t) ^ 3 * (P1 + 3 t ^ 2 * (1 - t) P2 t ^ 2 + 3 (1 - t) * * P4 P3 + t ^ 3 is used to draw curves, the purpose of a range of [0, 1] is t,
Such as when t=0.5, p (t) may be (=0.2 x, y=0.8)
I want to know is when x=0.2, and y=0.8
Because the formula of p (t)=(1 - t) ^ 3 * (P1 + 3 t ^ 2 * (1 - t) P2 + 3 t ^ 2 * (1 - t) P3 + t ^ 3 * P4 can be divided into two, respectively is
Coordinates formula of point x x (t)=(1 - t) ^ 3 * X1 + 3 t ^ 2 * (1 - t) t ^ 2 X2 + 3 X3 (1 - t) * + t ^ 3 * X4
Y coordinates formula of Y (t)=(1 - t) ^ 3 * Y1 + 3 t ^ 2 * (1 - t) Y2 t ^ 2 + 3 (1 - t) * Y3 + t ^ 3 * Y4

, according to the x coordinates formula into x (t)=0.2, because the X1, X2, X3, x, 4 known, is a three degree univariate polynomial equation can work out how much t equals.
The t value into the Y coordinates formula to calculate Y (t)

I haven't verify

  • Related