JP3425760B2 - Interference check device - Google Patents

Interference check device

Info

Publication number
JP3425760B2
JP3425760B2 JP00171899A JP171899A JP3425760B2 JP 3425760 B2 JP3425760 B2 JP 3425760B2 JP 00171899 A JP00171899 A JP 00171899A JP 171899 A JP171899 A JP 171899A JP 3425760 B2 JP3425760 B2 JP 3425760B2
Authority
JP
Japan
Prior art keywords
convex
interference
spheres
interference check
sphere
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP00171899A
Other languages
Japanese (ja)
Other versions
JPH11250122A (en
Inventor
裕一 佐藤
光徳 平田
次人 丸山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP00171899A priority Critical patent/JP3425760B2/en
Publication of JPH11250122A publication Critical patent/JPH11250122A/en
Application granted granted Critical
Publication of JP3425760B2 publication Critical patent/JP3425760B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
    • A63F2300/643Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car by determining the impact between objects, e.g. collision detection

Landscapes

  • Numerical Control (AREA)
  • Processing Or Creating Images (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は非凸多面体である2つの
物体間の干渉チェック装置に係わり、特に、コンピュー
タ上に構築されたCGモデルに対してそれらが互いに離
れているか、干渉しているかを計算機上にて判定し、物
体間の最近点、干渉点、最近点距離をリアルタイムに算
出する干渉チェック装置に関する。本発明は、機構設計
用CADシステム、マニピュレータや自走車等の移動ロ
ボットのパス生成、マルチメディアにおけるアニメーシ
ョン作成、ゲームソフト等、コンピュータグラフィック
スを応用した様々な分野に適用できるものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a device for checking interference between two objects which are non-convex polyhedrons, and in particular whether they are apart from or interfere with each other with respect to a CG model constructed on a computer. The present invention relates to an interference check device for determining in real time the closest point between objects, the interference point, and the distance between the closest points. INDUSTRIAL APPLICABILITY The present invention can be applied to various fields to which computer graphics are applied, such as a CAD system for mechanical design, path generation of mobile robots such as manipulators and self-propelled vehicles, animation creation in multimedia, game software and the like.

【0002】[0002]

【従来の技術】グラフィックコンピュータ上に物体のC
Gモデル(物体形状を定めるポリゴン集合)が複数個、
構築されている場合、任意の凹凸を持ったCGモデルが
互いに離れているか干渉しているかを判定し、離れてい
る場合には物体間の最近点を、干渉している場合には干
渉点を、リアルタイムに算出することが望まれている。
尚、一般に、グラフィックコンピュータ上のCGモデル
に限らず、物体の数学モデル(物体を定義する3次元頂
点座標、稜線集合、面集合)が与えられた時、数学モデ
ル間の最近点/干渉点を求める問題を「最近点探索問
題」という。かかる最近点探索問題に対する基本的なア
プローチは、対象となる物体の形状、位置、姿勢データ
を計算機上に取り込み、初等幾何学的計算により解決す
る方法である。通常、CAD分野で使われているグラフ
ィックシュミレータでは、平面的な凸多角形(凸ポリゴ
ン)を複数枚張りつけて一つの物体を表現している。従
って、二つの物体間の干渉状態をチェックする最も素朴
な方法は、各々の物体を構成しているポリゴン間の干渉
チェックを全てのポリゴンの組合せについて行うもので
ある。具体的には、空間上に任意に配置された二つのポ
リゴンに対し、最も近接しているポイントを各格子点、
辺、面について探索し、最接近距離を算出することであ
る。勿論、最接近距離がゼロならば、二つのポリゴン間
は干渉状態にあるということである。この方法では、二
つの物体を表現している格子点数をM1,M2としたとき
にO(M1・M2)の計算負荷を伴い、リアルタイム性が
失われていた。
2. Description of the Related Art C of an object on a graphic computer
Multiple G models (polygon sets that define the shape of an object),
When constructed, it is determined whether or not CG models having arbitrary irregularities are apart from or interfering with each other. If they are apart, the nearest point between objects is determined, and if they are interfering, the interference point is determined. It is desired to calculate in real time.
Generally, not only a CG model on a graphic computer, but when a mathematical model of an object (three-dimensional vertex coordinates defining an object, edge set, face set) is given, the closest point / interference point between mathematical models is calculated. The problem to be sought is called the "closest point search problem". The basic approach to such a closest point search problem is a method in which the shape, position, and orientation data of the target object are loaded into a computer and solved by elementary geometric calculation. Generally, in a graphic simulator used in the CAD field, a plurality of planar convex polygons (convex polygons) are attached to represent one object. Therefore, the simplest method of checking the interference state between two objects is to check the interference between the polygons forming each object for all combinations of polygons. Specifically, for the two polygons arbitrarily placed in space, the points closest to each polygon point are
This is to search for edges and faces and calculate the closest approach distance. Of course, if the closest distance is zero, it means that the two polygons are in an interference state. In this way, with the computational load of O (M 1 · M 2) the number of grid points that represent the two objects when the M 1, M 2, real-time has been lost.

【0003】一方、歴史的には、各格子点間の垂直二等
分線を結んで各格子点の近接関係を図示するVoronoi図
を使った方法や、三次元空間を象限ごとに次々に八等分
して対象の専有領域をデータベース化するオクトツリー
の方法による最近点の探索法も知られているが、これら
の方法は何れも対象が静的に一定である場合に有効であ
り、分解や組み立てなどにより対象が動的に次々と変化
していく場合には不向きであった。ロボテックスの分野
では、Boblow法、Lin/Canny法、Gilbert法が高速な干渉
チェックアルゴリズムとして知られており、何れもO
(N)(N:対象の総格子点数)以下の計算時間で最近
点を算出することができる。しかしながら、これらの方
法を適用できる対象は何れも凸多面体(Gilbert法では
楕円体などの二次凸曲面を持った物体にも適用可能)に
限られている。
On the other hand, historically, a method using a Voronoi diagram, which connects the perpendicular bisectors between the grid points to illustrate the proximity of the grid points, or a three-dimensional space is divided into eight quadrants one after another. Although the nearest point search method by the Octtree method that divides the occupied area of the target into a database is also known, these methods are all effective when the target is static and constant. It was unsuitable when the target dynamically changed one after another due to assembly or assembly. In the field of robotics, Boblow method, Lin / Canny method, and Gilbert method are known as high-speed interference check algorithms.
(N) The closest point can be calculated in a calculation time of (N: total number of target grid points) or less. However, the targets to which these methods can be applied are limited to convex polyhedrons (the Gilbert method can also be applied to objects having quadric convex surfaces such as ellipsoids).

【0004】Pro/Engineer等の市販の三次元CADシス
テムを使って設計される形状データは、殆どの場合にお
いて非凸物体であり、そのため、部品間の干渉チェック
を行うのに、Boblow法、Lin/Canny法、Gilbert法等のリ
アルタイム性を有する方法は適用されず、もっぱら、部
品を構成するポリゴンに関して総当たり的に干渉チェッ
クを行う方法(総当たり法)や形状を定義する方程式を解
析的に時間を掛けて解く方法が取られていた。非凸多面
体間の干渉チェックとしては、多面体を階層的に並べた
球の集合で覆い、球間の干渉チェックを行うことにより
最も接近しているポリゴン間の組合わせを求め、Gilber
t法を適用するQuinlan法が知られている。この方法は、
任意の非凸多面体に適用できる極めて一般的方法である
が、厳密に2物体間の距離を求めようとすると探索空間
が増え、計算時間が極端に長くなる欠点を有している。
The shape data designed by using a commercially available three-dimensional CAD system such as Pro / Engineer is a non-convex object in most cases. Therefore, the Boblow method and Lin method are used to check the interference between parts. Methods that have real-time properties such as the / Canny method and Gilbert method are not applied, and the method that performs a brute force interference check on the polygons that make up parts (brute force method) and the equation that defines the shape are analyzed analytically The method of taking the time to solve was taken. As a collision check between non-convex polyhedrons, the polyhedron is covered with a set of spheres arranged in a hierarchical manner, and the interference check between spheres is performed to find the combination between the closest polygons.
The Quinlan method applying the t method is known. This method
This is a very general method that can be applied to any non-convex polyhedron, but it has the drawback that the search space increases and the calculation time becomes extremely long if the distance between two objects is to be determined exactly.

【0005】[0005]

【発明が解決しようとする課題】従来の干渉チェック方
法では、リアルタイムに非凸多面体が互いに干渉してい
るかを判定し、離れている場合には物体間の最近点を、
干渉している場合には干渉点を算出できない問題があっ
た。以上から本発明の目的は、高速に非凸多面体間の干
渉チェックを行うことである。本発明の別の目的は、干
渉チェックの前処理である凸包の生成、近接点線形リス
ト、階層球の生成を効率良く、高速に行うことである。
本発明の更に別の目的は、非凸多面体同士がかなり接近
している場合の干渉チェックをBubble Collision法を用
いて高速に行い、しかも、物体静止時の干渉チェックを
効率的に行うことである。
In the conventional interference check method, it is determined in real time whether non-convex polyhedrons interfere with each other, and if they are far apart, the closest point between the objects is determined.
When there is interference, there is a problem that the interference point cannot be calculated. From the above, an object of the present invention is to perform interference check between non-convex polyhedrons at high speed. Another object of the present invention is to efficiently and rapidly generate a convex hull, which is a pre-process for an interference check, a nearby point linear list, and a hierarchical sphere.
Still another object of the present invention is to perform interference check when non-convex polyhedrons are very close to each other at high speed by using the Bubble Collision method, and to efficiently perform interference check when the object is stationary. ..

【0006】[0006]

【課題を解決するための手段】図1は本発明の原理説明
図である。1は非凸多面体の形状データより非凸多面体
を包絡する最小の凸多面体(凸包:convex hull)を生成
する凸包構成部、2は凸包の近接点線形リストを作成す
る近接点線形リスト作成部、3は非凸多面体を構成する
ポリゴン上に所定半径の複数の球(リーフ球)を配列し
て各ポリゴンを覆い、該球を階層球で順次包絡し、階層
包絡球の2分木ツリーを生成する階層包絡球2分木ツリ
ー生成部、4は生成された凸包、近接点線形リスト、2
分木ツリーのデータを記憶する記憶部、5はGilbert法
等に基づいて凸包間の干渉チェックを行う凸包間干渉チ
ェック部、6は2分岐ツリー構造に基づいて、上位階層
の包絡球同士の干渉チェックを行い、干渉する上位階層
の包絡球を、該包絡球を構成する下位階層の包絡球に分
解し、下位階層の包絡球について干渉チェックを行い、
以後干渉しなくなるまで前記包絡球の分解及び干渉チェ
ック処理を行って、近接球のペアを求め、該近接球のペ
アに応じたポリゴンのペアを近接ポリゴンのペアとして
求めるバブルコライジョン法実行部、7は近接ポリゴン
ペア間の干渉チェックを行うポリゴンペア間干渉チェッ
ク部である。
FIG. 1 is a diagram for explaining the principle of the present invention. 1 is a convex hull constituent that generates the smallest convex polyhedron (convex hull) that envelops the non-convex polyhedron from the shape data of the non-convex polyhedron. 2 is a near-point linear list that creates a near-point linear list of the convex hull. The creating unit 3 arranges a plurality of spheres (leaf spheres) having a predetermined radius on polygons forming a non-convex polyhedron, covers each polygon, sequentially envelopes the spheres with hierarchical spheres, and a binary tree of hierarchical envelope spheres. A hierarchical envelope sphere binary tree tree generator that generates a tree, 4 is a generated convex hull, a near-point linear list, and 2
A storage unit for storing the data of the branch tree, 5 is an interference check unit between convex hulls for checking interference between convex hulls based on the Gilbert method, and 6 is an envelope sphere of upper layers based on a two-branch tree structure. The interference check of the, the envelope sphere of the interfering upper layer is decomposed into the envelope sphere of the lower layer constituting the envelope sphere, and the interference check is performed on the envelope sphere of the lower layer,
After that, the envelope sphere is decomposed and the interference check process is performed until it does not interfere with each other, a pair of close spheres is obtained, and a bubble correlation method execution unit that finds a pair of polygons corresponding to the pair of close spheres as a pair of close polygons, Reference numeral 7 denotes an inter-polygon-interference check unit that performs an interference check between adjacent polygon pairs.

【0007】[0007]

【作用】(a) 干渉チェック高速前処理 非凸多面体の干渉チェックを高速に実行するには、凸包
や近接点線形リストの生成、階層球による物体の包絡の
ための前処理を実行する必要がある。本発明において
は、凸包構成部1、近接点線形リスト作成部2、階層球
2分木ツリー生成部3が干渉チェック高速前処理によ
り、それぞれ凸包、近接点線型リスト、階層球2分木ツ
リーを生成する。これにより、頂点数N個の任意の非凸
多面体CGモデルに対して、Nlog Nの時間で凸包、凸
包間連続探索のための近接点線形リストを生成でき、更
に、バブルコライジョン法(Bubble Collision法)のため
の「階層球による物体の包絡」を行うことができる。
[Operation] (a) High-speed pre-processing of interference check In order to execute high-speed interference check of a non-convex polyhedron, it is necessary to generate a convex hull and a near-point linear list, and perform pre-processing for enveloping an object with a hierarchical sphere. There is. In the present invention, the convex hull construction unit 1, the proximity point linear list creation unit 2, and the hierarchical sphere binary tree tree generation unit 3 perform the interference check high-speed preprocessing to respectively perform the convex hull, the proximity dotted linear list, and the hierarchical sphere binary tree. Generate a tree. As a result, for an arbitrary non-convex polyhedron CG model with N vertices, it is possible to generate a near point linear list for continuous search between convex hulls and convex hulls in N log N time, and further, the bubble collision method ( "Envelopment of objects by hierarchical sphere" for Bubble Collision method) can be performed.

【0008】1) 干渉チェック高速前処理(凸包構
成):非凸多面体の凸包を生成し、該凸包と他の物体間
の干渉チェックを行い、干渉し始めた時、凸包を解除し
て前記非凸多面体と他の物体間の干渉チェックを行う干
渉チェック方法において、凸包構成部1は、非凸多面体
を構成する頂点を、第1軸(例えばX軸)の座標値の差
が零あるいは微小量ε以内の複数の頂点群に分割し、各
頂点群について第2−第3軸平面(例えばYZ平面)上
で2次元凸包を生成し、隣接する2次元凸包を併合して
3次元凸包を生成し、以後、隣接する3次元凸包を順次
併合して目的とする非凸多面体の凸包を生成する。
1) High-speed pre-processing of interference check (convex hull construction): Generate a convex hull of a non-convex polyhedron, check the interference between the convex hull and another object, and release the convex hull when interference starts. Then, in the interference check method for checking the interference between the non-convex polyhedron and another object, the convex hull forming unit 1 sets the vertices forming the non-convex polyhedron to the difference in the coordinate values of the first axis (for example, the X axis). Is divided into a plurality of vertex groups within zero or a small amount ε, a two-dimensional convex hull is generated on the second to third axis planes (for example, YZ plane) for each vertex group, and adjacent two-dimensional convex hulls are merged. Then, a three-dimensional convex hull is generated, and thereafter, adjacent three-dimensional convex hulls are sequentially merged to generate a desired convex hull of a non-convex polyhedron.

【0009】2) 干渉チェック前処理(近接点線形リス
ト):この前処理は、凸多面体同士の干渉チェックにお
いて、最近点を連続的に探索していくための前処理であ
り、この処理を施しておくことにより最近点の連続探索
が極めて高速化される。近接点線形リストとは、CGモ
デルを構成する各頂点に対し、その頂点と稜線を介して
繋がっている他の頂点とを線形リストで繋ぐデータ構造
のことである。リストの先頭から順次辿ることにより、
その頂点に繋がる全ての近接点を拾いだすことができ
る。すなわち、近接点線形リスト作成部2は、凸包を構
成する全三角ポリゴンの頂点を第1方向(next方向)に
リンクし、各頂点にポリゴン辺を介して繋がる頂点群を
第2の方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストを作成して出力す
る。本前処理は、凸包構成の処理に引き続いて行われる
ところに特徴がある。
2) Pre-processing for interference check (near point linear list): This pre-processing is a pre-processing for continuously searching for the closest point in the interference check between convex polyhedrons. By doing so, the continuous search of the closest points is extremely speeded up. The close point linear list is a data structure in which each vertex forming a CG model is connected to the other vertex connected to the vertex via an edge by a linear list. By sequentially tracing from the beginning of the list,
You can pick up all the proximate points connected to that vertex. That is, the adjacent point linear list creation unit 2 links the vertices of all triangular polygons forming the convex hull in the first direction (next direction), and the vertex group connected to each vertex via the polygon side in the second direction ( A proximity point linear list having a data structure linked to the vertex in the branch direction) is created and output. This pre-processing is characterized in that it is performed subsequent to the processing of the convex hull configuration.

【0010】3) 干渉チェック高速前処理(近接点線形リ
スト結果のダンプ、およびそれらの高速ローディン
グ):近接点線形リストの結果をダンプし、それらのダ
ンプファイルをメモリ上に高速ローディングする。前処
理を施していないCGモデルに対しては、凸分解、近接
点形リスト生成処理を施すが、一旦、近接点線形リスト
を表現するファイルを作成した後は、このファイルから
高速ローディングを行ってメモリ上に展開する。これに
より、NポリゴンからなるCGモデルに対して、O
(N)の時間で近接点線形リストをメモリ上にの展開す
ることが可能となる。本処理は、凸包構成および近接線
形リスト構成の処理に引き続いて行われるところに特徴
がある。
3) High-speed pre-processing of interference check (dump of proximity point linear list results and their high-speed loading): The results of proximity point linear list are dumped and their dump files are loaded at high speed on the memory. Convex decomposition and proximity point list generation processing are performed on the CG model that has not been preprocessed. However, once a file expressing the proximity point linear list is created, high speed loading is performed from this file. Expand on memory. As a result, O is applied to the CG model consisting of N polygons.
In the time of (N), it becomes possible to expand the near point linear list on the memory. This processing is characterized in that it is performed subsequent to the processing of the convex hull structure and the close linear list structure.

【0011】4) 干渉チェック前処理(階層球による物
体の包絡):非凸多面体を構成する各ポリゴンを、該ポ
リゴン上に中心を持つ複数の球の組み合わせで覆い、そ
れらの球を包含する球を階層的に構成する。これによ
り、球間のチェックを階層的に行い最も接近した近接球
に応じたポリゴンの組み合せを高速に探索することが可
能となる。階層球の構成は、分割統治法で行われ、Nポ
リゴンからなるCGモデルに対して、O(NLog N)の
時間で処理が終わる。すなわち、階層球2分木ツリー生
成部3は、非凸多面体を構成するポリゴン上に所定半径
の複数の球(リーフ球)を配列して各ポリゴンを覆い、
分割統治アルゴリズムに従って該球を階層球で順次包絡
し、階層包絡球の2分木ツリー構造を生成する。この場
合、リーフ球の半径値を、非凸多面体を包含する球の半
径に応じた値にすると共に、非凸多面体のポリゴン数が
少ない場合には小さくし、ポリゴン数が多い場合には大
きくする。本処理とQuinlan法における階層球の構成法
の違いは、Quinlan法の階層球構成法がscan conversion
に類似した方法であるのに対し、本手法は、対象を覆う
ポリゴン数を考慮し、スケールSの値をパラメータとし
た効率的な球構成を行う。
4) Interference check preprocessing (envelope of object by hierarchical sphere): each polygon forming a non-convex polyhedron is covered with a combination of a plurality of spheres having a center on the polygon, and a sphere including those spheres. Are hierarchically configured. As a result, it becomes possible to check the spheres hierarchically and to quickly search for a combination of polygons according to the closest sphere. Hierarchical spheres are constructed by the division-and-conquer method, and a CG model composed of N polygons is processed in O (NLog N) time. That is, the hierarchical sphere binary tree generator 3 arranges a plurality of spheres (leaf spheres) having a predetermined radius on polygons forming a non-convex polyhedron to cover each polygon,
The sphere is sequentially enveloped by hierarchical spheres according to a division and conquest algorithm, and a binary tree tree structure of hierarchical envelope spheres is generated. In this case, the radius value of the leaf sphere is set to a value corresponding to the radius of the sphere including the non-convex polyhedron, and is decreased when the number of polygons of the non-convex polyhedron is small, and is increased when the number of polygons is large. . The difference between this processing and the Quinlan method is that the hierarchical sphere construction method of the Quinlan method is scan conversion.
In contrast to the method similar to, the present method considers the number of polygons covering the target and performs an efficient sphere configuration with the value of the scale S as a parameter.

【0012】5) 非凸多面体干渉チェックにおけるBubbl
e Collision法:非凸多面体間の干渉チェックを高速に
行うために、階層球2分木ツリー生成部3は各々の非凸
多面体を階層球で包絡し、包絡球からなるツリーを構成
する。バブルコライジョン実行部6は、球間の干渉チェ
ックをツリーに基づいてDepth-firstの探索法でチェッ
クしていき、最も接近する球のペアを検索する。近接ポ
リゴン間干渉チェック部7は、検索した球の中心が載っ
ているポリゴンの組み合わせに対してGilbert法を適用
することにより、二つの非凸多面体間の最近点を算出す
る。この場合、バブルコライジョン実行部6は、球間の
距離を以下により計算する。すなわち、バブルコライジ
ョン実行部6は、リーフ球とリーフ球間の距離をこれら
リーフ球の中心間距離とし、リーフ球と非リーフ球間の
距離をこれら球の中心間距離から非リーフ球の半径を差
し引いた距離とし、非リーフ球と非リーフ球間の距離を
これら球の中心間距離から両非リーフ球の半径を差し引
いた距離として計算する。本手法Quinlan法との違い
は、球間の距離の計算法にある。本手法では、球間の距
離を求めるに際し、その球が包絡球ツリーのどの深さに
あるかによって、球間の距離の定義を変更する。これに
より、Bubble Collision法で問題となっている、最終的
にチェックしなければならないポリゴンペアの数を抑え
ることができる。
5) Bubbl in non-convex polyhedron interference check
e Collision method: In order to perform the interference check between non-convex polyhedra at high speed, the hierarchical sphere binary tree tree generation unit 3 envelopes each non-convex polyhedron with hierarchical spheres to form a tree of envelope spheres. The bubble collision execution unit 6 checks the interference check between the spheres by the Depth-first search method based on the tree, and searches for the closest pair of spheres. The inter-adjacent-polygon interference check unit 7 calculates the closest point between two non-convex polyhedrons by applying the Gilbert method to the combination of polygons on which the center of the retrieved sphere is placed. In this case, the bubble collision executing unit 6 calculates the distance between the spheres as follows. That is, the bubble collision execution unit 6 sets the distance between the leaf spheres as the center-to-center distance between these leaf spheres, and the distance between the leaf sphere and the non-leaf sphere from the center-to-center distance between these spheres to the radius of the non-leaf sphere. And the distance between the non-leaf spheres is calculated as the distance between the centers of these spheres minus the radius of both non-leaf spheres. This method is different from the Quinlan method in the method of calculating the distance between spheres. In this method, when calculating the distance between spheres, the definition of the distance between spheres is changed according to the depth of the sphere in the envelope sphere tree. This makes it possible to reduce the number of polygon pairs that must be finally checked, which is a problem in the Bubble Collision method.

【0013】(b) Bubble collision法との融合 1) 凸多面体干渉チェックにおける凸包間連続型Gilbert
法と非凸多面体用Bubble Collision法の融合:非凸多面
体間の干渉チェックを出来るだけ無駄なく行うために、
非凸多面体間が充分離れている場合には、非凸多面体を
包含する凸包を構成し、凸包間に連続型Gilbert法を適
用する。凸包同士が干渉を始めたならば、Bubble Colli
sion法に自動的にスイッチする。スイッチングの指標
は、凸包間の距離とする。すなわち、凸包構成部1によ
り非凸多面体の凸包を生成し、非凸多面体間の距離が十
分離れている場合には凸包間干渉チェック部5により凸
包間の干渉チェックを行い、凸包同士が干渉し始めた
ら、バブルコライジョン実行部6によりBubble collisi
on法を適用して非凸多面体間の干渉チェックを行う。か
かる凸包間連続探索法と非凸多面体間の干渉チェックの
ためのBubble Collision法の融合(連続型 Bubble Colli
sion法)により、最近点を求めるに当たり、無駄な計算
が極力省かれる。
(B) Fusion with Bubble collision method 1) Continuous convex hull between convex hulls in convex polyhedron interference check
Method and Bubble Collision method for non-convex polyhedra: In order to check interference between non-convex polyhedra as efficiently as possible,
When the non-convex polyhedrons are sufficiently separated, a convex hull including the non-convex polyhedron is constructed, and the continuous Gilbert method is applied between the convex hulls. If the convex hulls start to interfere with each other, Bubble Colli
Switch to sion method automatically. The index of switching is the distance between the convex hulls. That is, the convex hull forming unit 1 generates a convex hull of a non-convex polyhedron, and when the distance between the non-convex polyhedrons is sufficiently large, the inter-convex hull interference checking unit 5 performs an interference check between the convex hulls, When the capsules start to interfere with each other, the bubble collisi
The on method is applied to check interference between non-convex polyhedra. Fusion of continuous search method between convex hulls and Bubble Collision method for checking interference between non-convex polyhedra (continuous Bubble Colli
By using the sion method), unnecessary calculation is eliminated as much as possible when finding the latest point.

【0014】2) 4次元Gilbert法:凸包間連続探索法か
ら非凸多面体用Bubble Collision法へスイッチングする
場合、またはその逆において、スイッチングの指標を凸
包間連続型Gilbert法により算出した距離である。凸包
間が干渉しだしたならば、距離を算出するアルゴリズム
を3次元連続型Gilbert法から4次元連続型Gilbert法に
スイッチングし、一方の凸包が他方の凸包に吸収された
場合においても矛盾無くスムースにスイッチングが行わ
れる。 3) メタツリーによる高速化:非凸多面体の集合におい
て、最も近接する非凸多面体のペアを高速に算出するた
めに、非凸多面体を包絡する球を構成し、この球を包含
する包絡球を階層的に構成することによるメタツリーを
構成する。非凸多面体間を総当たり的にチェックする代
わりに、メタツリーに基づいて包絡球間をdepth-first
の探索法でチェックしていき、最も接近する球のペアを
検索する。検索した球の中心が載る凸包間に連続型Gilb
ert法を適用することにより、最近点を効率よく算出す
る。本手法は、メタツリーの構成法、メタツリー間の干
渉チェックから連続型Gilbert法およびBubble Collisio
n法に移行する手法に特徴がある。
2) Four-dimensional Gilbert method: When switching from the continuous search between convex hulls to the Bubble Collision method for non-convex polyhedra, or vice versa, the switching index is the distance calculated by the continuous Gilbert method between convex hulls. is there. If the convex hulls start to interfere with each other, the algorithm for calculating the distance is switched from the 3-dimensional continuous Gilbert method to the 4-dimensional continuous Gilbert method, and even when one convex hull is absorbed by the other convex hull. Switching is performed smoothly and consistently. 3) Speedup by metatree: In a set of non-convex polyhedra, in order to calculate the closest pair of non-convex polyhedra at high speed, a sphere enclosing the non-convex polyhedron is constructed, and the envelope sphere including this sphere is hierarchized. A meta-tree by constructing it dynamically. Instead of brute force checking between non-convex polyhedra, depth-first between envelope spheres based on metatree
Check with the search method of to find the closest pair of spheres. A continuous Gilb between convex hulls where the center of the searched sphere is placed
By applying the ert method, the nearest points are calculated efficiently. This method consists of the meta-tree construction method, the interference check between meta-trees, the continuous Gilbert method, and the Bubble Collisio method.
There is a feature in the method of shifting to the n method.

