Inkscape tutorial: 補間

Inkscape

Tutorial | 補間

このドキュメントは Inkscape の補間エクステンションの使い方について説明しています。

はじめに

補間エクステンションは 2 つ以上の選択パスの間に対して線形補間を行います。これはすなわち、パスとパスの間の「隙間を埋める」、および指定されたステップ数に従ってそれらを変形することを意味します。

To use the Interpolate extension, select the paths that you wish to transform, and choose ExtensionsGenerate From PathInterpolate Between Paths from the menu.

Before invoking the extension, the objects that you are going to transform need to be paths. This is done by selecting the object and using PathObject to Path or Ctrl+Shift+C. If your objects are not paths, the extension will do nothing.

2 つの同じ形状のパス間の補間

補間エクステンションの最も簡単な使い方は、同じ形状の 2 つのパスの間を補間することです。このエクステンションが実行されると、2 つのパスの間のスペースがオリジナルのパスの複製で埋められます。何個の複製を配置するかはステップ数で指定します。

例えば、以下のパスに注目してください:

この 2 つのパスを選択し、イメージの下に表示されている設定で補間エクステンションを実行してみましょう。

上図のように、2 つの円形のパスの間のスペースが 6 (補間のステップ数) 個の複製された円形のパスで埋められます。これらの図形はグループ化されることも覚えておいてください。

2 つの異なるパス間の補間

補間が 2 つの異なる形状のパスに対して実行されたとき、プログラムはそれぞれのパスの形状も補間します。その結果はパスとパスの間を指定された補間のステップ数の規則性でモーフィングしたものになります。

例えば、以下のパスに注目してください:

2 つのパスを選択し補間エクステンションを実行してみましょう。以下のような結果になるはずです:

上図のように、円形のパスと三角形のパスの間のスペースが 6 個の、一方から他方への形状が変化するパスで埋められます。

2 つの異なる形状のパスに対して補間エクステンションを使用するとき、各パスの始点ノードの位置が重要です。パスの始点ノードを確認するには、パスを選択し、ノードツールを選択します。ノードが表示されますので、TAB を押してください。最初に選択されたノードがパスの始点ノードです。

以下のイメージを見てください。上の例と同じパスでノードが表示されています。緑色のノードがそれぞれの始点ノードです。

上の例 (以下にもう一度示します) はそれらが始点ノードであることによる結果です。

三角形のパスを水平に反転させ、始点ノードの位置を変えると、補間の結果は以下のように変化します:

補間方式

One of the parameters of the Interpolate extension is the Interpolation Method. There are 2 interpolation methods implemented, and they differ in the way that they calculate the curves of the new shapes. The choices are either Split paths into segments of equal lengths or Discard extra nodes of longer path.

In the examples above, we used the first Interpolation Method (Split paths), and the result was:

Now compare this to Interpolation Method 2 (Ignore nodes):

これら補間方式の計算方法の違いについての説明はこのドキュメントでは割愛します。各方式を試し、あなたが期待した結果に最も近いものを使用してください。

指数

The exponent parameter controls the spacing between steps of the interpolation. An exponent of 1 makes the spacing between the copies all even.

Here is the result of another basic example with an exponent of 1.

The same example with an exponent of 0.5:

with an exponent of 0.3:

and with an exponent of 1.5:

補間エクステンションで指数を使用する場合、オブジェクトを選択した順番が重要になります。上の例では、左の星形のパスが最初に選択され、右の六角形のパスが次に選択されています。

View the result when the path on the right was selected first. The exponent in this example was set to 0.5:

終端パスを複製する

このパラメーターはエクステンションでパスのグループを生成する際に補間が適用されるオリジナルのパスの複製も生成するかどうかを指定します。

スタイルを補間する

このパラメーターは補間エクステンションの賢い機能の一つです。この機能は各ステップごとにスタイルの変更を試みます。最初のパスと最後のパスの色が異なる場合、生成されるパスの色も徐々に変化します。

以下はパスのフィルにスタイルの補間機能が適用された例です:

スタイルの補間はパスのストロークに対しても作用します。

もちろん、始点および終点のパスは同じ形状でなくても構いません。

補間を利用して不規則な形状のグラデーションぽく見せる

At the time when gradient meshes were not implemented in Inkscape, it was not possible to create a gradient other than linear (straight line) or radial (round). However, it could be faked using the Interpolate extension and Interpolate Style. A simple example follows — draw two lines of different strokes:

そしてそれらの線の間を補間すると、グラデーションのようになります:

最後に

ここまで紹介したように、Inkscape の補間エクステンションは強力なツールです。このチュートリアルでは本エクステンションの基本的な部分にしか触れていませんが、自分で触ってみることこそが補間についてより深く知る最も良い手段となるでしょう。

Authors: Josh Andler; Ryan Lerch; Colin Marquardt; Kris De Gussem; Nicolas Dufour; Sylvain Chiron; Gellért Gyuris; Maren Hachmann

Translators: Masato Hashimoto — 2010

Header / footer design: Esteban Capella — 2019