SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

Smooth Curves

In life, one often feels the urge to connect line segments with smooth curves. (Even if you don't, please assume for the sake of this discussion that you do.)

Connecting them with line segments does not result in smooth endpoints, so I think a degree of at least 2, like a parabola, is necessary, but is it always possible to connect them with a parabola?

Here, I will show that it is possible to connect them with a cubic polynomial.

Determining the Cubic Function

Consider connecting y=0 (x<0) and y=α(x-w)+h (x>w, w>0) smoothly. The latter is a ray passing through (w, h) (w>0) with a slope of α at that point.

We will determine the coefficients of f(x)=ax^3+bx^2+cx+d.

First, since y=f(x) passes through the origin, f(0)=0, which means d=0.

We have f'(x)=3ax^2+2bx+c. Since the slope at the origin must be 0, f'(0)=0, which means c=0.

Then, since y=f(x) passes through (w, h) and the slope there is α, we obtain h=aw^3+bw^2 and α=3aw^2+2bw.

From these two equations, we can rearrange them as wα-2h=aw^3 and bw^2=3h-wα, so

$$
a=\frac{w\alpha-2h}{w^3}, b=\frac{3h-w\alpha}{w^2}
$$

we can determine the coefficients. Therefore,

$$
y=\left(\frac{w\alpha-2h}{w^3}\right)x^3+\left(\frac{3h-w\alpha}{w^2}\right)x^2
$$

we can see that a part of this curve is a smooth curve connecting the two line segments.

The condition for it to be a parabola is

The coefficient of the cubic term is wα-2h, and when this is 0, w:h=2:α. When this condition is satisfied, the two rays can be connected by a parabola passing through the origin.

For example, considering the case where h<0, we can see that the above condition is necessary and sufficient to catch a marble sliding horizontally in the positive direction on y=0 (x<0) and falling freely without making a sound.

Conversely, it can be seen that if the rays are tilted or shifted so that the above condition is not met, the marble will make a clicking sound when it lands.

Summary

Through these calculations, it was found that a cubic function can be used to connect rays smoothly. Here, I only considered the case where the angle of the ray is -90°<θ<90°, but since rays with larger angles can be connected by rotating and translating the rays and preparing cubic functions multiple times, I did not consider those cases.

いいなと思ったら応援しよう!

この記事が参加している募集