【0015】4) メタツリー構成を含めた連続干渉チェ
ック法:任意の非凸多面体間の最近点を連続的に追跡し
ていく場合において、メタツリー構成、Gilbert法、Bub
ble Collision法の全てを数サイクルに一回のみ行い、
他のサイクルでは、前回のサイクルで使用したポリゴン
ペアに再度Gilbert法を適用することにより最短距離を
求め、計算負荷を大幅に軽減する。 5) サイクルタイム自動調整型連続干渉チェック法:連
続干渉チェック法において、Bubble Collision法に掛か
る計算時間を自動測定することにより、メタツリー構
成、Gilbert法、Bubble Collision法を行うサイクルを
自動的に決定する。
4) Continuous interference check method including meta tree structure: In the case of continuously tracking the closest points between arbitrary non-convex polyhedra, the meta tree structure, Gilbert method, Bub
Do all of the ble Collision method once every few cycles,
In the other cycles, the Gilbert method is applied again to the polygon pairs used in the previous cycle to find the shortest distance, and the calculation load is greatly reduced. 5) Cycle time automatic adjustment type continuous interference check method: In the continuous interference check method, by automatically measuring the calculation time required for the Bubble Collision method, the cycle for performing the meta tree configuration, the Gilbert method, and the Bubble Collision method is automatically determined. .

【0016】(c) 連続型Bubble Collision法による干渉
チェック: 1) 連続型Bubble Collision法 干渉チェックにおいては、凸包同士の干渉チェックにお
いて凸包同士が干渉すると、凸包内部での干渉チェック
をBubble Collision法により行う。Bubble Collision法
による干渉チェックは時間を要するため、バブルコライ
ジョン実行部6は、毎サイクルBubble Collision法を実
行せず数サイクルに一度行い、Bubble Collision法の実
行結果である近接ポリゴンの幾つかのペアを保存する。
移動距離/姿勢変化が小さいとすると、次の瞬間もその
ペアは同じであるので、その数組の近接ポリゴン間に対
してのみ、近接ポリゴン間干渉チェック部7は干渉チェ
ックを行い、最近点、干渉点を求めて出力する。保存し
た数ペアのみに関して干渉チェックを行うことにより、
時間を要するBubble Collision法の処理回数を減少で
き、計算時間の短縮が図られる。
(C) Interference check by the continuous Bubble Collision method: 1) In the continuous Bubble Collision interference check, when the convex hulls interfere with each other in the interference check of the convex hulls, the interference check inside the convex hull is bubbled. The Collision method is used. Since the collision check by the Bubble Collision method requires a long time, the bubble collision execution unit 6 does not execute the Bubble Collision method every cycle, but does it once every several cycles. To save.
Assuming that the movement distance / posture change is small, the pair is the same at the next moment, so the inter-proximity polygon interference checking unit 7 performs the interference check only between the several sets of the proximate polygons. Obtain and output the interference point. By performing interference check on only a few saved pairs,
The number of times of the Bubble Collision method that requires time can be reduced, and the calculation time can be shortened.

【0017】2) Bubble Collision法 の計算時間による
連続型Bubble Collision法の更新サイクル自動決定法:
連続型Bubble Collision法においては、物体形状と移動
速度に基づいて、近接ポリゴンペアの更新サイクル(次
のBubble Collision法実行までのサイクル)の調整が必
要である。このサイクルが長すぎると、修正が遅くな
り、間違った結果を出力するのが目立つ。一方、上記更
新サイクルが短いと、リアルタイム性が薄れる。このた
め、試行錯誤的なサイクルの調整は、難しい。そこで、
Bubble Collision法を行う毎にその計算時間を測定し、
その計算時間から次の更新サイクルを自動的に決定す
る。
2) Automatic determination method of update cycle of continuous Bubble Collision method according to calculation time of Bubble Collision method:
In the continuous Bubble Collision method, it is necessary to adjust the update cycle of adjacent polygon pairs (cycle until the next Bubble Collision method is executed) based on the object shape and the moving speed. If this cycle is too long, the corrections will be slow and you will noticeably get the wrong result. On the other hand, if the update cycle is short, the real-time property deteriorates. Therefore, it is difficult to adjust the cycle by trial and error. Therefore,
Each time the Bubble Collision method is performed, the calculation time is measured,
The next update cycle is automatically determined from the calculated time.

【0018】3) 連続型Bubble Collision法の修正方法
(物体移動量による判定):連続型Bubble Collision法
は移動距離/姿勢変化が小さいと仮定するので、大移動
が発生すると、頻繁に間違った結果を出力するのが目立
つ。移動距離/姿勢変化があるしきい値より大きい場合
には、バブルコライジョン実行部6は、近接ポリゴンペ
アの更新サイクルに達しなくてもBubble Collision法を
行い、近接ポリゴンペアを更新する。これにより、正し
い干渉チェック結果が得られる。 4) 連続型Bubble Collision法の修正方法(物体移動速
度による判定):連続型Bubble Collision法は移動距離
/姿勢変化が小さいと仮定するので、大移動が発生する
と、頻繁に間違った結果を出力するのが目立つ。移動速
度があるしきい値より大きい場合には、近接ポリゴンペ
アの更新サイクルに達しなくてもバブルコライジョン実
行部6はBubble Collision法を行い、近接ポリゴンペア
を更新する。これにより、正しい干渉チェック結果が得
られる。
3) Correction method of continuous bubble collision method (judgment based on object movement amount): continuous bubble collision method assumes that the movement distance / posture change is small, and therefore, when a large movement occurs, an erroneous result is frequently generated. Is noticeable. When the movement distance / posture change is larger than a certain threshold value, the bubble collision executing unit 6 updates the proximity polygon pair by performing the Bubble Collision method even if the update cycle of the proximity polygon pair is not reached. As a result, a correct interference check result can be obtained. 4) Correction method of continuous bubble collision method (judgment based on object moving speed): continuous bubble collision method assumes that the movement distance / posture change is small, so when a large movement occurs, an incorrect result is frequently output. Stands out. When the moving speed is larger than a certain threshold value, the bubble collision execution unit 6 executes the Bubble Collision method to update the adjacent polygon pair even if the update cycle of the adjacent polygon pair is not reached. As a result, a correct interference check result can be obtained.

【0019】5) 連続型Bubble Collision法の修正方法
(最近点距離比による判定):連続型Bubble Collision
法は移動距離/姿勢変化が小さいと仮定するので、大移
動が発生すると、頻繁に間違った結果を出力するのが目
立つ。最近点距離比があるしきい値より大きい場合に
は、近接ポリゴンペアの更新サイクルに達しなくてもバ
ブルコライジョン実行部6はBubble Collision法を行
い、近接ポリゴンペアを更新する。これにより、正しい
干渉チェック結果が得られる。 6) 凸包外における物体静止時の干渉チェックの効率
化:干渉チェックを一度行った後に、チェック対象物体
がすべて静止していれば、前サイクルの結果を更新する
必要はない。速度指令、位置変位が零ならば、前サイク
ルの干渉チェック結果をそのまま使って干渉チェックの
計算を省く。この方法によれば、干渉チェック対象物体
グループが二つ以上存在する場合、移動物体を含むグル
ープのみの干渉チェック計算をするだけで良いので効果
が大きい。
5) Correction method of continuous bubble collision method (judgment by nearest point distance ratio): continuous bubble collision
Since the method assumes that the movement distance / posture change is small, it is conspicuous that a large amount of movement frequently gives an incorrect result. When the closest point distance ratio is larger than a certain threshold value, the bubble collision execution unit 6 performs the Bubble Collision method to update the adjacent polygon pair even if the update cycle of the adjacent polygon pair is not reached. As a result, a correct interference check result can be obtained. 6) Efficient interference check when the object is stationary outside the convex hull: If all the objects to be checked are stationary after performing the interference check once, it is not necessary to update the result of the previous cycle. If the speed command and the position displacement are zero, the interference check result of the previous cycle is used as it is and the calculation of the interference check is omitted. According to this method, if there are two or more interference check target object groups, it is sufficient to calculate the interference check only for the group including the moving object, which is very effective.

【0020】7) 凸包内における物体静止時の干渉チェ
ックの効率化:凸包内では連続型Bubble Collision法を
行っているが、干渉チェックを一度行った後に、チェッ
ク対象物体がすべて静止していれば、前サイクルの結果
を更新する必要はない。速度指令、位置変位が零なら
ば、前サイクルの干渉チェック結果をそのまま使って干
渉チェックの計算を省く。但し、静止後の近接ポリゴン
ペアの更新サイクルにおいて一度だけBubble Collision
法を行なって、正しい近接ポリゴンペアを求める必要が
ある。この方法によれば、干渉チェック対象物体グルー
プが二つ以上存在する場合、移動物体を含むグループの
みの干渉チェック計算をするだけで良いので効果が大き
い。
7) Efficient interference check when the object is stationary in the convex hull: The continuous bubble collision method is used in the convex hull, but after performing the interference check once, all objects to be checked are still. If so, there is no need to update the result of the previous cycle. If the speed command and the position displacement are zero, the interference check result of the previous cycle is used as it is and the calculation of the interference check is omitted. However, the Bubble Collision is performed only once in the update cycle of the neighboring polygon pair after stationary.
It is necessary to perform the method to find the correct pair of adjacent polygons. According to this method, if there are two or more interference check target object groups, it is sufficient to calculate the interference check only for the group including the moving object, which is very effective.

【0021】[0021]

【実施例】(A)凸包の生成 (a) 非凸多面体の干渉チェックの概略 非凸多面体間の干渉チェックを行う方法として、非凸多
面体(図2)を包絡する最小の凸多面体(凸包:convex
hull)を生成し(図3)、非凸多面体間の距離が十分離
れている場合には凸包間の干渉チェックを行い、凸包同
士が干渉し始めたら、Bubble collision法を適用して非
凸多面体間の干渉チェックを行う。かかる非凸多面体間
の干渉チェックを行うためには、前処理により非凸多面
体より凸包を生成する必要がある。
EXAMPLE (A) Generation of convex hull (a) Outline of interference check of non-convex polyhedron As a method of checking interference between non-convex polyhedrons, the smallest convex polyhedron (convex) that envelops the non-convex polyhedron (FIG. 2) is used. Package: convex
hull) (Fig. 3), and if the distances between the non-convex polyhedra are sufficiently large, check the interference between the convex hulls, and if the convex hulls start to interfere with each other, apply the Bubble collision method. Check the interference between convex polyhedrons. In order to check the interference between the non-convex polyhedrons, it is necessary to generate a convex hull from the non-convex polyhedron by preprocessing.

【0022】(b) システム構成 図4は凸包生成の前処理や干渉チェック処理を実行する
システム構成図であり、11はグラフィックワークステ
ーションGWS、12は三次元CADシステムである。
ワークステーション11において、11aは干渉チェッ
クの前処理や干渉チェック処理、その他の処理を実行す
るプロセッサ、11bはROMであり、凸包生成の前処
理プログラムCHP、干渉チェックプログラムICP等
を記憶するもの、11cはRAMであり、三次元CAD
システム12で設計された形状データ、その他の設定デ
ータ、演算処理結果を記憶するもの、11dはCADシ
ステムとの通信インタフェース、11eは表示部、11
fはキーボード、11gはマウス等の操作部、11hは
フロッピーディスク用のディスクドライブ、11iはハ
ードディスクである。
(B) System Configuration FIG. 4 is a system configuration diagram for performing preprocessing for convex hull generation and interference check processing, 11 is a graphic workstation GWS, and 12 is a three-dimensional CAD system.
In the workstation 11, 11a is a processor that executes pre-processing for interference check, interference check processing, and other processing, 11b is a ROM that stores the pre-processing program CHP for convex hull generation, the interference check program ICP, and the like. 11c is a RAM, which is a three-dimensional CAD
Shape data designed by the system 12, other setting data, data for storing arithmetic processing results, 11d is a communication interface with the CAD system, 11e is a display unit, 11
f is a keyboard, 11g is an operation unit such as a mouse, 11h is a disk drive for a floppy disk, and 11i is a hard disk.

【0023】(c) 概略フロー 図5は凸包生成の概略処理(干渉チェック前処理)フロ
ーである。三次元CADシステム12は形状モデル(非
凸多面体)を作成してグラフィックワークステーション
11に入力し、RAM11cに記憶する(ステップ10
01、1002)。CADシステム12は、形状モデル
データとして非凸多面体をポリゴンで覆った場合におけ
る全ポリゴンデータを入力する。ポリゴンデータは、ポ
リゴンの各頂点の座標値とその点における光の反射方向
を示す情報を有している。最も一般的なポリゴンデータ
は三角形ポリゴンの張り合わせで表現されるものであ
る。三角形ポリゴンデータにおいて、normal に続く3
つの実数が光の反射方向を示し、vertex に続く3つの
実数が頂点座標値を表している。
(C) Schematic flow FIG. 5 is a schematic process (pre-interference check process) flow for convex hull generation. The three-dimensional CAD system 12 creates a shape model (non-convex polyhedron), inputs it to the graphic workstation 11, and stores it in the RAM 11c (step 10).
01, 1002). The CAD system 12 inputs all polygon data when a non-convex polyhedron is covered with polygons as shape model data. The polygon data has information indicating the coordinate value of each vertex of the polygon and the light reflection direction at that point. The most general polygon data is represented by combining triangular polygons. In triangle polygon data, 3 following normal
One real number indicates the light reflection direction, and three real numbers following the vertex indicate the vertex coordinate values.

【0024】ついで、前処理(凸包生成)の実行を指令
すると、プロセッサ11aはROM11bに記憶されて
いる凸包生成用のプログラムCHPに基づいて非凸多面
体の形状データを用いて凸包を生成する(ステップ10
03)。凸包生成後、近接点線形リスト構成アルゴリズ
ムを用いて後述する近接点線形リストを作成してRAM
11cに展開する(ステップ1004,1005)。し
かる後、該近接点線形リストデータに基づき専用ダンプ
ファイル〜.HLを作成し、ハードディスク11i等に
記憶する(ステップ1006)。以後、該近接点線形リ
ストが必要な場合には、新たに作成せず近接点線形リス
ト展開アルゴリズムを通じて専用ダンプファイル内の情
報をデータ形式に再現する(ステップ1007)。
Next, when the execution of the preprocessing (convex hull generation) is instructed, the processor 11a generates a convex hull using the shape data of the non-convex polyhedron based on the convex hull generation program CHP stored in the ROM 11b. Yes (Step 10
03). After the convex hull is generated, a near-point linear list, which will be described later, is created using the near-point linear list construction algorithm, and the RAM is created.
It is expanded to 11c (steps 1004 and 1005). Then, a dedicated dump file ~. The HL is created and stored in the hard disk 11i or the like (step 1006). After that, when the proximity point linear list is required, the information in the dedicated dump file is reproduced in the data format through the proximity point linear list expansion algorithm without newly creating it (step 1007).

【0025】(d) 多面体表現のためのデータ構造 多面体は三角形パッチで張られているとする。多面体の
各三角形パッチ(図6(a)参照)をC言語で表現すると
図7に示す形式のデータ構造を取る。図7において、最
も基本的は表現クラスは、頂点VertexではなくエッジEd
geである。各エッジは方向を持っており、頂点uからv
に向かうエッジを指すポインタ変数をe、原点uを指す
ポインタをorig、対称エッジを指すポインタをsym、頂
点vから頂点wに向かうエッジを指すポインタをlnex
t、頂点uから頂点wに向かうエッジを指すポインタをo
nextとする。整数変数colorは、凸包構成の過程で必要
となり、blue(青)、purple(紫)、red(赤)のどれ
かの値を取る。blue、purple、redの意味は後述する。
また、三角形u−v−wを表現するクラスとしてFacet
を用意し、各エッジは左手方向のFacetを指すポインタ
変数leftを持つ。
(D) Data structure for polyhedron representation It is assumed that the polyhedron is stretched by triangular patches. When each triangular patch of the polyhedron (see FIG. 6A) is expressed in C language, a data structure of the format shown in FIG. 7 is obtained. In FIG. 7, the most basic expression class is edge Ed instead of vertex Vertex.
ge. Each edge has a direction and the vertices u to v
E is a pointer variable pointing to the edge pointing to, the pointer pointing to the origin u is orig, the pointer pointing to the symmetrical edge is sym, and the pointer pointing to the edge going from vertex v to vertex w is lnex.
t, the pointer pointing to the edge from vertex u to vertex w
next. The integer variable color is required during the process of constructing the convex hull and takes one of the values blue (blue), purple (purple), or red (red). The meanings of blue, purple, and red will be described later.
In addition, Facet is a class that represents a triangle u-v-w.
, Each edge has a pointer variable left that points to the Facet in the left hand direction.

【0026】頂点を表すクラスVertexは、頂点座標を表
す3次元ベクトルv及びベクトルvにランダムな偏差を
のせたdvを持ち(Vector3は3次元実ベクトルを表す
型名)、更に輪環構造を表現するためのポインタ変数ne
xt,preを持つ。Convexは、凸包を表現するためのクラス
であり、凸包を構成するエッジの先頭要素を指すポイン
タ変数としてedgeを持つ。図6(b)で示すとおり、edge-
>orig,edgemin->origはそれぞれ凸包HのX軸方向に対
する最大頂点、最小頂点を指すポインタ変数である。頂
点を指すポインタ変数 maxX, minX, maxY, minY は、凸
包構成の前半の過程でのみ使用する。また、sideには分
割統治法における左右の区別、vcntには凸包を張る全頂
点数が入る。ポインタ変数 vertexesはedgemin->origと
同じ頂点を指し、vertexesから出発してnext方向に辿る
ことにより凸包を構成する全ての頂点を小さい順に探索
できる。但し、この頂点探索は、図6(b)のVi,Vj
kのような凸包内部の頂点にもわたるものとする。ver
texesは、分割統治法の前半およびバックアップ処理に
て使用する。Listは、凸包構成の最後の過程で必要とな
るクラスであり、詳細は後述する。
The class Vertex representing vertices has a three-dimensional vector v representing the vertex coordinates and dv in which a random deviation is added to the vector v (Vector3 is a type name representing a three-dimensional real vector), and further represents a ring structure. Pointer variable ne to
has xt, pre. Convex is a class for expressing a convex hull, and has edge as a pointer variable that points to the head element of the edge that constitutes the convex hull. As shown in Fig. 6 (b), edge-
> orig and edgemin-> orig are pointer variables pointing to the maximum vertex and the minimum vertex of the convex hull H in the X-axis direction. The pointer variables maxX, minX, maxY, and minY that point to the vertices are used only in the first half of the convex hull construction. In addition, the side distinguishes the right and left in the division and conquer method, and the total number of vertices with a convex hull is entered in vcnt. The pointer variable vertexes points to the same vertices as edgemin-> orig. Starting from vertexes and following the next direction, all vertices forming the convex hull can be searched in ascending order. However, this vertex search is performed using V i , V j , and V i in FIG.
Let it also extend to vertices inside the convex hull such as V k . ver
texes is used in the first half of the divide and conquer method and in the backup process. List is a class required in the final process of convex hull construction, and details will be described later.

【0027】図7のデータ構造により、ある一つの頂点
に対して、その頂点と稜線を介して繋がる頂点を時計回
り、反時計回りに取り出す操作は、以下の手続で与えら
れる。尚、以後のプログラムはすべてC言語で表現した
ものである。 Edge *edumy0 = sym; Edge *edumy1 = sym; ・ ・ edumy0 = edumy0->lnext->sym; // clockwise order ・ ・ edumy1 = edumy1->sym->onext->sym; // counterclockwise order
According to the data structure shown in FIG. 7, an operation for extracting a vertex, which is connected to the vertex via a ridgeline, clockwise and counterclockwise with respect to a certain vertex is given by the following procedure. Note that all the programs thereafter are expressed in C language. Edge * edumy0 = sym; Edge * edumy1 = sym; ・ ・ edumy0 = edumy0->lnext->sym; // clockwise order ・ ・ edumy1 = edumy1->sym->onext->sym; // counterclockwise order

【0028】(e)3次元凸包構成アルゴリズム 図8は、図5のステップ1003における3次元凸包構
成アルゴリズムであり、凸包構成の基本関数を示してい
る。本アルゴリズムを一言で言えば、X軸方向に対して
各頂点をソーティングしながら分割統治法を行うもので
ある。詳細は、以下の手続からなる。三角形ポインタの
頂点データを入力する(ステップ1101)。入力形式
は、ステップ1101のブロック内に示すようにクラス
Convexのポインタ変数conのメンバ変数con->vertexesを
先頭要素としてnext,pre方向にvertexを繋げ、輪環形式
を取る。vertexesに繋がるvertexは、図7の入力ファイ
ルの頂点データを入力順に繋げたものであり、X軸方向
のソーティングは行っていない。ついで、モデルデータ
conに対し、X軸方向のmax, minであるmaxX, minXを算
出する(ステップ1102)。すなわち、頂点集合vert
exesに対してX軸方向の最大値、最小値を取る頂点を検
索し、各々のアドレスを maxX, minXに入れる。
(E) Three-dimensional convex hull construction algorithm FIG. 8 shows the three-dimensional convex hull construction algorithm in step 1003 of FIG. 5, which shows the basic function of the convex hull construction. In a nutshell, this algorithm is to perform the divide-and-conquer method while sorting each vertex in the X-axis direction. The details consist of the following procedures. The vertex data of the triangle pointer is input (step 1101). The input format is class as shown in the block of step 1101.
The member variable con-> vertexes of the pointer variable con of Convex is used as the head element, and vertex is connected in the next and pre directions to form a ring. The vertex connected to the vertexes is obtained by connecting the vertex data of the input file of FIG. 7 in the input order, and the sorting in the X-axis direction is not performed. Then, the model data
For con, maxX and minX which are max and min in the X-axis direction are calculated (step 1102). That is, vertex set vert
The vertices that take the maximum and minimum values in the X-axis direction for exes are searched, and the respective addresses are entered in maxX and minX.

【0029】しかる後、X座標値の最大値、最小値の差
が微少量εよりも小さいか調べ、小さい時は2次元凸包
を構成する(ステップ1103)。すなわち、頂点集合
vertexesがX軸に垂直な平面上に載っており、X座標値
の最大値maxX->v(0)、最小値minX->v(0)の差が微少量ε
よりも小さい時は、2次元凸包構成関数 MakeConvex2Di
m(con)を作用させて2次元凸包を生成する。X座標値の
最大値、最小値の差が微少量εよりも小さくなければ、
頂点集合vertexesをX軸方向に2分割する(ステップ1
104)。すなわち、最大値maxX->v(0)と、最小値minX
->v(0)の中心値を境にして、頂点集合vertexesをconLef
t,conRightに2分割する。例えば、s=(maxX->v(0)+min
X->v(0))/2とする時(sは中心値)、vertex->v(0)<s
ならばconLeft->vertexesに繋げ、vertex->v(0)≧sな
らば conRight->vertexesに繋げる。
Then, it is checked whether the difference between the maximum value and the minimum value of the X coordinate values is smaller than the minute amount ε, and if it is smaller, a two-dimensional convex hull is constructed (step 1103). That is, the vertex set
The vertexes are on a plane perpendicular to the X-axis, and the difference between the maximum X coordinate value maxX-> v (0) and the minimum value minX-> v (0) is very small ε.
If it is smaller than, then the 2D convex hull construction function MakeConvex2Di
Generate a two-dimensional convex hull by applying m (con). If the difference between the maximum and minimum X coordinate values is not smaller than a small amount ε,
The vertex set vertexes is divided into two in the X-axis direction (step 1
104). That is, the maximum value maxX-> v (0) and the minimum value minX
-> conLef the vertex set vertexes with the center value of v (0) as the boundary
Divide into t and conRight. For example, s = (maxX-> v (0) + min
When X-> v (0)) / 2 (s is the central value), vertex-> v (0) <s
If so, connect to conLeft-> vertexes, and if vertex-> v (0) ≧ s, connect to conRight-> vertexes.

