マイターそのストレートスケルトンを使用してポリゴンのオフセットを計算する方法

solub:

私はPythonで実装ストレートスケルトンアルゴリズムを持っており、ポリゴンのエッジをオフセットするためにそれを使用したいと思います。

ここでは、画像の説明を入力します。

私は、この相殺アプローチ残念ながらそれらのどれもがそれを達成する方法についての具体的な情報を提供していないことを示唆いくつかの論文を見てきました。その中で:

ストレート骨格の非常に定義はエッジの連続波面またはgrassfire伝播に基づいているので、特別ポリゴン相殺するのに適しています。特に、いわゆるコーナーオフセット多角形においてそのようなものとして残る相殺された「留め継ぎ」を得るために使用することができます

Pの骨格が既に知られている場合、任意の所与の半径Rの単一オフセット曲線の計算が簡単、効率的(線形時間)と数値的に安定しています。すべての一つが関係しているスケルトンを横断するある 特定の方法で、オフセットカーブの要素によって要素を挿入します。

私は彼らの周囲「骨」にオフセットを制約するために、各エッジに対して試みたが、出力が十分でないことがわかった:いくつかのオフセットが一致せず、私は線が互いに接触しなければならないギャップを参照します。

ここでは、画像の説明を入力します。

(高品質のここ

ここでは、画像の説明を入力します。

質問:マイターそのストレートスケルトンを使用してポリゴンのオフセットを計算するための正しい方法は何ですか?

イタチ - ピーターPalfraderさん:

I'm not exactly sure what is going on with the offsets you show in your second image, however it should be quite straight forward to compute the offsets once you have the skeleton.

Each arc of the skeleton can be seen as a line segment (or ray) in 3space, with the 3rd coordinate being time. That is, it starts at some time t_s (when it was created in an event or as an initial wavefront vertex that is incident to an input point) and ends at some time t_v (if it is a bounded edge) in some wavefront event.

Now, to find an offset curve of distance t, iterate over all arcs, and for each arc you have not yet visited that exists at time t (i.e. t_s < t < t_e), start an offset segment in one of the two incident faces. Let this arc be a.

The question, of course, then is where does this segment end. To find its endpoint, walk along the straight skeleton face, initially moving along the direction of the wavefront propagation. That is, the next arc you look at is incident to a at t_e of a. Walk along the face until you find another arc, a', that is alive during t. This is where your segment stops. If you have not seen a' before, then there is another offset segment on the other side of a' that you can find in the same way.

Once you have looked at all the arcs of the straight skeleton, you will have a set of line segments that represents your offset curve(s) at time t.

This might be what you're trying to do, but it's not exactly clear from your animation.

また、スケルトンあなたは(アニメーションので、それは、見えにくいです)正しいように見えますを示して、あなたのオフセットセグメントはまっすぐスケルトン弧を横断表示されます。各セグメントオフセットは、常に正確に1つの直線骨格面に限定されるべきである(それはに入射し、この面を放った入力エッジに平行であろう)。

また、参照 P.および開催:ストレートスケルトン(CADA、12(4)、2015)に基づいて計算マイターオフセットカーブ

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=14127&siteId=1