Let's start with a very basic but powerful way of thinking about curves. One of the most common ways that curves occur in the physical world is through cumulative motion or buildup, meaning a point starts moving from one location and changes its course over time. This can include freehand drawing, paths followed by insects, animals, vehicles, and the growth patterns of plants and other organisms.
曲線について考える非常に基本的ながら強力な方法から始めましょう。物理的な世界で曲線が生まれる最も一般的な形の1つは、累積的な運動や蓄積、つまり何かがある地点から動き始め、時間とともにその進路を変えながら進んでいくことです。これにはフリーハンドの描画、昆虫、動物、車両が辿る経路、または植物や他の生物の成長パターンなどが含まれます。
Applying this to computer graphics, we can create infinite varieties of curves by tracing the movement of a point and defining how the direction (velocity) changes as it progresses.
この考え方をコンピュータグラフィックスに応用すると、点が進むにつれどのように向き(速度)を変化させるかを決め、その動きを追跡することで、無限の種類の曲線を作ることができます。
<aside> 💡 Note that velocity here is a vector, which has both magnitude and orientation. ここでの速度は、大きさ方向の両方を持つベクトルです。 Velocity 速度
</aside>
積み重ねによる円
The demo below is a simple example of a point moving with a changing velocity. The velocity vector starts from pointing to the right and changes direction every frame at the same rate, resulting in an arc that eventually forms a circle.
下のデモは、移動するにつれ速度を変える点のシンプルな例です。速度のベクトルは最初は右を向いていて、フレームごとに同じ割合で向きを変えて行きます。これは結果として弧を描き、円を形作ります。
https://codepen.io/kynd/pen/qBGjrBg?editors=0010
<aside> 💡 It is technically impossible to create a perfectly smooth curve on a computer because it is digital. The example above moves the position by discrete steps, meaning the curve is an accumulation of very short line segments at the code level (see Continuous Time and Discrete Time). On the screen, the line is a collection of tiny pixels. But for our purposes, it is good enough as long as it appears smooth.
コンピュータはデジタルなので、完全に滑らかな曲線を作成することは技術的に不可能です。上記の例では、位置を離散的なステップで移動させています。つまり曲線はコード上では非常に短い線分の積み重ねとして表現されています(連続的な時間とバラバラな時間を参照)。画面上での線は小さなピクセルの集合体になりますが、見た目に滑らかであればここでの目的には十分です。
</aside>
積み重ねによる螺旋
This example is similar to the circle but increases the magnitude of the velocity at a constant rate. The result is a beautiful spiral.