【0030】ついで、左右二つに分割したConvexクラ
ス、conLeft, conRightに対して再帰的に凸包構成関数
MakeConvex( )を作用させて凸包を生成する(ステップ
1105)。以後、2分割ができなくなるまで凸包 con
Left, conRightのマージング(併合)を行う(ステップ 1
106)。すなわち、再帰的に構成された凸包conLeft,
conRightを併合して一つの凸包を構成する。一般に、分
割統治法は、上記手続きに示す通り一つの集合を再帰的
に次々に二分割していき併合の過程を繰り返すことによ
り最終的な出力を得る。分割統治法では、そのアルゴリ
ズム依存性は主にマージプロセス内で表現される。図8
の手続きでは関数 Merge3Dim(conLeft,conRight)がマー
ジプロセスを表現している。Merge3Dim(conLeft,conRig
ht)の詳細は、後述する。
Then, a convex hull constituent function is recursively applied to the Convex class, conLeft, conRight, which is divided into two left and right.
MakeConvex () is operated to generate a convex hull (step 1105). After that, the convex hull con
Perform merging (merging) of Left and conRight (Step 1
106). That is, recursively constructed convex hull conLeft,
Merge conRight to form a convex hull. In general, the division-and-conquer method obtains a final output by recursively dividing one set into two and repeating the merging process as shown in the above procedure. In Divide-and-Conquer, the algorithmic dependencies are primarily expressed within the merge process. Figure 8
In the procedure, the function Merge3Dim (conLeft, conRight) represents the merge process. Merge3Dim (conLeft, conRig
Details of (ht) will be described later.

【0031】(f) 2次元凸包構成アルゴリズム 2次元凸包構成の関数は、図9に示す通り、3次元の場
合と殆ど同じ構成をしている。違いは、ステップ120
1の1次元凸包構成のプロセスとステップ1202の2
次元におけるマージプロセスである。ステップ1201
の1次元凸包構成のプロセスは図10に示す通り、Z軸
に平行に並んだ頂点のトップとボトムを互いにnext,pre
で結ぶことで終了する。トップとボトムが同一点の場合
には、next,preは同じ頂点を差し示す。図11は、ステ
ップ1202における2次元におけるマージプロセスMe
rge2Dim(conLeft,conRight)の詳細を示したものであ
る。図に示す通りMerge2Dim(,)は、凸包conLeft、conRi
ghtを上方から覆う稜線 Upper Bridgeと下方から覆う稜
線Lower Bridgeを見つけるプロセスである。Upper Brid
geをみつけるために、econLeft->maxY、econRight->min
Yを結ぶ稜線を初期値として、conLeft、conRightに対し
て各々next,preの方向に順次移行して行き、最も上方に
達したところの頂点を結んでUpper Bridgeとする。同様
に、econLeft,econRightに対して各々pre,next方向に移
行していくことによりLower Bridgeを見つけることがで
きる。
(F) Two-dimensional convex hull construction algorithm The function of the two-dimensional convex hull construction has almost the same construction as that of the three-dimensional convex hull construction, as shown in FIG. The difference is step 120
1-dimensional convex hull construction process of 1 and step 1202 of 2
It is a dimensional merge process. Step 1201
As shown in FIG. 10, the process of constructing the one-dimensional convex hull of is as follows.
It ends by connecting with. When the top and bottom are at the same point, next and pre indicate the same vertex. FIG. 11 shows the two-dimensional merge process Me in step 1202.
This shows details of rge2Dim (conLeft, conRight). As shown in the figure, Merge2Dim (,) is a convex hull conLeft, conRi
This is the process of finding the ridge Upper Bridge that covers ght from above and the ridge Lower Bridge that covers ght from below. Upper Brid
to find ge, econLeft-> maxY, econRight-> min
With the ridge line connecting Y as the initial value, conLeft and conRight are sequentially moved in the directions of next and pre, respectively, and the vertices at the highest point are connected to form the Upper Bridge. Similarly, lower bridges can be found by moving in the pre and next directions with respect to econLeft and econRight, respectively.

【0032】図12は、マージ関数 Merge2Dim(conLef
t,conRight)の詳細構成を示したものである。ステップ
1301で初期値を設定し、ステップ1302のループ
(do〜while文)でUpper Bridgeを、ステップ1303の
ループ(do〜while文)でLower Bridgeを見つけ出す。W->
ConvexJudgeUp2Dim(u,v)はu,vを結ぶ直線に対し、頂
点wの上下関係を判定する関数である。
FIG. 12 shows the merge function Merge2Dim (conLef
t, conRight) is shown in detail. Initial value is set in step 1301 and loop of step 1302
The Upper Bridge is found in (do-while statement), and the Lower Bridge is found in the loop (do-while statement) in step 1303. W->
ConvexJudgeUp2Dim (u, v) is a function that determines the vertical relationship of the vertex w with respect to the straight line connecting u and v.

【0033】図13A〜図16は凸包構成の説明図であ
る。図13において、21は頂点a〜kを有する非凸多
面体であり、頂点a〜eのX座標値は等しくX=x1
頂点fのX座標値はX=x2、頂点g〜kのX座標値は
X=0である。図13の非凸多面体に対して、図8の三
次元凸包構成アルゴリズムを適用すると、各頂点a〜k
はX座標値の差が微小量εの範囲内の第1頂点群g〜k
(図14(a)参照)、第2頂点群a〜e(図14(b)参
照)、第3頂点群f(図14(c)参照)に分けられる。こ
れら各頂点群に対して二次元凸包構成アルゴリズムを施
す。例えば、第2頂点群a〜eに2次元凸包構成アルゴ
リズムを施すと、Y座標値の差がεの範囲内の第1頂点
群a,b、第2頂点群d、第3頂点群c,eの3つに分
けられ、これら各群に1次元凸包構成アルゴリズムを施
す。しかる後、1次元凸包に対して2次元凸包構成のた
めのマージ関数 Merge2Dim(,)を適用して2次元凸包を
構成する。例えば、第2、第3頂点群より生成した1次
元凸包にマージ関数を適用すると、図15(a)に示すよ
うに稜線deがupper bridge、稜線dcがlower bridge
になり、2次元凸包cdeが生成される(図15(b))。
ついで、第1頂点群a,bにより生成した1次元凸包と
2次元凸包cdeにマージ関数を適用すると、図15
(c)に示すように、稜線aeがupper bridge、稜線bc
がlower bridgeになり、2次元凸包abceが生成され
る(図15(d)参照)。
13A to 16 are explanatory views of the convex hull structure. In FIG. 13, reference numeral 21 is a non-convex polyhedron having vertices a to k, and the X coordinate values of the vertices a to e are equal to each other, X = x 1 ,
The X coordinate value of the vertex f is X = x 2 , and the X coordinate value of the vertices g to k is X = 0. When the three-dimensional convex hull construction algorithm of FIG. 8 is applied to the non-convex polyhedron of FIG.
Is the first group of vertices g to k in which the difference in X coordinate value is within the range of a minute amount ε.
(See FIG. 14A), the second vertex group a to e (see FIG. 14B), and the third vertex group f (see FIG. 14C). A two-dimensional convex hull construction algorithm is applied to each of these vertex groups. For example, when a two-dimensional convex hull construction algorithm is applied to the second vertex groups a to e, the first vertex groups a and b, the second vertex group d, and the third vertex group c in which the difference in Y coordinate value is within the range of ε. , E, and the one-dimensional convex hull construction algorithm is applied to each of these groups. Then, the merge function Merge2Dim (,) for constructing the two-dimensional convex hull is applied to the one-dimensional convex hull to construct the two-dimensional convex hull. For example, when the merge function is applied to the one-dimensional convex hull generated from the second and third vertex groups, the ridge line de is the upper bridge and the ridge line dc is the lower bridge as shown in FIG.
And a two-dimensional convex hull cde is generated (FIG. 15 (b)).
Then, when a merge function is applied to the one-dimensional convex hull and the two-dimensional convex hull cde generated by the first vertex groups a and b,
As shown in (c), ridge line ae is upper bridge, ridge line bc
Becomes a lower bridge, and a two-dimensional convex hull abce is generated (see FIG. 15 (d)).

【0034】同様に、第1頂点群g〜kに対して2次元
凸包構成アルゴリズムを施して2次元凸包を生成する。
以上の2次元凸包の生成が終了して、3次元凸包構成用
のMerge3Dim(,)を適用すると、3次元凸包が生成でき
る。例えば、2次元凸包abceと2次元凸包fにMerg
e3Dim(,)を適用すると、3次元凸包abcefが生成
され(図16(a))、この3次元凸包abcefと2次元
凸包ghikにMerge3Dim(,)を適用すると三次元凸包
abcefghikが生成される(図16(b))。3次元
凸包構成アルゴリズムの本質は、図17に示すマージ関
数に集約され、以下の四つのフェーズからなる。
Similarly, the two-dimensional convex hull is generated by applying the two-dimensional convex hull construction algorithm to the first vertex group g to k.
When the above three-dimensional convex hull generation is completed and Merge3Dim (,) for three-dimensional convex hull construction is applied, a three-dimensional convex hull can be generated. For example, the two-dimensional convex hull abce and the two-dimensional convex hull f
When e3Dim (,) is applied, a three-dimensional convex hull abcef is generated (FIG. 16 (a)). When Merge3Dim (,) is applied to the three-dimensional convex hull abcef and the two-dimensional convex hull ghik, the three-dimensional convex hull abcefghik is obtained. It is generated (FIG. 16 (b)). The essence of the three-dimensional convex hull construction algorithm is summarized in the merge function shown in FIG. 17, and consists of the following four phases.

【0035】Phase 0:頂点数が少ない場合における凸
包の直接構成 凸包の直接構成における注意点は、頂点数が3以下の場
合の取り扱いである。この場合には、最小凸包である四
面体を張ることができないため、マージ過程を通じて頂
点数を増やし、四面体を直接構成することが必要とな
る。本フェーズは、conLeft,conRightの頂点数が少な
い場合におけるダイレクトな凸包構成プロセスであり、
MakeConvexLowNumber(,), MakeConvexBackL(,),MakeCon
vexBackR(,)の各関数で表される。 MakeConvexLowNumbe
r(,) は、内部においてconLeft->vcnt, conRight->vcnt
の値に応じて更に場合分けされる。conLeft、conRight
の頂点数の合計が4未満の場合は、conLeft, conRight
の頂点をnext,preのポインタで張り直し、vertexes上に
蓄える。頂点数の合計が4になったところでMakeTetra2
2(,), MakeTetra13(,)の諸関数で四面体を直接構成す
る。conLeft->vcnt=2, conRight->vcnt=3の場合、conLe
ft->vcnt=3, conRight->vcnt=2の場合およびconLeft->v
cnt=3, conRight->vcnt=3の場合には、まず、四面体を
直接構成し、後ほど説明するバックアッププロセス(図
28)を援用して凸包を構成する。
Phase 0: Direct Construction of Convex Hull When Number of Vertices is Small The point to be noted in the direct construction of convex hull is when the number of vertices is 3 or less. In this case, since the tetrahedron, which is the smallest convex hull, cannot be stretched, it is necessary to increase the number of vertices through the merging process and directly construct the tetrahedron. This phase is a direct convex hull construction process when the number of conLeft and conRight vertices is small.
MakeConvexLowNumber (,), MakeConvexBackL (,), MakeCon
It is represented by each function of vexBackR (,). MakeConvexLowNumbe
r (,) is internally conLeft-> vcnt, conRight-> vcnt
Further cases are classified according to the value of. conLeft, conRight
If the total number of vertices of is less than 4, conLeft, conRight
The vertices of are reattached with the pointers of next and pre, and stored on vertexes. MakeTetra2 when the total number of vertices reached 4
A tetrahedron is directly constructed by the functions of 2 (,) and MakeTetra13 (,). If conLeft-> vcnt = 2, conRight-> vcnt = 3, then conLe
If ft-> vcnt = 3, conRight-> vcnt = 2 and conLeft-> v
In the case of cnt = 3, conRight-> vcnt = 3, first, the tetrahedron is directly constructed, and the convex hull is constructed by using the backup process (FIG. 28) described later.

【0036】MakeConvexBackL(,)は、conLeft->vcntの
値が3以下の、conRight->vcntが4以上の場合のマージ
法である。conRightが既に四面体以上の凸包を構成して
いるため、本関数は、凸包conRightにconLeftの頂点を
一つ一つマージしていく過程を表す。本関数は、バック
アッププロセスを使って構成される。同様に、MakeConv
exBackR(,) はconRight->vcntが3以下、conLeft->vcnt
の値が4以上の場合のマージ関数である。以上、MakeCo
nvexLowNumber(,), MakeConvexBackL(,), MakeConvexBa
ckR(,)の処理により、phase1以降は、conLeft, conRig
htとも四面体以上の凸包を構成している場合の処理であ
る。
MakeConvexBackL (,) is a merge method when the value of conLeft-> vcnt is 3 or less and conRight-> vcnt is 4 or more. Since conRight has already formed the convex hull of a tetrahedron or more, this function represents the process of merging the vertices of conLeft into the convex hull conRight one by one. This function is constructed using the backup process. Similarly, MakeConv
exBackR (,) has conRight-> vcnt 3 or less, conLeft-> vcnt
Is a merge function when the value of is 4 or more. Above, MakeCo
nvexLowNumber (,), MakeConvexBackL (,), MakeConvexBa
By the processing of ckR (,), conLeft, conRig after phase 1
This is the processing when both ht and the convex hull of tetrahedron or more are constructed.

【0037】Phase 1:Upper Bridgeの構成 図18に示すようなUpper Bridgeを構成する。この処理
をできるだけ少ない計算回数で実行するために、conLef
tのX軸方向最大エッジconLeft->edgeおよびconRightの
X軸方向最小エッジconRight->edgeminを初期値にして
近傍頂点を駈け上がっていくようにする。そのために、
各頂点において、その近傍頂点をX−Z平面に射影して
2次元の凸包構成を行い、X−Z平面上で近傍頂点と現
在のBridgeの上下判定を繰り返していく。
Phase 1: Configuration of Upper Bridge An Upper Bridge as shown in FIG. 18 is configured. In order to execute this processing with the least number of calculations, conLef
The maximum edge conLeft-> edge of t in the X-axis direction and the minimum edge conRight-> edgemin of conRight in the X-axis direction are set to initial values, and the neighboring vertices are raised. for that reason,
At each vertex, the neighboring vertices are projected onto the XZ plane to form a two-dimensional convex hull, and the up / down determination of the neighboring vertices and the current Bridge is repeated on the XZ plane.

【0038】Phase 2:Wrapping process 3次元マージプロセスにおいて基幹となるものであり、
その概要は、図19に示すように凸包conLeft, conRigh
tを包込むプロセスである。包み込む過程で、各凸包con
Left, conRightのエッジのcolorはBLUE(青)からPURPLE
(紫)、またはRED(赤)に変化させていく。全てのエッジ
の初期colorはBLUEであるとし、図19で示すようにWra
ppingの境界となるエッジのcolorはPURPLE, PURPLE edg
eの近傍エッジで、併合した凸包の内部に入るエッジのc
olorはREDに変化させる。他のエッジのcolorは全てBLUE
のままである。最終的にマージングが完了した時点で併
合凸包のエッジのcolorをBLUEにリセットする。
Phase 2: Wrapping process The core of the 3D merge process,
The outline is as shown in FIG. 19, where the convex hulls conLeft, conRigh
The process of wrapping t. In the process of wrapping, each convex hull con
Left, conRight edge color is BLUE (blue) to PURPLE
Change to (purple) or RED (red). The initial color of all edges is BLUE, and as shown in FIG.
The color of the edge that becomes the boundary of pping is PURPLE, PURPLE edg
c of an edge that is inside the merged convex hull and is an edge near e
olor changes to RED. All other edge colors are BLUE
It remains. Finally, when the merging is completed, the color of the edge of the merged convex hull is reset to BLUE.

【0039】Wrapping processの概要は以下の通りであ
る。Upper Bridgeの頂点 utop, vtopの近傍頂点を検索
し、Wrappingを構成する三角形パッチのもう一方の頂点
となる候補を捜し出す。今、utopに対する候補頂点をFi
rstWinLとする時、utopの他の近傍頂点は三角形utop-vt
op-FirstWinLが張る平面の下に位置する。一般に、Firs
tWinLは、Upper Bridgeから見て時計回り方向と反時計
回り方向に2頂点存在するが、三角形をutop-FirstWinL
-vtopの順に見た時に法線方向が上向きになる条件を課
すことにより一意的に時計回りの頂点を取り出すことが
できる。同様に、vtopの近傍頂点を調べFirstWinRを取
り出す。最後に三角形utop-FirstWinL-vtopの張る平面
とFirstWinRとの上下関係を調べることにより、最初の
三角形パッチの頂点を選択する。図19は、FirstWinL
が最初に選択された例を示している。 FirstWinLが選択
された後は、FirstWinL-vtopをUpper Bridgeと見做して
同様の操作を繰り返す。図19の例ではFirstWinLの近
傍頂点を検索した結果、三角形 FirstWinL-u-vtopが選
び出され、三角形 FirstWinL-u-vtopとFirstWinRの上
下関係を調べ、FirstWinRが選択された例である。この
場合は、三角形FirstWinL-FirstWinR-vtopが2番目の三
角形パッチである。以後u,vがutop, vtopと一致す
るまでu,vを更新していく。FirstWinL,uを一般的
にwinning vertexと呼ぶ。
The outline of the Wrapping process is as follows. The neighboring vertices of the upper bridge vertices utop and vtop are searched to find a candidate that is the other vertex of the triangular patch that constitutes Wrapping. Now, the candidate vertices for utop are Fi
When rstWinL, the other neighboring vertices of utop are triangles utop-vt
It is located below the plane formed by op-First WinL. In general, Firs
tWinL has two vertices in the clockwise direction and the counterclockwise direction as seen from the Upper Bridge, but the triangle is utop-FirstWinL
By applying the condition that the normal direction is upward when viewed in the order of -vtop, the clockwise vertices can be uniquely extracted. Similarly, check the neighboring vertices of vtop and extract FirstWinR. Finally, the top of the triangle utop-FirstWinL-vtop and the plane of FirstWinR are examined to select the vertices of the first triangle patch. Figure 19 shows FirstWinL
Shows the example first selected. After FirstWinL is selected, consider FirstWinL-vtop as Upper Bridge and repeat the same operation. In the example of FIG. 19, a triangle FirstWinL-u-vtop is selected as a result of searching the vertices of FirstWinL, and the vertical relation between the triangles FirstWinL-u-vtop and FirstWinR is checked, and FirstWinR is selected. In this case, the triangle FirstWinL-FirstWinR-vtop is the second triangle patch. After that, u and v are updated until u and v match utop and vtop. FirstWinL and u are generally called the winning vertex.

【0040】2番目以降のwinning vertexの検索では、
近傍頂点の全てに渡る検索は必要ない。直前の境界エッ
ジを初期値として、conLeftの場合には時計回り、conRi
ghtの場合には反時計回りに検索することにより、候補
頂点の一意的な選出が可能となる。winning vertexを選
出していく過程で、境界エッジ、およびその近傍エッジ
のcolorを変化させていく。第1三角形パッチの場合に
は、境界エッジ、(図19の例ではエッジutop-FirstWin
L)のみのcolorをPURPLEに変化させる。第2三角形パッ
チ以降は、境界エッジをPURPLEに変えると共に、winnin
g vertexの近傍エッジの内、併合凸包の内部に隠れるエ
ッジのcolorを全てREDに変える。以後、この処理を最終
三角形パッチまで繰返し、最後にutop, vtopの近傍エッ
ジを調べ、内包するエッジのcolorをREDに変える。以
上、本プロセスでは、併合凸包を構成する三角形パッチ
の頂点集合が全て、選別され、それらが、三角形パッチ
毎に図7のクラスListに格納され、next方向に線形リス
トを作成する。
In the search for the second and subsequent winning vertices,
It is not necessary to search all of the neighboring vertices. Starting from the previous border edge, clockwise for conLeft, conRi
In the case of ght, it is possible to uniquely select candidate vertices by searching counterclockwise. In the process of selecting the winning vertex, the colors of the boundary edge and its neighboring edges are changed. In the case of the first triangle patch, a boundary edge, (in the example of FIG. 19, edge utop-FirstWin
L) only color is changed to PURPLE. After the second triangle patch, change the boundary edge to PURPLE and winnin
Among the neighboring edges of g vertex, all the colors of the edges hidden inside the merged convex hull are changed to RED. After that, this process is repeated until the final triangular patch, and finally the neighboring edges of utop and vtop are examined, and the color of the included edge is changed to RED. As described above, in this process, all the vertex sets of the triangular patches that form the merged convex hull are selected, stored in the class List of FIG. 7 for each triangular patch, and a linear list is created in the next direction.

【0041】Phase 3:三角形ポリゴンのPatching proce
ss Phase2で構成した三角形パッチの頂点集合からなる線形
リストListに基づき、実際に三角形ポリゴンを張つけて
いくプロセスである。本プロセスは、図20、図21に
示す通り、大きく分けて初期パッチ、中間パッチ、最終
パッチの三つの過程からなる。三つの過程における三角
形パッチの構成法は微妙に違い、初期パッチでは、一本
のエッジと一個の頂点からなる三角形パッチの構成法、
中間パッチでは、2本のエッジからなる三角形パッチの
構成法、最終パッチでは3本のエッジからなる三角形パ
ッチの構成法が使用される。各々の構成法を表現する関
数PatchTriangle(,)では、図6(a)に示すonext, lnext,
sym, orig, leftの各ポインタ変数が、となり合う三角
形パッチ間において矛盾がないように設定される。
Phase 3: Triangular polygon patching process
This is the process of actually attaching triangular polygons based on the linear list List consisting of the vertices of triangular patches constructed in ss Phase2. As shown in FIG. 20 and FIG. 21, this process is roughly divided into three steps of an initial patch, an intermediate patch, and a final patch. The construction method of the triangular patch in the three processes is subtly different, and in the initial patch, the construction method of the triangular patch consisting of one edge and one vertex,
The intermediate patch uses a triangular patch configuration method having two edges, and the final patch uses a triangular patch configuration method having three edges. In the function PatchTriangle (,) expressing each construction method, next, lnext, shown in FIG.
The sym, orig, and left pointer variables are set so that there is no contradiction between adjacent triangle patches.

【0042】Phase 4:後処理 マージプロセス1サイクル毎の後処理を表し、以下の三
つのプロセスからなっている。 マージング後におけるconLeft,conRightの境界エッジ
のcolorをPURPLEからBLUEに変更する。 併合凸包のX軸方向の最大エッジedge、最小エッジed
geminを選出する。 併合凸包のX軸方向の最大頂点maxX,最小頂点minXを
選出する。 の過程で注意しなければならないのは、選び出したエ
ッジのcolorがREDの可能性があることである。この場合
には、このエッジを初期値として時計回りまたは反時計
回りのエッジ検索を行いcolorがBLUEのエッジを探し出
し、edge,edgeminとして設定する。の過程が必要な理
由は、後ほど説明する。バックアッププロセスのためで
ある。
Phase 4: Post-Processing Merge Process Representing post-processing for each cycle, it consists of the following three processes. Change color of border edge of conLeft, conRight after merging from PURPLE to BLUE. The maximum edge edge and the minimum edge ed of the merged convex hull in the X-axis direction
Select gemin. The maximum vertex maxX and the minimum vertex minX of the merged convex hull in the X-axis direction are selected. In the process of, it should be noted that the color of the selected edge may be RED. In this case, a clockwise or counterclockwise edge search is performed with this edge as an initial value to find an edge whose color is BLUE and set as edge, edgemin. The reason why this process is necessary will be explained later. Because of the backup process.

【0043】(h) O(Nlog N)の根拠 conLeftの頂点数をn1、conRightの頂点数をn2とする
時、(g)のマージプロセスにかかる計算負荷はO(n1
2)である。従って、総数Nの頂点集合に対する凸包
構成の計算時間をT(n)とすると、 T(N)=2T(N/2)+O(N) という漸化式が得られる。これを解くと、T(N)=O
(NlogN)となる。
(H) Ground of O (Nlog N) When the number of vertices of conLeft is n 1 and the number of vertices of conRight is n 2 , the calculation load on the merge process of (g) is O (n 1 +
n 2 ). Therefore, if the calculation time of the convex hull configuration for the total number N of vertex sets is T (n), the recurrence formula of T (N) = 2T (N / 2) + O (N) is obtained. Solving this, T (N) = O
(NlogN).

【0044】(i) ランダム偏差法 上に述べてきた凸包構成アルゴリズムでは、同一平面に
4点以上がのる場合や同一直線上に3点以上がのる場合
には、分岐の判定が微妙になる場合が多数発生する。例
えば、上記凸包構成アルゴリズムでは、2頂点を結ぶ直
線に対して、ある頂点が上下どちらに存在するかを判定
する関数 ConvexJudge2Dim( )、また、3頂点を結ぶ平
面に対して、ある頂点が上下どちらに存在するかを判定
する関数ConvexJudge3Dim( )を至るところで使用してい
るが、同一平面に4点以上がのる場合や同一直線上に3
点以上がのる場合には判定が微妙になってアルゴリズム
が無限ループに陥る場合がある。
(I) Random Deviation Method In the convex hull construction algorithm described above, when four or more points lie on the same plane or when three or more points lie on the same straight line, the branch determination is delicate. There are many cases where For example, in the above convex hull construction algorithm, a function ConvexJudge2Dim (), which determines whether a certain vertex is above or below a straight line connecting two vertices, and a certain vertex is above and below a plane connecting three vertices. I use the function ConvexJudge3Dim () everywhere to judge where it exists, but when 4 points or more are on the same plane or 3 on the same line.
If there are more points, the determination may be subtle and the algorithm may fall into an infinite loop.

【0045】この状況を避けるため、各頂点の座標値v
(0),v(1),v(2)にランダムな微小偏差random()をのせ
る。具体的には、図7で定義したクラスVertexの3次元
ベクトル要素dvを以下のように設定する。各頂点に対
して、 dv(0)=v(0); dv(1)=v(1) +random( ); dv(2)=v(2) +random( ); 即ち、X軸成分はそのままにし、Y,Z座標の値に偏差
をのせる。X軸成分を不変にする理由は、X軸に対する
頂点のソーティングがv(0)に基づいて行われるため
である。各頂点に対してランダム偏差をのせるプロセス
は、具体的には、図9の1次元凸包構成 MakeConvex1Di
m(com)の過程で行われる。
To avoid this situation, the coordinate value v of each vertex
Random small deviation random () is put on (0), v (1), v (2). Specifically, the three-dimensional vector element dv of the class Vertex defined in FIG. 7 is set as follows. For each vertex, dv (0) = v (0); dv (1) = v (1) + random (); dv (2) = v (2) + random (); Deviations are added to the values of the Y, Z coordinates. The reason for making the X-axis component invariant is that the sorting of the vertices with respect to the X-axis is performed based on v (0). The process of applying a random deviation to each vertex is specifically the one-dimensional convex hull configuration MakeConvex1Di in FIG.
It is done in the process of m (com).

【0046】(j) バックアッププロセス 上記凸包構成アルゴリズムのWrapping processでは、Up
per Bridgeの頂点utop,vtopから出発してこれらの頂点
に戻って来ずに、無限ループに陥る場合がある。この原
因は、(i)で述べたものと同じであるが各頂点にのせた
ランダム偏差が万能である保証はない。Wrapping proce
ssにおける無限ループは、Wrappingの途中段階で小ルー
プを構成し、utop,vtop以外のある頂点を繰り返すパタ
ーンを取る。utop,vtop以外の頂点を2度以上選択した
か否かはハッシングで判定することができる。従って、
小ループが発生した時点でWrapping processのメインル
ープを抜け出し、図22で示すバックアッププロセスに
以降する。
(J) Backup Process In the Wrapping process of the above convex hull construction algorithm, Up
There is a case where you start in the top utop, vtop of the per Bridge and do not return to these vertices and fall into an infinite loop. The cause is the same as that described in (i), but there is no guarantee that the random deviation placed at each vertex is universal. Wrapping proce
The infinite loop in ss forms a small loop in the middle stage of Wrapping, and takes a pattern that repeats some vertex other than utop and vtop. Whether or not a vertex other than utop and vtop is selected more than once can be determined by hashing. Therefore,
When the small loop occurs, the main loop of the Wrapping process is exited and the backup process shown in FIG. 22 is performed.

【0047】本プロセスでは、図22で示すように、co
nLeft->vcnt, conRight->vcntを比較し、頂点数の少な
い方の凸包を解除して、もう一方の凸包に対して解除し
た凸包の頂点を一点、一点付け加えていくことを行う。
頂点を付け加える過程は、頂点を一点からなる凸包と見
做して、マージプロセスを繰り返す。頂点を併合してい
く順序は、conRightの凸包を解除した場合にはconRight
の頂点を小さい順に併合していき、conLeftの凸包を解
除した場合には大きい順に併合していく。本プロセスで
は、一方の頂点が不動であるため無限ループに陥ること
は殆どなく、確実な凸包併合が可能となる。一度、併合
凸包を構成した後は、以前のマージプロセスに復帰し、
以後、Wrapping processで無限ループが再び発生しない
限り、通常のマージプロセスが続けられる。従って、バ
ックアッププロセスに伴う計算負荷の増大は、最小限に
抑えられる。
In this process, as shown in FIG.
Compare nLeft-> vcnt, conRight-> vcnt, cancel the convex hull with the smaller number of vertices, and add one point and one point to the other convex hull. ..
The process of adding vertices is regarded as a convex hull consisting of one point, and the merging process is repeated. The order of merging vertices is conRight when the convex hull of conRight is released.
The vertices of are merged in ascending order, and when the convex hull of conLeft is released, they are merged in ascending order. In this process, since one of the vertices is immovable, it hardly falls into an infinite loop, and reliable convex hull merging is possible. Once the merged convex hull has been constructed, it returns to the previous merge process,
After that, the normal merging process continues unless the infinite loop occurs again in the Wrapping process. Therefore, the increase in computational load associated with the backup process is minimized.

【0048】(B)干渉チェック前処理(近接点線形リ
スト) 凸多面体同士の干渉チェックにおいて、最近点を連続的
に探索していくための前処理である。この前処理を施す
ことにより、連続探索が極めて高速化される。通常、こ
の前処理は、図15に示す通り、凸包構成をした後に実
行される。近接点線形リストとは、CGモデルを構成す
る各頂点に対し、その頂点とエッジを介して繋がってい
る他の頂点とを線形リストで繋ぐデータ構造のことであ
り、branch方向にその頂点の近傍頂点、next方向に凸包
を構成する頂点が線形にリンクされる。
(B) Pre-processing of interference check (linear list of adjacent points) This is a pre-processing for continuously searching for the closest point in the interference check of convex polyhedrons. By performing this pre-processing, the continuous search is extremely speeded up. Usually, this pre-processing is executed after forming the convex hull as shown in FIG. The proximity point linear list is a data structure that connects each vertex forming a CG model to another vertex connected to the vertex via an edge by a linear list, and the neighborhood of the vertex in the branch direction. The vertices and the vertices forming the convex hull in the next direction are linearly linked.

【0049】(a) 近接点線形リストの例 図23は、直方体の近接点線形リストの例を示してい
る。図示の通り、近接点線形リストは、頂点を順次繋い
だnext方向と、各頂点にポリゴン辺を介して連結する近
接点を配列するbranch方向の2方向を持つ。branch方向
の先頭には、その頂点自身が入る。
(A) Example of Near-Point Linear List FIG. 23 shows an example of a rectangular parallelepiped near-point linear list. As shown in the figure, the proximity point linear list has two directions: a next direction in which vertices are sequentially connected and a branch direction in which proximity points connected to each vertex via a polygon edge are arranged. At the beginning of the branch direction, the vertex itself enters.

【0050】(b) 近接点線形リスト構成アルゴリズム 図24は対象物体の凸要素毎のポリゴンデータ説明図、
図25は近接点線形リスト構成アルゴリズムの説明図で
ある。対象物体が三角形ポリゴンの集合で構成されてい
るものとすると、近接点線形リストは以下のフローに従
って構成される。 1) 凸多面体のポリゴンデータを用意する(図24参
照)。 2) 各々のポリゴンデータ(pi,qi,ri)に対し、各
頂点をリストLに繋げていく。next方向を頂点に対する
線形リスト方向、branch方向を各頂点の近接点方向とす
る。リストLの先頭要素は第1番目のポリゴンの第1頂
点であり、作成途中では図25(a)に示すデータ構造と
なっている。具体的には以下のようにリストを作成す
る。 2-1) リストLの先頭要素topを割り付ける。すなわち、
topとして最初のポリゴンの最初の頂点を割り付ける。 2-2) ポリゴン(pi,qi,ri)に対し、以下の割付け
を繰り返す。 1) if(piが全てのnext方向頂点Ljに対し、pi≠Lj)
ならば、新しい要素piをnext方向の端にLj+1として割
り付ける(図25(b)参照)。ついで、頂点Lj+1のbranch
方向に対し、自分自身pi及びqi,riを割り付ける(図
25(c)参照)。
(B) Proximity point linear list construction algorithm FIG. 24 is an explanatory diagram of polygon data for each convex element of the target object,
FIG. 25 is an explanatory diagram of a near-point linear list construction algorithm. Assuming that the target object is composed of a set of triangular polygons, the near point linear list is structured according to the following flow. 1) Prepare polygon data for a convex polyhedron (see FIG. 24). 2) For each polygon data (pi, qi, ri), connect each vertex to the list L. The next direction is the linear list direction with respect to the vertices, and the branch direction is the neighboring point direction of each vertex. The first element of the list L is the first vertex of the first polygon, and has a data structure shown in FIG. Specifically, the list is created as follows. 2-1) Allocate the top element top of list L. That is,
Assign the first vertex of the first polygon as top. 2-2) Repeat the following allocation for polygons (pi, qi, ri). 1) if (pi is pi ≠ Lj for all next-direction vertices Lj)
If so, the new element p i is assigned to the end in the next direction as Lj + 1 (see FIG. 25 (b)). Then, the branch of vertex Lj + 1
Allocates pi, qi, and ri to the direction (see FIG. 25 (c)).

