Calculation of cubic Bezier with a known half-life point

I know:

  • Control points a and d (start and end points of a two-dimensional cubic bezier curve)

  • Slopes a-> b, c-> d and b-> c (b, c are other control points)

  • Where is the intermediate point of the Bezier curve .

Now, given this information, what is the formula for the positions of the control points b and c?

+5
source share
2 answers

I know this question is out of date, but there is no right or complete answer, so I thought that I would call you back with a solution. Please note that David’s calculations contain several errors, and his solution is incomplete, even if these errors are fixed.

T0, T1 T2, :

T0 = ( b - a ) / u0
T1 = ( c - b ) / u1
T2 = ( d - c ) / u2

, , u0, u1 u2. , u0, u1 u2 - . , , u0, u1 u2 , .

, . :

b = a + T0*u0
c = b + T1*u1
d = c + T2*u2

, " " . , , . p:

p = ( a + 3*b + 3*c + d ) / 8

:

b + c = ( 8*p - a - d ) / 3

b c . , , T0, T1 T2. .

1: T0 T1

b = a + T0*u0 c = a + T0*u0 + T1*u1 u0 u1:

2*T0*u0 + T1*u1 = ( 8*p - 7*a - d ) / 3

, T0 T1 - . u0 u1 b = a + T0*u0 c = a + T0*u0 + T1*u1, b c.

2: T1 T2

c = d - T2*u2 b = d - T2*u2 - T1*u1 u1 u2:

T1*u1 + 2*T2*u2 = ( a + 7*d - 8*p ) / 3

3: T0 T2

b = a + T0*u0 c = d - T2*u2 u0 u2:

T0*u0 - T2*u2 = ( 8*p - 4*a - 4*d ) / 3

4: T0, T1 T2

a, b, c d , T0, T1 T2 . . b, u0 = 1:

b = a + T0
(a + T0) + c = ( 8*p - a - d ) / 3
c = ( 8*p - 4*a - d - 3*T0 ) / 3

. , b c c b.

3D

, , p . u0, u1 u2:

T0*u0 + T1*u1 + T2*u2 = d - a

( - 3D) (u0, u1 u2). b = a + T0*u0 c = b + T1*u1 c = d - T2*u2 b c.

+2

, , u, v

u * slope(a->b)+a = b, v * slope(c->d)+d = c

a, d q:=(a+b+c+d)/8 ( ) c = 8(q-a-d-b)

,

v * slope(c->d)+d = 8(q-a-d-a-u * slope(a->b))

2 ( 2d) (u, v)

.

+1

All Articles