Kubische Kurve durch zwei Punkte

Pass a cubic curve through two points with two parameters to choose

The topic

Before starting the disussion of splines, I write about a curve between two points which corresponds to one spline segment.

A cubic curve - polynomial function of degree 3 - is determined by the four coefficients a, b, c, d with

f(x) = a + bx + cx2 + dx3

Constraints

With two points P0 = (x0,y0) und P1 = (x1,y1) given, the first two constraints are outright

a + bx0 + cx02 + dx03 = y0  I
a + bx1 + cx12 + dx13 = y1II

For an equation system to be determined, two more constraints are required. For example, one of the following pairs:

  1. Slopes m0 and m1 at the two points:
    b + 2cx0 + 3dx02 = m0, b + 2cx1 + 3dx12 = m1
  2. Slope at m0 and curvature u0 at point P0:
    b + 2cx0 + 3dx02 = m0, 2c + 6dx0 = u0
  3. Curvatures u0 und u1 at the two points:
    2c + 6dx0 = u0, 2c + 6dx1 = u1

Case 3: Curvatures at the two points

The two constraints for the curvatures may be put together with the first two constraints for y0 und y1 into an equation system:

y0 = a + bx0 + cx02 + dx03I
y1 = a + bx1 + cx12 + dx13  II
u0 = 2c + 6dx0III
u1 = 2c + 6dx1IV

Determining the curvature change v is easiest done by considering the difference IV - III of the curvatures at the points:

u1 - u0 = 6d(x1 - x0)IV - III
d = (u1 - u0)/6(x1 - x0)   

Using either equation III or IV allows to determine c, then b by using II-I:

y1 - y0 = b(x1 - x0) + c(x12 - x02) + d(x13 - x03)II-I
b = ((y1 - y0) - c(x12 - x02) - d(x13 - x03))/(x1 - x0)   

finally a is determined using either equation I or II.

Graphs

The possibility above and two more to determine a curve of 3rd order at two points are shown in the graphic below:

 

Comments and Responses

×

Name is required!

Enter valid name

Valid email is required!

Enter valid email address

Comment is required!

Comments :

  • user
    tZLOlQreJMeMxB 21/11/2024 At 01:01
  • user
    zYxVtDNtrYPRay 15/11/2024 At 07:50
  • user
    NKapkFfux 09/11/2024 At 14:24
  • user
    lVaFrXsW 08/11/2024 At 18:28
  • user
    JTWrqXcfubW 03/11/2024 At 15:21
  • user
    QVlfofVpEsZ 28/10/2024 At 07:03
  • user
    AVDSTozVH 25/10/2024 At 04:58
  • user
    LyWOvjhK 16/10/2024 At 16:13
Top