【0051】2) if(piがあるnext方向頂点Ljに対
し、Pi=Lj)ならば、頂点Ljのbranch方向に対し、q
i,riを割り付ける。もし、branch方向に既にqi,ri
と同一頂点があれば割り付けることはしない(図25(d)
参照)。 3) 頂点qiに対して上記1)、2)の処理を実行する。ただ
し、頂点qiに対するqi以外のbranch候補はpi,riで
ある。 4) 頂点riに対して上記1)、2)の処理を実行する。ただ
し、頂点riに対するri以外のbranch候補はpi,qiで
ある。 2-3) 全てのポリゴン集合∪i(pi,qi,ri)に対し、
2-2)の処理を繰り返す。
2) If if (pi = Lj for the vertex Lj in the next direction with Pi = Lj), q with respect to the branch direction of the vertex Lj.
Allocate i and ri. If it is already qi, ri in the branch direction
If there is the same vertex as, it will not be assigned (Fig. 25 (d)
reference). 3) Perform the processes 1) and 2) for the vertex qi. However, branch candidates other than qi for the vertex qi are pi and ri. 4) The above processes 1) and 2) are executed for the vertex ri. However, the branch candidates other than ri for the vertex ri are pi and qi. 2-3) For all polygon sets ∪i (pi, qi, ri),
Repeat the process of 2-2).

【0052】尚、近傍点線形リストを構成するためのク
ラス構成は、図7とは別の形式を取るとする。図7のク
ラス構成は、凸包構成以外に使うことはない。凸包構成
の過程において対象を覆う各ポリゴンは自動的に三角形
分割されるため、頂点同士を結ぶエッジは既に構成さ
れ、図7で示したデータ構造を有しているとする。近接
点線形リストを作成するアルゴリズムは、再帰的な手法
である。凸包 conの最大エッジcon->edgeから出発し、
con->edge->orig, con->edge->sym->orig, con->edge->
onext->sym->origの近接点線形リストを構成し、続い
て、エッジcon->edge->sym, con->edge->lnex->sym, co
n->edge->onextから出発して再帰的に各頂点をサーチし
ていく。同一頂点に対する2度以上の検索を避けるた
め、各頂点を検索する毎にハッシングを行う。
The class construction for constructing the neighborhood point linear list is assumed to have a format different from that shown in FIG. The class configuration of FIG. 7 is used only for the convex hull configuration. Since each polygon covering the target is automatically divided into triangles in the process of forming the convex hull, it is assumed that the edges connecting the vertices have already been formed and have the data structure shown in FIG. 7. The algorithm for creating the near-point linear list is a recursive method. Starting from the maximum edge con-> edge of the convex hull con,
con->edge-> orig, con->edge->sym-> orig, con->edge->
Construct a near-point linear list of onext->sym-> orig, followed by edges con->edge-> sym, con->edge->lnex-> sym, co
Starting from n->edge-> onext, each vertex is searched recursively. In order to avoid searching the same vertex more than once, hashing is performed every time each vertex is searched.

【0053】(c) ダンプファイルのフォーマット ダンプファイルのフォーマットは、図26に示すような
形式とする。このファイルフォーマットにおいて、高速
ローデングの必須項目は以下の通りである。 1) 凸包を構成する総頂点数(count)の項目があること。 2) 各々の頂点に番号付けがされること。 3) 各々の頂点に対し、その頂点の近接点個数(bcount)
を格納する項目があること。 4) 各々の頂点座標を格納する項目があること。
(C) Dump file format The dump file format is as shown in FIG. In this file format, the essential items for high-speed loading are as follows. 1) There must be a total number of vertices (count) that make up the convex hull. 2) Each vertex is numbered. 3) For each vertex, the number of neighbors of that vertex (bcount)
There is an item that stores. 4) There must be an item that stores each vertex coordinate.

【0054】(d) ダンプファイルからのローディング法 1) 凸包の総頂点数countを読み、各頂点を収めるcount
次元の配列を作る。 2) 配列に凸包の各頂点を収めていくと共に、各頂点間
をnext方向に結び線形リストを構成する。例えば、頂点
を収める配列をV〔N1〕とする時、V
(D) Loading method from dump file 1) Read the total number of vertices of the convex hull and count each vertex
Create an array of dimensions. 2) While accommodating each vertex of the convex hull in the array, connect each vertex in the next direction to form a linear list. For example, if the array containing the vertices is V [N 1 ], then V

〔0〕,V
〔1〕,...,を順にnext方向に結び、線形リストを
構成する。 3) 凸包の各頂点に対し、Branch方向の近接点番号(配列
内の位置を指定)を頼りに、Branch方向に近接点のリス
トを張る。例えば、凸包の全頂点を収める配列をV〔N
i〕とする時、頂点V
[0], V
[1] ,. . . , Are sequentially connected in the next direction to form a linear list. 3) For each vertex of the convex hull, draw a list of neighboring points in the Branch direction by relying on the neighboring point numbers in the Branch direction (specify positions in the array). For example, an array containing all the vertices of the convex hull is V [N
i ], the vertex V

〔0〕のBranchの番号が(0,9,1,7,
8)ならば、V
The branch number of [0] is (0,9,1,7,
If 8), then V

〔0〕のBranch方向にVV in the Branch direction of [0]

〔0〕,V
[0], V

〔9〕,V〔1〕,V〔7〕,V〔8〕を線形リストに
繋ぐ。上記のローディング法では、同じファイルに対し
て計二回( 1),2)が1回目、3)が二回目)の読み込みを
行う。各頂点のBranch数は殆どの場合において数10個
以下で抑えられるため、合計のローディング時間はO
(N)(凸包の総頂点数)である。凸包に対する図26
の形式のファイルをHLファイルと呼ぶ。
[9], V [1], V [7], V [8] are connected to a linear list. In the above loading method, the same file is read twice (1), 2) the first time and 3) the second time). In most cases, the number of Branches at each vertex can be suppressed to several tens or less, so the total loading time is O.
(N) (total number of vertices of convex hull). Figure 26 for the convex hull
A file of this format is called an HL file.

【0055】(C) 非凸多面体の第1の干渉チェック 以上の前処理により非凸多面体の凸包及び該凸包の近接
点線形リストが作成されれば、特願平6-209008号で提案
しているGilbert法による干渉チェックを適用して凸包
同士の干渉チェックを行い、凸包同士が干渉する場合に
は凸包を解除して非凸多面体を構成する凸多面体間の干
渉チェックを後述するBubble collision法に従って行
う。尚、凸包同士の干渉チェックに際しては、それ迄に
求まっている最接近点に近接する頂点を近接点線形リス
トより抽出し、これら頂点にGilbert法による干渉チェ
ック法を適用して所定時間後の最接近点を探索する。こ
のようにすることにより、干渉チェックに要する時間は
凸多面体を表現するポリゴン数にほとんど依存しない一
定数以下に抑えることができる。
(C) First interference check of non-convex polyhedron If a convex hull of the non-convex polyhedron and a near-point linear list of the convex hull are created by the above preprocessing, it is proposed in Japanese Patent Application No. 6-209008. The interference check by the Gilbert method is performed to check the interference between convex hulls, and when the convex hulls interfere with each other, the convex hull is released and the interference check between convex polyhedrons forming a non-convex polyhedron is described later. The Bubble collision method is used. When checking the interference between convex hulls, the vertices that are closest to the closest point that has been obtained so far are extracted from the neighboring point linear list, and the interference check method by the Gilbert method is applied to these vertices before a predetermined time. Search for the closest point. By doing so, the time required for the interference check can be suppressed to a fixed number or less that is almost independent of the number of polygons expressing the convex polyhedron.

【0056】(D)Bubble Collision 法による干渉チ
ェックの前処理 凸包同士が干渉し始めたら、バブルコライジョン法(Bub
ble Collision 法)を適用して非凸多面体間の干渉チェ
ックを行う。Bubble Collision 法では、非凸多面体を
構成する各ポリゴンをポリゴン上に中心を持つ複数の球
の組み合わせで覆い、それらの球を包含する球を階層的
に構成する。かかる球間の干渉チェックを階層的に行
い、最も接近したポリゴンの組み合わせを高速に探索
し、該ポリゴン同士の干渉チェックを行うことで非凸多
面体間の干渉チェックを行う。
(D) Pre-processing of interference check by Bubble Collision method When convex hulls start to interfere with each other, bubble collision method (Bubble Collision method)
ble Collision method) to check the interference between non-convex polyhedra. In the Bubble Collision method, each polygon that constitutes a non-convex polyhedron is covered with a combination of multiple spheres centered on the polygon, and spheres that include these spheres are hierarchically constructed. The interference check between the spheres is hierarchically performed, the combination of the closest polygons is searched at high speed, and the interference check between the polygons is performed to perform the interference check between the non-convex polyhedrons.

【0057】かかるBubble Collision 法を適用するに
は、非凸多面体を構成する各ポリゴンをポリゴン上に中
心を持つ複数の球の組み合わせで覆い、それらの球を包
含する球を階層的に構成する前処理が必要になる。階層
的に配置された球集合のツリーをSphere Treeと呼ぶ。S
phere Treeの構成は、分割統治法で行われ、Nポリゴン
からなるCGモデルに対して、O(N・log N)の時間
で処理が終わる。本処理とQuinlan法におけるSphere Tr
eeの構成法の違いは、Quinlan法ではスキャン変換(scan
conversion)に類似した方法であるのに対し、本手法で
は、対象を覆うポリゴン数を考慮し、スケールSの値を
パラメータとした効率的な構成を行う。
To apply the Bubble Collision method, each polygon forming a non-convex polyhedron is covered with a combination of a plurality of spheres having a center on the polygon, and spheres including the spheres are hierarchically constructed. Processing is required. The tree of spheres arranged hierarchically is called Sphere Tree. S
The construction of the phere tree is performed by the division-and-conquer method, and the processing is completed in O (N · log N) time for the CG model composed of N polygons. Sphere Tr in this process and Quinlan method
The difference in the ee configuration method is that the scan conversion (scan
In contrast to the method similar to (conversion), the present method considers the number of polygons covering the target and performs an efficient configuration using the value of the scale S as a parameter.

【0058】(a) Leaf Spheresの構成法 干渉チェックの対象となる非凸多面体は三角形ポリゴン
の集合で覆われているとする。この時、三角形ポリゴン
上に中心を持ち、対象を覆う球集合の最も底辺に位置す
る基本球をLeaf Sphereと呼ぶ。図27はLeaf Spheres
の例を示している。Leaf Spheresの構成法は以下の通り
である。 1) 初期設定 入力データは各三角形ポリゴンの頂点座標、スケールパ
ラメータSとする。スケールパラメータSの値の設定法
は後述する。図28に示すように、三角形ポリゴンの頂
点座標を基に辺の長さd0=|p1−p0|, d1=|p2−p1|, d2
=|p0−p2|を計算した時に、d0≧d1≧d2になっていると
する。もし、これを満たさなければ、頂点番号を入れ換
える。辺p0p1上における単位ベクトル e0=(p1−p0)/d
0を設定する。三角形ポリゴンの高さをhをh=√{d2 2
−((p1−p0)・(p0−p2)/do)2}で計算する。
(A) Leaf Spheres Construction Method It is assumed that the non-convex polyhedron to be subjected to the interference check is covered with a set of triangular polygons. At this time, the basic sphere having the center on the triangular polygon and located at the bottom of the set of spheres covering the target is called Leaf Sphere. Figure 27 shows Leaf Spheres
Shows an example of. The configuration method of Leaf Spheres is as follows. 1) The initial setting input data is the vertex coordinates of each triangular polygon and the scale parameter S. The method of setting the value of the scale parameter S will be described later. As shown in FIG. 28, the side lengths d 0 = | p 1 −p 0 |, d 1 = | p 2 −p 1 |, d 2 based on the vertex coordinates of the triangular polygon.
Assume that d 0 ≧ d 1 ≧ d 2 when calculating = | p 0 −p 2 |. If this is not satisfied, the vertex numbers are exchanged. Unit vector e 0 = (p 1 −p 0 ) / d on edge p 0 p 1
Set to 0 . Let h be the height of the triangular polygon h = √ {d 2 2
Calculate with − ((p 1 −p 0 ) ・ (p 0 −p 2 ) / d o ) 2 }.

【0059】2) メイン処理 2-1) 辺p0p1に沿ってLeaf Spheresを作成する。 N0=[d0/S]を計算し、もしN0=0ならば、半径 r0=d0
/2とする。N0≠0ならば r0=d0/(2・N0)とする。従っ
て、この時には辺P0P1に沿って半径r0の球がN0個並ぶ。 2-2) もし、(r0>h)ならば、辺p0p1上のLeaf Spheresで
三角形ポリゴン全体が覆われているとし(図29参照)、
処理を終了する。 2-3) もし、(r0≦h)ならば、単位ベクトルe1=(p2−p1)
/d1, e2=(p0−p2)/d2および N1=[d1/S], N2=[d2
/S]を計算し、辺p1p2、辺p2p0に沿って、辺p0p 1と同様
にLeaf Spheresを作成する。
2) Main processing 2-1) Side p0p1Create Leaf Spheres along with. N0= [D0/ S], if N0= 0, radius r0= D0
/ 2. N0R ≠ 00= D0/ (2 ・ N0). Obey
At this time, side P0P1Along radius r0The ball is N0Line up individually. 2-2) If (r0> H), edge p0p1On Leaf Spheres above
Assume that the entire triangular polygon is covered (see Figure 29),
The process ends. 2-3) If (r0≤ h), the unit vector e1= (P2−p1)
/ D1, e2= (P0−p2) / D2And N1= [D1/ S], N2= [D2
/ S] is calculated and side p1p2, Side p2p0Along the side p0p 1same as
Create Leaf Spheres.

【0060】2-4) ついで、三角形ポリゴンの内部をLea
f Spheresで覆う。図30に示すように三角形ポリゴン
の底辺を直径 diam0=2・r0だけ底上げし、p0p1に沿って
作成したのと同様にして底上げした底辺上に Leaf Sphe
resの球中心を配置する。球の半径rは、今回計算した
半径riと一つ前の半径ri-1と大小比較し、大きい方を
選択する。即ち、r=max(ri-1,ri)により更新してい
く。これにより、Leaf Spheresを積み上げていった時の
上下間の Leaf Spheres同士の隙間を小さくすることが
できる。 2-5) 上記2-3)、 2-4)の処理を底上げした三角形の高さ
hi=hi-1−diami-1がhi<diami-1/2を満たすまで繰り
返す。
2-4) Then, the inside of the triangular polygon is Lea
Cover with f Spheres. As shown in FIG. 30, the bottom of the triangular polygon is raised by a diameter diam 0 = 2 · r 0 , and Leaf Sphe is placed on the raised bottom in the same way as it was created along p 0 p 1.
Place the sphere center of res. As for the radius r of the sphere, the radius r i calculated this time is compared with the previous radius r i-1 to determine which is larger. That is, the update is performed by r = max (r i-1 , r i ). This makes it possible to reduce the gap between Leaf Spheres between the top and bottom when stacking Leaf Spheres. 2-5) The height of the triangle which raised the processing of 2-3) and 2-4) above.
Repeat until h i = h i-1 −diam i-1 satisfies h i <diam i-1 / 2.

【0061】(b) 分割統治法によるSphere Treeの構成
法 Sphere Treeとは、Leaf Spheresを要素として、それら
を包含する球を階層的に配置したツリー状データ構造の
ことである。ツリーの分岐の度数としては、二分木をと
る。この理由は、任意の非凸多面体に対しては、二分木
による構成が最もバランスする(各階層の枝下に含まれ
るLeaf Sphereの個数がバランスする)可能性が高いた
めである。二分木以外に例えば八分木を採用したとする
と、元々、対象の形状が8象限に対してバランスしてい
ない限り各階層における八分木の各枝下にLeaf Sphere
がほぼ等しくちりばめられる可能性は低い。
(B) Construction Method of Sphere Tree by Divide-and-Conquer Method A Sphere Tree is a tree-like data structure in which spheres that contain Leaf Spheres are arranged hierarchically. A binary tree is used as the frequency of branching of the tree. The reason for this is that for any non-convex polyhedron, the binary tree configuration is most likely to be balanced (the number of Leaf Spheres contained in the branches of each hierarchy is balanced). If, for example, an octree is adopted in addition to the binary tree, the Leaf Sphere is originally under each branch of the octree in each layer unless the shape of the target is originally balanced against the eight quadrants.
Are unlikely to be studded almost equally.

【0062】図31はSphere Tree構成のためのデータ
構造、図32はそのフローを示している。Sphere Tree
の基となる三角形ポリゴン上に中心を持つ球をLeafで表
し、Leafの集合をLeavesで表す。Sphere Treeの各枝に
配置される球要素はSphereで表す。Leaf、Sphereとも球
の中心をcenter,半径をrに格納する。LeafのメンバPlan
e* planeは、そのLeaf Sphereの中心がのる三角形ポリ
ゴンをポイントする。Leavesのメンバmax,minにはLeaf*
leavesに連なるLeaf要素 iのcenterを(xi,y i,zi)とす
る時、以下の値が入る。 max=( MAXi {xi} , MAXi {yi} , MAXi {zi} ) min=( MINi {xi} , MINi {yi} , MINi {zi} ) また、leafcntには、Leaf* leavesに連なるLeaf要素数
が入り、avcenterにはLeaf要素の中心座標の和を要素数
で割った重心が入る。Sphereのメンバleft, rightは二
分木を表し、Leavesはその階層以下に含まれるLeaf要素
の集合をポイントする。
FIG. 31 shows data for Sphere Tree configuration.
The structure, FIG. 32, shows the flow. Sphere Tree
Leaf is a sphere centered on a triangular polygon that is the base of
Then, the set of leaves is represented by Leaves. On each branch of the Sphere Tree
The sphere element to be placed is represented by Sphere. Both Leaf and Sphere are spheres
The center of is stored in center and the radius is stored in r. Leaf Member Plan
e * plane is a triangular poly with the center of its Leaf Sphere
Point to Gong. Leaves for members max and min of Leaves
 The center of Leaf element i that is connected to leaves is (xi, y i, zi)
The following values will be entered when max = (MAXi(xi}, MAXi(yi}, MAXi(zi}) min = (MINi(xi}, MINi(yi}, MINi(zi}) In leafcnt, the number of Leaf elements in the Leaf * leaves.
Is entered, and avcenter is the sum of the center coordinates of Leaf elements
The center of gravity divided by is entered. Sphere members left and right are two
Represents a branch tree, and Leaves is a Leaf element included in the hierarchy and below.
Point to the set.

【0063】Sphere Tree構成アルゴリズムの概要は以
下の通りである。 1) Planesのnext方向にリニアにつながれたポリゴン情
報を入力として、各ポリゴン毎にLeaf要素の集合を作
り、それら全体をポリゴン集合全体にわたりリニアにリ
ンクする(図32、ステップ2001)。 2) Leafのリニア集合leaves->leavesを入力として、分
割統治法により、Sphere Treeを構成する。 2-1) Leaf要素数が0または1の場合は、ステップ20
02、2003の処理を実行する。 2-2) Leaf要素数が2以上の場合は、二分木のメモリを
確保する(ステップ2004)。
The outline of the Sphere Tree construction algorithm is as follows. 1) Using the polygon information linearly connected in the next direction of the Planes as an input, a set of Leaf elements is created for each polygon, and all of them are linearly linked over the entire polygon set (FIG. 32, step 2001). 2) A linear set leaves-> leaves of Leaf is input, and a Sphere Tree is constructed by the division and conquer method. 2-1) If the number of Leaf elements is 0 or 1, step 20
The processing of 02 and 2003 is executed. 2-2) If the number of Leaf elements is 2 or more, the memory of the binary tree is secured (step 2004).

【0064】2-3) Leaf要素集合leaves->leavesを分割
するために、leaves->leavesに対するmax,minを計算し
(ステップ2005)、Leaf要素集合がX軸、Y軸、Z軸
のどの軸方向に最も伸展しているかを判定し(Leaf要素
数が最大の軸方向を求める)、伸展方向の中心値を算出
する(ステップ2006)。 2-4) Leaf要素集合を、2-3) で求めた軸方向に対して中
心値を境に分割する。(ステップ2007)。 2-5) 分割した各々の Leaf要素集合に対して、再帰的
に分割統治法を行う(ステップ2008)。 2-6) 再帰的に求めた left,rightの重心avcenterと要
素数leafcntを基に、親のSphereのavcenterとleafcntを
求める(ステップ2009)。 2-7) left, rightをマージ(併合)し、親のSphereを構成
する(ステップ2010)。
2-3) In order to divide the Leaf element set leaves-> leaves, calculate max, min for leaves-> leaves
(Step 2005), it is determined which of the X-axis, Y-axis, and Z-axis the Leaf element set extends the most (the axial direction with the largest number of Leaf elements is calculated), and the center value of the extension direction is calculated. (Step 2006). 2-4) Divide the Leaf element set with the center value as the boundary in the axial direction obtained in 2-3). (Step 2007). 2-5) The division and conquer method is recursively performed on each of the divided Leaf element sets (step 2008). 2-6) Based on the left and right center of gravity avcenter and the number of elements leafcnt recursively obtained, the avcenter and leafcnt of the parent Sphere are obtained (step 2009). 2-7) The left and right are merged (merged) to form the parent Sphere (step 2010).

【0065】親のSphereを構成するに当たり、その半径
と中心の求め方として二通り用意する。第一の方法は、
子Sphereのleft,rightを包含する最小の球を構成する方
法、第二の方法は、2-6)で求めたavcenterを中心とし
て、その階層以下に含まれるLeaf要素集合を包含する最
小の球を構成する方法である。親Sphereとしては、上記
二つの球を求め、半径の小さい方を採用する。図33は
上記アルゴリズムに基づき、直方体に対して求めたSphe
re Treeの例を示している。
In constructing the parent Sphere, there are two ways to obtain the radius and center. The first method is
The method of constructing the smallest sphere that includes the left and right of the child Sphere, and the second method is the smallest sphere that includes the Leaf element set contained in the hierarchy below the avcenter found in 2-6). Is a method of configuring. As the parent Sphere, find the above two spheres and use the one with the smaller radius. FIG. 33 shows the Sphe calculated for the rectangular parallelepiped based on the above algorithm.
The example of re Tree is shown.

【0066】(c) スケールパラメータS 対象をいくつのLeaf Spheresで覆うかは、対象を覆うポ
リゴン数Nに大きく依存する。Nが充分大きい場合に
は、一つのポリゴンを細かい球で覆う必要はなくなる。
一方、Nが小さい場合には、適度にLeaf Spheresの数を
増やし、球による被覆の近似を上げる必要がある。境と
なるポリゴン数は丁度100前後である。スケールパラ
メータSは以下のアルゴリズムに従って計算する。1)
凸包を構成する頂点集合に対して、 max=( MAXi {xi} , MAXi {yi} , MAXi {zi} ) min=( MINi {xi} , MINi {yi} , MINi {zi} ) を計算し、凸包を包絡する球の半径R=|max−min|/
2を求める。
(C) Scale Parameter S How many Leaf Spheres cover a target largely depends on the number N of polygons covering the target. When N is sufficiently large, it is not necessary to cover one polygon with a fine sphere.
On the other hand, when N is small, it is necessary to appropriately increase the number of Leaf Spheres and improve the approximation of the coverage by the sphere. The number of boundary polygons is about 100. The scale parameter S is calculated according to the following algorithm. 1)
For a set of vertices forming a convex hull, max = (MAX i {x i }, MAX i {y i }, MAX i {z i }) min = (MIN i {x i }, MIN i {y i }, MIN i {z i }) is calculated, and the radius R of the sphere enclosing the convex hull is R = | max−min | /
Ask for 2.

【0067】2) 対象のポリゴン数があるしきい値 PLAN
ELIMITより小さい時には、あるスケール定数 SPHERESCA
LEを使って、 S=R/SPHERESCALE とする。他の場合には、 S=R とする。 PLANELIMIT, SPHERESCALEの典型的な値は、PL
ANELIMIT=100,SPHERESCALE=8である。
2) Threshold PLAN with the number of target polygons
A scale constant SPHERESCA when smaller than ELIMIT
Use LE to set S = R / SPHERESCALE. In other cases, S = R. Typical values for PLANELIMIT and SPHERESCALE are PL
ANELIMIT = 100 and SPHERESCALE = 8.

【0068】(D)非凸多面体干渉チェックにおけるBu
bble Collision法 非凸多面体の干渉チェックを高速に行うために、各々の
非凸多面体をSphere Treeで包絡し、そのツリーをDepth
-firstの探索法でチェックしていき、最も接近するSphe
reのペアを検索する。検索したSphereの中心が載ってい
るポリゴンの組み合わせに対してGilbert法を適用をす
ることにより、二つの非凸多面体の最近点を算出する。
本手法とQuinlan法との違いは、Sphere間の距離の計算
法にある。本手法では、Sphere間の距離を求めるに際
し、そのSphereが Sphere Treeのどの階層にあるかによ
って、Sphere間の距離の定義を変更する。これにより、
Bubble Collision法で問題となっている、最終的にチェ
ックしなければならないポリゴンペアの数を抑えること
ができる。
(D) Bu in non-convex polyhedron interference check
bble Collision method In order to perform the collision check of non-convex polyhedrons at high speed, each non-convex polyhedron is enveloped with Sphere Tree and the tree is Depth
-Check with the first search method, the closest Sphe
Find the re pair. The nearest point of two non-convex polyhedrons is calculated by applying the Gilbert method to the combination of polygons on which the center of the searched Sphere is placed.
The difference between this method and the Quinlan method lies in the calculation method of the distance between Spheres. In this method, when calculating the distance between Spheres, the definition of the distance between Spheres is changed depending on the hierarchy of the Sphere in the Sphere Tree. This allows
It is possible to reduce the number of polygon pairs that have to be finally checked, which is a problem in the Bubble Collision method.

【0069】(a) Depth-firstによる最近点探索法 二つの非凸多面体の最近点を以下のDepth-firstアルゴ
リズムに従って求める。尚、図34、図35は Bubble Co
llision法における Bubble Collision Checkの基本関数
である。 1) 二物体間の距離の初期値cq->distを無限大に取る。
ここで、cqは干渉チェックにおける環境クラスの変数を
表す。詳細は後述する。 2) 今、着目しているSphere同士の距離を求め、その値
が cq->dist以下ならば、カレントの(着目している)Sph
ereを以下の方針に従って縦方向に解除していく(ステッ
プ2101)。 2-1) カレントのSphereが両方ともLeaf Sphereでない時
には、半径の大きい方を解除する(ステップ2102、
2105)。 2-2) 解除した結果得られる二つの子Sphereと解除しな
いSphereとの距離を求め、近い方を先に探索する(ステ
ップ2103、2104) 。 2-3) カレントのSphereの一方が Leaf Sphereである時
には、Leaf Sphereでない方を解除し、2-2)と同様に探
索する(ステップ2106、2107)。
(A) Depth-first closest point search method The closest points of two non-convex polyhedra are obtained according to the following Depth-first algorithm. 34 and 35 show Bubble Co.
This is the basic function of Bubble Collision Check in the llision method. 1) Take the initial value cq-> dist of the distance between two objects to infinity.
Here, cq represents the environment class variable in the interference check. Details will be described later. 2) Find the distance between Spheres of interest, and if the value is less than or equal to cq-> dist, current Sph of interest.
Ere is released vertically according to the following policy (step 2101). 2-1) If both current Spheres are not Leaf Spheres, release the one with the larger radius (step 2102,
2105). 2-2) The distance between the two child Spheres obtained as a result of the cancellation and the Spheres that are not canceled is obtained, and the closer one is searched first (steps 2103 and 2104). 2-3) When one of the current Spheres is Leaf Sphere, the one that is not Leaf Sphere is released and the search is performed in the same manner as 2-2) (steps 2106 and 2107).

【0070】3) カレントのSphereが両方ともLeaf Sphe
reである時には(ステップ2108)、それらのLeaf Sph
ereがのっている三角形ポリゴンペアに対してGilbert法
を適用し、三角形ポリゴンペア間の距離distを求める
(ステップ2110)。 4) 求めたdistの値がcq->distより小さければ、cq->dis
tの値を更新し、上記の処理を再帰的に繰り返す(ステッ
プ2111)。 上記アルゴリズムでは、3) の過程において、同一の三
角形ポリゴンペアによる干渉チェックが多数回発生す
る。そのため、ポリゴンペアに対してハッシングを行
い、不必要な干渉チェックを行わないようにしている、
(ステップ2109)。
3) Both current Spheres are Leaf Sphe
When re (step 2108), those Leaf Sphs
The Gilbert method is applied to the triangular polygon pair on which ere is present, and the distance dist between the triangular polygon pairs is obtained (step 2110). 4) If the obtained dist value is smaller than cq-> dist, cq-> dis
The value of t is updated, and the above processing is recursively repeated (step 2111). In the above algorithm, interference check by the same triangular polygon pair occurs many times in the process of 3). Therefore, hashing is performed on the polygon pair to prevent unnecessary interference check.
(Step 2109).

【0071】(b) Sphere間の距離 Bubble Collision法の効率を上げるには、cq->distの値
を出来るだけ速やかに小さくし、Depth-firstにおける
探索回数を減らすことが必要である。探索回数を減らす
ために、Sphere間の距離を以下のように定義する。 1) Intermediate Sphere(中間球)の間の距離は、中心間
の距離から両方の半径を引いた値(図36の)とする。 2) Inrermediate SphereとLeaf Sphere間の距離は、中
心間の距離からIntermediate Sphereの半径を引いた値
(図36の,)とする。 3) Leaf Sphere間の距離は、中心間の距離(図36の)
とする。この定義により、Sphere Treeの他の枝におけ
る探索の深度を浅く留めることができ、また、図35のス
テップ2110において同一ポリゴンペアが発生するこ
ともなくなる。
(B) Distance between Spheres In order to improve the efficiency of the Bubble Collision method, it is necessary to reduce the value of cq-> dist as quickly as possible and reduce the number of searches in Depth-first. To reduce the number of searches, define the distance between Spheres as follows. 1) The distance between the Intermediate Spheres is the distance between the centers minus both radii (in FIG. 36). 2) The distance between Inrermediate Sphere and Leaf Sphere is the distance between the centers minus the radius of Intermediate Sphere.
(In FIG. 36). 3) The distance between Leaf Spheres is the distance between the centers (Fig. 36)
And With this definition, the depth of the search in other branches of the Sphere Tree can be kept shallow, and the same polygon pair will not occur in step 2110 of FIG.

【0072】但し、この定義には、一つだけ難点があ
る。それは、二物体が複数の点で接触する多点接触の場
合である。この場合には、cq->distの値が、ある接触点
のために0に近い値を取ってしまうため、他の接触点の
探索においてその点を含むSphereを見逃してしまうこと
がある。これを避けるため、Sphere間の距離に、以下の
定義を付け加える。 4) もし、cq->distの値がある微少量EPSより小さい
場合には、Sphere間の距離を1) の定義とする。微少量
EPSの典型的な値は、1/104である。
However, this definition has one drawback. That is the case of multi-point contact where two objects touch at multiple points. In this case, the value of cq-> dist takes a value close to 0 due to a certain contact point, so that the Sphere including that point may be missed in the search for another contact point. To avoid this, add the following definition to the distance between Spheres. 4) If the value of cq-> dist is smaller than a certain small amount EPS, the distance between Spheres is defined as 1). A typical value for a small amount of EPS is 1/10 4 .

【0073】(c) 計算負荷 Bubble Collision法の計算負荷は、最も効率良い場合に
おいてO(logN0+logN1)(N0,N1はそれぞれ各対象を
被覆しているLeaf Sphereの総数)である。被覆の度合
い、即ち、Leaf Sphereの個数は多すぎても少なすぎて
もいけない。少なすぎるとcq->distの値がなかなか小さ
くならず、探索回数が増えてしまう。また、多すぎる場
合には、探索の深度自身が深くなる。効率を上げるため
の現実的な方法としては、対象を表現するポリゴン数が
大きい時には、1ポリゴン当たり1Leaf Sphereで覆
い、ポリゴン数が少なくなるに従い、Leaf Sphere数を
増やすようにする。具体的には、前述のスケールパラメ
ータSに従って被覆の度合いを調整する。
(C) Computational load In the most efficient case, the computational load of the Bubble Collision method is O (logN 0 + logN 1 ) (N 0 and N 1 are the total number of Leaf Spheres covering each target). . The degree of coverage, that is, the number of Leaf Spheres must not be too large or too small. If it is too small, the value of cq-> dist does not become small easily and the number of searches increases. Also, when the number is too large, the search depth itself becomes deep. As a practical method for increasing the efficiency, when the number of polygons expressing the target is large, 1 Leaf Sphere is covered per polygon, and the number of Leaf Spheres is increased as the number of polygons decreases. Specifically, the degree of coverage is adjusted according to the scale parameter S described above.

【0074】計算負荷を下げる他の方法では、相対誤差
パラメータcq->alphaの導入である。図35のステップ2
111に示すようにcq->alphaを導入すると、cq->dist
の更新値は、求めたばかりのポリゴン間の距離distより
小さく設定され、他の枝における探索の条件が厳しくな
る。cq->alphaの値は0から1の実数を取り、求めた距
離distに対して誤差を導入する効果がある。最近点間距
離の真値をdとすると、dist≧d≧・dist・(1−cq->alph
a)の関係が成り立つ。相対誤差パラメータは、対象同
士が大きく離れている場合には効果が大きく、近づくに
つれて効果が薄れ、接触している場合には、cq->alpha
=0の場合と全く変わらなくなる。
Another way to reduce the computational load is the introduction of the relative error parameter cq-> alpha. Step 2 of Figure 35
If you introduce cq-> alpha as shown in 111, cq-> dist
The update value of is set to be smaller than the distance dist between the polygons that has just been obtained, and the search conditions on other branches become stricter. The value of cq-> alpha takes a real number from 0 to 1, and has the effect of introducing an error into the obtained distance dist. If the true value of the distance between the nearest points is d, then dist ≧ d ≧ ・ dist ・ (1−cq-> alph
The relationship of a) is established. The relative error parameter has a large effect when the objects are far apart from each other, the effect weakens as the objects get closer, and cq-> alpha when the objects are in contact.
It is completely the same as when = 0.

【0075】(E)凸多面体干渉チェックにおける凸包
間連続型Gilbert法と非凸多面体用Bubble Collision法
の融合。 非凸多面体間の干渉チェックを出来るだけ無駄なく行う
ために、非凸多面体間が充分離れている場合には非凸多
面体を包含する凸包を構成し、凸包間に連続型Gilbert
法による干渉チェックを適用する。凸包同士が干渉を始
めたならば、Bubble Collision法に自動的にスイッチす
る。スイッチングの指標は、凸包間の距離とする。
(E) Fusion of continuous Gilbert method between convex hulls and Bubble Collision method for non-convex polyhedron in convex polyhedron interference check. In order to check interference between non-convex polyhedrons as efficiently as possible, if the non-convex polyhedrons are sufficiently separated, construct a convex hull that includes the non-convex polyhedron, and use continuous Gilbert between the hulls.
Apply interference check by law. If convex hulls start to interfere with each other, it automatically switches to Bubble Collision method. The index of switching is the distance between the convex hulls.

【0076】(a) 干渉チェック用データ構造 図37,図38,図39は本干渉チェックアルゴリズム
を表現するために必要となる干渉チェックデータ構造の
中枢部分を示している。CollisionQueは干渉チェック用
の環境を定義するクラス、ColQue干渉チェックを行う対
象を表現するクラス、Primsは対象を構成する頂点を表
現するクラス、ConvexHullは図32に示すHLファイル
から構成した凸包を表現するクラス、MetaLeaf, MetaLe
aves, MetaSphereは、後ほど説明するメタツリー関係の
クラスである。
(A) Data structure for interference check FIGS. 37, 38, and 39 show the central part of the interference check data structure necessary for expressing the present interference check algorithm. CollisionQue is a class that defines the environment for collision check, ColQue is a class that represents the target of collision check, Prims is a class that represents the vertices that make up the target, and ConvexHull is a convex hull that is composed of the HL file shown in FIG. Classes, MetaLeaf, MetaLeaf
aves and MetaSphere are metatree related classes that will be explained later.

【0077】今、問題としている対象を二つの組み分
け、それぞれ、ColQueリスト1、ColQueリスト2とす
る。各々のColQueリストは、クラスColQueのnextポイン
タを介してリニアにつながれ、それらの先頭要素が環境
クラスCollisionQueのnext, next2につながれている。
この時、本アルゴリズムは、ColQueリスト1、ColQueリ
スト2の間で最も近接するポイントを捜し出す。ColQue
リスト1内、ColQueリスト2内での干渉チェックは行わ
ない。例えばColQueリスト1としてロボット1の各リン
ク、ColQueリスト2としてロボット2の各リンクを設定
すると、ロボット1とロボット2の間で干渉チェックを
行い、ロボット1の各リンク同士、ロボット2の各リン
ク同士の干渉チェックは無視される。ロボット1のリン
ク数をL1,ロボット2のリンク数をL2とすると単純
には、L1×L2回の干渉チェックを行わなければなら
ないが、この過程を高速化する方法がメタツリーであ
る。これについては後述する。
Now, the objects in question are divided into two groups, a ColQue list 1 and a ColQue list 2, respectively. Each ColQue list is linearly connected via the next pointer of the class ColQue, and the first element thereof is connected to the next and next2 of the environment class CollisionQue.
At this time, the present algorithm searches for the closest point between ColQue list 1 and ColQue list 2. ColQue
Interference check is not performed in List 1 and ColQue List 2. For example, if each link of the robot 1 is set as the ColQue list 1 and each link of the robot 2 is set as the ColQue list 2, interference check between the robot 1 and the robot 2 is performed, and each link of the robot 1 and each link of the robot 2 are Interference check is ignored. If the number of links of the robot 1 is L1 and the number of links of the robot 2 is L2, the interference check must be performed L1 × L2 times, but the meta tree is a method of speeding up this process. This will be described later.

【0078】(b)Gilbert法の概要 凸多面体同士の干渉チェックを頂点数に対してリニアの
計算量で実行するアルゴリズムがGilbert法である。図
40は、Gilbert法による最近点算出法の基本的考えを
示している。尚、詳細は特願平6-209008号公報(最接近
点探索方法及びその前処理方法)を参照されたい。Gilbe
rt法では、まず、対象の重心同士を結んだベクトルν0
を作る。−ν0(およびν0)と各頂点との内積に対し
て、最大値を計算することにより、最近点の候補p0
0を見つけ出す(図40(a))。ν0をp0,q0を結んだ
ベクトルν1に更新し、同様の内積計算により新たな候
補p1,q1を見つけ出す(図40(b))。一般にνiを頂点
集合{pk}が張るポリゴンと{qk}が張るポリゴン間の
最近ベクトルとすると、上記処理は数回の繰り返しによ
り収束し、最終的に各対象上における最近点および最近
ベクトルνfinalが得られる(図40(c))。{pk},{qk
が張る図形は何れも三角形、エッジまたは1頂点である
ため、この間の距離は簡単に求められる。上記のよう
に、Gilbert法の計算負荷は、対象を構成する各頂点と
の内積計算により発生する。従って、その計算オーダは
O(n1+n2)(n1,n2:各対象の頂点数)である。
(B) Outline of Gilbert method The Gilbert method is an algorithm for executing the interference check between convex polyhedra with a linear calculation amount with respect to the number of vertices. FIG. 40 shows the basic idea of the closest point calculation method by the Gilbert method. For details, refer to Japanese Patent Application No. 6-209008 (closest point search method and preprocessing method thereof). Gilbe
In the rt method, first, the vector ν 0 connecting the centers of gravity of the objects
make. By calculating the maximum value for the inner product of −ν 0 (and ν 0 ) and each vertex, the closest point candidate p 0 ,
Find out q 0 (FIG. 40 (a)). ν 0 is updated to a vector ν 1 that connects p 0 and q 0, and new candidates p 1 and q 1 are found by the same inner product calculation (FIG. 40 (b)). In general, if ν i is the nearest vector between the polygon spanned by the vertex set {p k } and the polygon spanned by {q k }, the above process converges after several iterations, and finally the nearest point and the nearest point on each object The vector ν final is obtained (Fig. 40 (c)). {p k }, {q k }
Since each of the figures extending over is a triangle, an edge, or a vertex, the distance between them can be easily obtained. As described above, the calculation load of the Gilbert method is generated by the inner product calculation with each vertex forming the object. Therefore, the calculation order is O (n 1 + n 2) : a (n 1, n 2 number of vertices of each object).

【0079】(c) 連続型Gilbert法 最近点を連続的に求めていく場合には、前ステップで求
めた最近点の情報を使うことにより一層、効率的に次の
最近点を計算することができる。図41は本アルゴリズ
ムの概念図を示している。上記(b)で説明したようにGil
bert法では、毎回、全点にわたる内積計算を繰り返す。
最近点を連続的に追跡していく場合、次ステップにおけ
る最近点の位置は前ステップにおける最近点の近傍に存
在するはずである。従って、Gilbert法の内積計算は、
最近点の近傍のみで充分である。具体的にはνfinal(図
40)を構成する頂点集合{pk},{qk}の各々に対し
て、ポインタ変数branch方向をサーチして近傍頂点の和
集合をつくり、これに対して内積を取る。近傍頂点の和
集合を構成するに際しては、ハッシングを使い同一頂点
の重複を避けるようにする。
(C) Continuous Gilbert Method When the closest point is continuously obtained, the next closest point can be calculated more efficiently by using the information of the closest point obtained in the previous step. it can. FIG. 41 shows a conceptual diagram of this algorithm. Gil as described in (b) above
In the bert method, the inner product calculation for all points is repeated every time.
When the closest points are continuously tracked, the position of the closest point in the next step should exist near the closest point in the previous step. Therefore, the inner product calculation of Gilbert's method is
Only the neighborhood of the closest point is enough. Specifically, for each of the vertex sets {p k }, {q k } that compose ν final (FIG. 40), the pointer variable branch direction is searched to create a union of neighboring vertices, and Take the dot product. When constructing the union of neighboring vertices, hashing is used to avoid duplication of the same vertices.

【0080】連続型Gilbert法の計算負荷は、近傍頂点
の和集合の要素数に比例する。この値は、厳密に言え
ば、対象を表現するポリゴン数およびそのパッチングの
仕方に依存する。例えば円錐や円柱の底面を非常に細か
く花びら状にバッチングした場合には、中心付近におけ
る近傍頂点和集合の要素数は、他の領域に比べ格段に大
きくなる。しかしながら、このような例外を除き、他の
多くの場合において、要素数は充分小さい値(具体的に
は20〜30以下)に抑えられる。従って、連続型Gilb
ert法の計算負荷は、対象に依らず一定値以下というこ
とができる。16Mflopsの計算機マシーンを使ったラフな
評価では、殆どの対象に対して0.5ms/cycleの性能が
でている。
The calculation load of the continuous Gilbert method is proportional to the number of elements in the union of neighboring vertices. Strictly speaking, this value depends on the number of polygons that represent the target and how to patch them. For example, when the bottom surface of a cone or a cylinder is very finely batched into a petal shape, the number of elements in the neighborhood vertex union set near the center is significantly larger than in other regions. However, except for such an exception, in many other cases, the number of elements is suppressed to a sufficiently small value (specifically, 20 to 30 or less). Therefore, continuous Gilb
It can be said that the calculation load of the ert method is below a certain value regardless of the target. A rough evaluation using a 16Mflops computer machine shows a performance of 0.5ms / cycle for most targets.

【0081】(d) 融合アルゴリズム 図42は連続型Gilbert法とBubble Collision法の融合
アルゴリズムのフローを示している。凸包の外側では、
連続型Gilbert法による干渉チェックを行い(ステップ3
001)、干渉しなければステップ3002で「no」
となり、その結果を最近点とする(ステップ3003)。
凸包同士が干渉チェックしだしたならば、ステップ30
02で「yes」となり、Bubble Collision法に移行し(ス
テップ3004)、その結果を最近点とする(ステップ
3005)。再び、対象間の距離が離れ、連続型Gilbert
法の算出する距離が0より大きくなったならば、ステッ
プ2002で「no」となり、Bubble Collision法をや
め、連続型Gilbert法の結果を最近点とする。上記アル
ゴリズムにおける難点は、対象同士が干渉しだし、一方
が他方を飲み込むような状況においても連続型Gilbert
法が距離0を算出するか否かである。これに関しては、
3次元のGilbert法を4次元に拡張することにより解決
する。
(D) Fusion Algorithm FIG. 42 shows the flow of the fusion algorithm of the continuous Gilbert method and the Bubble Collision method. Outside the convex hull,
Interference check by continuous Gilbert method (Step 3
001), if there is no interference, in step 3002 "no"
And the result is set as the closest point (step 3003).
If the convex hulls check for interference, step 30
When the answer is 02, the answer is "yes", and the Bubble Collision method is started (step 3004), and the result is set as the closest point (step 3005). Once again, the distance between the objects increases, and the continuous Gilbert
If the distance calculated by the method becomes larger than 0, the result becomes “no” in step 2002, the Bubble Collision method is stopped, and the result of the continuous Gilbert method is set as the latest point. The difficulty with the above algorithm is that the continuous Gilbert even in situations where the subjects start to interfere and one swallows the other.
Whether the method calculates a distance of 0. In this regard,
The solution is to extend the 3-D Gilbert method to 4-D.

【0082】(e) 4次元Gilbert法 凸包間連続探索法から非凸多面体用Bubble Collision法
へスイッチングする場合、またはその逆において、スイ
ッチングの指標を凸包間連続型Gilbert法により算出し
た距離とする。凸包間が干渉しだしたならば、距離を算
出するアルゴリズムを3次元連続型Gilbert法から(3
+Extra−Dim.)次元、すなわち、4次元連続型Gilbert
法にスイッチングする。これにより、一方の凸包が他方
の凸包に吸収された場合においても近接ベクトルが矛盾
なく計算される。図43は、上記状況を(2+Extra−Di
m.)次元の場合に示したものである。図43の)に示
すように、二つの凸包が干渉していない場合には、凸包
間の距離はX−Y平面上の2次元的距離dで定義され
る。dの値は、2次元連続型Gilbert法で計算される。
dの値がある微少量より小さくなったならば、二つの凸
包は干渉を始めたとし、一方の凸包をExtra Dimension
の方向にεだけ嵩上げする(図43の、)。この状態
における近接ベクトルは、3次元連続型Gilbert法を使っ
て計算される。この時、近接ベクトルはExtra Dimensio
nの方向に向いており、X−Y平面上の成分は0であ
る。従って、二凸包間の距離dは常に0であり、二凸包
は干渉状態にあると判断される。近接ベクトルのX−Y
平面成分が非零になったならば、二凸包の干渉状態は解
除されたと判断し、干渉チェックは(2+Extra−Di
m.)次元、すなわち、3次元の連続型Gilbert法から2
次元連続型Gilbert法へ移行する。Extra Dimension方向
の嵩上げεは0以外の任意の値でよい。
(E) Four-dimensional Gilbert method When switching from the continuous search between convex hulls to the Bubble Collision method for non-convex polyhedra, or vice versa, the index of switching is the distance calculated by the continuous Gilbert method between convex hulls. To do. If convex hulls start to interfere with each other, the algorithm for calculating the distance is calculated from the three-dimensional continuous Gilbert method (3
+ Extra-Dim.) Dimension, that is, 4-dimensional continuous Gilbert
Switch to the law. Thereby, even when one convex hull is absorbed by the other convex hull, the proximity vectors are calculated without contradiction. FIG. 43 shows the above situation as (2 + Extra-Di
m.) dimension. As shown in FIG. 43), when the two convex hulls do not interfere with each other, the distance between the convex hulls is defined by the two-dimensional distance d on the XY plane. The value of d is calculated by the two-dimensional continuous Gilbert method.
If the value of d becomes smaller than a very small amount, it is assumed that the two convex hulls have started to interfere, and one of the convex hulls is set to Extra Dimension.
The height is increased by ε in the direction of (in FIG. 43). The proximity vector in this state is calculated using the three-dimensional continuous Gilbert method. At this time, the proximity vector is Extra Dimensio
It is oriented in the direction of n, and the component on the XY plane is 0. Therefore, the distance d between the biconvex hulls is always 0, and it is determined that the biconvex hulls are in the interference state. Proximity vector XY
If the plane component becomes non-zero, it is judged that the interference state of the biconvex hull is canceled, and the interference check is (2 + Extra-Di
m.) dimension, that is, 2 from the three-dimensional continuous Gilbert method
Move to the dimensional continuous Gilbert method. The padding ε in the Extra Dimension direction may be any value other than 0.

【0083】(f) メタツリーによる高速化 非凸多面体の集合において、最も近接する非凸多面体の
ペアを高速に算出するために、非凸多面体を包絡する球
を構成し、この球を包含する包絡球を階層的に並べたメ
タツリーを構成する。非凸多面体間を総当たり的にチェ
ックする代わりに、メタツリーに基づいて包絡球間をde
pth-firstの探索法でチェックしていき、最も接近する
球のペアを検索する。検索した球の中心が載る凸包間に
連続型Gilbert法を適用することにより、最近点を効率
よく算出する。図44は、ロボットアームRA1,RA
2に対してメタツリーを構成し、それを二本並べて干渉
チェックを行っているところを示している。メタツリー
を構成するに際し、Leaf Sphereに相当する球は以下で
定義される。
(F) Speed-up by metatree In a set of non-convex polyhedra, in order to calculate the closest pair of non-convex polyhedra at high speed, a sphere enclosing the non-convex polyhedron is constructed, and an envelope including this sphere is formed. Construct a meta tree in which spheres are arranged hierarchically. Instead of brute force checking between non-convex polyhedrons, de
Check the pth-first search method to find the closest pair of spheres. The nearest point is efficiently calculated by applying the continuous Gilbert method between the convex hulls where the center of the searched sphere is placed. FIG. 44 shows the robot arms RA1 and RA.
2 shows that a meta tree is constructed for two and two of them are arranged to perform interference check. In constructing the metatree, the sphere corresponding to Leaf Sphere is defined below.

【0084】干渉チェックを行う各非凸多面体に対し、
ベクトルmax,minを max=( MAXi {Xi} ,MAXi {yi} ,MAXi {zi} ) min=( MINi {Xi} ,MINi {yi} ,MINi {zi} ) (iは非凸多面体の各頂点を走る)で定義する。この時、
球の中心center及び半径rは以下で与えられる。 center=(max+min)/2 r=|max−min|/2 メタツリーの構成法は、Bubble Collision法における、
Sphere Tree構成法と同様に行う。メタツリーを構成し
た後、Bubble Collision法と同様に、Meta Sphere Tree
に対してDepth-Firstの探索を行い、干渉の可能性のあ
る非凸多面体のペアを検出する。この時、Meta Sphere
間の距離は、両Meta Sphere間の中心間の距離から両半
径を差し引いた値とする。
For each non-convex polyhedron for which interference checking is performed,
Vector max, min is max = (MAX i {X i }, MAX i {y i }, MAX i {z i }) min = (MIN i {X i }, MIN i {y i }, MIN i {z i }) (i runs at each vertex of the non-convex polyhedron). At this time,
The center center of the sphere and the radius r are given below. center = (max + min) / 2 r = | max-min | / 2 The method of constructing the metatree is the Bubble Collision method,
The same as the Sphere Tree construction method. After constructing the meta tree, use the Meta Sphere Tree as in the Bubble Collision method.
The Depth-First search is performed for and the pair of non-convex polyhedra with possible interference is detected. At this time, Meta Sphere
The distance between them is the value obtained by subtracting both radii from the distance between the centers of both Meta Spheres.

【0085】(g) メタツリー構成を含めた連続干渉チェ
ック法 任意の非凸多面体間の最近点を連続的に追跡していく場
合において、メタツリー構成、Gilbert法、Bubble Coll
ision法の全てを数サイクルに一回のみ行い、他のサイ
クルでは、前回のサイクルで使用した近接ポリゴンペア
に再度Gilbert法を適用することにより最短距離を求
め、計算負荷を大幅に軽減する。図45は、本アルゴリ
ズムのフローを示している。まず、サイクルをカウント
して現サイクルとし、該現サイクルがサイクル定数CYCL
Eで割り切れるか否かを判定し、割り切れるならばステ
ップ3102〜ステップ3106の処理を行い、割り切
れなければステップ3105〜3106の処理を行う。
例えば、CYCLE=100ならば、100サイクル毎にス
テップ3102〜ステップ3106の処理を行い、それ
以外はステップ3105〜3106の処理を行うことに
なる。
(G) Continuous Interference Checking Method Including Meta Tree Structure In the case of continuously tracking the closest points between arbitrary non-convex polyhedra, the meta tree structure, Gilbert method, Bubble Coll
All of the ision method is performed only once every few cycles, and in the other cycles, the shortest distance is obtained by applying the Gilbert method again to the neighboring polygon pair used in the previous cycle, and the calculation load is greatly reduced. FIG. 45 shows the flow of this algorithm. First, the cycle is counted to be the current cycle, and the current cycle is the cycle constant CYCL.
It is determined whether or not it is divisible by E. If divisible, the processes of steps 3102 to 3106 are performed, and if it is not divisible, the processes of steps 3105 to 3106 are performed.
For example, if CYCLE = 100, the processes of steps 3102 to 3106 are performed every 100 cycles, and otherwise, the processes of steps 3105 to 3106 are performed.

【0086】すなわち、割り切れなければステップ31
02において、図44で説明したメタツリーを構成し、
Meta Sphere Treeに対してDepth-Firstの探索を行い、
干渉の可能性のある非凸多面体のペアを検出する。この
処理により、Gilbert法を適用する凸包のぺアが確定
し、ステップ3103において、該確定した凸包のペア
に対してGilbert法による干渉チェック処理を実行す
る。凸包ペアが前回のペアと同一であれば、ステップ3
103で行うGilbert法は連続型となる。それ以外は非
連続型である。凸包間が干渉していなければ、Gilbert
法の結果を近接ベクトルとする(ステップ3106)。
干渉していれば、ステップ3104のBubbleCollision
法に移行し、その結果を近接ベクトルとすると共に(ス
テップ3106)、Bubble Collision法の過程で拾いだ
される近接ポリゴンペアをステップ3105において保
存する。現サイクルがCYCLEの倍数でない場合には、ス
テップ3105で保存したポリゴンペアにGilbert法を
適用し、最も近接するペアを拾いだし、近接ベクトルを
算出する。
That is, if it is not divisible, step 31
02, the meta tree explained in FIG. 44 is constructed,
Depth-First search for Meta Sphere Tree,
Detect pairs of non-convex polyhedra with potential interference. By this processing, the pair of convex hulls to which the Gilbert method is applied is determined, and in step 3103, the interference check processing by the Gilbert method is executed on the determined pair of convex hulls. If the convex hull pair is the same as the previous pair, step 3
The Gilbert method performed in 103 is a continuous type. Other than that, it is a non-continuous type. If there is no interference between convex hulls, Gilbert
The result of the method is the proximity vector (step 3106).
If there is interference, Bubble Collision in step 3104.
Then, the result is set as a proximity vector (step 3106), and the proximity polygon pair found in the process of the Bubble Collision method is saved in step 3105. If the current cycle is not a multiple of CYCLE, the Gilbert method is applied to the polygon pair saved in step 3105, the closest pair is picked up, and the proximity vector is calculated.

【0087】(h) サイクルタイム自動調整型連続干渉チ
ェック法図45の連続干渉チェック法では、CYCLEの値
が固定的であった。本アルゴリズムでは、図45のステ
ップ3102〜3104で費やされる時間を計算機のク
ロックから直接測定し、その値を基にCYCLEを決定す
る。図46はサイクルタイム自動調整型連続干渉チェッ
ク処理の流れ図であり、図45のフローと異なる点は、
ステップ3102の処理開始時刻t1を計時するステッ
プ3201と、ステップ3104の処理終了時刻t2
計時するステップ3201を付け加え、ステップ310
1において、CYCLEの値を次式 CYCLE=[A/(t2−t1)] により動的に決定している点である。ここで、Aは計算
機のCPUパワーに依存する定数である。これにより、
t2−t1の値が大きい時、すなわち、メタツリー構成から
Bubble Collision法に至るまでの処理時間が長い時に
は、CYCLEの値は小さくなり、ステップ3102〜31
04の処理を行う頻度は増す。また、逆にt2-t1の値が
小さい時には、その頻度は減少し、より計算負荷の小さ
いステップ3205の処理を行う頻度が増す。
(H) Cycle time automatic adjustment type continuous interference check method In the continuous interference check method of FIG. 45, the value of CYCLE was fixed. In this algorithm, the time spent in steps 3102 to 3104 of FIG. 45 is directly measured from the clock of the computer, and CYCLE is determined based on the value. FIG. 46 is a flow chart of the cycle time automatic adjustment type continuous interference check processing. The difference from the flow of FIG.
Step 3201 for measuring the processing start time t 1 of step 3102 and step 3201 for measuring the processing end time t 2 of step 3104 are added, and step 310
1 is that the value of CYCLE is dynamically determined by the following equation CYCLE = [A / (t2-t1)]. Here, A is a constant that depends on the CPU power of the computer. This allows
When the value of t2-t1 is large, that is, from the meta tree structure
When the processing time to reach the Bubble Collision method is long, the value of CYCLE becomes small, and steps 3102 to 31
The frequency of performing the processing of 04 increases. On the contrary, when the value of t2-t1 is small, the frequency decreases, and the frequency of performing the process of step 3205 having a smaller calculation load increases.

【0088】(E)連続型Bubble Collision法 (a) リアルタイム干渉チェック処理の全体フロー 図47は本発明のリアルタイム干渉チェック処理の全体
フローである。シミュレーションが開始されると(ステ
ップ4100)、干渉チェック前処理を行う(ステップ
4200)。凸包間の連続型干渉チェックのための前処
理では、凸包ファイル(HLファイル)があるかないか
を判定する(ステップ4211)。初回は凸包ファイル
がないので、呼び込むCGモデルに対して凸包を構成し
(ステップ4213)、凸包ファイル(HLファイル)
を出力する(ステップ4214)。次からは凸包ファイ
ルがあれば、それを読み込む(ステップ4212)。Bu
bble Collision法の前処理(ステップ4220)では、
非凸多面体の三角形ポリゴン上にLeaf Sphereを作成し
(ステップ4221)、それらを階層球で包絡し、包絡
球からなる2分木ツリーを構成する(ステップ422
2)。
(E) Continuous Bubble Collision Method (a) Overall Flow of Real Time Interference Check Processing FIG. 47 is an overall flow of the real time interference check processing of the present invention. When the simulation is started (step 4100), interference check preprocessing is performed (step 4200). In the preprocessing for the continuous interference check between convex hulls, it is determined whether or not there is a convex hull file (HL file) (step 4211). Since there is no convex hull file for the first time, a convex hull is constructed for the CG model to be called (step 4213), and the convex hull file (HL file) is set.
Is output (step 4214). Next, if there is a convex hull file, it is read (step 4212). Bu
In the preprocessing (step 4220) of the bble Collision method,
Leaf Spheres are created on triangular polygons of a non-convex polyhedron (step 4221) and they are enveloped by hierarchical spheres to form a binary tree tree composed of enveloped spheres (step 422).
2).

【0089】ついで、移動指令値作成のステップ430
0において、マウス302等のマンマシーンインタフェ
ース機器(MMI機器)より入力された三次元入力デー
タに基づいてインタラクティブに物体の移動指令値を作
成する(ステップ4310)。または、プログラミング
された軌道に沿って移動指令値を作成する(ステップ4
320)。しかる後、移動指令値に従って、図48に示
すように物体404(ここでは直方体B)を物体405
(ここでは非凸多面体A)に対して移動して(ステップ
4400)、CG内の環境を更新する。 ここで、マウ
スを用いた三次元データ入力方式について簡単に説明す
る。マウスを用いた三次元入力方式のシステム構成図を
図49に示す。このシステムでは、オペレータ300
は、計算機301に付属の三ボタンマウス302とキー
ボード303上のファンクションキー304を使用し、
特別な装置を必要としない。計算機301のディスクプ
レイ画面には、図50に示すCGモデルの画像が表示さ
れているとする。図50では、カーソル405の位置に
応じて、三次元座標計算部406は速度指令値を作成
し、それを積分して物体の三次元座標を計算する。マウ
ス302のボタン1,2,3(411〜413)をx,
y,zの各々の方向に対応付けてあり、ボタンがONの
場合にはカーソル位置に応じて速度Vx,Vy,Vzを
作成する。カーソル位置が画面中心線Xcentでは速度は
零で、カーソル変位量Vが小さいならば、速度は小さ
く、カーソル変位量Vが大きいならば、速度は大きくな
る。
Next, step 430 for creating a movement command value.
At 0, a movement command value of the object is interactively created based on the three-dimensional input data input from the man-machine interface device (MMI device) such as the mouse 302 (step 4310). Alternatively, a movement command value is created along the programmed trajectory (step 4).
320). Thereafter, according to the movement command value, the object 404 (here, the rectangular parallelepiped B) is moved to the object 405 as shown in FIG.
(Here, the non-convex polyhedron A) is moved (step 4400) to update the environment in the CG. Here, a three-dimensional data input method using a mouse will be briefly described. FIG. 49 shows a system configuration diagram of a three-dimensional input method using a mouse. In this system, the operator 300
Uses the three-button mouse 302 attached to the computer 301 and the function key 304 on the keyboard 303,
No special equipment required. It is assumed that the image of the CG model shown in FIG. 50 is displayed on the disc play screen of the computer 301. In FIG. 50, the three-dimensional coordinate calculation unit 406 creates a speed command value according to the position of the cursor 405 and integrates it to calculate the three-dimensional coordinates of the object. Press buttons 1, 2, 3 (411-413) of mouse 302 for x,
It corresponds to each direction of y and z, and when the button is ON, the velocities Vx, Vy and Vz are created according to the cursor position. When the cursor position is the center line Xcent of the screen, the velocity is zero, the velocity is small when the cursor displacement amount V is small, and the velocity is large when the cursor displacement amount V is large.

【0090】更新したCG内の環境について、干渉チェ
ックを行う(ステップ4500)。物体が離れている場
合は、凸包間の連続型干渉チェックを高速に行い(ステ
ップ4510)、最近点、干渉点、距離を求める(ステ
ップ4511)。凸包間の干渉判定を行い(ステップ4
512)、凸包間が干渉しない間は凸包間の連続型干渉
チェックが続く。凸包間が干渉すると、連続型Bubble C
ollision法を行い(ステップ4520)、凸包が解除さ
れた非凸物体に関して最近点、干渉点、距離を求める
(ステップ4521)。ファンクションキー等により、
シュミレーション終了命令が発生すると(ステップ46
00)、シュミレーションを終了する(ステップ470
0)。終了命令が発生しないと移動指令値作成以降の処
理を繰り返す。以上がリアルタイム干渉チェックシステ
ムの全体に渡る説明であり、マウスを用いてインタラク
ティブに物体を移動しながら、逐次、実時間での干渉チ
ェックを行っていくシステムに有効となるものである。
または、プログラミングされた軌道を移動しながら、実
時間で物体間の干渉チェックを行うシステムにおいても
有効となる。以下、ステップ4520の連続型Bubble C
ollision法について詳細説明を行う。
An interference check is performed on the updated environment in the CG (step 4500). If the object is far, the continuous interference check between the convex hulls is performed at high speed (step 4510), and the closest point, the interference point, and the distance are obtained (step 4511). The interference between convex hulls is determined (step 4
512), continuous interference check between the convex hulls continues while the convex hulls do not interfere with each other. If convex hulls interfere, continuous Bubble C
The ollision method is performed (step 4520), and the closest point, the interference point, and the distance are obtained for the non-convex object from which the convex hull is released (step 4521). With function keys etc.,
When a simulation end command is issued (step 46)
00) to end the simulation (step 470).
0). If the end command is not issued, the process after the movement command value is created is repeated. The above is a description of the entire real-time interference check system, and is effective for a system that sequentially performs real-time interference check while interactively moving an object using a mouse.
Alternatively, it is also effective in a system for checking interference between objects in real time while moving a programmed trajectory. Hereafter, continuous Bubble C in step 4520
The ollision method will be described in detail.

【0091】(b) Bubble Collision法の前処理 前処理では、多面体404,405を構成する三角形ポ
リゴン上に最小球 Leaf Sphereを配置する(図51)。
図52は、三角形ポリゴンを Leaf Sphereで覆った例で
あり、(a)はLeaf Sphereが比較的大きい場合、(b)はLea
f Sphereが小さい場合の例である。(b)の場合には、
三角形ポリゴン中に隙間があるので、ほぼ等しい大きさ
の球で中の隙間を埋める。Leaf Sphereの半径は、既述
のスケールパラメータSによって決定される。すべての
三角形ポリゴンに対して、上記の処理を行い、物体をLe
af Sphereで埋める。Leaf Sphereを分割統治法を行い階
層球で包絡し、階層包絡球の2分木ツリー構造(図5
3)を構成する。図54は階層包絡球の2分木ツリー構
造の3次元イメージである。図55は物体104(直方
体B)の場合の階層包絡球の構成例を階層的に示す。図
56は非凸多面体105(物体A)の場合の階層包絡球
の構成例を階層的に示す。但し、図55、図56では、
三角形ポリゴン全体についての図は非常に繁雑になるの
で、Leaf Sphereを輪郭部のみに載せた例で簡略化して
示している。
(B) Pre-processing of Bubble Collision Method In the pre-processing, the smallest sphere Leaf Sphere is arranged on the triangular polygons forming the polyhedra 404 and 405 (FIG. 51).
FIG. 52 shows an example in which a triangular polygon is covered with Leaf Sphere. (A) shows a relatively large Leaf Sphere, (b) shows a Leaf Sphere.
This is an example when f Sphere is small. In case of (b),
Since there is a gap in the triangular polygon, fill the gap with a sphere of approximately the same size. The radius of Leaf Sphere is determined by the scale parameter S described above. The above processing is performed for all triangular polygons, and the object is Le
Fill with af Sphere. The leaf sphere is divided and convolved to be enveloped by a hierarchical sphere, and the tree tree structure of the hierarchical envelope sphere (Fig. 5).
3) is configured. FIG. 54 is a three-dimensional image of the binary tree tree structure of the hierarchical envelope sphere. FIG. 55 hierarchically shows a configuration example of the hierarchical envelope sphere in the case of the object 104 (cuboid B). FIG. 56 hierarchically shows a configuration example of the hierarchical envelope sphere in the case of the non-convex polyhedron 105 (object A). However, in FIGS. 55 and 56,
The figure for the whole triangular polygon becomes very complicated, so it is shown in a simplified manner with Leaf Sphere placed only on the outline.

【0092】(c) 連続型 Bubble Collision法 連続型Bubble Collision法は、Bubble Collision法の高
速化を図ったものである。連続型Bubble Collision法に
おける物体の状態を図57に、連続型Bubble Collision
法における処理フローを図58に示す。例として非凸多
面体Aと直方体Bを考える。連続型Bubble Collision法
は、複雑な非凸多面体間で物体が凸包内部に入り、かな
り接近している場合の干渉チェックに適用される(図5
7参照)。 1) 連続型Bubble Collision法を開始すると(ステップ
5100)、第1回目、または、近接ポリゴンペア更新
サイクルであったら(ステップ5200)、Bubble Col
lision法を行う(ステップ5300)。そうでなかった
ら、前の処理で保存されている近接ポリゴンペアの干渉
チェックを行う(ステップ5400)。
(C) Continuous Bubble Collision Method The continuous Bubble Collision method is intended to speed up the Bubble Collision method. Fig. 57 shows the state of an object in the continuous Bubble Collision method.
The processing flow in the method is shown in FIG. As an example, consider a non-convex polyhedron A and a rectangular parallelepiped B. The continuous Bubble Collision method is applied to the interference check when an object enters inside the convex hull between complex non-convex polyhedra and is very close (Fig. 5).
7). 1) When the continuous Bubble Collision method is started (step 5100), if it is the first time or the adjacent polygon pair update cycle (step 5200), Bubble Col
The lision method is performed (step 5300). If not, an interference check is performed on the adjacent polygon pairs stored in the previous processing (step 5400).

【0093】2) Bubble Collision法 2-1) 近接球ペア探索(ステップ5310)では、前処
理で構成した包絡球間の干渉チェックを2分木ツリーに
基づいてDepth-firstの探索法でチェックしていき、最
も接近する球のペアを探索する。図59は近接球ペアの
探索/近接ポリゴンペアの探索の手順を示す。図59
(a)のように2物体A、Bの上位階層の包絡球が干渉す
ると、その下位階層の包絡球間の干渉チェックを行う。
包絡球が干渉した部分のみ、更に、下位階層の球間の干
渉チェックを行っていく。すると図59(g)のよう
に、最も接近する球のペアが探索される。 2-2) 近接ポリゴンぺア探索ステップ(ステップ532
0)では、探索した球の中心が載っているポリゴンのペ
ア(図59(g)のP11とP12、P21とP22)を
求める。これらは最近点である可能性のあるポリゴンの
ペア(近接ポリゴンペア)である。
2) Bubble Collision Method 2-1) In the close sphere pair search (step 5310), the interference check between the envelope spheres constructed in the preprocessing is checked by the Depth-first search method based on the binary tree. And search for the closest pair of spheres. FIG. 59 shows a procedure for searching for a close sphere pair / search for a close polygon pair. FIG. 59.
When the envelope spheres of the upper layers of the two objects A and B interfere with each other as shown in (a), the interference check between the envelope spheres of the lower layer is performed.
Only the portion where the envelope spheres interfere with each other is further checked for interference between spheres in the lower hierarchy. Then, as shown in FIG. 59 (g), the closest pair of spheres is searched. 2-2) Near polygon pair search step (step 532)
In 0), a pair of polygons (P11 and P12, P21 and P22 in FIG. 59 (g)) on which the center of the searched sphere is placed is obtained. These are pairs of polygons (neighboring polygon pairs) that may be the closest points.

【0094】2-3) 近接ポリゴンペアの保存ステップ
(ステップ5330)はステップ5320で得たポリゴ
ンP11とP12、P21とP22等の近接ポリゴンペ
アを保存する。 2-4) 干渉チェックステップ(ステップ5340)で
は、その近接ポリゴンぺア間に対してGilbert法を適用
することにより、二つの非凸多面体間の干渉点、最近
点、距離を算出する。干渉すれば(ステップ534
1)、干渉点を出力する(ステップ5342)。非干渉
時には、ポリゴンP11とP12間の干渉チェックから
最近点の距離d1を、ポリゴンP21とP22間の干渉
チェックから最近点の距離d2、・・を求める(ステッ
プ5343)。しかる後、最も短いものを最近点距離と
する(最小値判定、ステップ5344)。図57(b)で
は距離d2が距離d1より小さいのでd2を最近点距離
の解とする。最近点を出力する(345)。
2-3) In the step of storing adjacent polygon pairs (step 5330), the adjacent polygon pairs such as the polygons P11 and P12, P21 and P22 obtained in step 5320 are stored. 2-4) In the interference check step (step 5340), the Gilbert method is applied between the adjacent polygon pairs to calculate the interference point, the closest point, and the distance between the two non-convex polyhedrons. If they interfere (step 534)
1) Output an interference point (step 5342). At the time of non-interference, the closest distance d1 is obtained from the interference check between the polygons P11 and P12, and the closest distance d2 is obtained from the interference check between the polygons P21 and P22 (step 5343). After that, the shortest distance is set as the closest point distance (minimum value determination, step 5344). In FIG. 57 (b), since the distance d2 is smaller than the distance d1, d2 is set as the solution of the closest point distance. The closest point is output (345).

【0095】3) 近接ポリゴンぺアの干渉チェック 3-1) 次のサイクルで図57(c)のように直方体Bを左方
向に移動する。しかし、近接ポリゴンペア更新サイクル
でないので、保存されている近接ポリゴンペア間の干渉
チェックを行う(ステップ5400)。直方体Bが僅か
に移動したと仮定すると、その近接ポリゴンペアP1
1,P12;P21,P22は同じである。そこで、先
に保存した近接ポリゴンペア間に対してのみ干渉チェッ
クを行って、最近点、干渉点を求める。近接ポリゴンペ
アの呼出しステップ5410では、先にステップ533
0で保存した近接ポリゴンペアP11,P12;P2
1,P22等の近接ポリゴンペアを呼び出す。 3-2) ここで得た近接ポリゴンペアP11,P12;P2
1,P22等に干渉チェックを行って干渉点、最近点を
求める(ステップ5440)。図57(c)では距離d3
が距離d2より小さいのでこれを最近点距離の解とす
る。
3) Interference check of adjacent polygon pairs 3-1) In the next cycle, the rectangular parallelepiped B is moved leftward as shown in FIG. 57 (c). However, since it is not a close polygon pair update cycle, the interference check between the close polygon pairs stored is performed (step 5400). Assuming that the rectangular parallelepiped B has moved slightly, its neighboring polygon pair P1
1, P12; P21, P22 are the same. Therefore, the interference check is performed only between the adjacent polygon pairs stored previously, and the nearest point and the interference point are obtained. In the step 5410 of calling the near polygon pair, the step 533 is executed first.
Proximity polygon pair P11, P12; P2 saved as 0
Call a pair of adjacent polygons such as 1, P22. 3-2) Proximity polygon pair P11, P12; P2 obtained here
An interference check is performed on 1, P22 and the like to obtain an interference point and a closest point (step 5440). In FIG. 57 (c), the distance d3
Is smaller than the distance d2, this is the solution of the closest point distance.

【0096】移動距離/姿勢変化が小さいという仮定か
ら、しばらくは、この数組の近接ポリゴンペア間に対し
てのみ干渉チェックを行う近接ポリゴンペアチェック
(ステップ5400)を繰り返す。保存した数組の近接
ポリゴンのみに関して干渉チェックを行うことにより、
計算時間の短縮が図られる。しかし、移動距離が大きく
なると近接ポリゴンペアが変わる可能性があるので、数
サイクル毎にBubble Collision法(ステップ5300)
を行って近接ポリゴンペアを更新する。CG上での最近
点の表示は、移動距離が大きくなると一時、誤った点を
表示するが、すぐに次の近接ポリゴン更新サイクルで修
正される。更新サイクルが適切ならば、一時、誤った結
果が表示されても、瞬時に修正された正しい結果が表示
されるので、使用上に問題ない。本実施例では、近接ポ
リゴン更新サイクルを使用上に問題ないように調整した
値を手で入力したものを用いる。
On the assumption that the movement distance / orientation change is small, the proximity polygon pair check (step 5400) for performing the interference check only between the several pairs of proximity polygon pairs is repeated for a while. By performing interference check only on a few sets of neighboring polygons saved,
The calculation time can be shortened. However, as the moving distance increases, the neighboring polygon pairs may change, so the Bubble Collision method (step 5300) is performed every few cycles.
And update the adjacent polygon pair. The display of the closest point on the CG temporarily displays an incorrect point when the moving distance becomes large, but is immediately corrected in the next adjacent polygon update cycle. If the update cycle is appropriate, even if an incorrect result is temporarily displayed, the corrected correct result is displayed instantaneously, which causes no problem in use. In the present embodiment, a value obtained by manually inputting a value adjusted so that there is no problem in using the near polygon update cycle is used.

【0097】(d) 連続型Bubble Collision法の効果 図60(a)はBubble Collision法のみの場合における
干渉チェック計算時間であり、常に計算時間が数十〜数
百msかかっている。一方、本発明によれば干渉チェッ
ク計算時間は図60(b)に示すようになる。Bubble Co
llision法では計算時間が数十〜数百msかかるが、近
接ポリゴンペアチェックは数msであるので、大半はこ
ちらを行うと平均計算時間は点線のように小さくなる。
例えば、Bubble Collision法による処理時間を100m
s、近接ポリゴンチェックの処理時間を1ms、更新サ
イクルを100とすると、平均計算時間は2ms(=(1
00+99・1)/100)程度になる。もちろん、任意の非凸多面
体にもこの連続型Bubble Collision法を適用できる。連
続型Bubble Collision法によって、任意の非凸多面体に
対して物体移動速度に応じて逐次、実時間での干渉チェ
ックが可能になる。一例として、マウス等のMMIによ
り、インタラクティブな動作時の干渉チェックをリアル
タイムに行い、その結果をCG上に表示してユーザに提
示する環境の構築への利用等を可能にする。機構設計用
CADシステムに適用すると、CG上で実時間で干渉チ
ェックを行いながら部品の組み立てを行うことで、本当
に組み立てられるかのチェックができる。また、組み上
がった機構部の移動チェックが行える。これにより、設
計ミスを発見できるので設計へのフィードバックが早く
なることや、試作品を減らす効果が得られる。他にもマ
ニピュレータや自走車等の移動ロボットのパス生成、マ
ルチメディアにおけるアニメーション作成、ゲームソフ
ト等、コンピュータグラフィックスを応用した様々な分
野に適用される。
(D) Effect of Continuous Bubble Collision Method FIG. 60 (a) shows the interference check calculation time in the case of only Bubble Collision method, which always takes several tens to several hundreds ms. On the other hand, according to the present invention, the interference check calculation time is as shown in FIG. Bubble Co
The llision method takes tens to hundreds of ms, but the proximity polygon pair check takes a few ms, so if you do this in most cases, the average calculation time will be small as shown by the dotted line.
For example, processing time by Bubble Collision method is 100m
s, the processing time for the proximity polygon check is 1 ms, and the update cycle is 100, the average calculation time is 2 ms (= (1
It becomes about 00 + 99 ・ 1) / 100). Of course, this continuous Bubble Collision method can be applied to any non-convex polyhedron. The continuous Bubble Collision method makes it possible to sequentially perform real-time interference check on an arbitrary non-convex polyhedron according to the object moving speed. As an example, an MMI such as a mouse can be used to construct an environment in which an interference check during interactive operation is performed in real time and the result is displayed on a CG and presented to the user. When applied to a CAD system for mechanical design, it is possible to check whether or not it can be actually assembled by assembling parts while checking interference in real time on CG. In addition, the movement of the assembled mechanism can be checked. This makes it possible to detect design mistakes, which leads to faster feedback to the design and the effect of reducing prototypes. Besides, it is applied to various fields applying computer graphics such as path generation of mobile robots such as manipulators and self-propelled vehicles, animation creation in multimedia, game software, etc.

【0098】(F)連続型Bubble Collision法の更新サ
イクル自動決定法 連続型Bubble Collision法では、物体形状と移動速度に
応じて近接ポリゴンの更新サイクル(次のBubble Colli
sion法実行までのサイクル)の調整が必要である。
(E)の実施例では、近接ポリゴン更新サイクルとし
て、調整した一定値を手で入力したものを使っている
が、この更新サイクルが不適切な場合に次の問題が生じ
る。例えば、更新サイクルを200毎にするとサイクル
が長すぎて、修正が遅くなり、図61(b)のように間
違ったポリゴンペアP21,P22間の干渉チェックを
行い、それらの最近点距離d2´を出力してしまう。一
方、サイクルを10毎にすれば、近接ポリゴンペアの更
新が早いので、正しい近接ポリゴンペアP31,P32
間の最近点距離結果d3を計算して表示する。しかし、
BubbleCollision法の実行回数が多くなり干渉チェック
に時間がかかる。このように、試行錯誤的な更新サイク
ルの調整は難しい。
(F) Update cycle automatic determination method of continuous Bubble Collision method In the continuous Bubble Collision method, the update cycle of the adjacent polygons (next Bubble Colli
It is necessary to adjust the cycle until execution of the sion method).
In the embodiment of (E), the adjusted constant value manually input is used as the proximity polygon update cycle, but if this update cycle is inappropriate, the following problem occurs. For example, if the update cycle is set to every 200, the cycle becomes too long and the correction becomes slow. As shown in FIG. 61 (b), the interference check between the wrong polygon pairs P21 and P22 is performed, and the closest point distance d2 ′ between them is calculated. It will output. On the other hand, if the cycle is set to every 10, the update of the near polygon pair is quick, so that the correct near polygon pair P31, P32
The closest point distance result d3 between is calculated and displayed. But,
Bubble Collision method is executed many times and it takes time to check interference. As described above, it is difficult to adjust the update cycle by trial and error.

【0099】そこで、Bubble Collision法を行う毎にそ
の計算時間を測定し、その計算時間から次の更新サイク
ルを自動的に決定する方法を提案する。Bubble Collisi
on法の計算時間の変動に対応して自動的にサイクルを決
定することで、試行錯誤的でなく、計算時間の短縮と修
正タイミングのバランスをうまく取れる見込みがある。
このフローを図62に示すが、図58のフローに斜線部
のステップ5601〜5603を付加したものである。
計算時間測定は、まずBubble Collision法を行う前に計
算機システムコールにて計算機内部クロックで時間測定
してt1を求める(ステップ5601)。Bubble Colli
sion法を行った後に同様にしてt2を求め、Bubble Col
lision法の計算時間を次式 tBC=t2-t1 により計算する(ステップ5602)。
Therefore, a method of measuring the calculation time each time the Bubble Collision method is performed and automatically determining the next update cycle from the calculation time is proposed. Bubble Collisi
By automatically determining the cycle in response to fluctuations in the calculation time of the on method, it is possible to achieve a good balance between reduction in calculation time and correction timing without trial and error.
This flow is shown in FIG. 62, which is obtained by adding steps 5601 to 5603 in the hatched portion to the flow in FIG.
In measuring the calculation time, first, before performing the Bubble Collision method, the time is measured by the internal clock of the computer by the computer system call to obtain t1 (step 5601). Bubble Colli
Similarly, after performing the sion method, t2 is obtained, and Bubble Col
The calculation time of the lision method is calculated by the following equation t BC = t2-t1 (step 5602).

【0100】そして、ポリゴンペアの更新サイクルを例
えば次式 更新サイクル=(Bubble Collision法の計算時間tBC×
α(C) により求める(ステップ5603)。但し、αは調整必
要である。従って、Bubble Collision法の干渉チェック
に100msかかり、連続型Bubble Collision法に1m
sかかり、α=1.5とすると更新サイクルは150で
平均計算時間は1.66ms(=(100+149・1)/150)程度に
なる。図63(a)では、1回目(a)より2回目(b)
のBubble Collision法の計算時間が長くなっているの
で、更新サイクルが長くなる。3回目(c)のBubble C
ollision法の計算時間は短いので、更新サイクルは短く
なる。平均計算時間は点線のように多少変動するが、Bu
bble Collision法のみの時に比べて小さくなる。このよ
うに、計算時間tBCが長くなるほど更新サイクルを長く
することにより、平均計算時間を短くでき、しかも、ク
イックレスポンスが可能になる。ただし、間違った結果
を出力する可能性があるが、近接ポリゴンぺはBubble c
ollision法により更新され、正しい結果を出力できるよ
うになる。
The update cycle of the polygon pair is, for example, the following expression update cycle = (calculation time t BC of Bubble Collision method t BC ×
It is obtained from α (C) (step 5603). However, α needs to be adjusted. Therefore, it takes 100 ms for the interference check of the Bubble Collision method and 1 m for the continuous Bubble Collision method.
It takes s, and if α = 1.5, the update cycle is 150 and the average calculation time is about 1.66 ms (= (100 + 149 · 1) / 150). In FIG. 63 (a), from the first time (a) to the second time (b)
Since the calculation time of Bubble Collision method of is long, the update cycle becomes long. 3rd (c) Bubble C
Since the calculation time of the ollision method is short, the update cycle is short. The average calculation time varies slightly as shown by the dotted line, but
It is smaller than when only the bble Collision method is used. In this way, by increasing the update cycle as the calculation time t BC becomes longer, the average calculation time can be shortened, and moreover, quick response becomes possible. However, it may output the wrong result, but close polygon
It is updated by the ollision method so that the correct result can be output.

【0101】以上では、tBCが大きいほど更新サイクル
を長くした場合であるが、厳密に正しい出力結果が必要
の場合には、tBCが大きいほど更新サイクルを短くす
る。図63(b)では、1回目aより2回目bのBubble Co
llision法の計算時間が長くなっているので、更新サイ
クルは短くなる。3回目cのBubble Collision法の計算
時間は短いので、更新サイクルは長くなる。更新サイク
ルにより平均計算時間は多少変動するが、Bubble Colli
sion法のみの時に比べて遥かに小さくできる。又、tBC
が大きいとポリゴンペアの更新サイクルが短くなって平
均計算時間が長くなるが、厳密に正しい近接ポリゴン間
の干渉チェックを行うことができ、正しい最近点、最近
点間距離を出力できる。以上のように、Bubble Collisi
on法を行う毎にその計算時間を測定し、計算時間の変動
に対応して自動的に更新サイクルを決定することで、試
行錯誤的でなく、計算時間の短縮と修正タイミングのバ
ランスをうまく取れる。
In the above, the update cycle is made longer as t BC is larger. However, when a strictly correct output result is required, the update cycle is made shorter as t BC is larger. In FIG. 63 (b), the Bubble Co from the first time a to the second time b
Since the calculation time of the llision method is long, the update cycle is short. Since the calculation time of the Bubble Collision method of the third time c is short, the update cycle becomes long. The average calculation time varies slightly depending on the update cycle, but Bubble Colli
It can be made much smaller than when only the sion method is used. Also, t BC
If is large, the update cycle of the polygon pair becomes short and the average calculation time becomes long, but it is possible to strictly check the correct interference between adjacent polygons and output the correct closest point and the closest point distance. As mentioned above, Bubble Collisi
By measuring the calculation time each time the on method is performed and automatically determining the update cycle according to the fluctuation of the calculation time, it is possible to balance the shortening of the calculation time and the correction timing without trial and error. .

【0102】(G)連続型Bubble Collision法の第1変
形例 連続型Bubble Collision法は移動距離/姿勢変化が小さ
いと仮定するので、大移動が発生すると、間違ったポリ
ゴンペア間の距離を示すのが目立つ(図61(b))。移
動距離/姿勢変化があるしきい値より大きい場合には、
近接ポリゴンペアの更新サイクル(図63中のb、c)
に達しなくてもBubble Collision法による干渉チェック
を行い、近接ポリゴンペアを更新する。これにより、正
しい干渉チェック結果を得ることができる。例えば、 |△x|>|△xlimit| ならば、Bubble Collision法による干渉チェックを行
い、近接ポリゴンペアを更新する。図64はかかる処理
のフローであり、斜線部のステップ5604を図62の
フローに付加したものである。上式中、△xは1サイク
ルの間の物体移動量であり、△xlimitはしきい値であ
る。
(G) First Modified Example of Continuous Bubble Collision Method Since the continuous bubble collision method is assumed to have a small movement distance / posture change, when a large movement occurs, an incorrect distance between polygon pairs is indicated. Is conspicuous (Fig. 61 (b)). If the movement distance / posture change is larger than a certain threshold,
Update cycle of adjacent polygon pair (b, c in FIG. 63)
Even if it does not reach, the collision check by Bubble Collision method is performed and the neighboring polygon pair is updated. Thereby, a correct interference check result can be obtained. For example, if | Δx |> | Δxlimit | FIG. 64 is a flow of such processing, in which step 5604 of the shaded portion is added to the flow of FIG. In the above equation, Δx is the amount of object movement during one cycle, and Δxlimit is a threshold value.

【0103】しきい値△xlimitは、図65(a)〜(c)に
示すように、移動物体Bの最大辺の長さをLmaxとすれ
ば、Lmax/βにより、あるいは、移動物体の最上位包
絡球の半径をR0とすれば、R0/βにより、あるい
は、移動物体のLeaf球の最大半径をRLmaxとすれば、R
Lmax・βにより決定する(βは2〜4程度で調整必
要)。又、しきい値△xlimitは、干渉チェック対象中
の最小物体の最大辺の長さをLmaxとすればLmax/βに
より、あるいは、干渉チェック対象中の最小物体の最上
位包絡球の半径をR0とすればR0/βにより、あるい
は、干渉チェック対象中の最小物体のLeaf球の最大半径
をRLmaxとすればRLmax・βにより決定することもでき
る。
As shown in FIGS. 65 (a) to (c), the threshold value Δxlimit is set to Lmax / β or to the maximum value of the moving object if the maximum side length of the moving object B is Lmax. If the radius of the upper envelope sphere is R0, then R0 / β, or if the maximum radius of the leaf sphere of the moving object is RLmax, then R
Determined by Lmax · β (β needs to be adjusted between 2 and 4). The threshold value Δxlimit is Lmax / β when the length of the maximum side of the smallest object to be subjected to the interference check is Lmax, or the radius of the highest envelope sphere of the smallest object to be subjected to the interference check is R0. Then, it can be determined by R0 / β, or by RLmax · β if the maximum radius of the Leaf sphere of the smallest object in the interference check target is RLmax.

【0104】(H)連続型Bubble Collision法の第2変
形例 連続型Bubble Collision法は移動距離/姿勢変化が小さ
いと仮定するので、大移動が発生すると、間違ったポリ
ゴンペア間の距離を示すのが目立つ(図61(b))。移
動速度があるしきい値より大きい場合には、近接ポリゴ
ンペアの更新サイクル(図63中のb、c)に達しなく
てもBubble Collision法を行い、近接ポリゴンペアを更
新する。これにより、正しい干渉チェック結果を得るこ
とができる。例えば、 |v|>|vlimit| ならば、Bubble Collision法を行い、近接ポリゴンぺを
更新する。図66はかかる処理のフローであり、斜線部
のステップ5605を図62のフローに付加したもので
ある。上式中、vは物体移動速度、vlimitはしきい値
である。
(H) Second Modified Example of Continuous Bubble Collision Method Since the continuous bubble collision method is assumed to have a small movement distance / posture change, when a large movement occurs, an incorrect distance between polygon pairs is indicated. Is conspicuous (Fig. 61 (b)). When the moving speed is larger than a certain threshold value, the Bubble Collision method is performed and the adjacent polygon pair is updated even if the update cycle (b, c in FIG. 63) of the adjacent polygon pair is not reached. Thereby, a correct interference check result can be obtained. For example, if | v |> | vlimit |, the Bubble Collision method is performed and the adjacent polygon pair is updated. FIG. 66 is a flow chart of this processing, in which step 5605 of the shaded portion is added to the flow chart of FIG. In the above equation, v is an object moving speed, and vlimit is a threshold value.

【0105】しきい値vlimitは、移動物体の最大辺の長
さLmaxとすれば、Lmax/β・dtにより、移動物体の
最上位包絡球の半径をR0とすれば、R0/β・dtによ
り、あるいは、移動物体のLeaf球の最大半径をRL max
とすれば、RL max・β/dtにより決定する(但し、
dtは積分きざみ、βは2、3、4程度で調整必要)。
又、しきい値vlimitは、干渉チェック対象中の最小物
体の最大辺の長さをLmaxとすればLmax/β・dtによ
り、あるいは、干渉チェック対象中の最小物体の最上位
包絡球の半径をR0とすれば、R0/β・dtにより、
あるいは、干渉チェック対象中の最小物体のLeaf球の最
大半径をRLmaxとすればRLmax・β/dtにより決定す
ることもできる。
The threshold value vlimit is given by Lmax / β · dt, where Lmax is the maximum side length of the moving object, and R0 / β · dt is given when the radius of the uppermost envelope sphere of the moving object is R0. , Or the maximum radius of the Leaf sphere of the moving object is RL max
Then, it is determined by RL max · β / dt (however,
(Adjustment is required for dt, and β needs to be adjusted to 2, 3, or 4).
The threshold value vlimit is Lmax / β · dt, where Lmax is the maximum side length of the smallest object to be subjected to the interference check, or the radius of the highest envelope sphere of the smallest object to be subjected to the interference check. If R0, then R0 / β · dt gives
Alternatively, if the maximum radius of the Leaf sphere of the smallest object in the interference check target is RLmax, it can be determined by RLmax · β / dt.

【0106】(I)連続型Bubble Collision法の第3変
形例 連続型Bubble Collision法は移動距離/姿勢変化が小さ
いと仮定するので、大移動が発生すると、間違ったポリ
ゴンペア間の距離を示すのが目立つ(図61(b))。最
近点距離比があるしきい値より大きい場合には、近接ポ
リゴンペアの更新サイクル(図63中のb、c)に達し
なくてもBubble Collision法を行い、近接ポリゴンペア
を更新する。これにより、正しい干渉チェック結果を得
ることができる。例えば、(最近点距離比)>γ(但
し、γは3〜5程度)ならば、Bubble Collision法を行
い、近接ポリゴンペアを更新する。最近点距離が前回の
結果の5倍になるということは、大移動が発生したと考
えられるからである。
(I) Third Modified Example of Continuous Bubble Collision Method Since the continuous bubble collision method is assumed to have a small movement distance / posture change, when a large movement occurs, an incorrect distance between polygon pairs is indicated. Is conspicuous (Fig. 61 (b)). When the closest point distance ratio is larger than a certain threshold value, the Bubble Collision method is performed to update the near polygon pair even if the update cycle (b, c in FIG. 63) of the near polygon pair is not reached. Thereby, a correct interference check result can be obtained. For example, if (closest point distance ratio)> γ (where γ is about 3 to 5), the Bubble Collision method is performed to update the adjacent polygon pair. The reason that the nearest point distance is five times that of the previous result is that it is considered that a large movement has occurred.

【0107】ある近接ポリゴンペアについて、 (最近点距離比)=|(今回の最近点距離)/(前回の
最近点距離)| とする。例えば図67では近接ポリゴンペアP11,P
12については|d1′/d1|、近接ポリゴンペアP
21,P22では、|d2′/d2|である。γ=3と
すると|d1′/d1|>3、|d2′/d2|>3に
なるので、BubbleCollision法を行い、近接ポリゴンペ
アを更新して干渉チェックを行い、正しい最近点距離d
3を出力する。
For a certain adjacent polygon pair, (closest point distance ratio) = | (current closest point distance) / (previous closest point distance) | For example, in FIG. 67, a pair of adjacent polygons P11 and P
12 is | d1 '/ d1 |, the near polygon pair P
21 and P22, | d2 '/ d2 |. When γ = 3, | d1 '/ d1 |> 3 and | d2' / d2 |> 3, so the BubbleCollision method is performed, the adjacent polygon pair is updated, and the interference check is performed.
3 is output.

【0108】図68はかかる処理のフローであり、斜線
部のステップ5606 〜5607を図62のフローに
付加したものである。ステップ5606では、修正フラ
グBCmodeの判定を行う。BCmodeが1ならばBubble Colli
sion法を行い、近接ポリゴンを更新して干渉チェックを
行う。BCmodeが0ならば、近接ポリゴンペアの干渉チェ
ックを行う。ステップ5607では、まず、最近点距離
di′の保存と、その時の近接ポリゴンペアの保存を行
う。次に最近点距離比計算で|di′/di|を計算す
る。(diは一つ手前のサイクルの状態での最近点距離
である)。最近点距離比判定で|di′/di|>γ
(但し、γは3〜5程度)ならば、修正フラグBCmode=
1とする。そうでなければ、修正フラグBCmode=0とす
る。修正フラグBCmode=1ならば、次のサイクルでBubb
le Collision法を行い、近接ポリゴンを更新する。尚、
第1〜第3変形例は、図62に示す連続型Bubble colli
sion法の変形例として説明したが、図58の連続型Bubb
le collision法を同様に変形することができる。
FIG. 68 shows the flow of this processing, in which steps 5606 to 5607 in the shaded area are added to the flow of FIG. In step 5606, the correction flag BCmode is determined. Bubble Colli if BCmode is 1
The sion method is performed and the adjacent polygons are updated to check for interference. If BCmode is 0, the collision check of adjacent polygon pairs is performed. In step 5607, first, the closest point distance di ′ is saved and the adjacent polygon pair at that time is saved. Next, | di '/ di | is calculated by the closest point distance ratio calculation. (Di is the closest point distance in the previous cycle). | Di '/ di |> γ in the closest point distance ratio judgment
If (γ is about 3 to 5), the correction flag BCmode =
Set to 1. Otherwise, the correction flag BCmode = 0 is set. If the correction flag BCmode = 1, Bubb in the next cycle
Perform the le Collision method and update the neighboring polygons. still,
The first to third modifications are continuous bubble colli shown in FIG.
Although explained as a modification of the sion method, the continuous type Bubb in FIG.
The le collision method can be similarly modified.

【0109】(J)物体静止の干渉チェック効率化 (a) 凸包外における物体静止の干渉チェック効率化 従来は、高速化を図ることでリアルタイムな干渉チェッ
クを可能にすることに重点を置いている。そして、リア
ルタイム性が保てるということでステップ毎に毎回、干
渉チェックを行っている。しかし、干渉チェックを一度
行った後に、チェック対象物体がすべて静止していれ
ば、前回の結果と同じであるので、その結果を更新する
必要はない。そこで、速度指令、位置変位を監視し、速
度指令あるいは位置変位が零ならば、前サイクルの干渉
チェック結果をそのまま使って計算を省略する。このよ
うにすれば、干渉チェック対象物体グループが二つ以上
の場合に効果が大きい。なぜならば、移動物体を含むグ
ループのみの干渉チェック計算だけで良いからであり、
干渉チェックの効率化が図られる。
(J) Improvement of efficiency of interference check of object stationary (a) Improvement of efficiency of interference check of object stationary outside the convex hull Conventionally, emphasis is placed on enabling real-time interference checking by increasing the speed. There is. Then, because the real-time property can be maintained, the interference check is performed every step. However, if all the check target objects are stationary after the interference check is performed once, the result is the same as the previous result, and it is not necessary to update the result. Therefore, the speed command and the position displacement are monitored, and if the speed command or the position displacement is zero, the interference check result of the previous cycle is used as it is and the calculation is omitted. By doing so, the effect is great when there are two or more interference check target object groups. This is because it is sufficient to calculate the interference check only for the group including the moving object,
The efficiency of the interference check can be improved.

【0110】一例として、図69のような自動車工場内
ロボットの干渉チェックを考えてみる。ロボット1とロ
ボット2はプログラミングされた作業軌道で塗装作業等
を行い、ロボット3はマウス等のMMIによってインタ
ラクティブに指令値が与えられ、タイヤのネジ締め作業
等を行っているとする。この場合、干渉チェック対象物
体のグループとして3つ存在する。第1グループはロボ
ット1と車、第2グループはロボット2と車、第3グル
ープはロボット3とロボット2と車である。各グループ
の干渉チェック計算時間が10msずつかかると仮定す
ると次のような効率化が可能である。
As an example, consider the interference check of a robot in an automobile factory as shown in FIG. It is assumed that the robot 1 and the robot 2 perform a painting work or the like on a programmed work trajectory, and the robot 3 is interactively given a command value by an MMI such as a mouse to perform a screw tightening work or the like of a tire. In this case, there are three groups of interference check target objects. The first group is the robot 1 and the vehicle, the second group is the robot 2 and the vehicle, and the third group is the robot 3 and the robot 2 and the vehicle. Assuming that the interference check calculation time of each group takes 10 ms, the following efficiency can be achieved.

【0111】1) ロボット1が静止の場合 第1グループの干渉チェックデータが維持され、総計算
時間は20msとなる 2) ロボット2が静止の場合 第2グループの干渉チェックデータが維持され、総計算
時間は20msとなる。 3) ロボット1、ロボット2
が静止の場合 ロボット1、ロボット2の干渉チェックデータが維持さ
れ、総計算時間は10msとなる。この考えは車が他の
装置、製品であっても、ロボットが多数の場合にも拡張
でき、干渉チェックの効率化を図れる。
1) When the robot 1 is stationary, the interference check data of the first group is maintained and the total calculation time is 20 ms. 2) When the robot 2 is stationary, the interference check data of the second group is maintained and the total calculation is performed. The time is 20 ms. 3) Robot 1, Robot 2
When is stationary, the interference check data of the robot 1 and the robot 2 is maintained, and the total calculation time is 10 ms. This idea can be extended to the case where the number of robots is large even if the vehicle is another device or product, and the efficiency of interference check can be improved.

【0112】(b) 凸包内における物体静止時の干渉チ
ェック効率化 以上は凸包外における物体静止時の場合であるが、それ
を物体がかなり接近して、凸包内にある場合にも適用で
きる。ただし、若干の相違がある。凸包内では連続型Bu
bble Collision法による干渉チェックを行っているが、
干渉チェックを一度行った後に、チェック対象物体がす
べて静止していれば、前回の結果を更新する必要はな
い。そこで、速度指令、位置変位を監視し、これらが零
ならば、前サイクルの干渉チェック結果をそのまま使っ
て干渉チェック処理を省略する。但し、静止後の近接ポ
リゴンペアの更新サイクルで一度だけBubble Collision
法を行って正しい結果を求める必要がある。このように
すれば、干渉チェック対象物体グループが二つ以上の場
合に、移動物体を含むグループのみの干渉チェック計算
だけで良いので効果が大きい。
(B) Improving the efficiency of interference check when the object is stationary inside the convex hull The above is the case when the object is stationary outside the convex hull, but if the object is very close and is inside the convex hull, Applicable. However, there are some differences. Continuous Bu in the convex hull
Interference check by bble Collision method,
After performing the interference check once, if all the check target objects are stationary, there is no need to update the previous result. Therefore, the speed command and the position displacement are monitored, and if they are zero, the interference check result of the previous cycle is used as it is and the interference check process is omitted. However, the Bubble Collision is performed only once in the update cycle of the adjacent polygon pair after stationary.
We need to go to the law and get the right result. In this way, when there are two or more interference check target object groups, only the interference check calculation for the group including the moving object is sufficient, which is very effective.

【0113】例えば、図70に示す凹型物体Cと立方体
Dの簡易なモデルについて説明する。移動中t1では
(a)の状態にあり、正しく近接ポリゴンペアP11,
P12間の干渉チェックが行われる。しかし、その後の
移動量が大きく時刻t2で静止すると(b)の状態にな
り、この状態で間違ったポリゴンペアP11,P12間
で干渉チェックを行って誤った結果を示す。そこで、速
度指令、位置変位が零において、単に前サイクルでの干
渉チェック結果をそのまま使って計算を省くという方法
では、再移動後の時刻t5までは誤ったポリゴンペアP
11,P12が保存し続けられる。これを避けるために
は、時刻t2で静止した後、時刻t3の近接ポリゴンペ
アの更新サイクルで一度だけBubble Collision法を行っ
て、正しい近接ポリゴンペアP21,P22を求め、こ
れらの間の干渉チェックを行い、その結果を保持し、時
刻t4まではその干渉チェック結果をそのまま使って干
渉チェック処理を省略する。これを図69のような自動
車工場内ロボットの干渉チェックに拡張すると、物体が
かなり接近して、凸包内にある場合の干渉チェックの効
率化に結び付く。
For example, a simple model of the concave object C and the cube D shown in FIG. 70 will be described. On the move t1
In the state of (a), the correct proximity polygon pair P11,
The interference check between P12 is performed. However, when the amount of movement after that is large and the robot stops at time t2, the state becomes as shown in (b). In this state, an interference check is performed between the wrong polygon pairs P11 and P12, and an incorrect result is shown. Therefore, when the speed command and the position displacement are zero, a method of simply using the interference check result in the previous cycle as it is and omitting the calculation is used.
11 and P12 continue to be saved. To avoid this, after stopping at time t2, the Bubble Collision method is performed only once in the update cycle of the adjacent polygon pair at time t3 to obtain the correct adjacent polygon pairs P21 and P22, and the interference check between them is performed. The interference check result is retained, the interference check result is used as it is until time t4, and the interference check process is omitted. If this is extended to the interference check of the robot in the automobile factory as shown in FIG. 69, the objects come very close to each other, which leads to the efficiency of the interference check when the object is inside the convex hull.

【0114】(K)産業上の応用分野 本発明は、以下のような分野における応用が可能であ
る。 (a) 機構設計用CADシステム 機構設計では、製品を組み立てた時に不用意な干渉が度
々発生する。このようなことを事前に防ぐためには、機
構設計用CADシステム上にて部品間の接合関係、マー
ジンを入念にチェックしておくことが重要になる。本発
明のリアルタイム干渉チェック方法を機構設計用CAD
システムに組み込むことにより、実際の製品に近い形で
の事前チェックが可能となる。
(K) Industrial Application Field The present invention can be applied in the following fields. (a) CAD system for mechanical design In mechanical design, careless interference often occurs when products are assembled. In order to prevent such a situation in advance, it is important to carefully check the joining relationship between components and the margin on the mechanical design CAD system. The real-time interference check method of the present invention is applied to CAD for mechanism design.
By incorporating it in the system, it is possible to perform a preliminary check in a form that is close to the actual product.

【0115】(b) 移動ロボットの経路計画 マニピュレータや自走車などの移動ロボットでは、他の
物体と衝突しないよう経路計画を事前に行った後に駆動
させる場合が多い。例えば、マニピュレータを使った部
品組立て工程では、機構設計用CADシステム上に部品
モデル、マニピュレータモデルを持ち、マニピュレータ
を使って各部品を組み立てていく工程をプランニングす
ることがある。このような場合に部品間の干渉、部品と
マニピュレータ間との干渉をチェックしながら経路計画
することが必要となる。また、掃除ロボット、警護ロボ
ット、運搬ロボットなどの自走ロボットでは、地点間の
移動において壁や柱または机等の障害物との衝突を回避
した経路計画が必要である。これら経路計画において本
発明の干渉チェック方法を適用して、干渉の事前チェッ
クすることができる。
(B) Path Planning of Mobile Robot In many cases, a mobile robot such as a manipulator or a self-propelled vehicle is driven after carrying out path planning in advance so as not to collide with other objects. For example, in a part assembly process using a manipulator, a part model and a manipulator model are held on a mechanical design CAD system, and a process of assembling each part using the manipulator may be planned. In such a case, it is necessary to plan the route while checking the interference between the parts and the interference between the parts and the manipulator. In addition, self-propelled robots such as cleaning robots, guard robots, and transport robots require route planning that avoids collisions with obstacles such as walls, columns, or desks when moving between points. The interference check method of the present invention can be applied to these path plans to check interference beforehand.

【0116】(c) マルチメディアにおけるアニメーショ
ン作成 マルチメディアでは、コンピュータグラフィックス、実
画像、音声などをミックスさせた様々な応用が期待され
ており、又、コマーシャルや映画の分野ではコンピュー
タグラフィックスを使ったリアリティの高いアニメーシ
ョン作成が望まれている。従来のコンピュータグラフィ
ックスの世界では、アニメーションはもっぱらオフライ
ン的に作成されており、干渉問題も総当たり法を使った
方法が取られていた。これからのアニメーション作成
は、高速なグラフィックコンピュータを使ったリアルタ
イム/インタラクティブ作成が主流になり、その場合に
はCGモデル間の干渉を如何に高速に解くかが鍵とな
る。例えば、アンドロイドモデル(人間の形をしたCG
モデル)を歩かせる場合には、アンドロイドモデルと地
上との接触問題を解かなければならず、また、自動車の
衝突をシミュレーションする場合には、まさしく自動車
間の干渉問題を解く必要がある。本発明の高速の干渉チ
ェック方法は、リアルタイム/インタラクティブアニメ
ーション作成において必須技術となるものである。
(C) Creation of animation in multimedia Multimedia applications are expected to have various applications in which computer graphics, real images, sounds, etc. are mixed, and computer graphics are used in the field of commercials and movies. It is desired to create highly realistic animation. In the traditional computer graphics world, animations were created exclusively offline, and the interference problem was also dealt with using the brute force method. In the future animation creation, real-time / interactive creation using a high-speed graphic computer will be the mainstream, and in that case, how to solve interference between CG models at high speed is the key. For example, an android model (human-shaped CG
When walking a model), the contact problem between the android model and the ground must be solved, and when simulating a car collision, it is necessary to solve the interference problem between cars. The high-speed interference checking method of the present invention is an indispensable technique in real-time / interactive animation creation.

【0117】(d) ゲームソフト 従来のゲームソフトはもっぱら2次元的なものが多かっ
たが、今後は、グラフィックコンピュータを使い、3次
元的に表示するものが主流になると予想される。ゲーム
ソフトでは、例えば、シューティングゲームにおけるミ
サイルと戦闘機の衝突、レーシングゲームにおける車同
志の衝突など物体間の干渉問題が多くの場面に絡んでお
り、本発明の干渉チェック方法は、これらに対して非常
に強力な手段を提供するものである。以上、本発明を実
施例により説明したが、本発明は請求の範囲に記載した
本発明の主旨に従い種々の変形が可能であり、本発明は
これらを排除するものではない。
(D) Game software Conventional game software was mostly two-dimensional, but in the future, it is expected that a three-dimensional display using a graphic computer will become mainstream. In game software, for example, a collision problem between objects such as a collision between a missile and a fighter in a shooting game and a collision between cars in a racing game is involved in many scenes. It provides a very powerful tool. Although the present invention has been described above with reference to the embodiments, the present invention can be variously modified according to the gist of the present invention described in the claims, and the present invention does not exclude these.

【0118】[0118]

【発明の効果】本発明によれば、高速に非凸多面体間の
干渉チェックを行うことができる。本発明によれば、干
渉チェックの前処理である凸包の生成、近接点線形リス
ト、階層球の生成を効率良く、高速に行うことができ
る。本発明によれば、非凸多面体同士がかなり接近して
いる場合の干渉チェックを連続型Bubble Collision法を
用いて高速に行うことができる。本発明によれば、物体
静止時の干渉チェックを効率的に行うことができる。
According to the present invention, it is possible to check interference between non-convex polyhedrons at high speed. According to the present invention, it is possible to efficiently and rapidly generate a convex hull, which is a pre-process for an interference check, a near point linear list, and a hierarchical sphere. According to the present invention, interference check when non-convex polyhedrons are very close to each other can be performed at high speed by using the continuous Bubble Collision method. According to the present invention, it is possible to efficiently perform an interference check when an object is stationary.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】非凸多面体の説明図である。FIG. 2 is an explanatory diagram of a non-convex polyhedron.

【図3】凸包の説明図である。FIG. 3 is an explanatory diagram of a convex hull.

【図4】干渉チェックのシステム構成図である。FIG. 4 is a system configuration diagram of interference check.

【図5】干渉チェック前処理の概略フローである。FIG. 5 is a schematic flow of interference check preprocessing.

【図6】多面体を表現するためのデータ構造説明図であ
る。
FIG. 6 is an explanatory diagram of a data structure for expressing a polyhedron.

【図7】多面体を表現するためのC言語によるデータ構
造である。
FIG. 7 is a C language data structure for expressing a polyhedron.

【図8】凸包構成アルゴリズムである。FIG. 8 is a convex hull construction algorithm.

【図9】C言語による2次元凸包構成基本関数である。FIG. 9 is a two-dimensional convex hull construction basic function in C language.

【図10】一次元凸包構成説明図である。FIG. 10 is an explanatory diagram of a one-dimensional convex hull configuration.

【図11】アッパーブリッジ、ロワーブリッッジの構成
法説明図である。
FIG. 11 is an explanatory diagram of a configuration method of an upper bridge and a lower bridge.

【図12】C言語による2次元凸包マージ関数の構成で
ある。
FIG. 12 is a configuration of a two-dimensional convex hull merge function in C language.

【図13】凸包構成の説明図である。FIG. 13 is an explanatory diagram of a convex hull configuration.

【図14】凸包構成の説明図である。FIG. 14 is an explanatory diagram of a convex hull structure.

【図15】凸包構成の説明図である。FIG. 15 is an explanatory diagram of a convex hull configuration.

【図16】凸包構成の説明図である。FIG. 16 is an explanatory diagram of a convex hull configuration.

【図17】C言語による3次元凸包マージ関数の構成で
ある。
FIG. 17 is a configuration of a three-dimensional convex hull merge function in C language.

【図18】3次元凸包構成の説明図である。FIG. 18 is an explanatory diagram of a three-dimensional convex hull configuration.

【図19】ラッピングプロセス説明図である。FIG. 19 is an explanatory diagram of a wrapping process.

【図20】三角形ポリゴンのパッチングプロセスの説明
図である。
FIG. 20 is an explanatory diagram of a triangular polygon patching process.

【図21】C言語による三角形パッチング関数である。FIG. 21 is a triangular patching function in C language.

【図22】バックアップ凸包構成アルゴリズムにおける
ラッピング及びパッチングプロセス説明図である。
FIG. 22 is an explanatory diagram of a wrapping and patching process in the backup convex hull construction algorithm.

【図23】近接点線形リスト説明図である。FIG. 23 is an explanatory diagram of a near point linear list.

【図24】凸要素毎のポリゴンデータの説明図である。FIG. 24 is an explanatory diagram of polygon data for each convex element.

【図25】近接点線形リスト構成アルゴリズムの説明図
である。
FIG. 25 is an explanatory diagram of a near-point linear list construction algorithm.

【図26】近接点線形リストのダンプファイルフォーマ
ットである。
FIG. 26 is a dump file format of a near point linear list.

【図27】リーフ球の説明図である。FIG. 27 is an explanatory diagram of a leaf ball.

【図28】三角形ポリゴン説明図である。FIG. 28 is an explanatory diagram of a triangular polygon.

【図29】辺上のリーフ球による被覆説明図である。FIG. 29 is an explanatory diagram of covering with a leaf sphere on a side.

【図30】三角形ポリゴン内部の被覆説明図である。FIG. 30 is an explanatory diagram of the inside of a triangular polygon.

【図31】C言語による2分木ツリー用のデータ構造で
ある。
FIG. 31 is a data structure for a binary tree tree in C language.

【図32】2分木ツリー構成のフローである。FIG. 32 is a flow of a binary tree tree structure.

【図33】2分木ツリーの例である。FIG. 33 is an example of a binary tree.

【図34】C言語によるバブルコライジョンチェック基
本関数(その1)である。
FIG. 34 is a bubble collision check basic function (No. 1) in C language;

【図35】C言語によるバブルコライジョンチェック基
本関数(その2)である。
FIG. 35 is a bubble collision check basic function (No. 2) in C language;

【図36】球間距離説明図である。FIG. 36 is an explanatory diagram of an inter-sphere distance.

【図37】C言語による干渉チェックデータ構造(その
1)である。
FIG. 37 is an interference check data structure (part 1) in C language.

【図38】C言語による干渉チェックデータ構造(その
2)である。
FIG. 38 is an interference check data structure (No. 2) in C language.

【図39】C言語による干渉チェックデータ構造(その
3)である。
FIG. 39 is an interference check data structure (part 3) in C language.

【図40】Gilbert法の基本的な説明図である。FIG. 40 is a basic explanatory diagram of the Gilbert method.

【図41】連続型Gilbert法の説明図である。FIG. 41 is an explanatory diagram of a continuous Gilbert method.

【図42】融合アルゴリズムのフローである。FIG. 42 is a flow of the fusion algorithm.

【図43】(2+1)次元干渉チェック説明図である。FIG. 43 is an explanatory diagram of a (2 + 1) -dimensional interference check.

【図44】メタツリー説明図である。FIG. 44 is an explanatory diagram of a meta tree.

【図45】メタツリー構成を包含した連続型干渉チェッ
クのフローである。
FIG. 45 is a flowchart of continuous interference check including a meta tree structure.

【図46】メタツリー構成を包含した連続型干渉チェッ
クの別のフローである。
FIG. 46 is another flow of the continuous interference check including the meta tree structure.

【図47】干渉チェックの全体フローである。FIG. 47 is an overall flow of interference check.

【図48】CG内の環境説明図である。FIG. 48 is an explanatory diagram of the environment in the CG.

【図49】マウスを用いた三次元入力方式のシステム構
成図である。
FIG. 49 is a system configuration diagram of a three-dimensional input method using a mouse.

【図50】三次元座標入力部の説明図である。FIG. 50 is an explanatory diagram of a three-dimensional coordinate input unit.

【図51】リーフ球の作成説明図である。FIG. 51 is an explanatory diagram of making a leaf sphere.

【図52】三角形ポリゴン上のリーフ球説明図である。FIG. 52 is an explanatory diagram of leaf spheres on a triangular polygon.

【図53】階層包絡球の2分木ツリ−構造説明図であ
る。
FIG. 53 is an explanatory diagram of a binary tree tree structure of a hierarchical envelope sphere.

【図54】階層包絡球の2分木ツリ−構造の三次元イメ
ージ説明図である。
FIG. 54 is a three-dimensional image explanatory diagram of a binary tree tree structure of a hierarchical envelope sphere.

【図55】階層包絡球の構成例(直方体の場合)であ
る。
FIG. 55 is a configuration example of a hierarchical envelope sphere (in the case of a rectangular parallelepiped).

【図56】階層包絡球の構成例(非凸多面体の場合)で
ある。
FIG. 56 is a configuration example of a hierarchical envelope sphere (in the case of a non-convex polyhedron).

【図57】連続型バブルコライジョン法説明図である。FIG. 57 is an explanatory diagram of a continuous bubble collision method.

【図58】連続型バブルコライジョン法のフロー図であ
る。
FIG. 58 is a flow chart of the continuous bubble collision method.

【図59】近接球ペアの探索/近接ポリゴンペアの探索
説明図である。
FIG. 59 is an explanatory diagram of a search for a close sphere pair / search for a close polygon pair.

【図60】連続型バブルコライジョン法の計算時間説明
図である。
FIG. 60 is an explanatory diagram of calculation time of the continuous bubble collision method.

【図61】近接ポリゴンペア更新説明図である。FIG. 61 is an explanatory diagram of updating a near polygon pair.

【図62】連続型バブルコライジョン法の更新サイクル
自動決定法のフローである。
FIG. 62 is a flow of an automatic update cycle determination method of the continuous bubble collision method.

【図63】連続型バブルコライジョン法の計算時間説明
図である。
FIG. 63 is an explanatory diagram of calculation time of continuous bubble collision method.

【図64】連続型バブルコライジョン法の修正方法のフ
ローである。
FIG. 64 is a flow of a correction method of the continuous bubble collision method.

【図65】物体移動量のしきい値の決定法説明図であ
る。
FIG. 65 is an explanatory diagram of a method of determining the threshold value of the object movement amount.

【図66】連続型バブルコライジョン法の修正方法のフ
ローである。
FIG. 66 is a flow of a correction method of the continuous bubble collision method.

【図67】最近点距離比による修正説明図である。FIG. 67 is an explanatory diagram of correction based on the closest point distance ratio.

【図68】連続型バブルコライジョン法の修正方法のフ
ローである。
FIG. 68 is a flow of a correction method of the continuous bubble collision method.

【図69】自車工場内ロボット干渉チェック説明図であ
る。
FIG. 69 is an explanatory diagram of a robot interference check in the own vehicle factory.

【図70】凸包内における物体静止時の干渉チェックの
効率化の説明図である。
[Fig. 70] Fig. 70 is an explanatory diagram of efficiency improvement in interference check when an object is stationary in a convex hull.

【符号の説明】[Explanation of symbols]

1・・凸包構成部 2・・近接点線形リスト作成部 3・・階層包絡球2分木ツリー生成部 4・・記憶部 5・・凸包間干渉チェック部 6・・バブルコライジョン法実行部 7・・ポリゴンペア間干渉チェック部 1 ... Convex hull component 2. Proximity point linear list creation unit 3 ... Hierarchical envelope sphere binary tree tree generation unit 4 ... Storage unit 5 ... Interference between convex hulls 6 ... Bubble Correlation Method Execution Department 7..Interference check unit between polygon pairs

───────────────────────────────────────────────────── フロントページの続き (72)発明者 丸山 次人 神奈川県川崎市中原区上小田中4丁目1 番1号 富士通株式会社内 (56)参考文献 S.Quinlan「Efficie nt Distance Comput ation between Non− Convex Objects」Rob otics and Automati on,1994.Proceeding s.,1994 IEEE Interra tional Conference (1994.5.8−13)Vol.4 P. 3324−3329 (58)調査した分野(Int.Cl.7,DB名) G06F 17/50 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Tsujito Maruyama 4-1-1 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Fujitsu Limited (56) References Quinlan, "Efficient Distance Computation between Non-Convex Objects", Robotics and Automation, 1994. Proceeding s. , 1994 IEEE Internal Conference (1994.5.8-13) Vol. 4 P. 3324-3329 (58) Fields investigated (Int.Cl. 7 , DB name) G06F 17/50

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 非凸多面体である2つの物体間の干渉チ
ェックを行う干渉チェック装置において、 非凸多面体の凸包を生成し、該凸包間の干渉チェックを
行う手段、 凸包間の距離が設定値以下になったとき、前記非凸多面
体を構成するポリゴン上に前記凸包の大きさと該ポリゴ
ンの数に応じた半径を有する複数の球(リーフ球)を配
列して各ポリゴンを覆い、分割統治アルゴリズムに従っ
て該球を階層球で順次包絡し、階層包絡球の2分木ツリ
ー構造を生成する手段、 前記生成された2分木ツリー構造に基づいて、上位階層
の包絡球同士の干渉チェックを行い、干渉する上位階層
の包絡球を、該包絡球を構成する下位階層の包絡球に分
解し、下位階層の包絡球について干渉チェックを行い、
以後干渉しなくなるまで前記包絡球の分解及び干渉チェ
ック処理を行って、近接球のペアを求める手段、 該近接球のペアに応じたポリゴンのペアを近接ポリゴン
のペアとして求め、近接ポリゴンペア間の干渉チェック
を行う手段を備えたことを特徴とする干渉チェック装
置。
1. An interference check device for checking interference between two objects which are non-convex polyhedrons, means for generating a convex hull of a non-convex polyhedron, and checking interference between the convex hulls, distance between the convex hulls When is less than a set value, a plurality of spheres (leaf spheres) having a radius corresponding to the size of the convex hull and the number of the polygons are arranged on the polygons forming the non-convex polyhedron to cover each polygon. A means for sequentially enclosing the sphere with hierarchical spheres according to a divide-and-conquer algorithm to generate a binary tree tree structure of hierarchical envelope spheres, based on the generated binary tree tree structure, interference between envelope spheres of an upper hierarchy Perform the check, decompose the envelope sphere of the upper layer that interferes into the envelope sphere of the lower layer that constitutes the envelope sphere, perform the interference check on the envelope sphere of the lower layer,
After that, the envelope sphere is decomposed and the interference check process is performed until there is no interference, and a means for obtaining a pair of close spheres, a pair of polygons corresponding to the pair of close spheres is obtained as a pair of close polygons, and a pair of close polygons is obtained. An interference check device comprising means for performing an interference check.
【請求項2】 多面体である2つの物体間の干渉チェッ
クを行う干渉チェック装置において、 各々の多面体に対して、多面体を構成するポリゴン上に
該多面体の大きさと該ポリゴンの数に応じた半径を有す
る球を配列し、分割統治アルゴリズムに従って該球を階
層球で順次包絡し、階層包絡球の2分木ツリー構造を生
成する手段、 前記生成された多面体の2分木ツリー構造に基づいて、
上位階層の包絡球同士の干渉チェックを行い、干渉する
上位階層の包絡球を、該包絡球を構成する下位階層の包
絡球に分解し、下位階層の包絡球について干渉チェック
を行い、以後干渉しなくなるまで前記包絡球の分解及び
干渉チェック処理を行って、近接球のペアを求め、該近
接球のペアに応じたポリゴンのペアを近接ポリゴンペア
として求めて保存し、該近接ポリゴンペア間の干渉チェ
ックを行うバブルコライジョンアルゴリズムを実行する
手段、 バブルコライジョンアルゴリズムにより求まった近接ポ
リゴンのペアについて所定回数干渉チェックを繰返し実
行する手段、 前記ポリゴンペアの所定回数の干渉チェック毎に前記バ
ブルコライジョンアルゴリズムを実行させて近接ポリゴ
ンペアを更新する手段を備えたことを特徴とする干渉チ
ェック装置。
2. An interference check device for checking interference between two polyhedron objects, wherein each polyhedron has a radius corresponding to the size of the polyhedron and the number of the polygons on a polygon forming the polyhedron. Means for arranging the spheres, sequentially enclosing the spheres with a hierarchical sphere according to a division and convolution algorithm, and generating a binary tree tree structure of the hierarchical envelope sphere, based on the generated binary tree tree structure of the polyhedron,
Performs an interference check between the envelope spheres of the upper layer, decomposes the interfering envelope spheres of the upper layer into the envelope spheres of the lower layer that composes the envelope sphere, performs the interference check of the envelope spheres of the lower layer, and then interferes. The envelope sphere is decomposed and the interference check process is performed until it disappears, a pair of close spheres is obtained, a pair of polygons corresponding to the pair of close spheres is obtained and stored as a close polygon pair, and interference between the close polygon pairs is obtained. Means for executing a bubble collision algorithm for performing a check, means for repeatedly executing a predetermined number of interference checks for pairs of adjacent polygons obtained by the bubble collision algorithm, the bubble collision algorithm for each predetermined number of collision checks of the polygon pair Is executed to update the neighboring polygon pair. Checking device.
【請求項3】 更に、バブルコライジョンアルゴリズム
の計算時間を測定する手段、 該計算時間に基づいて近接ポリゴンの更新サイクルを変
更する手段、 を備えたことを特徴とする請求項2記載の干渉チェック
装置。
3. The interference check according to claim 2, further comprising means for measuring the calculation time of the bubble collision algorithm, and means for changing the update cycle of the adjacent polygons based on the calculation time. apparatus.
【請求項4】 移動物体の移動量を監視する手段を備
え、 前記バブルコライジョンアルゴリズム実行手段は、移動
量が設定値以上の場合には、近接ポリゴンの更新サイク
ルに達しなくてもバブルコライジョンアルゴリズムを実
行して近接ポリゴンのペアを更新することを特徴とする
請求項2記載の干渉チェック装置。
4. A means for monitoring the moving amount of a moving object, wherein said bubble collision algorithm executing means, when the moving amount is equal to or more than a set value, bubble collision even if it does not reach the update cycle of the adjacent polygons. 3. The interference check device according to claim 2, wherein an algorithm is executed to update the pair of adjacent polygons.
【請求項5】 移動物体の移動速度を監視する手段を備
え、 前記バブルコライジョンアルゴリズム実行手段は、移動
速度が設定値以上の場合には、近接ポリゴンの更新サイ
クルに達しなくてもバブルコライジョンアルゴリズムを
実行して近接ポリゴンのペアを更新することを特徴とす
る請求項2記載の干渉チェック装置。
5. A means for monitoring the moving speed of a moving object, wherein the bubble collision algorithm executing means, when the moving speed is equal to or higher than a set value, does not reach the update cycle of the adjacent polygons. 3. The interference check device according to claim 2, wherein an algorithm is executed to update the pair of adjacent polygons.
【請求項6】 近接ポリゴンペア間の距離を測定する手
段を備え、 前記バブルコライジョンアルゴリズム実行手段は、今回
の距離と前回の距離の比が設定値以上の場合には、近接
ポリゴンの更新サイクルに達しなくてもバブルコライジ
ョンアルゴリズムを実行して近接ポリゴンのペアを更新
することを特徴とする請求項2記載の干渉チェック装
置。
6. A means for measuring a distance between pairs of adjacent polygons, wherein the bubble collision algorithm execution means is a cycle for updating the adjacent polygons when the ratio of the present distance and the previous distance is equal to or more than a set value. 3. The interference check device according to claim 2, wherein the bubble collision algorithm is executed to update the pair of adjacent polygons even if the number of times is not reached.
JP00171899A 1999-01-07 1999-01-07 Interference check device Expired - Fee Related JP3425760B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00171899A JP3425760B2 (en) 1999-01-07 1999-01-07 Interference check device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00171899A JP3425760B2 (en) 1999-01-07 1999-01-07 Interference check device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP7174627A Division JP2915826B2 (en) 1995-07-11 1995-07-11 Interference check device

Publications (2)

Publication Number Publication Date
JPH11250122A JPH11250122A (en) 1999-09-17
JP3425760B2 true JP3425760B2 (en) 2003-07-14

Family

ID=11509357

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00171899A Expired - Fee Related JP3425760B2 (en) 1999-01-07 1999-01-07 Interference check device

Country Status (1)

Country Link
JP (1) JP3425760B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4904731B2 (en) * 2005-07-06 2012-03-28 株式会社ジェイテクト Interference check device for machine tools
JP5167767B2 (en) * 2007-11-05 2013-03-21 株式会社ジェイテクト Machine tool interference detection device
US8497875B2 (en) * 2009-01-21 2013-07-30 Siemens Product Lifecycle Management Software Inc. System, method, and computer program product for determining a translation vector
JP6069923B2 (en) * 2012-07-20 2017-02-01 セイコーエプソン株式会社 Robot system, robot, robot controller
JP5878907B2 (en) * 2013-10-30 2016-03-08 株式会社シーイーシー Interference determination apparatus, interference determination method, and interference determination program
CN107688342B (en) 2017-03-27 2019-05-10 平安科技(深圳)有限公司 The obstruction-avoiding control system and method for robot

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
S.Quinlan「Efficient Distance Computation between Non−Convex Objects」Robotics and Automation,1994.Proceedings.,1994 IEEE Interrational Conference(1994.5.8−13)Vol.4 P.3324−3329

Also Published As

Publication number Publication date
JPH11250122A (en) 1999-09-17

Similar Documents

Publication Publication Date Title
JP2915826B2 (en) Interference check device
Tang et al. Interactive continuous collision detection between deformable models using connectivity-based culling
US7084869B2 (en) Methods and apparatus for detecting and correcting penetration between objects
US5056031A (en) Apparatus for detecting the collision of moving objects
US20140025203A1 (en) Collision detection system, collision detection data generator, and robot
KR900003123B1 (en) Method for evaluating free surface and n.c. system
KR101028698B1 (en) Apparatus and method for three-dimensional modeling using lattice structure
JP3415438B2 (en) Interference checking apparatus and method
US9881417B2 (en) Multi-view drawing apparatus of three-dimensional objects, and method
US20190303658A1 (en) Motion generating apparatus, model generating apparatus and motion generating method
JPH03171303A (en) Method and apparatus for generating data structure
US9892485B2 (en) System and method for mesh distance based geometry deformation
JP3425760B2 (en) Interference check device
JPH05346957A (en) Device and method for presenting shape feature quantity
US5761391A (en) Arithmetic unit for calculating distance between objects
JP7161154B2 (en) Hierarchical bounding volume generation method, computer program and computer device
Zhong et al. A methodology for solid modelling in a virtual reality environment
CN112486319B (en) VR (virtual reality) interaction method, device, equipment and medium based on touch rendering equipment
Shah et al. GPU-accelerated collision analysis of vehicles in a point cloud environment
JPH08123835A (en) Shape design support device
JPH087800B2 (en) Method and apparatus for synthesizing solid model
Zhong et al. Solid modelling in a virtual reality environment
JPH0727582B2 (en) Shape modeling system in CAD system
WO2003031005A2 (en) Methods and apparatus for detecting and correcting penetration between objects
JP2004094750A (en) Three-dimensional configuration processor, interference model detecting method, program and storage medium

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20001003

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080509

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090509

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090509

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100509

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100509

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110509

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120509

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130509

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140509

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees