JP2002312409A - Closest point search device - Google Patents

Closest point search device

Info

Publication number
JP2002312409A
JP2002312409A JP2002061723A JP2002061723A JP2002312409A JP 2002312409 A JP2002312409 A JP 2002312409A JP 2002061723 A JP2002061723 A JP 2002061723A JP 2002061723 A JP2002061723 A JP 2002061723A JP 2002312409 A JP2002312409 A JP 2002312409A
Authority
JP
Japan
Prior art keywords
convex
point
closest
polyhedron
polygon
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.)
Granted
Application number
JP2002061723A
Other languages
Japanese (ja)
Other versions
JP3556644B2 (en
Inventor
Yuichi Sato
裕一 佐藤
Mitsunori Hirata
光徳 平田
Shiro Nagashima
史朗 永嶋
Tsugihito Maruyama
次人 丸山
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 JP2002061723A priority Critical patent/JP3556644B2/en
Publication of JP2002312409A publication Critical patent/JP2002312409A/en
Application granted granted Critical
Publication of JP3556644B2 publication Critical patent/JP3556644B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To realize the high-speed continuous search between articles, while restricting a computing load. SOLUTION: In the case of continuously searching the closest point between projecting polygonal bodies to check the interference with each other, vertex coordinates of all polygons covering the projecting polygonal body are input, and stored in a polygon data memory unit 22a. A close point linear list forming unit 24 forms a close point linear list provided with the data structure formed by linking the vertex of each polygon in a first direction (next direction) and linking a vertex group connected to each vertex through a polygon side with the vertex in a second direction (branch direction) before carrying out the closest point search processing. Thereafter, a closest point search processing unit 26 finds the vertex close to the closest point on the basis of the close point linear list, and searches the closest point in the following time among the vertexes to check the interference.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明はロボットや自走車の運用
における衝突回避や経路通路設計(パスプランニング)
に適用できる最接近点探索装置に係わり、特にコンピュ
ータ上に構築された複数の物体の形状モデル(CGモデ
ル)に対してそれらが互いに離れているか、接触してい
るか、干渉しているかを判定でき、しかも、物体間の最
接近点、接触点、距離をリアルタイムに算出できる最接
近点探索装置に関する。本発明は、機械設計用CADシ
ステム、マニピュレータや自走車等の移動ロボットのパ
ス生成、マルチメディアにおけるアニメーション作成、
ゲームソフトウェア等コンピュータグラフィックスを応
用した様々な分野に適用できる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to collision avoidance and path planning in the operation of robots and self-propelled vehicles (path planning).
The present invention relates to an apparatus for searching for the closest point which can be applied to a computer. In particular, it is possible to determine whether a plurality of object shape models (CG models) built on a computer are separated from each other, in contact with each other, or interfere with each other. In addition, the present invention relates to a closest approach point search device capable of calculating a closest approach point, a contact point, and a distance between objects in real time. The present invention provides a CAD system for machine design, path generation for mobile robots such as manipulators and self-propelled vehicles, animation creation in multimedia,
It can be applied to various fields using computer graphics such as game software.

【0002】[0002]

【従来の技術】通常、ロボットはオペレータによる遠隔
操作、あるいは計算機上で作成したデータに基づくプロ
グラム操作により運用される。ロボットを遠隔操作する
場合には、オペレータはロボットを取り囲む他の物体と
の不意な衝突、干渉を避けながら運用しなければならな
い。又、ロボットをプログラム操作する場合には、予
め、計算機上にて障害物との衝突や干渉が生じないよう
にパスプランニングを行う必要がある。一方、自走車を
運用する場合、自走車は走行しようとする方向の環境地
図データをセンサを通して取り込み、障害物を回避しな
がら自律走行し、あるいは、予め計算機上に格納されて
いる地図情報に基づいて作成されたパスに従ってプログ
ラム走行する。これらの場合にも、ロボットの場合と同
じように逐次的な衝突回避や干渉の生じないパスプラン
ニングが必要となる。
2. Description of the Related Art Generally, a robot is operated by remote control by an operator or program operation based on data created on a computer. When remotely controlling the robot, the operator must operate the robot while avoiding unexpected collision or interference with other objects surrounding the robot. When a robot is operated by a program, it is necessary to perform path planning on a computer in advance so as not to cause collision or interference with an obstacle. On the other hand, when operating a self-propelled vehicle, the self-propelled vehicle fetches environmental map data in the direction in which the vehicle is going to travel through a sensor and autonomously runs while avoiding obstacles, or uses map information stored in advance on a computer. Program running according to the path created based on the. In these cases, it is necessary to perform sequential collision avoidance and path planning that does not cause interference as in the case of the robot.

【0003】物体間の最接近点及び距離を測定すること
ができれば、障害物を回避しながらロボットあるいは自
走車を移動することができ、あるいは衝突や干渉が生じ
ない走行経路をプログラムしてプログラム走行すること
ができる。このため、ロボット、自走車における逐次的
な衝突回避、事前のパスプランニングにおいて、物体間
の最接近点探索方法が要望されている。すなわち、複数
の物体が存在する時、それらが互いに離れているか、接
触しているか、干渉しているかを判定し、かつ、物体間
の最接近点(接触又は干渉している場合には、各々、接
触点または干渉点)及び距離を効率良く算出する最接近
点探索方法が要望されている。
[0003] If the closest point and the distance between objects can be measured, a robot or a self-propelled vehicle can be moved while avoiding obstacles. You can run. For this reason, there is a demand for a method of searching for a point of closest approach between objects in sequential collision avoidance of robots and self-propelled vehicles and in advance path planning. That is, when there are a plurality of objects, it is determined whether they are separated from each other, in contact with each other, or interferes with each other, and the closest point between the objects (in the case of contact or interference, , A contact point or an interference point) and a closest approach point searching method for efficiently calculating a distance.

【0004】最接近点探索問題に対する基本的なアプロ
ーチは、対象となる物体の形状、位置、姿勢データを計
算機上に取り込み、初等幾何学的計算により解決する方
法である。通常、CAD分野で使われているグラフィッ
クシミュレータでは、平面的な凸多角形(凸ポリゴン)
を複数枚貼付けて1つの物体を表現している。従って、
2つの物体間の干渉状態をチェックする最も素朴な方法
は、各々の物体を構成している凸ポリゴン間に対する最
接近点探索を全ての凸ポリゴンの組み合わせについて行
うものである。具体的には、空間上に任意に配置された
2つの物体を構成する各凸ポリゴンに対し、最も近接し
ているポイントを各格子点(頂点)、辺、面について探
索し、最接近距離を算出することである。勿論、最接近
距離がゼロの場合には、2つの物体は干渉状態にあると
いえる。この方法では、2つの物体を表現している格子
点数をM1,M2としたときに、O(M1・M2)の計算
負荷を伴う。尚、O( )は計算負荷のオーダを示す関数
である。
The basic approach to the closest point search problem is a method in which shape, position, and orientation data of a target object is loaded on a computer and solved by elementary geometric calculation. Normally, graphic simulators used in the CAD field use planar convex polygons (convex polygons).
Are attached to represent one object. Therefore,
The simplest method for checking the interference state between two objects is to search for the closest approach point between the convex polygons constituting each object for all the combinations of the convex polygons. Specifically, for each convex polygon constituting two objects arbitrarily arranged in space, the closest point is searched for each grid point (vertex), side, and surface, and the closest approach distance is determined. It is to calculate. Of course, when the closest approach distance is zero, it can be said that the two objects are in an interference state. In this method, when the number of grid points representing two objects is M1 and M2, a calculation load of O (M1 · M2) is involved. O () is a function indicating the order of the calculation load.

【0005】O(M1・M2)の計算負荷を減らすためのア
ルゴリズムの開発が、主に、計算幾何学の分野において
研究されており、O(MlogM)(M=M1+M2)という漸近特
性(M1,M2が非常に大きい場合)を持ったアルゴリ
ズムが開発されている。この種のアルゴリズムは理論的
に正しいが、いずれも漸近特性に注目したものであり、
M1,M2が実用的な大きさの場合にどれだけ計算負荷
が減るかといった実際的な議論が欠けており、真に実用
的なアルゴリズムとはいえなかった。一方、歴史的に
は、各格子点間の垂直2等分線を結んで各格子点の近接
関係を図示するボロノイ(Voronoi)図を使った方法や、
三次元空間を象限毎に次々に八等分して対象の専有領域
をデータベース化するオクトツリー(oct-tree)の方法
による最接近点の探索法も知られている。これらの方法
はいずれも対象が静的に一定である場合に有効であり、
分解や組み立てなどにより対象が動的に次々と変化して
いく場合には不向きであった。
The development of an algorithm for reducing the computational load of O (M1 · M2) has been studied mainly in the field of computational geometry, and the asymptotic property of O (MlogM) (M = M1 + M2) ( An algorithm with M1 and M2 being very large) has been developed. Although this type of algorithm is theoretically correct, both focus on asymptotic properties,
Practical discussions on how much the computational load is reduced when M1 and M2 are of a practical size are lacking, and cannot be said to be a truly practical algorithm. On the other hand, historically, a method using a Voronoi diagram that connects the perpendicular bisectors between the grid points to illustrate the proximity relationship between the grid points,
It is also known to search for the closest approach point by an oct-tree method in which a three-dimensional space is divided into eight equal parts one after another for each quadrant, and the occupied area of the object is made into a database. Each of these methods is effective when the target is statically constant,
It is not suitable when the target changes dynamically one after another due to disassembly or assembly.

【0006】さて、最接近点探索アルゴリズムの実用度
を上げるためには、次の1)〜5)に示す要件をカバーする
必要がある。 1) 非凸多面体への拡張 計算幾何学などで従来開発されてきた最接近点探索アル
ゴリズムでは、取り扱う対象を凸多面体に限っている
(図69(a)参照)。しかし、実際には、図69(b)に示
すように非凸多面体との干渉問題が多数発生する。この
ため、最接近点探索アルゴリズムを非凸多面体まで拡張
する必要がある。尚、凸多面体(convex polyhedron)と
は多面体内部の任意の2点を結ぶ線分がその多面体の内
部に含まれるような多面体である。
Now, in order to improve the practicality of the closest point search algorithm, it is necessary to cover the following requirements 1) to 5). 1) Extension to non-convex polyhedron In the closest point search algorithm that has been conventionally developed for computational geometry, etc., the object to be handled is limited to a convex polyhedron (see FIG. 69 (a)). However, in practice, many interference problems with the non-convex polyhedron occur as shown in FIG. 69 (b). Therefore, it is necessary to extend the closest point search algorithm to a non-convex polyhedron. The convex polyhedron is a polyhedron in which a line connecting any two points inside the polyhedron is included in the polyhedron.

【0007】2) 非単連結多面体への拡張 トラス(truss)の組み立てや配管工事などでは穴が開い
た物体との干渉性を考慮する必要がある。図69(c)は
トラスの組み立てを示すもので、TRはトラス、RBH
はロボットハンドである。 3) 一般自由曲面を持った物体への拡張 一般自由曲面を持った物体は、グラフィックシミュレー
タ上では複数のポリゴンの張り合わせで表現される。図
69(d)は自由曲面を有するアンテナの組み立てを示す
もので、ATはアンテナ、RBHはロボットハンドであ
る。一般自由曲面を持った物体との干渉問題を扱うに
は、ポリゴン数を増やして近似の精度を上げるか、また
は曲面をスプライン曲面などで解析的に表現して取り扱
う必要がある。
2) Extension to non-single connected polyhedron When assembling a truss or plumbing, it is necessary to consider the interference with a perforated object. FIG. 69 (c) shows the assembly of the truss, where TR is the truss and RBH.
Is a robot hand. 3) Extension to an object with a general free-form surface An object with a general free-form surface is represented by a combination of multiple polygons on a graphic simulator. FIG. 69 (d) shows the assembly of an antenna having a free-form surface, where AT is an antenna and RBH is a robot hand. In order to deal with the problem of interference with an object having a general free-form surface, it is necessary to increase the number of polygons to increase the approximation accuracy, or to treat the curved surface analytically using a spline surface or the like.

【0008】4) 環境変動への対応性 干渉問題で取り扱う対象物は、いつも静止しているとは
限らず、一般には分解、運搬、組み立てなどの作業を通
して環境が動的に変動していく。凸多面体を組み合わせ
て非凸の構造物を組み上げていくといったことは、しば
しば発生することである。又、アームの各リングを凸多
面体で表現した時、アーム自身は動的に動く凸多面体の
集合体(一般には非凸物体)とみなすことができる。こ
の時、図70(a)に示すようにアームAM先端のロボッ
トハンドRBHで対象物体OBJを把持しようとする場
合には、ハンドと対象物体との干渉だけでなくアーム肘
と他の物体OBSとの干渉も考慮しなければならない。
実用的なアルゴリズムはこのような動的な環境変動に柔
軟、迅速に対応できるものでなければならない。
[0010] 4) Responsiveness to environmental fluctuations The object handled in the interference problem is not always stationary, and generally the environment dynamically fluctuates through operations such as disassembly, transportation, and assembly. Combining convex polyhedrons to assemble a non-convex structure often occurs. When each ring of the arm is represented by a convex polyhedron, the arm itself can be regarded as an aggregate of dynamically moving convex polyhedrons (generally a non-convex object). At this time, when trying to grasp the target object OBJ with the robot hand RBH at the tip of the arm AM as shown in FIG. 70 (a), not only the interference between the hand and the target object but also the arm elbow and the other object OBS Must be considered.
Practical algorithms must be able to respond flexibly and quickly to such dynamic environmental changes.

【0009】5) 形状変化への対応 対象物体が柔軟性を有する場合などでは、物体自身の形
状が動的に変化する(図70(b)参照)。これは4) の環
境変動の一種とも捉えることができるが、取扱は形状変
化の方が難しい。このため、Michigan大学のGilbert教
授は凸多面体間の最接近点探索問題に対する極めて実用
的な方法(Gilbert法という)を提案している。このGilbe
rt法によれば、アルゴリズムの計算負荷は、非常に病的
な例外を除いてほとんどの凸多面体の組合せに対してO
(M1+M2)となる。又、非凸多面体を複数の凸ポリゴン
の集合とみなすことによりGilbert法を非凸多面体へ拡
張している。以下、Gilbert法について詳述する。
5) Response to Shape Change When the target object has flexibility, the shape of the object itself dynamically changes (see FIG. 70 (b)). This can be regarded as a kind of environmental change in 4), but handling is more difficult with shape change. For this reason, Professor Gilbert of Michigan University has proposed an extremely practical method (called the Gilbert method) for the search for the point of closest approach between convex polyhedrons. This Gilbe
According to the rt method, the computational load of the algorithm is O.sub.0 for most convex polyhedral combinations with very pathological exceptions.
(M1 + M2). The Gilbert method is extended to a non-convex polyhedron by considering the non-convex polyhedron as a set of a plurality of convex polygons. Hereinafter, the Gilbert method will be described in detail.

【0010】Gilbert法による凸多面体間の最接近点探
索アルゴリズム (a) 物体の表現法と物体間の距離 三次元空間上の凸多面体Xを考える。この時、X内の任
意の点xは、Xの境界に位置する格子点(頂点)xi∈
Xを使って以下のように表現できる。 x=Σλi・xi (i=1〜m) :xi∈X,λi≧0 λ1+λ2+・・・+λm=1 (1) 上式を格子点の集合[xi:i=1、2、・・・m}で張
られる凸多面体の定義としてもよい。[xi}のことを凸
多面体Xのベースという。今、2つの凸多面体K1,K
2を考える。この時、2物体間の最接近距離は以下で定
義される。
[0010] Finding the closest point between convex polyhedrons using the Gilbert method
Search algorithm (a) Object representation method and distance between objects Consider a convex polyhedron X in a three-dimensional space. At this time, an arbitrary point x in X is a lattice point (vertex) xi∈ located at the boundary of X.
It can be expressed as follows using X. x = Σλi · xi (i = 1 to m): xi∈X, λi ≧ 0 λ1 + λ2 +... + λm = 1 (1) Using the above equation, a set of lattice points [xi: i = 1, 2,.凸 may be defined as a convex polyhedron. [xi} is called the base of the convex polyhedron X. Now, two convex polyhedrons K1, K
Consider 2. At this time, the closest approach distance between the two objects is defined as follows.

【0011】 d(K1,K2)=min{|x−y|:x∈K1,y∈K2) (2) ここで、x,yは位置ベクトルであり、|x−y|=√
{(x1−y1)2+(x2−y2)2+(x3−y
3)}2である。従って、2つの凸多面体間の最接近点
を求める問題は、(2)式を満足するようなx,yを以下
の式で求めることである。 x=Σλi・xi (i=1〜m1) :xi∈K1,λi≧0 λ1+λ2+・・・+λm1=1 y=Σμi・yi (i=1〜m2) :yi∈K2,μi≧0 μ1+μ2+・・・+μm2=1 (3) 単純に考えると(3)式では、λとμの両方が変数である
から計算負荷は、O(M1・M2)である。(2)式は以下の
ように書き換えることが可能である。
D (K1, K2) = min {| xy−: x∈K1, y∈K2) (2) where x and y are position vectors, and | xy− =
{(X1-y1) 2+ (x2-y2) 2+ (x3-y
3) $ 2. Therefore, the problem of finding the point of closest approach between two convex polyhedrons is to find x and y that satisfy equation (2) by the following equations. x = Σλi · xi (i = 1 to m1): xi∈K1, λi ≧ 0 λ1 + λ2 +... + λm1 = 1 y = Σμi · yi (i = 1 to m2): yi∈K2, μi ≧ 0 μ1 + μ2 +. + Μm2 = 1 (3) In simple terms, in equation (3), since both λ and μ are variables, the calculation load is O (M1 · M2). Equation (2) can be rewritten as follows.

【0012】任意の物体K1,K2の和集合、差集合を
K1±K2={x±y:x∈K1,y∈K2}で定義す
る時、(2)式は次式と等価になる。 d12=min{|z|:z∈K},K=K1−K2 (4) 尚、物体K1,K2の和集合とは各物体の任意の位置ベ
クトルx,yのベクトル加算により得られる位置ベクト
ルzの集合で構成された物体であり、物体X1,X2の
差集合とは各物体の任意の位置ベクトルx,yのベクト
ル減算により得られる位置ベクトルzの集合で構成され
た物体である。(4)式は、最接近点の探索問題が座標原
点Oから多面体Kに対する最接近点を求める問題に等し
いことを物語っている。多面体K1,K2がいずれも凸
多面体の場合は、多面体Kも凸多面体になり、凸多面体
Kを構成する格子点の集合Zは以下で与えられる。
When the union and difference sets of arbitrary objects K1 and K2 are defined by K1 ± K2 = {x ± y: x {K1, y} K2}, equation (2) is equivalent to the following equation. d12 = min {| z |: z∈K}, K = K1−K2 (4) The union of the objects K1 and K2 is a position vector obtained by vector addition of arbitrary position vectors x and y of each object. The difference set between the objects X1 and X2 is an object formed from a set of position vectors z obtained by vector subtraction of arbitrary position vectors x and y of each object. Equation (4) indicates that the problem of searching for the closest point is equivalent to the problem of finding the closest point to the polyhedron K from the coordinate origin O. When both the polyhedrons K1 and K2 are convex polyhedrons, the polyhedron K is also a convex polyhedron, and a set Z of lattice points constituting the convex polyhedron K is given below.

【0013】 Z={zi=xj−yk:xj∈K1,yk∈K2, i=1,2,・・・m1m2 j=1,2,・・・m1 k=1,2,・・・m2} (5) 以上をまとめると、以下の結論が導出される。すなわ
ち、「2つの凸多面体K1,K2間の最接近点を求める
問題は、座標原点Oから凸多面体K(=K1−K2)へ
の最接近点を求める問題に等しい。但し、Kはm1m2個
(m1:K1の格子点数、m2:K2の格子点数)の格子
点{zi=xj−yk}で張られた凸多面体である。」
Z = 0013zi = xj-yk: xj∈K1, yk∈K2, i = 1, 2,... M1m2 j = 1, 2,... M1 k = 1, 2,. } (5) Summarizing the above, the following conclusions are drawn. That is, "the problem of finding the closest point between the two convex polyhedrons K1 and K2 is equivalent to the problem of finding the closest point from the coordinate origin O to the convex polyhedron K (= K1-K2), where K is m1m2. (M1: the number of grid points of K1; m2: the number of grid points of K2) is a convex polyhedron spanned by grid points {zi = xj-yk}. "

【0014】(b) Gilbert法の概略 (a)における結論より、2つの凸多面体K1,K2間の
最接近点を求める問題は、一点Oから凸多面体Kへの最
接近点を求める問題に帰着される。Gilbert法では、こ
の事実と次に述べるサポート関数(Support Function)と
呼ばれる関数を使用する。凸多面体のサポート関数hx
(η):R3→Rとは以下で定義されるものである。 hx(η)=max{xi・η:i=1〜m} (6) ここで、{xi}は凸多面体Xのベースとなる格子点の
集合であり、・はベクトル内積を意味しており、又、R
3→Rは3次元より1次元への変換を意味している。従
って、(6)式のサポート関数hx(η)は、図71に示すよ
うにベクトルηを決めた時、その方向に対して原点から
最も離れた凸多面体Xの格子点を求めることを意味して
いる。今、座標原点Oからこの格子点に向かうベクトル
(位置ベクトル)を sx(η)とすると(6)式は以下の
ようになる。
(B) Outline of Gilbert's Method From the conclusion in (a), the problem of finding the closest point between the two convex polyhedrons K1 and K2 results in the problem of finding the closest point from one point O to the convex polyhedron K. Is done. The Gilbert method uses this fact and a function called a support function described below. Support function hx for convex polyhedron
(η): R3 → R is defined below. hx (η) = max {xi · η: i = 1 to m} (6) where {xi} is a set of lattice points serving as a base of the convex polyhedron X, and denotes a vector inner product. , And R
3 → R means conversion from three dimensions to one dimension. Therefore, the support function hx (η) in equation (6) means that, when the vector η is determined as shown in FIG. 71, the lattice point of the convex polyhedron X farthest from the origin in that direction is determined. ing. Now, assuming that a vector (position vector) from the coordinate origin O to this grid point is sx (η), the expression (6) is as follows.

【0015】hx(η)=sx(η)・η (7) Gilbert法による最接近点探索の計算負荷はO(M1+M
2)となる。その理由は、凸多面体K1,K2の差集合
Kのサポート関数hk(η)、位置ベクトルsk(η)に対
して以下の法則が成り立つことに基づいている。 hk(η)=hk1(η)+hk2(−η), sk(η)=sk1(η)−sk2(−η) (8) 上式は、m1m2個の格子点からなる凸多面体K=K1−
K2に対するサポート関数が凸多面体K1,K2に対す
るサポート関数の和で構成されることを意味している。
従って、(6)式の定義から明らかなように、hx(η)を
求める計算負荷はO(M1+M2)となる。Gilbert法によ
る最接近点探索の本質は、サポート関数hx(η)を繰
返し使用することによって最接近点に漸次、近ずいてい
くところにある。すなわち、Gilbert法は、以下の4つ
のプロセスから構成される。
Hx (η) = sx (η) · η (7) The calculation load of the closest approach point search by the Gilbert method is O (M1 + M
2). The reason is based on the fact that the following rule is satisfied for the support function hk (η) and the position vector sk (η) of the difference set K of the convex polyhedrons K1 and K2. hk (η) = hk1 (η) + hk2 (−η), sk (η) = sk1 (η) −sk2 (−η) (8) The above equation shows the convex polyhedron K = K1-
This means that the support function for K2 is composed of the sum of the support functions for the convex polyhedrons K1 and K2.
Therefore, as is clear from the definition of the equation (6), the calculation load for calculating hx (η) is O (M1 + M2). The essence of the closest point search by the Gilbert method is that the support function hx (η) is repeatedly used to gradually approach the closest point. That is, the Gilbert method is composed of the following four processes.

【0016】(c) Gilbert法による最接近点探索アルゴ
リズム 1) 初期化 凸多面体K1,K2に対し、差凸多面体K1−K2をK
とする。凸多面体K内の任意の点を取り、それらをy
1,y2・・・yp∈Kとする。尚、y1,y2・・・
ypは必ずも凸多面体Kのベース格子点である必要はな
い。pは一般に1≦p≦4とする。この時、初期格子点
の集合Vk(=V0)を Vk={y1,y2・・・yp}, k=0 とする。
(C) Algorithm for searching for the closest point by the Gilbert method 1) Initialization For the convex polyhedrons K1 and K2, the difference convex polyhedron K1-K2 is represented by K
And Take any points in the convex polyhedron K and call them y
1, y2... Yp∈K. In addition, y1, y2 ...
yp need not necessarily be the base lattice point of the convex polyhedron K. p is generally 1 ≦ p ≦ 4. At this time, a set Vk (= V0) of initial lattice points is set to Vk = {y1, y2... Yp}, k = 0.

【0017】2) 基本多面体に対する最接近点探索 要素数p(4個以下)からなる格子点の集合Vkに対
し、 νk=ν(co Vk) (9) を計算する。ここで、co Vkは、格子点集合Vkをベ
ースとする凸多面体、ν(X)は座標原点Oから凸多面体
Xへの最接近点ベクトル(位置ベクトル)を表す。
2) Searching for the closest point to the basic polyhedron With respect to a set Vk of lattice points composed of the number of elements p (four or less), νk = ν (coVk) (9) is calculated. Here, co Vk represents a convex polyhedron based on a lattice point set Vk, and ν (X) represents a point of closest approach (a position vector) from the coordinate origin O to the convex polyhedron X.

【0018】3)最接近点判定 R3→Rへの関数gK(x)を以下のように定義する。 gK(x)=|x|2+hK(−x) 上式において右辺第1項は、凸多面体K上の所定ポイン
トの位置ベクトルをxとするとき、該ポイント迄の距離
の二乗を意味し、右辺第2項はベクトルx方向に原点か
ら最も近い格子点位置ベクトルとベクトル−xとの内積
を意味する。換言すれば、hK(−x)は格子点の位置
ベクトルとxの内積のうち最小となる値である。gK
(x)は最接近点の判定関数となり、xが原点OからKへ
の最接近点であるならば、また、その時に限りgK(x)
=0となる。尚、gK(x)が最接近点の判定関数となる
ことは証明できるが割愛する。詳細は、「IEEE JOUNAL
OF ROBOTICSAND AUTOMATION, VOL.4, NO.2, APRIL 198
8、頁193〜203「A Fast Procedure forComputing the Di
stance Between Complex Objects in Three-Dimensiona
l Space」を参照されたい。以上より、もし、(9)式で求
めたνkに対し、 gK(νk)=0 (10) ならば、ν(K)=νkとし、最接近点探索処理を終了
する。
3) Determination of closest approach point A function gK (x) from R3 to R is defined as follows. gK (x) = | x | 2 + hK (-x) In the above equation, the first term on the right-hand side means the square of the distance to the predetermined point on the convex polyhedron K, where x is the position vector, and the right-hand side The second term means an inner product of the lattice point position vector closest to the origin in the vector x direction and the vector -x. In other words, hK (-x) is the minimum value of the inner product of the position vector of the lattice point and x. gK
(x) is a determination function of the closest approach point. If x is the closest approach point from the origin O to K, and only then, gK (x)
= 0. It can be proved that gK (x) is a function for determining the closest approach point, but is omitted. See “IEEE JOUNAL
OF ROBOTICSAND AUTOMATION, VOL.4, NO.2, APRIL 198
8, pages 193-203, `` A Fast Procedure for Computing the Di
stance Between Complex Objects in Three-Dimensiona
l Space ”. From the above, if gK (νk) = 0 (10) with respect to νk determined by the equation (9), ν (K) = νk, and the closest approach point search processing is terminated.

【0019】4) kのインクリメント (10)式が成立しなければ、kをインクリメントする。す
なわち、V(k+1)を V(k+1)=Vk′∪{sK(−νk)] (11) とする。ここで、Vk′はVk′⊆Vkであり、かつ、
νk∈co Vk′となるVkの最小部分集合である。(1
1)式は、Vkの部分集合Vk′(νkを含む)と、Vk
における最接近点ベクトルνk方向に原点から最も近い
最小の格子点sK(−νk)を含む集合を意味する。以
上から、(10)式が成立しなければ、(11)式によりkをイ
ンクリメントして2)へ戻り以降の処理を(10)式が成立す
るまで繰り返す。
4) Increment of k If equation (10) does not hold, k is incremented. That is, V (k + 1) is set as V (k + 1) = Vk′∪ {sK (−νk)] (11). Here, Vk ′ is Vk′⊆Vk, and
Vk is the minimum subset of Vk such that co∈Vk '. (1
Equation (1) expresses a subset Vk ′ (including νk) of Vk and Vk
Means the set including the minimum lattice point sK (−νk) closest to the origin in the direction of the closest point vector νk. As described above, if the expression (10) is not satisfied, k is incremented by the expression (11), the process returns to 2), and the subsequent processing is repeated until the expression (10) is satisfied.

【0020】(d) Gilbert法による最接近点探索アルゴ
リズムの適用 上記Gilbert法による最接近点探索アルゴリズムの理解
度を深めるために図72を参照して最接近点探索を説明
する。図72において、初期値V0={z1,z2,z
3}とし、V0における最接近点ベクトルを求めるとν
0となる。この時、(10)式は満たされないからkをイン
クリメントする。 V1=V0′∪{sk(−ν0)]=V0′∪{z4} であり、又、V0′={z2,z3}となるからV1=
{z2,z3,z4}となる。V1における最接近点ベ
クトルを求めるとν1となる。この時、(10)式は満たさ
れないからkをインクリメントする。
(D) Application of nearest point search algorithm by Gilbert method The closest point search will be described with reference to FIG. 72 to deepen the understanding of the nearest point search algorithm by the Gilbert method. In FIG. 72, an initial value V0 = {z1, z2, z
3}, and the closest point vector at V0 is ν
It becomes 0. At this time, since the expression (10) is not satisfied, k is incremented. V1 = V0 '{sk (-ν0)] = V0' {z4}, and since V0 '= {z2, z3}, V1 =
{Z2, z3, z4}. When the closest approach point vector in V1 is obtained, it becomes ν1. At this time, since the expression (10) is not satisfied, k is incremented.

【0021】V2=V1′∪{sk(−ν1)]=V
1′∪{z5} であり、又、V1′={z3,z4}となるからV2=
{z3,z4,z5}となる。V1における最接近点ベ
クトルを求めるとν2となり、このν2により(10)式が
満たされ、ν2は最接近点ベクトルとなり、 ν2=ν(K)∈co {z4,z5} となる。この結果、最接近距離dはd=|ν2|とな
る。同じことを初期値を変えて行ってみる。図72にお
いて、初期値V0={z2}とし、V0における最接近
点ベクトルを求めるとν0′(=z2)となる。この
時、(10)式は満たされないからkをインクリメントす
る。 V1=V0′∪{sK(−ν0′)]=V0′∪{z
5} であり、又、V0′={z2}であるからV1={z
2,z5}となる。
V2 = V1'∪ {sk (-ν1)] = V
1 ′ {z5}, and since V1 ′ = {z3, z4}, V2 =
{Z3, z4, z5}. When the closest point vector at V1 is obtained, it becomes ν2. This ν2 satisfies the expression (10), and ν2 becomes the closest point vector, and ν2 = ν (K) ∈co {z4, z5}. As a result, the closest approach distance d is d = | ν2 |. Try the same with different initial values. In FIG. 72, when the initial value V0 = {z2} and the closest point vector at V0 is obtained, ν0 ′ (= z2). At this time, since the expression (10) is not satisfied, k is incremented. V1 = V0′∪ {sK (−ν0 ′)] = V0′∪ {z
5}, and since V0 '= {z2}, V1 = {z
2, z5}.

【0022】V1における最接近点ベクトルを求めると
ν1′となる。この時、(10)式は満たされないからkを
インクリメントする。 V2=V1′∪{sK(−ν1′)]=V1′∪{z
4} であり、又、V1′={z2,z5}であるからV2=
{z2,z4,z5}となる。V2における最接近点ベ
クトルを求めるとν2′(=ν2)となり、このν2′
により(10)式が満たされ、ν2は最接近点ベクトルとな
り、 ν2′=ν2=ν(K)∈co {z4,z5} となる。この結果、最接近距離dはd=|ν2|とな
り、初期値V0を V0={z1,z2,z3} とした場合と同じ結果が得られる。
When the closest point vector at V1 is obtained, it becomes ν1 '. At this time, since the expression (10) is not satisfied, k is incremented. V2 = V1′∪ {sK (−ν1 ′)] = V1′∪ {z
4}, and since V1 ′ = {z2, z5}, V2 =
{Z2, z4, z5}. When the closest approach point vector in V2 is obtained, ν2 ′ (= ν2) is obtained.
Satisfies equation (10), and ν2 becomes the closest approach point vector, and ν2 ′ = ν2 = ν (K) ∈co {z4, z5}. As a result, the closest approach distance d is d = | ν2 |, and the same result as when the initial value V0 is set to V0 = {z1, z2, z3} is obtained.

【0023】(e) 考察 上記アルゴリズムにおいて、計算を要するのは、(9),(1
0),(11)式の部分である。まず、(9)式であるが、この式
の意味は、つまり1点Oから点、辺、面、または4面体
への最接近点を計算せよということである。この部分
は、凸多面体の複雑度には関係しない部分であり、後述
するようなサブルーチンを予め用意しておくことにより
実行できる。次に、(10)式の計算であるが、gK(ν
k)のhK(−νk)を計算するに際しては(8)式の分
解則を使用する。この部分は、(6)式に示すように、各
凸多面体K1,K2のベース格子点に対する内積(ベー
ス格子点の位置ベクトルとνkの内積)を評価するだけ
で計算される。すなわち、hK(−νk)はベース格子
点の位置ベクトルとνkの内積のうち最小のものを求め
ることであり、従って、この部分の計算負荷はO(M1+
M2)である。
(E) Discussion In the above algorithm, the computations required are (9) and (1)
0) and (11). First, equation (9) means that the point closest to a point, a side, a plane, or a tetrahedron from one point O is calculated. This part is not related to the complexity of the convex polyhedron, and can be executed by preparing a subroutine described later in advance. Next, the calculation of equation (10), gK (ν
In calculating hK (-νk) of k), the decomposition rule of equation (8) is used. This part is calculated only by evaluating the inner product of each convex polyhedron K1 and K2 with respect to the base lattice point (the inner product of the position vector of the base lattice point and νk), as shown in Expression (6). That is, hK (-νk) is to find the minimum of the inner product of the position vector of the base lattice point and νk, and therefore the calculation load of this part is O (M1 +
M2).

【0024】(11)式は、gK(νk)を計算する過程で
sK(−νk)が求まり、後述する補題アルゴリズムか
ら自動的にVk′が求まるため、この部分の計算負荷は
M1,M2に依存しない無視可能な定数(negligible c
onstant)である。Gilbert法の優れたところは、ほとん
ど全ての凸多面体に対し、上記1) 〜4)の4つのプロセ
スを数回繰り返すだけで最接近点に到達することであ
る。多くの場合、3〜4回の繰返しにより収束すること
が数値実験により確かめられている。以上より、Gilber
t法による最接近点探索法の本質を一言でいうならば、
次のように要約できる。すなわち、2つの凸多面体K
1,K2間の最接近点は、凸多面体K=K1−K2に対
し、判定関数gK(x)=|x|2+hK(−x)を繰返
し適用することによって求めることができる。そして、
繰返しの回数は殆どの凸多面体に対して3ないし4回で
収束する。
In the equation (11), sK (−νk) is obtained in the process of calculating gK (νk), and Vk ′ is automatically obtained from the lemma algorithm described later. Independent negligible constants (negligible c
onstant). The advantage of Gilbert's method is that it can reach the point of closest approach by repeating the above four processes 1) to 4) several times for almost all convex polyhedrons. In many cases, it has been confirmed by numerical experiments that the convergence is achieved by repeating 3 to 4 times. From the above, Gilber
In short, the essence of the closest point search method by the t method is
It can be summarized as follows. That is, two convex polyhedrons K
The closest point between K1 and K2 can be determined by repeatedly applying the judgment function gK (x) = | x | 2 + hK (-x) to the convex polyhedron K = K1-K2. And
The number of repetitions converges to 3 or 4 for most convex polyhedrons.

【0025】なお、Gilbert法の初期格子点(初期値)
V0は一般には任意であるが、以下に示すような各凸多
面体の重心差分方向の格子点から出発するのが効率的で
ある。 v0={sK(−zc1+zc2)} (12) ここで、zc1,zc2は、それぞれzc1=Σ(xi/
M1) (i=1〜M1) xi:凸多面体K1のベース
格子点 zc2=Σ(yi/M2) (i=1〜M2) yi:凸
多面体K2のベース格子点 である。
The initial lattice point (initial value) of the Gilbert method
Although V0 is generally arbitrary, it is efficient to start from a lattice point in the gravity center difference direction of each convex polyhedron as described below. v0 = {sK (−zc1 + zc2)} (12) Here, zc1 and zc2 are respectively zc1 = Σ (xi /
M1) (i = 1 to M1) xi: Base lattice point of convex polyhedron K1 zc2 = Σ (yi / M2) (i = 1 to M2) yi: Base lattice point of convex polyhedron K2

【0026】(f) Gilbert法の補題 Gilbert法のステップ2) では、4以下の格子点に張られ
る凸多面体(点、辺、面、4面体)に対する1点(原点
O)からの最接近点ベクトルを求めるアルゴリズムが必
要であった。以下で述べる補題は5点以上の格子点で張
られる凸多面体にも成立するが、格子点数が少ない場合
に特に効率的である。 1) 補題1 格子点集合Y={y1,y2,・・・ym}∈R3に対
し、Yの任意の部分集合を Ys=[yi:i∈Is⊆{1,2,・・・m}}、Isの
補集合をIs′とする。この時、数列Δi(Ys)を次の
法則に基づいて作成する。 Δi({yi])=1,i∈Is Δj(Ys∪{yj})=ΣΔi(Ys)(yiyk−yi
yj) (i∈Is)但し、k=min{i:i∈Is},j
∈Is この時、次の性質を満たすYの部分集合がYsが存在す
る。 (1) i∈Isである各々のiに対してΔi(Ys)>0
(i∈Is) (2) j∈Isである各々のjに対してΔj(Ys∪{y
j})≦0 (j∈Is)
(F) The lemma of the Gilbert method In step 2) of the Gilbert method, the point of closest approach from one point (origin O) to a convex polyhedron (point, side, surface, tetrahedron) spanning four or less grid points An algorithm for finding a vector was needed. The lemma described below also holds for a convex polyhedron spanned by five or more grid points, but is particularly efficient when the number of grid points is small. 1) Lemma 1 For a lattice point set Y = {y1, y2,... Ym} R3, an arbitrary subset of Y is represented by Ys = [yi: i {Is {1,2,. }, The complement of Is is Is'. At this time, the sequence Δi (Ys) is created based on the following rule. Δi ({yi)) = 1, i∈Is Δj (Ys∪ {yj}) = ΣΔi (Ys) (yiyk−yi
yj) (i∈Is) where k = min {i: i∈Is}, j
∈Is At this time, a subset of Y satisfying the following property is Ys. (1) Δi (Ys)> 0 for each i where i∈Is
(I∈Is) (2) For each j where j∈Is, Δj (Ys∪ {y
j}) ≦ 0 (j∈Is)

【0027】2) 補題2 格子点集合Y={y1,y2,・・・ym}∈R3に対
し、Yで張られる凸多面体をco Y、原点Oからco Yへ
至る最接近点ベクトルをν(co Y)とする時、 ν(c
o Y)は以下の公式で与えられる。 ν(co Y)=Σλiyi,i∈Is⊆{1,2,・・・
m} ここで、比例定数λiは、補題1で求めた部分集合Ys
に対するΔi(Ys)を使って次式で与えられる。 λi=Δi(Ys)/Δ(Ys) ,Ys={yi:i∈I
s} Δ(Ys)=ΣΔi(Ys) (i∈Is) 上記補題の詳しい証明はここでは省略するが、補題の意
味するところは簡単に理解できる。上記補題を4面体に
適用してみる。図73(a)〜(d)に示すように、1点Oと
4面体との最接近ベクトルは、4面体の各格子点、辺、
面、又は4面体内部に存在する場合があり得る。従っ
て、Yの部分集合Ysが1点からなる場合は格子点に、
2点からなる場合は辺上に、3点からなる場合は面上に
それぞれ最接近点が存在する場合に対応し、4点からな
る場合は4面体内部に原点Oが存在する場合に相当す
る。
2) Lemma 2 For a set of lattice points Y = {y1, y2,. (Co Y), ν (c
o Y) is given by the following formula: ν (co Y) = {λiyi, i∈Is⊆ {1, 2,...
Here, the proportionality constant λi is the subset Ys obtained in Lemma 1.
Is given by the following equation using Δi (Ys) for λi = Δi (Ys) / Δ (Ys), Ys = {yi: i∈I
s} Δ (Ys) = ΣΔi (Ys) (i∈Is) Although the detailed proof of the above lemma is omitted here, the meaning of the lemma can be easily understood. Let's apply the above lemma to a tetrahedron. As shown in FIGS. 73 (a) to 73 (d), the closest approach vector between the one point O and the tetrahedron is represented by each lattice point, side,
It may be in a plane or inside a tetrahedron. Therefore, if the subset Ys of Y consists of one point,
The case of two points corresponds to the case where the closest point exists on the side, and the case of three points corresponds to the case where the closest approach point exists on the surface. The case of four points corresponds to the case where the origin O exists inside the tetrahedron. .

【0028】補題1、2を実際に実行する場合には、以
下のアルゴリズムに従う。 (g) Gilbert法の補題アルゴリズム 格子点集合Y={y1,y2,・・・ym}∈R3に対
し、Yの部分集合をYs=[yi:i∈Is⊆{1,2,
・・・m}}、Isの補集合をIs′とする。又、s=
1、2、・・・σとすることによりYの全ての部分集合
が指示されるものとする。この時、Gilbert法のアルゴ
リズ2) は以下のようになる。
When Lemma 1 and 2 are actually executed, the following algorithm is used. (g) The lemma algorithm of the Gilbert method For a lattice point set Y = {y1, y2,... ym} ∈R3, a subset of Y is represented by Ys = [yi: i∈Is⊆ {1,2,2,
... m}}, the complement of Is is Is'. Also, s =
.. Σ indicate all subsets of Y. At this time, the algorithm 2) of the Gilbert method is as follows.

【0029】2)1 1→s 2)2 もし、i∈Isの各々のiに対して Δi(Ys)>0 (i∈Is) であり、かつ、j∈Isの各々のjに対して Δj(Ys∪{yj})≦0 (j∈Is) ならば、λi=Δi(Ys)/Δ(Ys),Ys=[yi:i
∈Is} Δ(Ys)=ΣΔi(Ys) (i∈Is) ν(co Y)=Σλiyi (i∈Is) (12)′ としてストップし、以後Gilbert法のアルゴリズ3)を実
行する。 2)3 しかし、2)2の条件が成立しなければ、sをイン
クリメントしてステップ2)2を実行する。すなわち、2)
2の条件が成立する迄2) 2,2) 3 のステップを繰返
し、2)2の条件が成立した時、ν(co Y)を計算して以
後Gilbert法のアルゴリズ3)を実行する。
2) 1 1 → s 2) 2 For each i of i∈Is, Δi (Ys)> 0 (i∈Is) and for each j of j∈Is If Δj (Ys∪ {yj}) ≦ 0 (j∈Is), λi = Δi (Ys) / Δ (Ys), Ys = [yi: i
∈Is} Δ (Ys) = ΣΔi (Ys) (i∈Is) ν (co Y) = Σλiyi (i∈Is) (12) ′, and then execute the algorithm 3) of the Gilbert method. 2) 3 However, if the condition of 2) 2 is not satisfied, s is incremented and step 2) 2 is executed. That is, 2)
Steps 2), 2) and 3) are repeated until the condition 2 is satisfied. When the condition 2) is satisfied, ν (co Y) is calculated, and thereafter the algorithm 3) of the Gilbert method is executed.

【0030】(i) 数値試験 Gilbert法による最接近点探索アルゴリズムは、次の入
出力を持つサブルーチンにまとめることができる。 入力:2凸多面体の各格子点の座標値 出力:最接近点の座標値、最接近距離 図74はGilbert法をフォルトランで実行し、各種凸多
面体に適用した場合の数値試験例であり、星印は2物体
が接近している場合(フリー)、白丸は2物体が接触し
ている場合、四角黒印は2物体が干渉している場合であ
る。尚、使用した計算機はHarris 800で、VAX 780より
少々速く現在のパソコン程度の性能である。
(I) Numerical test The closest point search algorithm by the Gilbert method can be summarized into a subroutine having the following inputs and outputs. Input: Coordinate values of each lattice point of the biconvex polyhedron Output: Coordinate values of the closest approach point, closest approach distance FIG. 74 is a numerical test example in which the Gilbert method is executed in Fortran and applied to various convex polyhedrons. An asterisk indicates a case where two objects are approaching (free), an open circle indicates a case where the two objects are in contact, and a square black mark indicates a case where the two objects are interfering. The computer used was a Harris 800, which is a bit faster than the VAX 780 and has the performance of a current personal computer.

【0031】図74の横軸に示されているMは格子点
数、縦軸に示されているEFは次式で定義される量であ
る。 EF=(tMNM+tANA+tDND+tCNC)/(tM+tA) (13) ここで、NMは積算回数、NAは加算回数、NDは除算回
数、NCは比較演算回数であり、tM,tA,tD,tCは
各々に要する計算時間であり、Harris 800の場合には、
tM=3.8μs,tA=2.1μs,tD=6.7μs,tC=1.7μs
である。EFの値は、計算機によって大きく変動するこ
とはなくマシーンインデペンデントな指標として使うこ
とができる。Harris 800の場合には、EFに6/106を
掛けた値がCPUスケールに相当する。Sparcチップ(C
PUのチップ)を使ったワークステーションの場合には
更に一桁以上の高速性を期待できる。
In FIG. 74, M shown on the horizontal axis is the number of grid points, and EF shown on the vertical axis is an amount defined by the following equation. EF = (tMNM + tANA + tDND + tCNC) / (tM + tA) (13) Here, NM is the number of integrations, NA is the number of additions, ND is the number of divisions, and NC is the number of comparison operations, and tM, tA, tD, and tC are required calculations. Time, and in the case of Harris 800,
tM = 3.8 μs, tA = 2.1 μs, tD = 6.7 μs, tC = 1.7 μs
It is. The value of EF does not vary greatly depending on the computer, and can be used as a machine independent index. In the case of Harris 800, the value obtained by multiplying EF by 6/106 corresponds to the CPU scale. Sparc chip (C
In the case of a workstation using a PU chip), a speed of one digit or more can be expected.

【0032】(j) 結論 1) 以上からGilbert法による最接近点探索は、2つの凸
多面体の格子点の総数をMとした時、干渉している場
合、接触している場合、フリーの場合それぞれにおい
て、ほぼMに比例した計算負荷を有し、比例定数はEF
/Mの値で見て14〜19の値に収まる。2) Gilbert法
を1M Flops程度のワークステーション上で2つの凸多
面体に適用する場合、格子点の総数が200程度でも数
msで最接近点の算出が可能である。
(J) Conclusion 1) From the above, the search for the closest approach point by the Gilbert method is performed when the total number of lattice points of two convex polyhedrons is M, when there is interference, when there is contact, and when free. Each has a computational load approximately proportional to M, and the proportionality constant is EF
The value falls within the range of 14 to 19 in terms of the value of / M. 2) When the Gilbert method is applied to two convex polyhedrons on a workstation of about 1M Flops, even if the total number of grid points is about 200,
The closest approach point can be calculated in ms.

【0033】[0033]

【発明が解決しようとする課題】以上より、Gilbert法
によれば、2物体間の最接近点探索を短時間で効率良く
実行できる効果がある。しかし、Gilbert法には以下の
ような限界ないしは制約条件が存在する。 1) Gilbert法の限界:連続探索問題への対応 2つの凸多面体間の最接近点を連続的に追い掛ける場合
を考察する。このように2つの凸多面体間の最接近点を
連続的に追い掛ける問題を連続探索問題という。物体の
移動に伴い、最接近点は各々の凸多面体において、面か
ら辺、辺から頂点、頂点から面へと渡り歩くように遷移
していく。従って、ある時点で最接近点が求まった場
合、次の時点における最接近点は前の最接近点の近傍に
存在するはずである。換言すれば、最接近点の探索は局
所的な問題であり、凸多面体全領域の複雑度とは無関係
のはずである。
As described above, according to the Gilbert method, there is an effect that the closest point search between two objects can be efficiently executed in a short time. However, the Gilbert method has the following limitations or restrictions. 1) Limit of Gilbert's method: Support for continuous search problem Consider the case where the closest point between two convex polyhedrons is continuously chased. The problem of continuously following the point of closest approach between two convex polyhedrons is called a continuous search problem. With the movement of the object, the point of closest approach transitions in each convex polyhedron so as to walk from the surface to the side, from the side to the vertex, and from the vertex to the surface. Therefore, if the closest point is obtained at a certain point in time, the closest point at the next point in time should be near the previous closest point. In other words, the search for the point of closest approach is a local problem and should be independent of the complexity of the entire convex polyhedron.

【0034】しかし、Gilbert法では、連続探索問題に
おいて全格子点を考慮した最接近探索処理を行うため、
凸多面体の全格子点数M1,M2に依存したO(M1+M
2)の計算負荷が最接近点探索の都度必要となる問題が
ある。又、計算負荷が大きいため、ロボット、自走車が
高速で移動する場合には最接近点探索処理が間にあわな
くなる問題がある。
However, in the Gilbert method, in the continuous search problem, the closest approach search processing considering all grid points is performed.
O (M1 + M
There is a problem that the calculation load of 2) is required every time the closest approach point is searched. In addition, since the calculation load is large, there is a problem that the closest approach point search process cannot be completed when the robot or the self-propelled vehicle moves at high speed.

【0035】2) Gilbert法の制約条件:非凸多面体への
対応 Gilbert法は凸多面体間の最接近点を探索するアルゴリ
ズムである。このため、実用度を上げるために、非凸多
面体、非単連結多面体、自由曲面を持った物体への拡張
が必要である。Gilbert法により非凸多面体間の最接近
点探索を行う場合には、図75に示すように、各非凸多
面体K1,K2を複数の凸多面体A,B;a,b,cに
分割し、全ての凸多面体の組み合わせについて最接近点
探索アルゴリズムを適用し、得られた最接近距離のうち
最も短いものを選択する。しかし、かかる方法では組み
合わせの数が多くなり、計算負荷が大きくなる問題があ
る。以上から本発明の目的は、物体間の連続探索問題を
少ない計算負荷で高速に実行できる最接近点探索装置を
提供することである。本発明の別の目的は、少なくとも
一方が非凸多面体の物体間の最接近点探索を少ない計算
負荷で高速に実行できる最接近点探索装置を提供するこ
とである。
2) Restriction of Gilbert's method: correspondence to non-convex polyhedron Gilbert's method is an algorithm for searching for the closest point between convex polyhedrons. For this reason, in order to increase the practicality, it is necessary to expand the object to a non-convex polyhedron, a non-single connected polyhedron, and an object having a free-form surface. When the closest point search between non-convex polyhedrons is performed by the Gilbert method, as shown in FIG. 75, each non-convex polyhedron K1, K2 is divided into a plurality of convex polyhedrons A, B; a, b, c, The closest point search algorithm is applied to all combinations of convex polyhedrons, and the shortest one among the obtained closest distances is selected. However, this method has a problem that the number of combinations increases and the calculation load increases. Accordingly, an object of the present invention is to provide an apparatus for searching for a closest approach point which can execute a continuous search problem between objects at a high speed with a small calculation load. Another object of the present invention is to provide an apparatus for searching for a point of closest approach that can execute a search for a point of closest approach between objects of at least one of which is a non-convex polyhedron at a high speed with a small calculation load.

【0036】[0036]

【課題を解決するための手段】図1は本発明の原理説明
図である。図1において、22aは対象となる2つの凸
多面体を覆う全ポリゴンデータを記憶するポリゴンデー
タ記憶部、22bは近接点線形リスト記憶部、24は各
ポリゴンの頂点を第1方向(next方向)にリンク
し、各頂点にポリゴン辺を介して繋がる頂点群を第2の
方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストを作成する近接点線
形リスト作成部、26は最接近点探索処理部である。
FIG. 1 is a diagram illustrating the principle of the present invention. In FIG. 1, reference numeral 22a denotes a polygon data storage unit for storing all polygon data covering two convex polyhedrons of interest, 22b a linear list storage unit for adjacent points, and 24 a vertex of each polygon in a first direction (next direction). A proximity point linear list creation unit that creates a proximity point linear list having a data structure in which a vertex group linked to each vertex via a polygon side is linked to the vertex in a second direction (branch direction); Reference numeral 26 denotes a closest approach point search processing unit.

【0037】[0037]

【作用】凸多面体間の最接近点を連続的に探索すること
により両者の干渉チェックを行なう場合、凸多面体を覆
う全ポリゴンの頂点座標を入力してポリゴンデータ記憶
部22aに記憶する。近接点線形リスト作成部24は各ポ
リゴンの頂点を第1方向(next方向)にリンクし、
各頂点にポリゴン辺を介して繋がる頂点群を第2の方向
(branch方向)に該頂点にリンクしてなるデータ
構造を備えた近接点線形リストを最接近点探索処理の実
行前に作成する。しかる後、最接近点探索処理部26
は、最新に求まっている最接近点に近接する頂点を近接
点線形リストより求め、これら頂点の中より次の時刻に
おける最接近点を探索して干渉チェックを行なう。
When the interference between the convex polyhedrons is checked by continuously searching for the closest point between the convex polyhedrons, the vertex coordinates of all the polygons covering the convex polyhedron are input and stored in the polygon data storage unit 22a. The proximity point linear list creation unit 24 links the vertices of each polygon in a first direction (next direction),
A near point linear list having a data structure in which a vertex group connected to each vertex via a polygon side is linked to the vertex in the second direction (branch direction) is created before executing the closest point search processing. Then, the closest approach point search processing unit 26
Calculates the vertices that are closest to the closest point obtained the latest from the close-point linear list, searches the vertices for the closest point at the next time, and performs an interference check.

【0038】第1、第2の非凸多面体間の干渉チェックを
行なう場合、各非凸多面体をそれぞれ凸多面体に分解
し、凸多面体間の最接近点を連続的に探索することによ
り非凸多面体間の干渉チェックを行なう。各区凸多面体
間の干渉チェックを行うために、予め、近接点線形リス
ト作成部24は前記凸多面体毎に、該凸多面体を覆う全
ポリゴンの頂点を第1方向(next方向)にリンク
し、各頂点にポリゴン辺を介して繋がる頂点群を第2の
方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストを作成する。最接近
点探索処理部26は、前記非凸多面体毎に、該非凸多
面体の頂点座標値のうち、各軸方向の最大座標値及び最
小座標値を求め、該最大座標値及び最小座標値により該
非凸多面体を包む包絡球を生成し、第1、第2の非凸多
面体の包絡球が干渉するかチェックし、干渉した後は
前記非凸多面体を分解して得られている凸多面体間の最
接近点を探索し、最新に求まっている最接近点に近接
する頂点を前記近接点線形リストより求め、これら頂点
の中より次の時刻における最接近点を探索し、各凸多
面体間の最接近点間距離が最も短いものを用いて干渉チ
ェックを行なう。
When the interference check between the first and second non-convex polyhedrons is performed, each non-convex polyhedron is decomposed into convex polyhedrons, and the closest approach point between the convex polyhedrons is continuously searched for. Check for interference between the two. In order to check for interference between the respective convex polyhedrons, the proximity point linear list creating unit 24 links the vertices of all the polygons covering the convex polyhedron in the first direction (next direction) in advance for each convex polyhedron. A proximity point linear list having a data structure in which a vertex group connected to a vertex via a polygon side is linked to the vertex in a second direction (branch direction) is created. The closest point search processing unit 26 obtains, for each of the non-convex polyhedrons, the maximum coordinate value and the minimum coordinate value in each axis direction among the vertex coordinate values of the non-convex polyhedron, and calculates the non-convex polyhedron based on the maximum coordinate value and the minimum coordinate value. An envelope sphere enclosing the convex polyhedron is generated, and it is checked whether the envelope spheres of the first and second non-convex polyhedrons interfere with each other. After the interference, the maximum between the convex polyhedrons obtained by decomposing the non-convex polyhedron is obtained. The approach point is searched for, and the vertices closest to the closest approach point that has been obtained latest are obtained from the above-mentioned proximity point linear list, the closest approach point at the next time is searched from these vertices, and the closest approach between each convex polyhedron is obtained. An interference check is performed using the one having the shortest point-to-point distance.

【0039】第1、第2の非凸多面体間の干渉チェックを
行なう場合、各非凸多面体をそれぞれ凸多面体に分解
し、凸多面体間の最接近点を連続的に探索することによ
り非凸多面体間の干渉チェックを行なう。各区凸多面体
間の干渉チェックを行うために、予め、近接点線形リス
ト作成部24は前記凸多面体毎に、該凸多面体を覆う全
ポリゴンの頂点を第1方向(next方向)にリンク
し、各頂点にポリゴン辺を介して繋がる頂点群を第2の
方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストを作成する。最接近
点探索処理部26は、各非凸多面体を包む最小の凸多
面体(凸包)を生成し、第1、第2の非凸多面体の凸
包が干渉するかチェックし、干渉した後は凸多面体間
の最接近点を探索し、最新に求まっている最接近点に近
接する頂点を前記近接点線形リストより求め、これら頂
点の中より次の時刻における最接近点を探索し、各凸
多面体間の最接近点間距離が最も短いものを用いて干渉
チェックを行なう。
When the interference check between the first and second non-convex polyhedrons is performed, each non-convex polyhedron is decomposed into convex polyhedrons, and the point of closest approach between the convex polyhedrons is continuously searched for. Check for interference between the two. In order to check for interference between the respective convex polyhedrons, the proximity point linear list creating unit 24 links the vertices of all the polygons covering the convex polyhedron in the first direction (next direction) in advance for each convex polyhedron. A proximity point linear list having a data structure in which a vertex group connected to a vertex via a polygon side is linked to the vertex in a second direction (branch direction) is created. The closest point search processing unit 26 generates a minimum convex polyhedron (convex hull) wrapping each non-convex polyhedron, checks whether the convex hulls of the first and second non-convex polyhedrons interfere, and after the interference, The closest point between the convex polyhedrons is searched for, the vertices close to the closest point obtained the latest are obtained from the close point linear list, and the closest point at the next time is searched from these vertices, and each convex point is searched. An interference check is performed using the shortest distance between the closest points between the polyhedrons.

【0040】[0040]

【実施例】(A) 凸多面体間の最接近点探索の第1の方
法 (a) 原理 Gilbert法でO(M1+M2)の計算負荷が発生するプロセ
スは、ステップ3)における判定関数gK(νk)のhK
(−νk)の内積計算においてである。すなわち、hK
(−νk)は(8)式より hK(−νk)=hK1(−νk)+hK2(−νk) =−min[xi・νk:i=1,2,・・・M1]+ −min[yi・νk:i=1,2,・・・M2] (14) であるから、hKを評価する過程で凸多面体K1,K2
の全格子点にわたる内積を計算して最小のものを決定す
ることになるため、O(M1+M2)の計算負荷が発生す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (A) First method of searching for the closest point between convex polyhedrons (a) Principle The process of generating an O (M1 + M2) computational load by the Gilbert method is a judgment function gK ( νk) hK
This is in calculating the inner product of (−νk). That is, hK
(−νk) is calculated from the equation (8) as follows. .Nu.k: i = 1, 2,... M2] (14) Therefore, in the process of evaluating hK, the convex polyhedrons K1, K2
Since the inner product over all the grid points is calculated to determine the minimum one, a calculation load of O (M1 + M2) occurs.

【0041】内積の計算回数を減らす有効な方策は、凸
多面体K1,K2を格子点数がより少ない凸多面体又は
凸多角形に分割し、現在の最接近点の近傍に位置する凸
多面体又は凸多角形についてのみ内積を評価する方法で
ある。
An effective measure to reduce the number of calculations of inner products is to divide the convex polyhedrons K1 and K2 into convex polyhedrons or convex polygons having a smaller number of grid points, and to divide the convex polyhedron or convex polyhedron located near the current closest point. This is a method of evaluating the inner product only for a square.

【0042】最も簡単な分割法は、図2に示すように、
凸多面体を表面多角形の集合に分割する方法である。こ
の時、凸多面体における最接近点は、 1)格子点上に存在する場合、 2)辺上に存在する場合、 3)面上に存在する場合 の3通りがあり得る。
The simplest division method is as shown in FIG.
This is a method of dividing a convex polyhedron into a set of surface polygons. At this time, the closest approach point in the convex polyhedron can be one of three cases: 1) existing on a grid point, 2) existing on a side, and 3) existing on a surface.

【0043】そこで、それぞれに対して内積を評価する
表面多角形を以下のように制限すれば良い。すなわち、
最接近点が 1)格子点上に存在する場合には、その格子点を頂点に持つ表面多角形の全て、 2)辺上に存在する場合には、その辺を1辺として持つ表面多角形の全て、 3)面上に存在する場合には、現在最接近点が存在する表面多角形 ・・・(15) を、内積を評価する表面多角形とする。すなわち、最接
近点が存在する位置に応じて(15)の1)〜3)で示す表面多
角形を構成する格子点(頂点)についてのみ内積を評価
し(内積が最小となる格子点を求め)、判定関数gK
(νk)を演算すればよい。このようにすれば、内積評
価に必要となる格子点数が減り、計算負荷が減少する。
Therefore, the surface polygon for which the inner product is evaluated for each of them may be limited as follows. That is,
If the closest point is on a grid point, 1) all surface polygons having the grid point at the vertex; 2) if they are on a side, the surface polygon has the side as one side , 3) If it exists on the surface, the surface polygon on which the closest point is present ... (15) is the surface polygon for evaluating the inner product. That is, the inner product is evaluated only for the grid points (vertexes) constituting the surface polygon shown in 1) to 3) of (15) according to the position where the closest approach point exists (the grid point at which the inner product is minimized is determined). ), Judgment function gK
(Νk) may be calculated. By doing so, the number of grid points required for inner product evaluation is reduced, and the calculation load is reduced.

【0044】(b) 最接近点探索のための凸多面体のデー
タ構造 上記1)〜3)により連続的に内積評価に必要となる表面多
角形を求めるためには、凸多面体を定義するデータ構造
に工夫を要する。図3は図2の6面体の場合のデータ構
造例であり、有向グラフ型構造データを採用している。
この有向グラフ型構造データは抽象化すると以下のよう
に表現できる。
(B) Data Structure of Convex Polyhedron for Searching for Nearest Point In order to continuously obtain surface polygons required for inner product evaluation according to the above 1) to 3), a data structure for defining a convex polyhedron It needs some ingenuity. FIG. 3 shows an example of a data structure in the case of the hexahedron shown in FIG. 2, and employs directed graph type structure data.
This directed graph type structure data can be expressed as follows when abstracted.

【0045】1)凸多面体を構成する表面多角形に番号を
付け、各々に1つずつポリゴンノード(polygon node)
を割り付ける。 2)各ポリゴンノードの下に、その多角形を構成する全格
子点と全辺を並べるための格子点ノード(Vertex node)
とエッジノード(Edge node)を割り付ける。多角形を構
成する格子点の集合と辺の集合は、格子点ノードとエッ
ジノードに対してそれぞれブラザーノード(brother nod
e)として存在する。 3)格子点ノードとエッジノードの下に、それらの格子点
又は辺を構成要素として持つ多角形をポリゴンノードと
して割り付ける。多角形が複数存在する場合にはブラザ
ーノードとして割り付ける。
1) The surface polygons constituting the convex polyhedron are numbered, and one polygon node is assigned to each polygon.
Assign 2) Below each polygon node, a lattice point node (Vertex node) for arranging all the grid points and all sides that make up the polygon
And an edge node. The set of grid points and the set of edges that make up the polygon are the brother node (brother nod) for the grid point node and the edge node, respectively.
e) exists as 3) Under the grid point node and the edge node, a polygon having those grid points or sides as constituent elements is allocated as a polygon node. If there are a plurality of polygons, they are assigned as brother nodes.

【0046】(c) 判定関数gK(νk)の内積評価法 以上のように、凸多面体のデータ構造を作成すると、(1
5)は以下のように表現できる。判定関数gK(νk)の
計算におけるhK(−νk)の評価は、 1)最接近点が格子点上に存在する場合には、該格子点に対応する格子点ノード の下に連なる全てのポリゴンノードに応じた表面多角形の格子点について内積評 価を行う、 2)最接近点が辺上に存在する場合には、該辺に対応するエッジノードの下に連 なる全てのポリゴンノードに応じた多角形の格子点について内積評価を行う、 3)最接近点が面上に存在する場合は、該面の格子点について内積評価を行う。 ・・・(15)′ 内積評価を(15)′のように制限した場合には、判定関数
gK(νk)の計算負荷は、凸多面体の表面凸多角形の
格子点数の最大値をLとすると、O(L)以下に抑える
ことができる。
(C) Method for evaluating inner product of decision function gK (νk) As described above, when a data structure of a convex polyhedron is created, (1)
5) can be expressed as follows. The evaluation of hK (-νk) in the calculation of the judgment function gK (νk) is as follows. The inner product evaluation is performed on grid points of the surface polygon corresponding to the node. The inner product is evaluated with respect to the lattice points of the polygon. 3) If the closest point exists on the surface, the inner product is evaluated with respect to the lattice points of the surface. (15) 'When the inner product evaluation is restricted as shown in (15)', the calculation load of the judgment function gK (νk) is L with the maximum number of lattice points of the surface convex polygon of the convex polyhedron being L and Then, it can be suppressed to O (L) or less.

【0047】(d) 本発明の内積評価法を採用した最接近
点探索アルゴリズム 図4は本発明による2つの凸多面体間の最接近点探索ア
ルゴリズムの流れ図である。まず対象となる2つの凸多
面体を特定するデータを入力する(初期入力:凸多面体
の環境モデル設定)。この場合、各凸多面体を特定する
データを以下の方式で入力する(図5参照)。すなわ
ち、第1の凸多面体PH1を構成する表面多角形にポリ
ゴン番号P1i(i=1,2,・・・m)を付ける。つ
いで、第iポリゴン番号P1iを入力し、しかる後、ポ
リゴン番号P1iを構成する格子点の座標値及びポリゴ
ン番号P1iの外向き法線方向を入力し、全ポリゴンP
1i(i=1,2,・・・m)についてポリゴン番号、
格子点座標値、外向き法線方向を入力する。なお、ポリ
ゴンを構成する格子点の座標値は外向き法線ベクトルに
向かって右回りに入力する。
(D) Algorithm for Finding the Nearest Point Using the Inner Product Evaluation Method of the Present Invention FIG. 4 is a flowchart of the algorithm for finding the closest point between two convex polyhedrons according to the present invention. First, data for specifying two target convex polyhedrons is input (initial input: environment model setting of convex polyhedron). In this case, data specifying each convex polyhedron is input in the following manner (see FIG. 5). That is, a polygon number P1i (i = 1, 2,... M) is assigned to a surface polygon constituting the first convex polyhedron PH1. Then, the i-th polygon number P1i is input, and thereafter, the coordinate values of the grid points constituting the polygon number P1i and the outward normal direction of the polygon number P1i are input, and all polygons P1i are input.
Polygon number for 1i (i = 1, 2,... M),
Enter the coordinate values of the grid points and the outward normal direction. Note that the coordinate values of the grid points forming the polygon are input clockwise toward the outward normal vector.

【0048】以後、同様に、第2の凸多面体PH2を構
成する表面多角形にポリゴン番号P2i(i=1,2,
・・・n)を付ける。ついで、第iポリゴン番号P2i
を入力し、しかる後、ポリゴン番号P2iを構成する格
子点の座標値及びポリゴン番号P2iの外向き法線方向
を入力し、全ポリゴンP2i(i=1,2,・・・n)
についてポリゴン番号、格子点座標値、外向き法線方向
を入力する(以上ステップ101)。各凸多面体を特定
するデータの入力が完了すると、入力データに基づいて
有向グラフ型構造データを作成する(ステップ10
2)。有向グラフ型構造データの作成が完了すると凸多
面体PH1,PH2に対してGilbert法を適用する。ま
ず、初期格子点集合Vk(k=0)を決定し(ステップ
103)、該初期格子点集合V0について最接近点ベク
トルνkを計算して出力する(ステップ104)。
Thereafter, similarly, polygon numbers P2i (i = 1, 2, 2) are assigned to surface polygons constituting the second convex polyhedron PH2.
.. N). Then, the i-th polygon number P2i
, And then input the coordinate values of the lattice points constituting the polygon number P2i and the outward normal direction of the polygon number P2i, and enter all the polygons P2i (i = 1, 2,... N).
, A polygon number, grid point coordinate values, and outward normal directions are input (step 101). When the input of the data for specifying each convex polyhedron is completed, directed graph type structure data is created based on the input data (step 10).
2). When the creation of the directed graph type structure data is completed, the Gilbert method is applied to the convex polyhedrons PH1 and PH2. First, an initial lattice point set Vk (k = 0) is determined (step 103), and the closest point vector νk is calculated and output for the initial lattice point set V0 (step 104).

【0049】ついで、該最接近点に対応する各凸多面体
PH1,PH2上の最接近点が格子点上、辺上、面上の
いずれに存在するか調べ、存在位置に基づいて(15)′に
より内積評価に使用する格子点を決定し、判定関数gK
(νk)を演算する(ステップ105)。尚、凸多面体
PH1上の格子点をx1i、凸多面体PH2上の格子点
をx2iとすると(12)′式は ν(co Y)=Σλiyi (i∈Is) =Σλi(x1i−x2i) (i∈Is) =Σλix1i−Σλix2i (i∈Is) (12)″ となる。(12)″の右辺第1項は凸多面体PH1上の最接
近点の位置ベクトルであり、右辺第2項は凸多面体PH
2上の最接近点の位置ベクトルである。従って、最接近
点ベクトルνkを演算する過程で(12)″式の右辺第1
項、右辺第2項を計算することにより最接近点ベクトル
に対応する各凸多面体PH1,PH2上の最接近点を求
めることができる。
Next, it is checked whether the closest point on each convex polyhedron PH1 or PH2 corresponding to the closest point is present on the lattice point, on the side, or on the surface. Grid points to be used for inner product evaluation are determined by
(Νk) is calculated (step 105). Note that if the lattice points on the convex polyhedron PH1 are x1i and the lattice points on the convex polyhedron PH2 are x2i, the expression (12) 'is expressed as follows. ∈Is) = Σλix1i−Σλix2i (i∈Is) (12) ″ The first term on the right side of (12) ″ is a position vector of the closest point on the convex polyhedron PH1, and the second term on the right side is the convex polyhedron. PH
2 is the position vector of the point of closest approach on FIG. Therefore, in the process of calculating the closest approach point vector νk, the first right side of the equation (12) ″
By calculating the term and the second term on the right side, the closest point on each convex polyhedron PH1, PH2 corresponding to the closest point vector can be obtained.

【0050】判定関数が求まれば、gK(νk)=0に
なったか調べ(ステップ106)、gK(νk)=0で
あれば最接近点探索は終了する。しかし、gK(νk)
が0でなければ、kをインクリメントし、次の格子点集
合V1について最接近点ベクトルを出力する(ステップ
107)。以後ステップ105以降の処理を繰り返せ
ば、最終的にgK(νk)=0となり、最接近距離、最
接近点が求まる。すなわち、2つの凸多面体PH1,P
H2の差集合凸多面体までの最接近点ベクトルは(12)′
式で求まるから、原点Oから該最接近点までの距離が最
接近距離となる。又、この時、(12)″式の右辺第1項、
第2項により各凸多面体PH1,PH2上の最接近点を
求めることができる。
When the judgment function is obtained, it is checked whether gK (νk) = 0 (step 106). If gK (νk) = 0, the search for the closest approach point is completed. However, gK (νk)
Is not 0, k is incremented and the closest point vector is output for the next set of grid points V1 (step 107). Thereafter, by repeating the processing of step 105 and subsequent steps, gK (νk) becomes finally 0, and the closest approach distance and the closest approach point are obtained. That is, two convex polyhedrons PH1, P
The closest point vector to the difference set convex polyhedron of H2 is (12) '
Since it is obtained by the formula, the distance from the origin O to the closest point is the closest distance. Also, at this time, the first term on the right side of the equation (12) ″,
The closest point on each convex polyhedron PH1, PH2 can be obtained from the second term.

【0051】(e) 本発明の内積評価法を採用した最接近
点探索装置の構成図 図6は2つの凸多面体間の最接近点探索装置の構成図で
ある。図中、11は対象となる2つの凸多面体を特定す
るデータ(図5参照)を入力する入力部、12は入力さ
れた凸多面体データを記憶する記憶部、13は凸多面体
毎に凸多面体データを用いて有向グラフ型構造データを
作成する有向グラフ型構造データ作成部、14は有向グ
ラフ型構造データを記憶する記憶部、15はGilbert法
に基づいて2物体間の最接近点探索処理を行なう最接近
点探索処理部、16は最接近点が存在する位置(格子
点、辺、面)に応じた内積評価用の格子点を有向グラフ
型構造データ記憶部14より読出して最接近点探索処理
部15に入力する内積評価用格子点読み出し部である。
(E) Configuration diagram of the closest approach point search device employing the inner product evaluation method of the present invention FIG. 6 is a configuration diagram of the closest approach point search device between two convex polyhedrons. In the figure, 11 is an input unit for inputting data (see FIG. 5) for specifying two target polyhedrons, 12 is a storage unit for storing the input polyhedron data, and 13 is convex polyhedron data for each convex polyhedron A directed graph type structure data creating unit that creates directed graph type structure data by using, 14 is a storage unit that stores the directed graph type structure data, 15 is a closest approach point that performs a closest point search process between two objects based on the Gilbert method The search processing unit 16 reads, from the directed graph type structure data storage unit 14, a grid point for inner product evaluation corresponding to the position (grid point, side, surface) where the closest point exists, and inputs it to the closest point search processing unit 15. This is an inner product evaluation grid point reading unit.

【0052】入力部11から凸多面体PH1,PH2を
特定するデータを入力して記憶部12に記憶する。有向
グラフ型構造データ作成部13は入力データに基づいて
有向グラフ型構造データを作成し、記憶部14に記憶す
る。有向グラフ型構造データの作成が完了すると最接近
点探索処理部15は凸多面体PH1,PH2に対してGi
lbert法を適用する。まず、初期格子点集合Vk(k=
0)を決定し、該初期格子点集合V0について最接近ベ
クトルνkを計算する。ついで、最接近ベクトルνkに
応じた各凸多面体上の最接近点を求め、それぞれの最接
近点が格子点上、辺上、面上のいずれに存在するか調
べ、存在位置(格子点、辺、面)を内積評価用格子点読
み出し部16に入力する。読み出し部16は最接近点位
置に基づいて定まる内積評価に使用する格子点を有向グ
ラフ型構造データ記憶部14より読出して最接近点探索
処理部15に入力する。最接近点探索処理部15は入力
された格子点を用いて内積評価を行なって判定関数gK
(νk)を演算する。しかる後、判定関数が求まれば、
gK(νk)=0になったか調べ、gK(νk)=0で
あれば最接近点探索は終了し、最接近距離、最接近点を
出力する。しかし、gK(νk)が0でなければ、kを
インクリメントし、次の格子点集合V1について最接近
点ベクトルを出力する。以後、同様な処理が行なわれ、
最終的にgK(νk)=0となり、最接近距離、最接近
点が出力される。尚、凸多面体PH1,PH2が移動す
れば、所定時間毎の移動データに基づいて移動後の各凸
多面体の格子点位置を求め、上記処理を行う。
Data for specifying the convex polyhedrons PH1 and PH2 is input from the input unit 11 and stored in the storage unit 12. The directed graph type structure data creating unit 13 creates directed graph type structure data based on the input data, and stores it in the storage unit 14. When the creation of the directed graph type structure data is completed, the closest approach point search processing unit 15 provides Gi for the convex polyhedrons PH1 and PH2.
Apply lbert method. First, an initial lattice point set Vk (k =
0) is determined, and the closest approach vector νk is calculated for the initial lattice point set V0. Next, the closest approach point on each convex polyhedron according to the closest approach vector νk is determined, and it is checked whether each closest approach point is on a lattice point, on a side, or on a surface. , Plane) are input to the inner product evaluation grid point reading unit 16. The reading unit 16 reads grid points used for inner product evaluation determined based on the position of the closest point from the directed graph type structure data storage unit 14 and inputs the lattice points to the closest point search processing unit 15. The closest point search processing unit 15 evaluates the inner product using the input lattice points and determines the judgment function gK
(Vk) is calculated. Then, if the decision function is found,
It is checked whether gK (νk) = 0. If gK (νk) = 0, the search for the closest approach point is finished, and the closest approach distance and the closest approach point are output. However, if gK (νk) is not 0, k is incremented and the closest point vector is output for the next set of grid points V1. Thereafter, the same processing is performed,
Finally, gK (νk) = 0, and the closest approach distance and the closest approach point are output. If the convex polyhedrons PH1 and PH2 move, the lattice point positions of the respective convex polyhedrons after the movement are obtained based on the movement data at predetermined time intervals, and the above processing is performed.

【0053】(B) 凸多面体間の最接近点探索の第2の
方法 (a) 原理 最接近点探索の第1の方法では、対象物体である凸多面
体をそれぞれ包む表面凸多角形に分割したため、計算負
荷は凸多角形の格子点数のオーダであった。この第1の
最接近探索方法の考え方を更に突き詰めると、凸多角形
の表面を三角形ポリゴンで覆い尽くせば1回の内積評価
の回数が最も少なくなることは明らかである。図7(a)
は原点Oの移動に合わせて凸多面体Kとの最接近点が表
面多角形上を推移して行く状態の説明図である。原点O
の移動に応じて最接近点Sは凸多角形P1→凸多角形P
2→凸多角形P3上を連続的に推移して行く。従って、
凸多角形を図7(b)に示すように三角形Tijに分割すれ
ば、原点Oの移動に応じて最接近点Sは三角形T11→
T12→T21→T22→T23→T24→T25→T
26→T31上を連続的に推移して行く。
(B) Second method of searching for the closest point between convex polyhedrons (a) Principle In the first method of searching for the closest point, the convex polyhedron, which is the target object, is divided into surface convex polygons each wrapping it. The calculation load was on the order of the number of lattice points of the convex polygon. Further elaborating the concept of the first closest approach search method, it is clear that if the surface of the convex polygon is completely covered with the triangular polygon, the number of times of one inner product evaluation is minimized. Fig. 7 (a)
Is an explanatory view of a state in which the point of closest approach to the convex polyhedron K moves on the surface polygon in accordance with the movement of the origin O. Origin O
The point of closest approach S is a convex polygon P1 → a convex polygon P according to the movement of
2 → Continuously moves on the convex polygon P3. Therefore,
If the convex polygon is divided into triangles Tij as shown in FIG.
T12 → T21 → T22 → T23 → T24 → T25 → T
26 → Continuously changes on T31.

【0054】そこで、凸多面体を構成する表面凸多角形
をすべて三角形に分割して、第1の最接近探索処理を施
しても何等問題はない。そして、三角形に分割すること
により1回の内積評価の回数を減少できる。例えば、図
7(a),(b)において最接近点S′が辺E11上に存在す
ると仮定すれば、図7(a)の場合には、内積評価に使用
する格子点はV1〜V6の6個存在するが、図7(b)の
場合には、V1,V3,V4,V6の4個で良く、1回
の内積評価の回数を減少できる。以上より、対象となる
凸多面体に前処理を施して表面凸多角形を全て三角形ポ
リゴンに分割したデータ構造とすれば、gK(νk)を
連続的に評価する場合の計算負荷は、対象となる凸多面
体の複雑度に関係なく一定値以下に押さえることができ
る。
Therefore, there is no problem even if all the surface convex polygons constituting the convex polyhedron are divided into triangles and the first closest approach search processing is performed. Then, by dividing into triangles, the number of times of one inner product evaluation can be reduced. For example, assuming that the closest point S ′ exists on the side E11 in FIGS. 7A and 7B, in the case of FIG. 7A, the grid points used for inner product evaluation are V1 to V6. There are six, but in the case of FIG. 7 (b), only four of V1, V3, V4, and V6 are sufficient, and the number of times of one inner product evaluation can be reduced. As described above, if the target convex polyhedron is subjected to preprocessing to form a data structure in which all the surface convex polygons are divided into triangular polygons, the calculation load in the case of continuously evaluating gK (νk) becomes an object. It can be kept below a certain value regardless of the complexity of the convex polyhedron.

【0055】任意の凸多角形を三角形ポリゴンに分割す
る方法は、計算幾何学の分野で幾つかアルゴリズムが知
られている。最もよく知られている方法は、動的計画法
を使って弦の長さの和を最小にするような三角形分割法
である。図8にその例を示す。なお、弦とはL1〜L6
のように三角形に分割するための線分である。このアル
ゴリズムの計算負荷は、始めの多角形の格子点数をnと
するとO(n3)である。多角形を三角形にするアルゴ
リズムに関しては、浅野哲夫著「計算幾何学」(朝倉書
店)、Te. Asano, Ta. Asano and Y. Ohsuga:"Partitio
ning a Polygonal Region into a Minimum Number of T
riangles", Trans. IECE of Japan, vol.E67, pp.232〜
233、 1984を参照されたい。
Several algorithms for dividing an arbitrary convex polygon into triangular polygons are known in the field of computational geometry. The best known method is triangulation, which uses dynamic programming to minimize the sum of chord lengths. FIG. 8 shows an example. The strings are L1 to L6
Is a line segment for dividing into triangles as shown in FIG. The calculation load of this algorithm is O (n3), where n is the number of grid points of the first polygon. For an algorithm to convert polygons into triangles, see Tetsuo Asano, "Computational Geometry" (Asakura Shoten), Te. Asano, Ta. Asano and Y. Ohsuga: "Partitio
ning a Polygonal Region into a Minimum Number of T
riangles ", Trans. IECE of Japan, vol.E67, pp.232〜
See 233, 1984.

【0056】以上より、最接近点の連続探索問題への対
応法(第2の最接近点探索方法)は以下のようにまとめ
ることができる。 1)前処理1:対象凸多面体を包む各表面凸多角形に対
し、三角形分割を施す(Triangulation algorithm) 2)前処理2:三角形を用いて第1の最接近点探索方法に
おけると同様に有向グラフ型構造データを作成する。 3)内積評価:(15)′にしたがってgK(νk)をにおけ
る内積評価の範囲を限定する。
As described above, the method for dealing with the continuous search for the closest approach point (second closest approach search method) can be summarized as follows. 1) Preprocessing 1: Triangulation of each surface convex polygon surrounding the target convex polyhedron (Triangulation algorithm) 2) Preprocessing 2: Directed graph as in the first closest point search method using triangles Create type structure data. 3) Inner product evaluation: The range of inner product evaluation in gK (νk) is limited according to (15) ′.

【0057】(b) 本発明の第2の最接近点探索アルゴ
リズム 図9は本発明の第2の最接近点探索方法による最接近点
探索アルゴリズムの流れ図である。まず対象となる2つ
の凸多面体を特定するデータを入力する(初期入力:凸
多面体の環境モデル設定)。各凸多面体を特定するデー
タは以下の方式で入力される(図5参照)。すなわち、
第1の凸多面体PH1を構成する表面多角形に番号P1
i(i=1,2,・・・m)を付ける。ついで、第iポ
リゴン番号P1iを入力し、しかる後、番号P1iのポ
リゴンを構成する格子点の座標値及びポリゴンの外向き
法線方向を入力し、同様に、全ポリゴンP1i(i=
1,2,・・・m)についてポリゴン番号、格子点座標
値、外向き法線方向を入力する。なお、ポリゴンを構成
する格子点の座標値は外向き法線ベクトルに向かって右
回りに入力する。同様に、第2の凸多面体PH2を構成
する表面多角形にポリゴン番号P2i(i=1,2,・
・・n)を付ける。ついで、第iポリゴン番号P2iを
入力し、しかる後、ポリゴン番号P2iを構成する格子
点の座標値及びポリゴン番号P2iの外向き法線方向を
入力し、全ポリゴンP2i(i=1,2,・・・n)に
ついてポリゴン番号、格子点座標値、外向き法線方向を
入力する(以上ステップ201)。
(B) Second Nearest Point Search Algorithm of the Present Invention FIG. 9 is a flowchart of the closest point search algorithm according to the second closest point search method of the present invention. First, data for specifying two target convex polyhedrons is input (initial input: environment model setting of convex polyhedron). Data for specifying each convex polyhedron is input in the following manner (see FIG. 5). That is,
The number P1 is assigned to the surface polygon constituting the first convex polyhedron PH1.
i (i = 1, 2,... m) is attached. Then, the i-th polygon number P1i is input, and thereafter, the coordinate values of the lattice points constituting the polygon of the number P1i and the outward normal direction of the polygon are input, and similarly, all the polygons P1i (i =
For 1, 2,... M), a polygon number, grid point coordinate values, and outward normal directions are input. Note that the coordinate values of the grid points forming the polygon are input clockwise toward the outward normal vector. Similarly, the polygon numbers P2i (i = 1, 2,...) Are assigned to the surface polygons constituting the second convex polyhedron PH2.
・ ・ N) Then, the i-th polygon number P2i is input, and thereafter, the coordinate values of the grid points constituting the polygon number P2i and the outward normal direction of the polygon number P2i are input, and all polygons P2i (i = 1, 2,. .. N), a polygon number, grid point coordinate values, and outward normal directions are input (step 201).

【0058】各凸多面体を特定するデータの入力が完了
すると、入力データに基づいて凸多面体を構成する表面
凸多角形を三角形に分割し、各三角形にポリゴン番号T
ijを付加する(ステップ202)。ついで、得られた
三角形をポリゴンノードとして第1最接近点探索方法に
おけると同様に有向グラフ型構造データを作成する(ス
テップ203)。有向グラフ型構造のデータ作成が完了
すると凸多面体PH1,PH2に対してGilbert法を適
用する。まず、初期格子点集合Vk(k=0)を決定し
(ステップ204)、該初期格子点集合V0について最
接近点ベクトルνkを計算して出力する(ステップ20
5)。
When the input of the data for specifying each convex polyhedron is completed, the surface convex polygon constituting the convex polyhedron is divided into triangles based on the input data, and each triangle has a polygon number T.
ij is added (step 202). Next, the obtained triangle is used as a polygon node to create directed graph type structure data in the same manner as in the first closest point search method (step 203). When the creation of the data of the directed graph structure is completed, the Gilbert method is applied to the convex polyhedrons PH1 and PH2. First, an initial lattice point set Vk (k = 0) is determined (step 204), and the closest point vector vk is calculated and output for the initial lattice point set V0 (step 20).
5).

【0059】ついで、最接近点ベクトルνkに応じた各
凸多面体上の最接近点を求め、それぞれの最接近点が格
子点上、辺上、面上のいずれに存在するか調べ、存在位
置に基づいて(15)′により内積評価に使用する格子点を
決定し、判定関数gK(νk)を演算する(ステップ2
06)。判定関数が求まれば、gK(νk)=0になっ
たか調べ(ステップ207)、gK(νk)=0であれ
ば最接近点探索は終了する。しかし、gK(νk)が0
でなければ、kをインクリメントし、次の格子点集合V
1について最接近点ベクトルを出力する(ステップ20
8)。以後ステップ105以降の処理を繰り返せば、最
終的にgK(νk)=0となり、最接近距離、最接近点
が求まる。尚、凸多面体PH1,PH2が移動すれば、
所定時間毎の移動データに基づいて移動後の各凸多面体
の格子点位置を求め、上記処理を行う。
Next, the closest point on each convex polyhedron according to the closest point vector νk is determined, and it is checked whether each closest point exists on a lattice point, on a side, or on a surface. Based on (15) ', a grid point used for inner product evaluation is determined based on (15)', and a judgment function gK (νk) is calculated (step 2).
06). If the judgment function is obtained, it is checked whether gK (νk) = 0 (step 207). If gK (νk) = 0, the search for the closest approach point is completed. However, gK (νk) is 0
Otherwise, k is incremented and the next set of grid points V
1 is output as the closest approach point vector (step 20).
8). Thereafter, by repeating the processing of step 105 and subsequent steps, gK (νk) becomes finally 0, and the closest approach distance and the closest approach point are obtained. If the convex polyhedrons PH1 and PH2 move,
Based on the movement data for each predetermined time, the lattice point position of each convex polyhedron after movement is obtained, and the above processing is performed.

【0060】(c) 本発明の第2の最接近点探索装置の構
成図 図10は本発明の第2の最接近点探索方法を実現する装
置の構成図であり、図6と同一部分には同一符号を付し
ている。図6と異なる点は、1)凸多面体を特定する凸多
面体データに基づいて該凸多面体を構成する表面凸多角
形を三角形に分割する三角形分割部17が設けられてい
る点、2)有向グラフ型構造データ作成部13は各三角形
をポリゴンノードとして有向グラフ型構造データを作成
して記憶部14に記憶する点、である。
(C) Configuration of Second Nearest-Point Searching Apparatus of the Present Invention FIG. 10 is a block diagram of an apparatus for implementing the second closest-point searching method of the present invention. Have the same reference numerals. 6 is different from FIG. 6 in that 1) a triangular division unit 17 is provided to divide the surface convex polygons constituting the convex polyhedron into triangles based on the convex polyhedron data specifying the convex polyhedron. 2) Directed graph type The structure data creation unit 13 creates directed graph type structure data using each triangle as a polygon node, and stores it in the storage unit 14.

【0061】(d) 第2の最接近点探索方法の効果 第2の最接近点探索方法によれば、以下の1)、2)の効果
が得られる。 1)高速性:最接近点を連続的に追い掛ける場合、初期化
に要する時間を除くと対象凸多面体の複雑度に係らず計
算負荷をほぼ一定にできる。一定値は、三角形ポリゴン
同士の最接近点探索時間にほぼ等しい。 2)自由曲面への応用:自由曲面を三角形ポリゴンを張り
合わせて表現する場合、表現の精度を上げるためにポリ
ゴン数を増やしても最接近点探索の時間は常に一定であ
る。
(D) Effects of the second closest approach point searching method According to the second closest approach point searching method, the following effects 1) and 2) can be obtained. 1) High speed: When following the closest approach point continuously, the calculation load can be kept almost constant regardless of the complexity of the target convex polyhedron except for the time required for initialization. The constant value is substantially equal to the time for searching for the closest point between the triangular polygons. 2) Application to free-form surfaces: When a free-form surface is expressed by laminating triangular polygons, the time for searching for the closest approach point is always constant even if the number of polygons is increased in order to increase the accuracy of the expression.

【0062】(C) 非凸多面体間の最接近点探索の第1
の方法 (a) 原理 Gilbert法を非凸多面体に拡張するための基本的な方針
は、非凸多面体を凸多面体の集合と捕らえた時に、干渉
チェックを行わなければならない凸多面体の組み合わせ
数をできるだけ減らすことである。凸多面体間の干渉チ
ェックには勿論Gilbert法を採用する。凸多面体数を減
らすために複数の凸多面体に対してマージング(mergin
g)という概念を導入する。物体Aと物体Bのマージング
とは、AとBを含む最小の凸物体(Copnvex hull:凸包)
を構成することである。図11は非凸多面体Kを2つの
凸多面体A,Bに分割し、マージング処理によりAとB
を含む最小の凸物体(凸包)Cを構成した例である。凸
包が生成されると、非凸多面体の干渉チェックは凸包同
士(凸多面体同士)の干渉チェックに帰着し、本発明の
第1の最接近点探索方法を適用できる。
(C) First Search for Nearest Point between Nonconvex Polyhedrons
(A) Principle The basic principle of extending the Gilbert method to a non-convex polyhedron is that when a non-convex polyhedron is regarded as a set of convex polyhedrons, the number of combinations of convex polyhedrons that must be checked for interference is It is to reduce. Of course, the Gilbert method is used to check for interference between convex polyhedrons. Merging (mergin) for multiple convex polyhedra to reduce the number of convex polyhedra
Introduce the concept of g). The merging of the object A and the object B is the smallest convex object including A and B (Copnvex hull: convex hull)
It is to constitute. FIG. 11 shows that the non-convex polyhedron K is divided into two convex polyhedrons A and B, and A and B are merged.
This is an example in which a minimum convex object (convex hull) C including the following is configured. When the convex hull is generated, the interference check of the non-convex polyhedron results in the interference check of the convex hulls (convex polyhedrons), and the first closest point search method of the present invention can be applied.

【0063】凸包Cを構成するに当り、バーチャリティ
(Virtuality)という指標を導入する。バーチャリティ
は複数の凸多面体のマージングで生じる仮想的な多角形
を識別するためのフラグである。図11の例では、2つ
の実在する凸多面体(直方体)A,Bにまたがる多角形
(ポリゴン4,5,6)に対してバーチャリティは”
1”となり、その他の実際に存在する多角形に対しては
バーチャリティは”0”となる。マージングで凸包が作
成され、該凸包に第1の最接近点探索方法を適用するた
めには、凸包の有効グラフ型構造データを作成する。図
12は図11に示す凸包の有向グラフ型構造データであ
り、凸包の表面多角形ポリゴン1,2,・・・をポリゴ
ンノードとしてその下方に格子点ノード、エッジノード
を配列し、更に各格子点ノード、エッジノードの下方に
ポリゴンノードを配列している。又、ポリゴンにはバー
チャリティが付加されている。
In constructing the convex hull C, an index called virtuality is introduced. The virtuality is a flag for identifying a virtual polygon generated by merging a plurality of convex polyhedrons. In the example of FIG. 11, the virtuality is "for a polygon (polygons 4, 5, 6) extending over two existing convex polyhedrons (cuboids) A and B.
1 ”, and the virtuality is“ 0 ”for other actually existing polygons. Creates effective graph type structure data of a convex hull.FIG. 12 shows directed graph type structure data of a convex hull shown in FIG. A grid point node and an edge node are arranged below, and a polygon node is arranged below each grid point node and the edge node.

【0064】(b) マージング アルゴリズム 図13はマージングアルゴリズムの流れ図である。対象
となる非凸多面体を2以上の凸多面体に分割し、各凸多
面体を特定するデータを入力する(初期入力:凸多面体
の環境モデル設定)。すなわち、第1の凸多面体PH1
を構成する表面多角形にポリゴン番号P1i(i=1,
2,・・・m)を付ける。ついで、第iポリゴン番号P
1iを入力し、しかる後、ポリゴン番号P1iを構成す
る格子点の座標値及びポリゴン番号P1iの外向き法線
方向を入力し、全ポリゴンP1i(i=1,2,・・・
m)についてポリゴン番号、格子点座標値、外向き法線
方向を入力する。以後、同様に、他の凸多面体PH2を
構成する表面多角形にポリゴン番号P2i(i=1,
2,・・・n)を付け、全ポリゴンP2i(i=1,
2,・・・n)についてポリゴン番号、格子点座標値、
外向き法線方向を入力する(以上ステップ301)。
(B) Merging Algorithm FIG. 13 is a flowchart of the merging algorithm. The target non-convex polyhedron is divided into two or more convex polyhedrons, and data specifying each convex polyhedron is input (initial input: environment model setting of the convex polyhedron). That is, the first convex polyhedron PH1
Are assigned polygon numbers P1i (i = 1,
2,... M). Then, the i-th polygon number P
1i, and thereafter, the coordinate values of the lattice points forming the polygon number P1i and the outward normal direction of the polygon number P1i are input, and all polygons P1i (i = 1, 2,...) Are input.
For m), a polygon number, grid point coordinate values, and outward normal directions are input. Hereafter, similarly, polygon numbers P2i (i = 1,
2,... N) and all polygons P2i (i = 1, 2)
2,... N), polygon numbers, grid point coordinate values,
An outward normal direction is input (step 301).

【0065】各凸多面体を特定するデータの入力が完了
すると、入力データに基づいて有向グラフ型構造のデー
タを作成する(ステップ302)。ついで、各凸多面体
PH1,PH2を包含する最小の凸包PH(1,2)を生成する
(ステップ303)。しかる後、凸包PH(1,2)を構成
する表面多角形にポリゴン番号PPH(1,2)i(i=
1,2,・・・r)を付け、第iポリゴン番号PPH(1,2)
iを入力後、第iポリゴンを構成する格子点の座標値、
ポリゴンのバーチャリティ及び外向き法線方向を求めて
記憶する(図14参照)。以後、同様にして全ポリゴン
PPH(1,2)i(i=1,2,・・・r)についてポリゴン番
号、格子点座標値、バーチャリティ外向き法線方向を求
めれば、凸包の有向グラフ型構造データが作成されてメ
モリに記憶されることになる。尚、ポリゴンPPH
(1,2)iが凸多面体PH1,PH2の両方の格子点を
含む場合にはバーチャリティは”1”になり、片方の格
子点しか含まない場合にはバーチャリティは”0”にな
る(以上、ステップ304、305)。
When the input of the data for specifying each convex polyhedron is completed, data of a directed graph structure is created based on the input data (step 302). Next, the smallest convex hull PH (1,2) including each convex polyhedron PH1, PH2 is generated (step 303). After that, the polygon number PPH (1,2) i (i = i) is assigned to the surface polygon forming the convex hull PH (1,2).
1, 2,... R) and the i-th polygon number PPH (1, 2)
After inputting i, coordinate values of grid points constituting the i-th polygon,
The virtuality and outward normal direction of the polygon are obtained and stored (see FIG. 14). Thereafter, similarly, when the polygon number, the grid point coordinate value, and the virtual normal outward direction are obtained for all the polygons PPH (1, 2) i (i = 1, 2,... R), the convex graph directional graph is obtained. Type structure data is created and stored in memory. The polygon PPH
If (1,2) i includes both lattice points of the convex polyhedron PH1, PH2, the virtuality is "1", and if it includes only one lattice point, the virtuality is "0" ( Steps 304 and 305).

【0066】マージングアルゴリズムは複数の凸多面体
から凸包を作成し、有向グラフ型構造データを作成する
アルゴリズムである。凸包を作成するアルゴリズムは計
算幾何学で良く知られている。現在三次元の凸包に対し
ては、格子点の総数をMとするとき、計算負荷がO(M
・log M)のアルゴリズムが知られている。例えば、F.
P. Preparata and S.J. Hong, "Convex hulls of finit
e sets of points intwo and three dimensions", Com
m. ACM 2(20), pp.87〜93, 1977を参照。マージングア
ルゴリズムは相対的に静止している凸多面体同士に作用
させ、バーチャリティ”1”の多角形が他の物体と接触
・衝突した場合にはマージングを解除する。これによ
り、以後、下位の凸多面体の集合状態に対して最接近点
探索処理が施される。又、マージング解除後(凸包解除
後)、一定時間他の物体と干渉が生じない場合には、干
渉によって分解した凸包はリカバリアルゴリズム(後
述)により回復する。
The merging algorithm is an algorithm for creating a convex hull from a plurality of convex polyhedrons and creating directed graph type structure data. Algorithms for creating convex hulls are well known in computational geometry. For the current three-dimensional convex hull, if the total number of grid points is M, the computational load is O (M
The algorithm of log M) is known. For example, F.
P. Preparata and SJ Hong, "Convex hulls of finit
e sets of points intwo and three dimensions ", Com
m. See ACM 2 (20), pp. 87-93, 1977. The merging algorithm operates on relatively stationary convex polyhedrons, and cancels merging when the polygon of virtuality "1" comes into contact with or collides with another object. As a result, the closest point search process is performed on the set state of the lower convex polyhedron. Further, after the merging is released (after the convex hull is released), if there is no interference with another object for a certain period of time, the convex hull decomposed by the interference is recovered by a recovery algorithm (described later).

【0067】(c) マージングアルゴリズムの起動 マージングアルゴリズムは、対象物体に対して初期設定
においてオフライン的に作用させておき、環境が動的に
変化しだしたならば、すなわち、環境中のある凸多面体
が動き出したならば、マージングプロセスは現状を維持
したまま一時的に停止して、干渉チェックを行う。そし
て、環境が停止した時、マージング処理を実行して環境
変化後の凸包の作成、凸包の有向グラフ型構造データの
作成を行う。図15は以上を考慮した時のプロセッサに
よるマージング処理の説明図である。全ての凸包に対し
て凸包の静動を監視するためのフラグms(i)を用意す
る。静動フラグms(i)=”1”の場合は動、ms(i)
=”0”の場合は静であり、iは凸包全てにわたる。
(C) Activating the Merging Algorithm The merging algorithm is applied to the target object offline in the initial setting, and when the environment starts to change dynamically, that is, a certain convex polyhedron in the environment If has started, the merging process stops temporarily while maintaining the current state, and performs an interference check. Then, when the environment is stopped, a merging process is executed to create a convex hull after the environment is changed, and to create a directed graph type structure data of the convex hull. FIG. 15 is an explanatory diagram of merging processing by the processor in consideration of the above. A flag ms (i) for monitoring the static movement of the convex hull is prepared for all convex hulls. If the static motion flag ms (i) = "1", it is dynamic, ms (i)
== "0" is static and i spans all convex hulls.

【0068】プロセッサのタスクとして、常時全てのm
s(i)の値を監視して凸包の静動状態を監視する状態監
視タスクTask1と、いずれかのms(i)が”1”の
場合に前述の第1の最接近点探索方法により干渉チェッ
クをその他の処理を実行するTask2(干渉チェック
タスク)と、全てのms(i)=”0”の場合、すなわち
凸包全てが静止している場合にマージング処理を実行す
るTask3(マージングタスク)がある。凸包全ての
静動状態は図示しないロボット制御装置により監視さ
れ、メモリMEMにms(i)=”1”あるいはms(i)
=”0”として書き込まれる。状態監視タスクTask
1はms(i)の内容を監視し、全て”0”の場合にはマ
ージングタスクTask3が起動してマージング処理を
実行して凸包の作成、有向グラフ型構造データの作成を
行う。マージングタスクTask3は凸包を1つ構成す
ると停止し、次の起動指示を待つ。一方、いずれかのm
s(i)が”1”の場合には、換言すればいずれかの凸包
が動いている場合には、干渉チェックタスクTask2
は第1の最接近点探索方法により干渉チェックをその他
の処理を実行する。以後、上記動作が繰り返されて干渉
チェックが実行される。
As a task of the processor, all m
A state monitoring task Task1 that monitors the value of s (i) to monitor the static motion state of the convex hull, and the first closest approach point search method described above when any of ms (i) is “1”. Task2 (an interference check task) for executing other processing for interference check, and Task3 (merging task) for executing a merging process when all ms (i) = "0", that is, when all convex hulls are stationary. ). The static state of all convex hulls is monitored by a robot controller (not shown), and ms (i) = "1" or ms (i) is stored in the memory MEM.
= "0". Status monitoring task Task
1 monitors the contents of ms (i), and if all are "0", a merging task Task3 is activated to execute a merging process to create a convex hull and create directed graph type structure data. The merging task Task3 stops when one convex hull is formed, and waits for the next activation instruction. On the other hand, any m
When s (i) is “1”, in other words, when any convex hull is moving, the interference check task Task2
Performs the interference check and other processing by the first closest approach point search method. Thereafter, the above operation is repeated to execute the interference check.

【0069】以上はタスク切り換えによりマージング処
理、干渉チェック処理等を実行する場合であるが、Wh
ile文を用いてシーケンシャルにマージング処理を行
うようにもできる。図16はWhile文を用いてマー
ジング処理を実行する場合の説明図である。While
文において全ての凸包のms(i)が”0”か監視し、全
て”0”の場合にはマージングプロセスを実行して1つ
の凸包を作成する(ステップ401)。しかる後、Wh
ile文を抜け出し、干渉チェックその他の処理を実行
し(ステップ402)、再びWhile文を実行する。
以後、常時マージング処理、干渉チェック処理を繰返し
連続的に実行する。
The above is a case where merging processing, interference check processing, and the like are executed by task switching.
The merging process can be performed sequentially using an ile statement. FIG. 16 is an explanatory diagram of a case where a merging process is executed using a While sentence. While
In the sentence, it is monitored whether ms (i) of all convex hulls is "0", and if all are "0", a merging process is executed to create one convex hull (step 401). After a while, Wh
The ile sentence is escaped, interference check and other processing are executed (step 402), and the While sentence is executed again.
Thereafter, the merging process and the interference check process are repeatedly and continuously executed.

【0070】環境が動的に変化する場合、例えば図17
に示すようにロボットアームAMが非凸多面体であるア
ーチACを通り抜けて向う側の対象物OBを掴むような
場合、アームAMはアーチACで構成される凸包を突き
破って対象物OBに到達する。この場合、ロボットアー
ムAMが凸包のバーチャリティ”1”の凸多角形と接触
すると、マージングが解除される。以後、ロボットアー
ムAMとアーチACを構成する個々の凸多面体AC1〜
AC3との干渉チェックが行われ、ロボットアームはア
ーチACに接触しないように対象物OBに至り、該対象
物を掴んで目的の場所に運ぶ。マージングが解除された
凸包は、次に説明するリカバリアルゴリズムにより復元
する。図18(a)は作業台BSとアーチACに凸包CH
1を生成した例、図18(b)は、アーチAC、対象物O
Bそれぞれに凸包CH2,CH3を生成した場合の例で
あり、ロボットアームAMは図18(c)に示すように作
業台BSとアーチACで構成される凸包CH1、アーチ
で構成される凸包CH2を次々に突き破って対象物OB
に到達し、対象物を把持して目的の場所に運ぶ。
When the environment changes dynamically, for example, FIG.
When the robot arm AM passes through the arch AC, which is a non-convex polyhedron, and grasps the object OB on the opposite side as shown in (1), the arm AM breaks through the convex hull formed by the arch AC and reaches the object OB. In this case, merging is canceled when the robot arm AM comes into contact with the convex polygon of the virtual hull “1” of the convex hull. After that, the individual convex polyhedrons AC1 to AC1 constituting the robot arm AM and the arch AC will be described.
An interference check with AC3 is performed, and the robot arm reaches the object OB so as not to contact the arch AC, and grabs the object and transports it to a target location. The convex hull from which merging has been canceled is restored by a recovery algorithm described below. FIG. 18A shows a convex hull CH on the worktable BS and the arch AC.
FIG. 18B shows an example in which an arch AC and an object O are generated.
This is an example in which convex hulls CH2 and CH3 are generated for each of B. As shown in FIG. 18C, the robot arm AM has a convex hull CH1 composed of a worktable BS and an arch AC, and a convex hull composed of an arch. Object OB by piercing the parcel CH2 one after another
, And grasps and transports the object to a target location.

【0071】(d) リカバリアルゴリズム 干渉によって分解した凸包は、一定時間、他の物体と干
渉が生じない場合には回復する。リカバリ処理は、マー
ジング状態のデータ構造が残っている凸包に対してのみ
作用する。従って、相対位置関係が動いてしまい、元の
凸包のデータ構造が失われている凸多面体集合は、リカ
バリ処理では回復せず、マージングアルゴリズムの適用
により新しい凸包が構成される。
(D) Recovery Algorithm The convex hull decomposed by the interference recovers when there is no interference with another object for a certain period of time. The recovery process operates only on the convex hull in which the data structure in the merging state remains. Therefore, a convex polyhedron set in which the relative positional relationship has moved and the original data structure of the convex hull has been lost is not recovered by the recovery processing, and a new convex hull is formed by applying the merging algorithm.

【0072】図19はプロセッサによるマージング処
理、リカバリ処理の説明図である。全ての凸包に対して
凸包の静動を監視するためのフラグms(i)を用意す
る。静動フラグms(i)=”1”の場合は動、ms(i)
=”0”の場合は静であり、iは凸包全てにわたる。プ
ロセッサのタスクとして、常時全てのms(i)の値を監
視して凸包の静動状態を監視する状態監視タスクTas
k1と、いずれかのms(i)が”1”の場合に第1の最
接近点探索方法による干渉チェック処理、リカバリ処
理、その他の処理を実行するTask2(干渉チェック
/リカバリタスク)と、全てのms(i)=”0”の場
合、すなわち凸包全てが静止している場合にマージング
処理を実行するTask3(マージングタスク)があ
る。
FIG. 19 is an explanatory diagram of merging processing and recovery processing by the processor. A flag ms (i) for monitoring the static movement of the convex hull is prepared for all convex hulls. If the static motion flag ms (i) = "1", it is dynamic, ms (i)
== "0" is static and i spans all convex hulls. As a task of the processor, a state monitoring task Tas that constantly monitors all values of ms (i) to monitor the static state of the convex hull.
k1 and Task2 (interference check / recovery task) for executing interference check processing, recovery processing, and other processing by the first closest approach point search method when any of ms (i) is “1”; Task3 (merging task) for executing the merging process when ms (i) = “0”, that is, when all the convex hulls are stationary.

【0073】凸包全ての静動状態は図示しないロボット
制御装置により監視され、メモリMEMにms(i)=”
1”あるいはms(i)=”0”として書き込まれる。状
態監視タスクTask1はms(i)の内容を監視し、全
て”0”の場合にはマージングタスクTask3が起動
する。マージングタスクTask3はマージング処理を
実行して凸包の作成、有向グラフ型構造データの作成を
行う。マージングタスクTask3は凸包を1つ構成す
ると停止し、次の起動指示を待つ。一方、いずれかのm
s(i)が”1”の場合には、換言すればいずれかの凸包
が動いている場合には、干渉チェックタスクTask2
は第1の最接近点探索方法により干渉チェックを実行す
ると共に、リカバリ処理その他の処理を実行する。以
後、上記動作が繰り返されて干渉チェックが実行され
る。
The stationary state of all the convex hulls is monitored by a robot controller (not shown), and ms (i) = “
It is written as 1 "or ms (i) =" 0 ". The status monitoring task Task1 monitors the contents of ms (i), and when all are" 0 ", the merging task Task3 is activated. The processing is executed to create a convex hull and create directed graph type structure data.The merging task Task3 stops when one convex hull is formed, and waits for the next activation instruction.
When s (i) is “1”, in other words, when any convex hull is moving, the interference check task Task2
Executes the interference check by the first closest approach point search method, and executes the recovery process and other processes. Thereafter, the above operation is repeated to execute the interference check.

【0074】リカバリ処理は、凸包のバーチャリティ”
1”の凸多角形が他の物体と接触してマージングが解除
された時、凸包が該物体と干渉しなくなったか監視し、
干渉しなくなってから連続して所定時間干渉しない場合
には凸包を復元する。図17の例では、ロボットアーム
AMが対象物OBを把持してアーチACを通り抜けると
凸包とアームの干渉がなくなるから、干渉しなくなって
から所定時間経過した時凸包を復元する。
In the recovery process, a convex hull virtuality is used.
When the merging is released by contact of the convex polygon of 1 "with another object, monitoring whether the convex hull no longer interferes with the object,
If no interference continues for a predetermined time after the interference stops, the convex hull is restored. In the example of FIG. 17, when the robot arm AM grasps the object OB and passes through the arch AC, interference between the convex hull and the arm disappears.

【0075】以上はタスク切り換えによりリカバリ処理
等を実行する場合であるが、While文を用いてシー
ケンシャルにリカバリ処理を行うようにもできる。図2
0はWhile文を用いてリカバリ処理を実行する場合
の説明図である。While文において全ての凸包のm
s(i)が”0”か監視し、全て”0”の場合にはマージ
ングプロセスを実行して1つの凸包を作成する(ステッ
プ501)。しかる後、While文を抜け出し、干渉
チェック処理、リカバリ処理、その他の処理を実行し
(ステップ502)、再びWhile文を実行する。以
後、常時マージング処理、干渉チェック処理、リカバリ
処理を繰返し連続的に実行する。
The above is a case where the recovery processing is executed by switching tasks, but the recovery processing can be performed sequentially using a While statement. FIG.
0 is an explanatory diagram in the case where recovery processing is executed using a While statement. M of all convex hulls in a While sentence
It monitors whether s (i) is "0", and if all are "0", executes a merging process to create one convex hull (step 501). Thereafter, the While sentence is escaped, interference check processing, recovery processing, and other processing are executed (step 502), and the While sentence is executed again. Thereafter, the merging process, the interference check process, and the recovery process are repeatedly and continuously executed.

【0076】(e) 非凸多面体間の最接近点探索の全体の
処理 図21は非凸多面体間の最接近点探索の全体の処理フロ
ー図である。対象となる非凸多面体を特定するデータを
入力する(初期入力:環境モデル設定)。・・・ステッ
プ601 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiの有向グラフ型構造データを作成する。又、マージ
ング処理により凸包を生成すると共に、凸包の有向グラ
フ型構造データを作成する(ステップ602)。以上の
初期化処理が終了すると第1の最接近点探索処理(干渉
チェック)処理を実行する(ステップ603)。つい
で、干渉するかチェックし(ステップ604)、干渉す
ればバーチャリティ=”1”の部分が干渉したかチェッ
クし(ステップ605)、バーチャリティ=”0”であ
れば、ただちに移動を停止し(ステップ606)、バー
チャリティ=”1”であればマージングを解除し(ステ
ップ607)、ステップ603に戻る。以後、凸包が回
復するまで、非凸多面体を構成する個々の凸多面体に対
する最接近点探索処理を実行する。
(E) Overall processing for searching for the closest point between non-convex polyhedrons FIG. 21 is an overall processing flowchart for searching for the closest point between non-convex polyhedrons. Input data specifying the target non-convex polyhedron (initial input: environment model setting). Step 601 Next, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P
Create directed graph type structure data of Hi. Further, a convex hull is generated by the merging process, and directed graph type structure data of the convex hull is generated (step 602). When the above initialization processing is completed, a first closest point search processing (interference check) processing is executed (step 603). Next, it is checked whether or not interference occurs (step 604). If there is interference, it is checked whether or not the portion of virtuality = “1” has interfered (step 605). In step 606), if the virtuality is "1", merging is canceled (step 607), and the process returns to step 603. Thereafter, until the convex hull is recovered, the closest approach point search processing is executed for each convex polyhedron constituting the non-convex polyhedron.

【0077】一方、ステップ604において、干渉して
いなければリカバリ処理を実行する(ステップ60
6)。リカバリ処理においては、マージングが解除され
た凸包が存在するか調べ、存在する場合には、他の物体
と干渉しているかチェックし、干渉してなければ非干渉
時間を計時する。そして、マージングが解除された凸包
の非干渉時間が設定値以上になっていれば、該凸包を復
元する。しかし、他の物体と干渉していたり、非干渉時
間が設定値以上でない場合には凸包を復元せず次のステ
ップを実行する。尚、凸包を構成する部分の相対位置関
係が動いて元の凸包データが失われている場合には凸包
の回復は行わない。ついで、凸包の全ての部分が静止し
ているかチェック(ステップ609)、静止していない
場合にはステップ603に戻り以降の処理を繰返し、静
止している場合にはマージング処理を実行して新たな凸
包を作成し(ステップ610)、以後ステップ603に
戻り以降の処理を繰り返す。
On the other hand, in step 604, if there is no interference, a recovery process is executed (step 60).
6). In the recovery process, it is checked whether or not the convex hull whose merging has been canceled exists. If there is, it is checked whether or not it interferes with another object. Then, if the non-interference time of the convex hull whose merging has been canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or the non-interference time is not longer than the set value, the next step is executed without restoring the convex hull. If the original convex hull data is lost due to a change in the relative positional relationship between the parts constituting the convex hull, the convex hull is not restored. Next, it is checked whether all parts of the convex hull are stationary (step 609). If not stationary, the process returns to step 603 and the subsequent processing is repeated. A convex hull is created (step 610), and the process returns to step 603 to repeat the subsequent processes.

【0078】(f) 非凸多面体間の最接近点探索装置の構
成 図22は非凸多面体間の最接近点探索装置の構成図であ
る。21は対象となる非凸多面体を特定するデータを入
力する入力部、22は入力された非凸多面体データを記
憶する記憶部、23は非凸多面体を複数の凸多面体に分
割し、各凸多面体毎に有向グラフ型構造データを作成す
る凸多面体分割/有向グラフ作成部、24は非凸多面体
の凸包を作成し、該凸包の有向グラフ型構造データを作
成する凸包作成/有向グラフ作成部、25は各凸多面体
の有向グラフ型構造データCVD及び凸包の有向グラフ
型構造データCHDを記憶する記憶部、26は状態監
視、干渉チェック、マージング、リカバリ処理を行うプ
ロセッサ、27はロボット制御装置から送られてくる静
動フラグms(i)や各物体の位置データを記憶するメモ
リ、28は凸包のマージングが解除されているか否かを
凸包毎に記憶するメモリである。
(F) Configuration of apparatus for searching for points of closest approach between non-convex polyhedrons FIG. 22 is a block diagram of an apparatus for searching for points of closest approach between non-convex polyhedrons. Reference numeral 21 denotes an input unit for inputting data for specifying a target non-convex polyhedron, reference numeral 22 denotes a storage unit for storing the input non-convex polyhedron data, and reference numeral 23 divides the non-convex polyhedron into a plurality of convex polyhedrons. A convex polyhedron division / directed graph creation unit for creating directed graph type structure data for each, a convex hull creation / directed graph creation unit for creating a convex hull of a non-convex polyhedron and creating directed graph type structure data of the convex hull, 25 A storage unit for storing the directional graph type structure data CVD of each convex polyhedron and the directional graph type structure data CHD of the convex hull, a processor 26 for performing state monitoring, interference check, merging and recovery processing, and a controller 27 sent from the robot controller A memory 28 stores the static motion flag ms (i) and the position data of each object. A memory 28 stores, for each convex hull, whether or not merging of the convex hull is canceled. That.

【0079】入力部21より対象となる非凸多面体を特
定するデータを入力してメモリ22に記憶する。凸多面
体分割/有向グラフ作成部23は非凸多面体を凸多面体
に分割し、各凸多面体の有向グラフ型構造データCVD
を作成してメモリ25に記憶する。又、凸包作成/有向
グラフ作成部24はマージング処理により凸包を生成す
ると共に、凸包の有向グラフ型構造データCHDを作成
してメモリ25に記憶する。
Data for specifying the target non-convex polyhedron is input from the input unit 21 and stored in the memory 22. The convex polyhedron division / directed graph creation unit 23 divides a non-convex polyhedron into convex polyhedrons, and generates a directed graph type structure data CVD of each convex polyhedron.
Is created and stored in the memory 25. In addition, the convex hull creation / directed graph creation unit 24 creates a convex hull by merging processing, creates directed graph type structure data CHD of the convex hull, and stores it in the memory 25.

【0080】以上の初期化処理が終了するとプロセッサ
26は凸包の有向グラフ型構造データを用いて前述の第
1の最接近点探索処理(干渉チェック)処理を実行す
る。尚、移動物体についてはロボット制御装置より入力
されている移動データに基づいて格子点位置を算出し、
該格子点位置に基づいて最接近点探索処理を行う。最接
近点探索処理により、凸包(バーチャリティ=”1”)
との干渉が検出されると、該凸包のマージングを解除
し、解除フラグFR=”1”をメモリ28に記憶する。
以後、プロセッサ26は解除フラグFRを参照して凸包
が回復したか調べ、回復しなければ、非凸多面体を構成
する個々の凸多面体の有向フラグ構造データを用いて最
接近点探索処理を実行する。又、プロセッサ26は、凸
包(バーチャリティ=”1”)と干渉していなければリ
カバリ処理を実行する。
When the above initialization processing is completed, the processor 26 executes the above-described first closest approach point search processing (interference check) processing using the directed graph type structural data of the convex hull. For a moving object, a grid point position is calculated based on movement data input from the robot control device,
The closest point search processing is performed based on the grid point position. Convex hull (virtuality = "1") by closest point search processing
When the interference with the hull is detected, the merging of the convex hull is released, and the release flag FR = "1" is stored in the memory 28.
Thereafter, the processor 26 checks whether or not the convex hull has been recovered by referring to the release flag FR. Execute. In addition, the processor 26 executes the recovery process if it does not interfere with the convex hull (virtuality = “1”).

【0081】リカバリ処理においては、解除フラグメモ
リ28を参照してマージングが解除された凸包が存在す
るか調べ、存在する場合には、他の物体と干渉している
かチェックし、干渉してなければ非干渉時間Tを計時す
る。そして、マージングが解除された凸包の非干渉時間
Tが設定値以上になっていれば、該凸包を復元する。す
なわち、解除フラグFRを0にする。しかし、他の物体
と干渉していたり、非干渉時間が設定値以上でない場合
には凸包を復元しない。ついで、ロボット制御装置から
入力されている静止フラグms(i)を参照して凸包の全
てが静止しているかチェック、静止していない場合には
上記干渉チェックを繰り返す。静止している場合、非凸
多面体を構成する凸多面体の相対的位置関係が変化して
いる場合にはマージング処理を実行して新たな凸包を作
成してメモリ25に記憶し、以後同様な処理を繰り返
す。
In the recovery processing, the release flag memory 28 is referenced to check whether or not a convex hull whose merging has been released exists. If there is, it is checked whether or not it interferes with another object. For example, the non-interference time T is measured. Then, if the non-interference time T of the convex hull from which merging has been canceled is equal to or longer than the set value, the convex hull is restored. That is, the release flag FR is set to 0. However, the convex hull is not restored when it interferes with another object or when the non-interference time is not longer than the set value. Then, referring to the stationary flag ms (i) input from the robot controller, it is checked whether all of the convex hulls are stationary, and if not, the above interference check is repeated. When stationary, when the relative positional relationship of the convex polyhedrons constituting the non-convex polyhedron is changing, a merging process is executed to create a new convex hull, store it in the memory 25, and thereafter, Repeat the process.

【0082】以上より、本発明の非凸多面体間の最接近
点探索方法によれば、凸包を作成し、凸包の有向グラフ
型構造データを作成し、該凸包の有向グラフ型構造デー
タに基づいて最接近点探索処理を行うようにしたから、
凸多面体の組み合わせ数を大幅に減らすことができる。
又、環境が動的に変化することによって凸包が崩壊した
場合には、その後、一定時間、他の物体との干渉が生じ
なければ元の凸包を回復し、凸多面体の数を最小に保持
でき、計算負荷を現象できる。
As described above, according to the method of searching for the closest point between non-convex polyhedrons according to the present invention, a convex hull is created, directed graph-type structure data of the convex hull is created, and based on the directed graph-type structure data of the convex hull. The closest approach point search process.
The number of combinations of convex polyhedrons can be greatly reduced.
Also, if the convex hull collapses due to the dynamic change of the environment, the original convex hull will be restored if there is no interference with other objects for a certain period of time, and the number of convex polyhedrons will be minimized. Can be maintained and the computational load can be reduced.

【0083】(D) 非凸多面体間の最接近点連続探索に
おける第1の方法 (a) 原理 複数の非凸多面体間の最接近点を連続的に追い掛ける
「最接近点の連続探索問題」において、各々の非凸多面
体に対してマージング処理を施し、形式上凸多面体間の
最接近点の連続問題にリダクションして解決する。この
とき、マージングにより求めた各凸多面体に対し、凸多
面体を構成する表面凸多角形に番号を付け、各々の凸多
角形の近傍に位置する格子点、辺、凸多角形を登録する
ための有向グラフ型構造データを作成し、最接近点探索
の計算負荷を表面多角形の格子点数の最大値のオーダO
(L)以下に抑える。マージングするに当たり、バーチ
ャリティという指標を導入する。バーチャリティとは、
マージングの過程で求まる凸多面体の表面多角形におい
て、元の非凸多面体の表面多角形と一致する場合にはバ
ーチャリティ=0,一致しない場合にはバーチャリティ
=1とする。
(D) First Method in Continuous Search for Nearest Points between Nonconvex Polyhedrons (a) Principle In the “continuous search for closest points”, which continuously tracks the closest points between a plurality of nonconvex polyhedrons The merging process is performed on each of the non-convex polyhedrons to reduce and solve the continuity problem of the points of closest approach between the formal convex polyhedrons. At this time, for each convex polyhedron obtained by merging, numbers are assigned to surface convex polygons constituting the convex polyhedron, and lattice points, sides, and convex polygons located near each convex polygon are registered. Create a directed graph type structure data and calculate the calculation load of the closest point search by the order O of the maximum value of the number of grid points of the surface polygon.
(L) Keep below. In merging, an index called virtuality is introduced. What is virtuality?
In the surface polygon of the convex polyhedron obtained in the process of merging, if the surface polygon of the original non-convex polyhedron matches, the virtuality is set to 0, and if not, the virtuality is set to 1.

【0084】バーチャリティ=1の凸多角形との干渉が
発生した場合には、マージングを解除し、元の非凸多面
体を構成する凸多面体間の組み合わせに対して凸多面体
における本発明の第1の最接近点探索方法を適用する。
マージングの解除に伴う規則は以下の通りとする。 1)バーチャリティ=1の多角形(凸包Aの成分)とバー
チャリティ=0の多角形(凸包Bの成分)が干渉したな
らば、バーチャリティ=1の多角形を有する凸包Aを解
除する。 2)バーチャリティ=1の多角形(凸包Aの成分)とバー
チャリティ=1の多角形(凸包Bの成分)が干渉したな
らば、凸包を凸多面体に分解した時の構成凸多面体数の
少ない方の凸包を解除する。 3) バーチャリティ=0の多角形同士が干渉した場合に
は、どちらの凸包も解除しない。
When interference with the convex polygon of virtuality = 1 occurs, merging is canceled and the first polyhedron of the present invention in the convex polyhedron is compared with the combination between the convex polyhedrons constituting the original non-convex polyhedron. The method of searching for the closest point is applied.
The rules for canceling merging are as follows. 1) If a polygon with virtuality = 1 (a component of convex hull A) and a polygon with virtuality = 0 (a component of convex hull B) interfere with each other, a convex hull A having a polygon with virtuality = 1 is generated. To release. 2) If the polygon with virtuality = 1 (the component of the convex hull A) and the polygon with the virtuality = 1 (the component of the convex hull B) interfere with each other, the constituent convex polyhedron when the convex hull is decomposed into a convex polyhedron Release the smaller number of convex hulls. 3) If the polygons with virtuality = 0 interfere with each other, neither convex hull is released.

【0085】図23に示すように、凸包Aと凸包Bが干
渉し((b)参照)、凸包Aが解除されて構成凸多面体の集
合DA(Decomposed A)が現われれば((c)参照)、以後、
集合DAと凸包B間で凸多面体における本発明の第1の
最接近点探索方法を適用する。この場合のアルゴリズム
は以下のようになる。 (b) 凸多面体集合と凸包間の最接近点探索アルゴリズム 1)凸包Aが解除された時の凸包Aの干渉面をPA(Virt
uality(PA)=1)とする。この時、干渉面PAの各辺は集
合DAの要素 Edge(DA,PA)とバーチャリティ=1の辺で
構成され、干渉面PAの格子点は集合DAの要素 Verte
x(DA,PA)で構成される。
As shown in FIG. 23, if the convex hull A and the convex hull B interfere with each other (see (b)), and the convex hull A is released and a set DA (Decomposed A) of constituent convex polyhedrons appears (( c)).
The first closest point search method of the present invention in the convex polyhedron between the set DA and the convex hull B is applied. The algorithm in this case is as follows. (b) Algorithm for searching for the point of closest approach between the convex polyhedron set and the convex hull 1) The interference surface of convex hull A when convex hull A is released is defined as PA (Virt
uality (PA) = 1). At this time, each side of the interference plane PA is composed of an element Edge (DA, PA) of the set DA and a side of virtuality = 1, and the lattice points of the interference plane PA are elements of the set DA
x (DA, PA).

【0086】2)構成凸多面体の集合DAと凸包B間の干
渉チェックは、 Edge(DA,PA)、 Vertex(DA,PA)と凸包B
間に凸多面体における本発明の第1の最接近点探索方法
を適用することにより行う。すなわち、 Edge(DA,PA)、
Vertex(DA,PA)を含むDAの表面凸多角形((c)の斜線
部参照)を、非凸多面体を構成する各凸多面体(A′、
A″)の有向グラフ型構造データより検索する。つい
で、それぞれより求めた表面多角形と凸包B間に並行し
て第1の最接近点探索方法を適用して干渉チェックを行
う((d)参照)。 3)バーチャリティ=1の凸多角形との干渉状態から抜け
出せば、リカバリ処理により解除した凸包を回復し、凸
包に対して最接近点探索処理を施す((e)参照)。2)の処
理により、最接近点探索の対象となる凸多面体A′、
A″の面数を少なくでき(凸多面体A′では1面、凸多
面体A″では2面)、最接近点探索処理の計算負荷を軽
減できる。
2) The interference check between the set DA of the constituent convex polyhedron and the convex hull B is performed by Edge (DA, PA), Vertex (DA, PA) and convex hull B
This is performed by applying the first closest approach point search method of the present invention in a convex polyhedron. That is, Edge (DA, PA),
The surface convex polygon of DA including Vertex (DA, PA) (see the shaded portion of (c)) is converted to each convex polyhedron (A ′,
A ″) is searched from the directed graph type structure data.Then, the interference check is performed by applying the first closest approach point search method in parallel between the surface polygon and the convex hull B obtained respectively ((d)). 3) If the state escapes from the state of interference with the convex polygon of virtuality = 1, the convex hull released by the recovery processing is recovered, and the closest approach point search processing is performed on the convex hull (see (e)). By the processing of 2), the convex polyhedron A ′ to be searched for the closest approach point
The number of planes of A ″ can be reduced (one plane for convex polyhedron A ′, two planes for convex polyhedron A ″), and the calculation load of the closest point search processing can be reduced.

【0087】(c) 最接近点連続探索処理のフロー 図24は非凸多面体間の最接近点連続探索処理の処理フ
ロー図である。対象となる非凸多面体を特定するデータ
を入力する(初期入力:環境モデル設定)。・・・ステ
ップ701 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiの有向グラフ型構造データを作成する。又、マージ
ング処理により凸包を生成すると共に、凸包の有向グラ
フ型構造データを作成する(ステップ702)。以上の
初期化処理が終了すると凸多面体における本発明の第1
の最接近点探索処理(干渉チェック)を実行する(ステ
ップ703)。ついで、干渉するかチェックし(ステッ
プ704)、干渉すればバーチャリティ=0の多角形同
士が干渉したかチェックし(ステップ705)、YES
であれば、どちらの凸包も解除せず処理を停止し、次の
指示を待つ。しかし、バーチャリティ=0の多角形同士
の干渉でなければ、バーチャリティ=1の多角形(凸包
Aの成分)とバーチャリティ=0の多角形(凸包Bの成
分)が干渉したかチェックする(ステップ706)。
(C) Flow of the closest approach point continuous search process FIG. 24 is a process flowchart of the closest approach point continuous search process between non-convex polyhedrons. Input data specifying the target non-convex polyhedron (initial input: environment model setting). Step 701 Next, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P
Create directed graph type structure data of Hi. In addition, a convex hull is generated by merging, and directed graph type structure data of the convex hull is generated (step 702). When the above initialization process is completed, the first polyhedron of the present invention in the convex polyhedron is completed.
(Step 703). Next, it is checked whether or not they interfere (step 704). If they do, it is checked whether or not polygons having virtuality = 0 have interfered (step 705), and YES
If so, the processing is stopped without releasing either of the convex hulls, and the next instruction is awaited. However, if there is no interference between polygons of virtuality = 0, it is checked whether the polygon of virtuality = 1 (component of convex hull A) and the polygon of virtuality = 0 (component of convex hull B) have interfered. (Step 706).

【0088】YESであればバーチャリティ=1の多角
形を有する凸包Aを解除する(ステップ707)。NO
であれば、換言すれば、バーチャリティ=1の多角形
(凸包Aの成分)とバーチャリティ=1の多角形(凸包
Bの成分)が干渉したならば、凸包を凸多面体に分解し
た時の構成凸多面体数の少ない方の凸包を求め(ステッ
プ708)、該凸包を解除する(ステップ707)。つ
いで、干渉面PAの Edge(DA,PA)、 Vertex(DA,PA)を含
む集合DAの表面凸多角形を各凸多面体の有向グラフ型
構造データより検索してプロセッサに渡す(ステップ7
09)。以後、プロセッサは求めた表面多角形と凸包B
間に並行して第1の最接近点探索方法を適用して干渉チ
ェックを行う(ステップ703)。
If YES, the convex hull A having the polygon of virtuality = 1 is released (step 707). NO
Then, in other words, if the polygon having the virtuality = 1 (the component of the convex hull A) and the polygon having the virtuality = 1 (the component of the convex hull B) interfere with each other, the convex hull is decomposed into a convex polyhedron. Then, the convex hull with the smaller number of constituent convex polyhedrons is obtained (step 708), and the convex hull is released (step 707). Then, a surface convex polygon of a set DA including Edge (DA, PA) and Vertex (DA, PA) of the interference plane PA is retrieved from the directed graph type structure data of each convex polyhedron and passed to the processor (step 7).
09). After that, the processor calculates the surface polygon and convex hull B
In parallel, an interference check is performed by applying the first closest approach point search method (step 703).

【0089】一方、ステップ704において、物体間が
干渉していなければリカバリ処理を実行する(ステップ
710)。リカバリ処理においては、マージングが解除
された凸包が存在するか調べ、存在する場合には、他の
物体と干渉しているかチェックし、干渉してなければ非
干渉時間を計時する。そして、マージングが解除された
凸包の非干渉時間が設定値以上になっていれば、該凸包
を復元する。しかし、他の物体と干渉していたり、非干
渉時間が設定値以上でない場合には凸包を復元せず次の
ステップを実行する。以後ステップ703に戻り以降の
処理を繰り返す。ついで、凸包の全ての部分が静止して
いるかチェック(ステップ711)、静止していない場
合にはステップ703に戻り以降の処理を繰返し、静止
している場合にはマージング処理を実行して新たな凸包
を作成し(ステップ712)、以後ステップ703に戻
り以降の処理を繰り返す。
On the other hand, if there is no interference between the objects in step 704, a recovery process is executed (step 710). In the recovery process, it is checked whether or not the convex hull whose merging has been canceled exists. If there is, it is checked whether or not it interferes with another object. Then, if the non-interference time of the convex hull whose merging has been canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or the non-interference time is not longer than the set value, the next step is executed without restoring the convex hull. Thereafter, the process returns to step 703 and the subsequent processes are repeated. Next, it is checked whether all parts of the convex hull are stationary (step 711). If not stationary, the process returns to step 703 and the subsequent steps are repeated. A convex hull is created (step 712), and the process returns to step 703 to repeat the subsequent processes.

【0090】(E) 非凸多面体間の最接近点連続探索に
おける第2の方法 (a) 原理 複数の非凸多面体間の最接近点を連続的に追い掛ける
「最接近点の連続探索問題」において、各々の非凸多面
体に対してマージング処理を施し、形式上凸多面体間の
最接近点の連続問題にリダクションして解決する。この
とき、本発明の第2の最接近点探索方法を適用する。す
なわち、マージングにより求めた各凸多面体に対し、凸
多面体を包む各表面凸多角形に三角形分割(Triangulat
ion)を施し、三角形分割した結果に対して有向グラフ型
のデータ構造を取り、最接近点探索の計算負荷を対象凸
多面体の複雑度に関係せずに一定に抑える。マージング
するに当たり、バーチャリティという指標を導入する。
バーチャリティとは、マージングの過程で求まる凸多面
体の表面多角形において、元の非凸多面体の表面多角形
と一致する場合にはバーチャリティ=0,一致しない場
合にはバーチャリティ=1とする。
(E) Second method for continuous search of the closest points between non-convex polyhedrons (a) Principle In the "continuous search for closest points", which continuously chase the closest points between a plurality of non-convex polyhedrons The merging process is performed on each of the non-convex polyhedrons to reduce and solve the continuity problem of the points of closest approach between the formal convex polyhedrons. At this time, the second closest approach point search method of the present invention is applied. That is, for each convex polyhedron obtained by merging, a triangulation (Triangulat
ion) and take a directed graph type data structure for the result of the triangulation, and keep the calculation load of the search for the closest approach point constant irrespective of the complexity of the target convex polyhedron. In merging, an index called virtuality is introduced.
In the surface polygon of the convex polyhedron obtained in the merging process, the virtuality is set to virtuality = 0 when the surface polygon matches the surface polygon of the original non-convex polyhedron, and virtuality = 1 when the surface polygon does not match.

【0091】バーチャリティ=1の三角形ポリゴンとの
干渉が発生した場合には、マージングを解除し(凸包の
解除)、元の非凸多面体を構成する凸多面体間の組み合
わせに対して本発明の第2の最接近点探索方法を適用す
る。マージングの解除に伴う規則は以下の通りとする。 1)バーチャリティ=1の三角形ポリゴン(凸包Aの成
分)とバーチャリティ=0の三角形ポリゴン(凸包Bの
成分)が干渉したならば、バーチャリティ=1の三角形
ポリゴンを有する凸包Aを解除する。 2)バーチャリティ=1の三角形ポリゴン(凸包Aの成
分)とバーチャリティ=1の三角形ポリゴン(凸包Bの
成分)が干渉したならば、凸包を凸多面体に分解した時
の構成凸多面体数の少ない方の凸包を解除する。 3)バーチャリティ=0の三角形ポリゴン同士が干渉した
場合には、どちらの凸包も解除しない。
When interference with a triangular polygon with virtuality = 1 occurs, merging is canceled (release of the convex hull), and the present invention is applied to the combination between the convex polyhedrons constituting the original non-convex polyhedron. The second closest point search method is applied. The rules for canceling merging are as follows. 1) If a triangular polygon with virtuality = 1 (a component of convex hull A) and a triangular polygon with virtuality = 0 (a component of convex hull B) interfere with each other, a convex hull A having a triangular polygon with virtuality = 1 is generated. To release. 2) If the triangular polygon with virtuality = 1 (component of convex hull A) and the triangular polygon with virtuality = 1 (component of convex hull B) interfere, the convex polyhedron when the convex hull is decomposed into a convex polyhedron Release the smaller number of convex hulls. 3) If the triangular polygons with virtuality = 0 interfere with each other, neither convex hull is released.

【0092】図25に示すように、凸包Aと凸包Bが干
渉し((b)参照)、凸包Aが解除されて構成凸多面体の集
合DA(Decomposed A)が現われれば((c)参照)、以後、
集合DAと凸包B間で凸多面体における本発明の第2の
最接近点探索方法を適用する。この場合のアルゴリズム
は以下のようになる。 1)凸包Aが解除された時の凸包Aの干渉三角形ポリゴン
をTA(Virtuality(TA)=1)とする。この時、干渉三角
形ポリゴンTAの各辺は集合DAの要素 Edge(DA,PA)と
バーチャリティ=1の辺で構成され、干渉三角形ポリゴ
ンTAの格子点は集合DAの要素 Vertex(DA,PA)で構成
される。
As shown in FIG. 25, if the convex hull A and the convex hull B interfere with each other (see (b)) and the convex hull A is released and a set DA (Decomposed A) of constituent convex polyhedrons appears (( c)).
The second closest point search method of the present invention in the convex polyhedron between the set DA and the convex hull B is applied. The algorithm in this case is as follows. 1) The interference triangle polygon of the convex hull A when the convex hull A is released is set to TA (Virtuality (TA) = 1). At this time, each side of the interference triangular polygon TA is composed of the element Edge (DA, PA) of the set DA and the side of virtuality = 1, and the lattice point of the interference triangular polygon TA is the element Vertex (DA, PA) of the set DA. It is composed of

【0093】2)構成凸多面体の集合DAと凸包B間の干
渉チェックは、 Edge(DA,PA)、 Vertex(DA,PA)と凸包B
間に凸多面体における本発明の第2の最接近点探索方法
を適用することにより行う。すなわち、 Edge(DA,PA)、
Vertex(DA,PA)を含むDAの三角形ポリゴン((c)の斜
線部参照)を、非凸多面体を構成する各凸多面体
(A′、A″)の有向グラフ構造データより検索する。
ついで、それぞれより求めた三角形ポリゴンと凸包B間
に並行して第2の最接近点探索方法を適用して干渉チェ
ックを行う((d)参照)。 3)バーチャリティ=1の三角形ポリゴンとの干渉状態か
ら抜け出せば、リカバリ処理により解除した凸包を回復
し、凸包に対して最接近点探索処理を施す((e))。2)の
処理により、最接近点探索の対象となる凸多面体A′、
A″の三角形ポリゴン数を少なくでき(凸多面体A′、
A″でそれぞれ2個)、最接近点探索処理の計算負荷を
軽減できる。
2) The interference check between the set DA of the constituent convex polyhedron and the convex hull B is performed by Edge (DA, PA), Vertex (DA, PA) and convex hull B
This is performed by applying the second closest point search method of the present invention in a convex polyhedron. That is, Edge (DA, PA),
A triangular polygon of DA including Vertex (DA, PA) (see the hatched portion in (c)) is searched from the directed graph structure data of each convex polyhedron (A ′, A ″) constituting the non-convex polyhedron.
Next, an interference check is performed by applying the second closest approach point search method in parallel between the triangular polygon and the convex hull B obtained respectively (see (d)). 3) If the state escapes from the interference state with the triangular polygon of virtuality = 1, the convex hull released by the recovery processing is recovered, and the closest hull search processing is performed on the convex hull ((e)). By the processing of 2), the convex polyhedron A ′ to be searched for the closest approach point,
A ″ can reduce the number of triangular polygons (convex polyhedron A ′,
A ″, two each) can reduce the calculation load of the closest point search processing.

【0094】(b) 非凸多面体間の最接近点連続探索処理 図26は非凸多面体間の第2の最接近点連続探索処理の
フロー図である。対象となる非凸多面体を特定するデー
タを入力する(初期入力:環境モデル設定)。・・・ス
テップ801 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiに対して三角形分割を行い、しかる後、各凸多面体
の有向グラフ型構造データを作成する。又、マージング
処理により凸包を生成すると共に、凸包の有向グラフ型
構造データを作成する(ステップ802)。
(B) Process for continuously searching for points of closest approach between non-convex polyhedrons FIG. 26 is a flowchart of a process for continuously searching for points of closest approach between non-convex polyhedrons. Input data specifying the target non-convex polyhedron (initial input: environment model setting). Step 801 Next, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P
Triangulation is performed on Hi, and thereafter, directed graph type structure data of each convex polyhedron is created. In addition, a convex hull is generated by merging, and directed graph type structure data of the convex hull is generated (step 802).

【0095】以上の初期化処理が終了すると非凸多面体
間の第2の最接近点探索処理(干渉チェック)を実行す
る(ステップ803)。干渉するかチェックし(ステッ
プ804)、干渉すればバーチャリティ=0の三角形ポ
リゴン同士が干渉したかチェックし(ステップ80
5)、YESであれば、どちらの凸包も解除せず処理を
停止し、次の指示を待つ。しかし、バーチャリティ=0
の三角形ポリゴン同士の干渉でなければ、バーチャリテ
ィ=1の三角形ポリゴン(凸包Aの成分)とバーチャリ
ティ=0の三角形ポリゴン(凸包Bの成分)が干渉した
かチェックする(ステップ806)。YESであればバ
ーチャリティ=1の三角形ポリゴンを有する凸包Aを解
除する(ステップ807)。NOであれば、換言すれ
ば、バーチャリティ=1の三角形ポリゴン(凸包Aの成
分)とバーチャリティ=1の三角形ポリゴン(凸包Bの
成分)が干渉したならば、凸包を凸多面体に分解した時
の構成凸多面体数の少ない方の凸包を求め(ステップ8
08)、該凸包を解除する(ステップ807)。
When the above initialization processing is completed, a second closest point search processing (interference check) between the non-convex polyhedrons is executed (step 803). It is checked whether or not they interfere (step 804). If they do, it is checked whether or not triangular polygons with virtuality = 0 have interfered with each other (step 80).
5) If YES, stop processing without releasing either convex hull and wait for the next instruction. However, virtuality = 0
If the triangle polygons do not interfere with each other, it is checked whether or not the triangular polygon with the virtuality = 1 (the component of the convex hull A) and the triangular polygon with the virtuality = 0 (the component of the convex hull B) have interfered (step 806). If YES, the convex hull A having the triangular polygon with virtuality = 1 is released (step 807). If NO, in other words, if the triangular polygon with virtuality = 1 (component of convex hull A) and the triangular polygon with virtuality = 1 (component of convex hull B) interfere, the convex hull is converted into a convex polyhedron. Find the convex hull with the smaller number of constituent polyhedrons when decomposed (step 8)
08), the convex hull is released (step 807).

【0096】ついで、干渉三角形ポリゴンTAの Edge
(DA,PA)、 Vertex(DA,PA)を含む集合DAの三角形ポリ
ゴンを各凸多面体の有向グラフ構造データより検索して
プロセッサに渡す(ステップ809)。以後、プロセッ
サは求めた三角形ポリゴンと凸包B間に並行して第2の
最接近点探索方法を適用して干渉チェックを行う(ステ
ップ803)。一方、ステップ804において、物体間
が干渉していなければリカバリ処理を実行する(ステッ
プ810)。
Next, the edge of the interference triangle polygon TA
Triangular polygons of a set DA including (DA, PA) and Vertex (DA, PA) are retrieved from the directed graph structure data of each convex polyhedron and passed to the processor (step 809). After that, the processor performs an interference check by applying the second closest approach point search method in parallel between the obtained triangular polygon and the convex hull B (step 803). On the other hand, if there is no interference between the objects in step 804, a recovery process is executed (step 810).

【0097】リカバリ処理においては、マージングが解
除された凸包が存在するか調べ、存在する場合には、他
の物体と干渉しているかチェックし、干渉してなければ
非干渉時間を計時する。そして、マージングが解除され
た凸包の非干渉時間が設定値以上になっていれば、該凸
包を復元する。しかし、他の物体と干渉していたり、非
干渉時間が設定値以上でない場合には凸包を復元せず次
のステップを実行する。 ついで、凸包の全ての部分が
静止しているかチェック(ステップ811)、静止して
いない場合にはステップ803に戻り以降の処理を繰返
し、静止している場合にはマージング処理を実行して新
たな凸包を作成し(ステップ812)、以後ステップ8
03に戻り以降の処理を繰り返す。
In the recovery process, it is checked whether or not a convex hull whose merging has been canceled exists. If there is, it is checked whether or not it interferes with another object. If not, the non-interference time is measured. Then, if the non-interference time of the convex hull whose merging has been canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or the non-interference time is not longer than the set value, the next step is executed without restoring the convex hull. Next, it is checked whether all parts of the convex hull are stationary (step 811). If not stationary, the process returns to step 803 and the subsequent processing is repeated. Create a convex hull (step 812),
03 and the subsequent processing is repeated.

【0098】(F)非凸多面体の凸多面体への第1の分
解処理(前処理) (a) システムの構成 非凸多面体間の最接近点探索を実行するためには非凸多
面体を凸多面体に分解する必要がある。図27はグラフ
ィックワークステーション上の形状モデルに最接近点探
索の前処理を施す場合におけるシステム構成図であり、
GWSはグラフィックワークステーション、CPUは最
接近点探索の前処理や最接近点探索処理、その他の処理
を実行するプロセッサ、MEMはメモリであり、図示し
ない三次元CADシステムで設計された形状データFD
Tや最接近点探索の前処理プログラムICP等を記憶す
るもの、DPLは表示部、OPSはキーボード、マウス
等の操作部、OPRはオペレータである。オペレータO
PRは、操作部OPSを使ってプロセッサCPUに対し
グラフィックワークステーションGWS上の形状モデル
に対して前処理を実行するように指令を入力する。前処
理指令が入力されると、プロセッサCPUはメモリME
Mに記憶されている最接近点探索の前処理プログラムI
CPに基づいて非凸多面体の形状データFDTを用いて
前処理(非凸多面体のポリゴン集合の分割処理)を実行
する。そして、分割結果をメモリMEMに記憶すると共
に、前処理結果を表示部DPLを通してオペレータに提
示する。
(F) First Decomposition Process of Nonconvex Polyhedron into Convex Polyhedron (Preprocessing) (a) System Configuration To execute the search for the closest point between the nonconvex polyhedrons, the nonconvex polyhedron is converted into a convex polyhedron. Need to be disassembled. FIG. 27 is a system configuration diagram in a case where preprocessing for searching for the closest approach point is performed on the shape model on the graphic workstation.
GWS is a graphic workstation, CPU is a processor that executes pre-processing for searching for the closest approach point, processing for searching for the closest approach point, and other processing. MEM is a memory, and the shape data FD designed by a three-dimensional CAD system (not shown).
TPL, a preprocessing program ICP for searching for the closest approach point, and the like, DPL is a display unit, OPS is an operation unit such as a keyboard and a mouse, and OPR is an operator. Operator O
The PR uses the operation unit OPS to input a command to the processor CPU to execute preprocessing on the shape model on the graphic workstation GWS. When the preprocessing command is input, the processor CPU
Preprocessing program I for searching for the closest approach point stored in M
Based on the CP, preprocessing (division processing of a polygon set of the non-convex polyhedron) is performed using the non-convex polyhedron shape data FDT. Then, the division result is stored in the memory MEM, and the preprocessing result is presented to the operator through the display unit DPL.

【0099】(b) 最接近点探索の前処理の概略 図28は本発明の最接近点探索の前処理の概略的な処理
フローである。三次元CADシステムは形状モデル(非
凸多面体)を作成してグラフィックワークステップGW
Sに入力する(ステップ1001、1002)。CAD
システムは物体(非凸多面体)をポリゴンで覆った場合
における全ポリゴンデータを入力する。ポリゴンデータ
は、ポリゴンの各頂点の座標値とその点における光の反
射方向を示す情報を有している。最も一般的なポリゴン
データは、図28に示すように三角形ポリゴンの張り合
わせで表現されるものである。図28に示す三角形ポリ
ゴンのデータの場合、normal に続く3つの実数が光の
反射方向を示し、vertex に続く3つの実数が頂点座標
値を表している。三次元CADシステム内の形状モデル
からポリゴンデータを出力する手順は通常、三次元CA
Dシステム内に用意されている。ついで、分割統治法に
よる凸分解基本アルゴリズムに従って、上記ポリゴンデ
ータを凸要素毎に分割されたポリゴンデータの組(ポリ
ゴン部分集合)に分ける。すなわち、初期のポリゴンデ
ータ(非凸多面体のポリゴン集合)を凸要素毎の部分集
合の組に分割して出力する(ステップ1003,100
4)。しかる後、各部分集合毎に凸多面体を生成する。
尚、ポリゴンの各形状は一般的に任意であるが、各ポリ
ゴンは凸性を満たしているものとする。
(B) Outline of Preprocessing for Searching for Nearest Point FIG. 28 is a schematic processing flow of preprocessing for searching for the closest point according to the present invention. The 3D CAD system creates a shape model (non-convex polyhedron) and creates a graphic work step GW
Input to S (steps 1001 and 1002). CAD
The system inputs all polygon data when the object (non-convex polyhedron) is covered with polygons. 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 common polygon data is represented by a combination of triangular polygons as shown in FIG. In the case of the triangular polygon data shown in FIG. 28, three real numbers following normal indicate the light reflection direction, and three real numbers following vertex indicate the vertex coordinate values. The procedure for outputting polygon data from a shape model in a three-dimensional CAD system is usually a three-dimensional CA
It is provided in the D system. Next, the polygon data is divided into sets of polygon data (polygon subsets) divided for each convex element according to a basic algorithm for convex decomposition based on the division and conquer method. That is, initial polygon data (polygon set of non-convex polyhedron) is divided into sets of subsets for each convex element and output (steps 1003 and 100).
4). Thereafter, a convex polyhedron is generated for each subset.
Although each shape of the polygon is generally arbitrary, it is assumed that each polygon satisfies convexity.

【0100】(c) 分割統治法による凸分解基本アルゴリ
ズム 図29は分割統治法による凸分解基本アルゴリズムのフ
ロー図である。初期ポリゴン集合(非凸多面体のポリゴ
ン集合)Pを入力し(ステップ1101)、ついで、初
期ポリゴン集合Pに対して分割統治法による処理を施す
(ステップ1102)。すなわち、初期ポリゴン集合P
を第1、第2の2つのグループに分割し、各グループに
おいて隣接ポリゴンとの関係が凸であるポリゴン部分集
合を求める。ついで、共通の境界稜線を有する第1グル
ープのポリゴン部分集合と第2グループのポリゴン部分
集合とが凸関係にあるものを併合して凸要素毎の複数の
新たなポリゴン部分集合DP1,DP2,・・・を求め
る。しかる後、ポリゴン部分集合DP1,DP2,・・
・を出力する(ステップ1103)。
(C) Basic Algorithm for Convex Decomposition by Divide and Conquer FIG. 29 is a flowchart of a basic algorithm for convex decomposition by divide and conquer. An initial polygon set (polygon set of a non-convex polyhedron) P is input (step 1101), and the initial polygon set P is subjected to processing by the divide and conquer method (step 1102). That is, the initial polygon set P
Is divided into first and second groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Next, a polygonal subset of the first group and a polygonal subset of the second group having a common boundary ridge are merged in a convex relationship to form a plurality of new polygon subsets DP1, DP2,.・ ・Then, the polygon subsets DP1, DP2,.
Is output (step 1103).

【0101】以下は、分割統治法の詳細のプログラム例
である。 定義 P={p1,p2,p3,・・・}:初期ポリゴン集合 DC(P)={DP1=[1p1,1p2,1p3,・・・],DP2=[2p1,2p2,2p3,・・・] ,・・・} :Pの分割ポリゴン集合 NoP:Pの要素数 Algorithm(分割統治法) if(入力ポリゴン数が1、i.e.,NoP=1)then DC(P)=P else DIVIDE: k=[Pの要素数/2] PL={p1,p2,p3,・・・,pk}:k以下のポリゴン集 合 PH={pk+1,pk+2,pk+3,・・・,pNoP}: kより大きい ポリゴン集合 RECUR: Costruct DC(PL) and DC(PH) recursively. MERGE: Merge DC(PL) and DC(PH) DC(P)=Merge (DC(PL),DC(PH)) endif 上記アルゴリズムから判るとおり、分割統治法では、分
割と統治の過程が再起的に繰り返される。分割統治法に
おいて問題依存性が存在する最も重要な個所は、「併
合」過程、すなわち、関数Mergeの構成方法である。
The following is a detailed program example of the divide and conquer method. Definition P = {p1, p2, p3,...}: Initial polygon set DC (P) = {DP1 = [1p1, 1p2, 1p3,...]], DP2 = [2p1, 2p2, 2p3,. ],... :: P divided polygon set NoP: Number of elements of P Algorithm (divided and conquer method) if (number of input polygons is 1, ie, NoP = 1) then DC (P) = P else DIVIDE: k = [Number of elements of P / 2] PL = {p1, p2, p3,..., Pk}: Polygon set equal to or less than k PH = {pk + 1, pk + 2, pk + 3,. Set RECUR: Costruct DC (PL) and DC (PH) recursively. MERGE: Merge DC (PL) and DC (PH) DC (P) = Merge (DC (PL), DC (PH)) endif As seen from the above algorithm In the divide and conquer law, the process of divide and govern is repeated recursively. The most important place where problem dependence exists in the divide-and-conquer method is the "merging" process, that is, the method of constructing the function Merge.

【0102】(d) 分割統治法におけるMergeプロセス 図30は分割統治法におけるMergeプロセスの流れ図で
ある。 1) 凸要素集合DC(PL),DC(PH)を用意する
(ステップ1111a,1111b)。凸要素集合DC
(PL),DC(PH)の各要素は、図30のCLi,
CHjで示されるようにその要素を構成するポリゴンの
集合(polygons)とその要素の境界をなす境界稜線の集
合(boundary edges)で構成される。 2) Merge 可能性の判定 凸要素CLi,CHjが互いにMerge可能か否かを判定
する(ステップ1112)。判定条件は以下の通りであ
る。 条件1:凸要素CLi,CHjで共有している境界稜線
を全て取り出す。共有しているか否かは、境界稜線を構
成するポリゴン辺の中点を比較することにより判定でき
る。共有している境界稜線が1本もなければMerge不可
能と判定する。 条件2:共有している境界稜線に対し、その稜線を共有
するCLiのポリゴンとCHjのポリゴン間の凹凸関係
を調べる。1組でも凹の関係にあるポリゴンの組合せが
存在すれば、Merge不可能と判定する。 条件3:条件1、条件2をクリアした場合、すなわち、
境界稜線を共有するポリゴンの全組合せにおいてポリゴ
ン間が凸の関係にある時はMerege可能と判定する。
(D) Merge process in the divide-and-conquer method FIG. 30 is a flowchart of the Merge process in the divide-and-conquer method. 1) Prepare convex element set DC (PL), DC (PH)
(Steps 1111a and 1111b). Convex element set DC
(PL) and DC (PH) are represented by CLi,
As shown by CHj, it is composed of a set of polygons (polygons) constituting the element and a set of boundary edges (boundary edges) forming the boundary of the element. 2) Judgment of Merge Possibility It is judged whether or not the convex elements CLi and CHj can be merged with each other (step 1112). The judgment conditions are as follows. Condition 1: All boundary edges shared by the convex elements CLi and CHj are extracted. Whether or not they are shared can be determined by comparing the midpoints of the polygon sides constituting the boundary ridge line. If there is no shared border ridge, it is determined that merging is not possible. Condition 2: With respect to the shared boundary ridge line, the unevenness relationship between the CLi polygon and the CHj polygon sharing the ridge line is examined. If there is at least one combination of polygons having a concave relationship, it is determined that merging is impossible. Condition 3: When conditions 1 and 2 are cleared, that is,
If the polygons have a convex relationship in all combinations of polygons sharing the boundary ridge line, it is determined that Merge is possible.

【0103】3) Mergeの順序 凸要素のMergeは以下の順序で行なう。 3-1) 凸要素CL1がCHj(j=1,2,・・・NPH)とMerge可能
か否かを判定する。もし、CL1がCHjとMerge可能
であれば、それ以降は、CL1,DC(PH)を以下の
ようにする。 CL1∪CHj→CL1 DC(PH)={CH1,CH2,・・・CHj−1,C
Hj+1・・・} 3-2) CLi(i=2,3,・・・NPL)に対して同様の手順を実行す
る。 4) 併合凸要素集合DC(P)の構成 上記3)のプロセスにより 併合凸要素集合DC(P)=Merge (DC(PL),D
C(PH)) が実行され、 DC(P)={CL1,CL2,・・・CLPNPL,C
Hj′,CHj″・・・} で与えられる併合凸要素集合DC(P)が出力される
(ステップ1113)。ここで、{CHj′,CHj″・・・}
は、いかなるCLiともMergeしないDC(PH)の凸要
素である。
3) Merge Order Merge of convex elements is performed in the following order. 3-1) It is determined whether or not the convex element CL1 can be merged with CHj (j = 1, 2,..., NPH). If CL1 can be merged with CHj, thereafter, CL1, DC (PH) is set as follows. CL1∪CHj → CL1 DC (PH) = {CH1, CH2,... CHj-1, C
Hj + 1...} 3-2) The same procedure is executed for CLi (i = 2, 3,..., NPL). 4) Configuration of merged convex element set DC (P) By the process of 3) above, merged convex element set DC (P) = Merge (DC (PL), D
C (PH)) is executed, and DC (P) = {CL1, CL2,... CLPNPL, C
A merged convex element set DC (P) given by Hj ′, CHj ″... Is output (step 1113), where {CHj ′, CHj ″.
Is a DC (PH) convex element that does not merge with any CLi.

【0104】(e) ポリゴン間の凹凸関係の判定 図31はポリゴン間の凹凸関係判定処理の説明図であ
る。図31(a)に示すように1本の境界稜線BEGを共有
する2枚のポリゴンA,Bを想定する。ポリゴンの相対
的位置関係は、互いに離れているか、図31(a)のよう
に稜線を介して接しているかのどちらかであって、それ
以外の関係(例えば、稜線以外の部分で交わっている等)
はないものとする。図31(a)において、ベクトルb,
cは、それぞれポリゴンB,ポリゴンAの重心p,qか
ら境界稜線x1−x0=aに降ろした垂線ベクトルであ
る。又、ベクトルa,b,cを単位化したものをそれぞ
れe0,e1,e2とする。nA,nBは、それぞれポ
リゴンA、ポリゴンBの外向き法線ベクトル(ポリゴン
を定義する各格子点における光の反射方向の平均とす
る)を表す。この時、b,c,e0,e1,e2は次式
で与えられる。
(E) Judgment of Unevenness Relationship between Polygons FIG. 31 is an explanatory diagram of the unevenness relationship determination processing between polygons. As shown in FIG. 31A, two polygons A and B sharing one boundary ridge BEG are assumed. The relative positional relationship between the polygons is either apart from each other or is in contact with each other via an edge as shown in FIG. etc)
Shall not exist. In FIG. 31 (a), vectors b,
c is a perpendicular vector dropped from the center of gravity p, q of polygon B and polygon A to boundary ridge line x1-x0 = a, respectively. Also, the vectors a, b, and c are unitized as e0, e1, and e2, respectively. nA and nB represent the outward normal vectors of polygon A and polygon B, respectively (the average of the light reflection directions at each grid point defining the polygon). At this time, b, c, e0, e1, and e2 are given by the following equations.

【0105】b=p-x0-(x1-x0)・(p-x0)(x1-x0)/|
x1-x0|2 ・はベクトル内積である =p-x0-e0・(p-x0)e0 c=q-x0-e0・(q-x0)e0 e0=a/|a| e1=b/|b| e2=c/|c| ポリゴンA、ポリゴンBの凹凸関係を判定するため、図
6(b)のようにベクトルbがX0軸と一致するように座
標変換を行なう。この時の変換行列は次式
B = p−x0− (x1−x0) · (p−x0) (x1−x0) / |
x1-x0 | 2 is a vector dot product = p-x0-e0. (p-x0) e0 c = q-x0-e0. (q-x0) e0 e0 = a / | a | e1 = b / | b | e2 = c / | c | In order to determine the unevenness relationship between the polygons A and B, coordinate transformation is performed so that the vector b coincides with the X0 axis as shown in FIG. The transformation matrix at this time is

【数1】 で与えられる。(Equation 1) Given by

【0106】法線ベクトルnBの向きにより、次の2通
りの条件のどちらかを満たせば、ポリゴンA,ポリゴン
Bは凸の関係にあるといえる。すなわち、 1) (e0×e1)・nB>0の場合 [T・c]Z<0 であり、かつ、(e1×e2)・nA>0を満たす時、 2) (e0×e1)・nB≦0の場合 [T・c]Z≧0 であり、かつ、(e1×e2)・nA≦0を満たす時、ポ
リゴンA,ポリゴンBは凸の関係にあるといえる。実際
のCADデータを扱う場合には、誤差を考慮して判定条
件は以下のようになる。
If one of the following two conditions is satisfied depending on the direction of the normal vector nB, it can be said that the polygon A and the polygon B have a convex relationship. That is, 1) When (e0 × e1) · nB> 0 When [T · c] Z <0 and (e1 × e2) · nA> 0, 2) (e0 × e1) · nB In the case of ≦ 0 When [T · c] Z ≧ 0 and (e1 × e2) · nA ≦ 0, it can be said that polygon A and polygon B have a convex relationship. When dealing with actual CAD data, determination conditions are as follows in consideration of errors.

【0107】1) (e0×e1)・nB>0の場合 [T・c]Z<ε であり、かつ、(e1×e2)・nA>−εを満たす時、 2) (e0×e1)・nB≦0の場合 [T・c]Z≧−ε であり、かつ、(e1×e2)・nA≦εを満たす時、ポ
リゴンA,ポリゴンBは凸の関係にある。ここで、εは
扱う対象によって決める微少量である。分割統治法で得
られるポリゴン部分集合の集合DC(P)の各要素は、
実は凸とは限らない。図31に示した凹凸判定条件は、
局所的条件である。しかしながら、図31に示した条件
のもとに初期のポリゴン集合を分割すると、多くの場合
において非常によい凸性を示す。
1) When (e0 × e1) · nB> 0 When [T · c] Z <ε and (e1 × e2) · nA> −ε, 2) (e0 × e1) When nB ≦ 0 [T · c] Z ≧ −ε and (e1 × e2) · nA ≦ ε, the polygon A and the polygon B are in a convex relationship. Here, ε is a very small amount determined depending on the object to be handled. Each element of the set DC (P) of polygon subsets obtained by the divide-and-conquer method is
In fact, it is not always convex. The unevenness determination condition shown in FIG.
Local conditions. However, when the initial polygon set is divided under the conditions shown in FIG. 31, very good convexity is exhibited in many cases.

【0108】(G)凸多面体への分解処理の第2実施例
(前処理) 分割統治法による基本アルゴリズムによって凸分解を行
なう場合、分解したあとの凸要素数は最少とは限らな
い。第2実施例では、凸分解基本アルゴリズムを繰り返
して使用することにより、凸要素数を最適化する(でき
るだけ少なくする)ものである。第2実施例の最適化法
は厳密な意味で凸要素数を最小化する分けではなく、あ
くまでも限られた時間内で、できるだけ要素数を減らす
手法である。図32は第2実施例(最適化法)の処理の
流れ図である。三次元CADシステム等から初期ポリゴ
ン集合(非凸多面体のポリゴン集合)Pを入力し(ステ
ップ1201)、ついで、初期ポリゴン集合Pに対して
分割統治法による凸分解基本アルゴリズムを適用する
(ステップ1202)。すなわち、初期ポリゴン集合P
を第1、第2の2つのグループに分割し、各グループに
おいて隣接ポリゴンとの関係が凸であるポリゴン部分集
合を求める。ついで、共通の境界稜線を有する第1グル
ープのポリゴン部分集合と第2グループのポリゴン部分
集合とが凸関係にあるものを併合して凸要素毎の複数の
新たなポリゴン部分集合DP1,DP2,・・・を求め
る。
(G) Second Embodiment of Decomposition into Convex Polyhedron (Preprocessing) When performing convex decomposition by a basic algorithm based on the divide-and-conquer method, the number of convex elements after decomposition is not always the minimum. In the second embodiment, the number of convex elements is optimized (reduced as much as possible) by repeatedly using the basic algorithm of convex decomposition. The optimization method of the second embodiment is not a method of strictly minimizing the number of convex elements, but a method of reducing the number of elements as much as possible within a limited time. FIG. 32 is a flowchart of the process of the second embodiment (optimization method). An initial polygon set (polygon set of non-convex polyhedron) P is input from a three-dimensional CAD system or the like (step 1201), and then a basic algorithm for convex decomposition based on the divide and conquer method is applied to the initial polygon set P (step 1202). . That is, the initial polygon set P
Is divided into first and second groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Next, a polygonal subset of the first group and a polygonal subset of the second group having a common boundary ridge are merged in a convex relationship to form a plurality of new polygon subsets DP1, DP2,.・ ・

【0109】しかる後、ポリゴン部分集合DP1,DP
2,・・・を要素とする凸要素集合DC(P)を出力す
る(ステップ1203)。尚、凸要素数はNDC(P)
である。ついで、凸要素集合DC(P)に再度分割統治
法による凸分解基本アルゴリズムを適用する(ステップ
1204)。すなわち、凸要素集合DC(P)を構成す
る複数のポリゴン部分集合を第1、第2のグループに分
割し、各グループにおいて隣接ポリゴンとの関係が凸で
あるポリゴンの部分集合を求め、共通の境界稜線を有す
る第1グループのポリゴン部分集合と第2グループのポ
リゴン部分集合とが凸関係にあるものを併合して複数の
新たなポリゴン部分集合DDP1,DDP2,・・・を
求める。しかる後、ポリゴン部分集合DDP1,DDP
2,・・・を要素とする凸要素集合DC(DC(P))
を出力する(ステップ1205)。尚、凸要素数はND
DC(P)である。
Thereafter, the polygon subsets DP1, DP
A convex element set DC (P) having 2,... As elements is output (step 1203). The number of convex elements is NDC (P)
It is. Next, the convex decomposition basic algorithm based on the divide-and-conquer method is applied to the convex element set DC (P) again (step 1204). That is, a plurality of polygon subsets constituting the convex element set DC (P) are divided into first and second groups, and a subset of polygons having a convex relationship with adjacent polygons in each group is obtained. A plurality of new polygon subsets DDP1, DDP2,... Are obtained by merging polygon subsets of the first group having boundary edges and polygon subsets of the second group in a convex relationship. Then, the polygon subsets DDP1, DDP
Convex element set DC (DC (P)) having 2,.
Is output (step 1205). The number of convex elements is ND
DC (P).

【0110】ついで、前回に求めたポリゴン部分集合の
数NDC(P)と今回求めたポリゴン部分集合の数ND
DC(P)を比較し(ステップ1206)、一致すれ
ば、凸要素集合DC(DC(P))を最終的に出力する
(ステップ1207)。そして、この凸要素集合DC
(DC(P))を構成するポリゴン部分集合を用いて凸
多面体を生成することになる一方、NDDC(P)とN
DC(P)が等しくない場合には(例えば、NDDC
(P)<NDC(P))、DC(DC(P))→DC
(P)とし(ステップ1208)、以後、ステップ12
04以降の処理を繰り返す。すなわち、新たに求めた複
数のポリゴン部分集合DC(DC(P))に対して分割
統治法による凸分解処理を繰返し施す。最適化法では、
凸要素数がこれ以上減らなくなるまで凸分解基本アルゴ
リズムを出力DC(P)に対して繰返し作用させる。
Next, the number of polygon subsets NDC (P) obtained previously and the number ND of polygon subsets obtained this time are calculated.
DC (P) is compared (step 1206), and if they match, a convex element set DC (DC (P)) is finally output (step 1207). And this convex element set DC
While a convex polyhedron is generated using a polygon subset constituting (DC (P)), NDDC (P) and N
If DC (P) is not equal (eg, NDDC
(P) <NDC (P)), DC (DC (P)) → DC
(P) (step 1208).
The process after 04 is repeated. That is, a plurality of newly obtained polygon subsets DC (DC (P)) are repeatedly subjected to convex decomposition processing by the divide-and-conquer method. In the optimization method,
The convex decomposition basic algorithm is repeatedly applied to the output DC (P) until the number of convex elements no longer decreases.

【0111】(H)凸多面体への分解処理の第3実施例
(前処理) 分割統治法による基本アルゴリズムを用いる方法では、
穴等の認識において分割した凸要素数が予想以上に増え
る可能性がある。第3実施例では、凸要素数を減少する
ために、穴等の物体に対してブール代数を負とみなして
凸分解処理を行ない、その他の正物体に対して第1実施
例の凸分解処理を施すものである。ブール代数を負とみ
なすとは、端的に各ポリゴンの法線方向の符号を反転
(法線方向を逆転)することである。通常の分割統治法
による基本アルゴリズムと負物体認識法とを組み合わせ
ることにより、凸要素数の少ない凸分解が可能となる。
図33は穴等の形状(負物体)を含む物体のブール集合
演算による物体表現法の説明図である。HLは穴、H
L′は法線方向を逆転した穴部、BDYは穴のない物体
(穴なし物体)である。穴付き物体は穴なし物体BDY
から法線方向を逆転した穴部分を差し引くことにより表
現される。
(H) Third Embodiment of Decomposition into Convex Polyhedron (Preprocessing) In the method using the basic algorithm by the divide-and-conquer method,
There is a possibility that the number of divided convex elements in recognition of a hole or the like increases more than expected. In the third embodiment, in order to reduce the number of convex elements, convex decomposition processing is performed on an object such as a hole by regarding a Boolean algebra as negative, and the convex decomposition processing of the first embodiment is performed on other positive objects. Is applied. To regard a Boolean algebra as negative is to simply reverse the sign of the normal direction of each polygon (reverse the normal direction). Combining the basic algorithm based on the ordinary divide-and-conquer method with the negative object recognition method enables convex decomposition with a small number of convex elements.
FIG. 33 is an explanatory diagram of an object expression method by a Boolean set operation of an object including a shape such as a hole (negative object). HL is a hole, H
L 'is a hole portion whose normal direction is reversed, and BDY is an object without a hole (object without a hole). Objects with holes are BDY without holes
It is expressed by subtracting the hole portion whose normal direction is reversed from.

【0112】図34は第3実施例の凸分解処理の流れ
図、図35はその凸分解結果の説明図である。三次元C
ADシステム等から初期ポリゴン集合(非凸多面体のポ
リゴン集合)Pを入力し(ステップ1301)、つい
で、初期ポリゴン集合Pの法線方向を全て逆転したポリ
ゴン集合PBを作る(ステップ1302)。しかる後、
ポリゴン集合PBに対して凸分解基本アルゴリズムを適
用する(ステップ1303)。すなわち、ポリゴン集合
PBを第1、第2の2つのグループに分割し、各グルー
プにおいて隣接ポリゴンとの関係が凸であるポリゴン部
分集合を求める。ついで、共通の境界稜線を有する第1
グループのポリゴン部分集合と第2グループのポリゴン
部分集合とが凸関係にあるものを併合して凸要素毎の複
数の新たなポリゴン部分集合を求める。
FIG. 34 is a flowchart of the convex decomposition processing of the third embodiment, and FIG. 35 is an explanatory diagram of the result of the convex decomposition. 3D C
An initial polygon set (polygon set of a non-convex polyhedron) P is input from an AD system or the like (step 1301), and then a polygon set PB in which all normal directions of the initial polygon set P are reversed is created (step 1302). After a while
The basic algorithm of convex decomposition is applied to the polygon set PB (step 1303). That is, the polygon set PB is divided into first and second groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Then the first with a common border ridge
The polygon subsets of the group and the polygon subsets of the second group that have a convex relationship are merged to determine a plurality of new polygon subsets for each convex element.

【0113】しかる後、該複数のポリゴン部分集合を要
素とする凸要素集合DC(PB)(図35参照)を出力
し、又、凸要素集合DC(PB)の各凸要素において、
ポリゴン数が2以上で構成される凸要素を取りだし、そ
れらの凸要素を構成する全てのポリゴン集合をP2(D
C(PB))とする。すなわち、穴等の負物体凸要素を
構成するポリゴンを集めてP2(DC(PB))とする
(ステップ1304)。ついで、初期ポリゴン集合Pと
P2(DC(PB))の差集合を取り、正物体を構成す
るポリゴン集合P-P2(DC(PB))を求める(ステップ13
05)。正物体を構成するポリゴン集合(差集合)が求
まれば、該差集合P-P2(DC(PB))に対して分割統治法に
よる凸分解基本アルゴリズムを適用する(ステップ13
06)。すなわち、差集合P-P2(DC(PB))を第1、第2
の2つのグループに分割し、各グループにおいて隣接ポ
リゴンとの関係が凸であるポリゴン部分集合を求める。
ついで、共通の境界稜線を有する第1グループのポリゴ
ン部分集合と第2グループのポリゴン部分集合とが凸関
係にあるものを併合して凸要素毎の複数の新たなポリゴ
ン部分集合を求める。しかる後、該複数のポリゴン部分
集合を要素とする凸要素集合DC(P-P2(DC(PB)))を出力
し(ステップ1307、図35)、正物体の認識を行な
う。最後に、DC(P-P2(DC(PB)))を正物体の凸要素、D
C(PB)を負物体の凸要素として出力する(ステップ
1308)。以後、各凸要素のポリゴン部分集合を用い
て凸多面体が生成されることになる。
Thereafter, a convex element set DC (PB) (see FIG. 35) having the plurality of polygon subsets as elements is output, and for each convex element of the convex element set DC (PB),
A convex element composed of two or more polygons is extracted, and all the polygon sets constituting the convex element are represented by P2 (D
C (PB)). That is, polygons constituting negative object convex elements such as holes are collected and set as P2 (DC (PB)) (step 1304). Next, a difference set between the initial polygon sets P and P2 (DC (PB)) is obtained, and a polygon set P-P2 (DC (PB)) constituting the regular object is obtained (step 13).
05). When the polygon set (difference set) constituting the regular object is obtained, the basic algorithm of convex decomposition by the divide and conquer method is applied to the difference set P-P2 (DC (PB)) (step 13).
06). In other words, the difference set P-P2 (DC (PB)) is
, And a polygon subset having a convex relationship with adjacent polygons in each group is obtained.
Next, a plurality of new polygon subsets for each convex element are obtained by merging polygon subsets of the first group and the polygon subset of the second group having a common boundary ridge line in a convex relationship. Thereafter, a convex element set DC (P-P2 (DC (PB))) having the plurality of polygon subsets as elements is output (step 1307, FIG. 35) to recognize a regular object. Finally, DC (P-P2 (DC (PB))) is a convex element of a positive object, D
C (PB) is output as a convex element of the negative object (step 1308). Thereafter, a convex polyhedron is generated using the polygon subset of each convex element.

【0114】(I)凸多面体への分解処理の第4実施例
(前処理) 凸分解の第1実施例に最適化法を施すことにより凸要素
数を減少したのと同様に、第3実施例に最適化法を施し
て凸要素数を減少することができる。図36はかかる場
合の凸分解処理の流れ図であり、第3実施例と異なる点
は、ステップ1303′、1306′において凸分解基
本アルゴリズムの替わりに最適化法を適用した点であ
る。
(I) Fourth Embodiment of Decomposition into Convex Polyhedron (Pre-processing) The third embodiment is performed in the same manner as the first embodiment of the convex decomposition in which the number of convex elements is reduced by performing an optimization method. An optimization method can be applied to the example to reduce the number of convex elements. FIG. 36 is a flowchart of the convex decomposition processing in such a case, which is different from the third embodiment in that an optimization method is applied instead of the basic convex decomposition algorithm in steps 1303 'and 1306'.

【0115】(J)凸多面体への分解処理の第5実施例
(前処理) (a) 考察 以上の実施例では、第1グループのポリゴン部分集合C
Liと第2グループのポリゴン部分集合CHjのMerge
可能性を以下のように判定している。すなわち、ポリゴ
ン部分集合CLiとポリゴン部分集合CHjが共通稜線
を有しているのか、いないのかに関係なく、CLiの境
界稜線を構成する全ポリゴン辺とCHjの境界稜線を構
成する全ポリゴン辺の中点が一致するか否かにより共通
の境界稜線を求めている。
(J) Fifth Embodiment of Decomposition into Convex Polyhedron (Preprocessing) (a) Consideration In the above embodiment, the polygon subset C of the first group is used.
Merge of Li and polygon subset CHj of the second group
The possibility is determined as follows. That is, irrespective of whether the polygon subset CLi and the polygon subset CHj have a common edge, or not, all of the polygon edges forming the boundary edge of CLi and all the polygon edges forming the boundary edge of CHj A common boundary ridge is determined based on whether or not the points match.

【0116】しかし、かかるMerge可能性の判定処理で
は、あらゆるポリゴン部分集合の組合せにおいて、しか
も、境界稜線を構成するポリゴン辺の総当たり的な組合
せにおいて中点が一致するか否かを調べなくてはならな
いため、Merge可能性の判定処理に相当の時間を要し、
凸分解の高速化に限界を与えている。ところで、凸要素
CLiの境界稜線と凸要素CHjの境界稜線が共通の境
界稜線部分を有する場合には、凸要素CLiの境界稜線
で構成する凸物体と凸要素CHjの境界稜線で構成する
凸物体とが干渉する。そこで、凸要素CLi,CLjの
共通の境界稜線を求める処理を実行する前に、計算負荷
がO(N)の干渉チェック法により凸要素CLiの境界稜線
で構成する凸物体と凸要素CHjの境界稜線で構成する
凸物体とが干渉するかチェックする。そして、干渉しな
い場合には以降のmerge処理をスキップし、干渉する場
合のみ以降のMerge処理を継続するようにする。このよ
うにすれば、Merge処理に要する時間を大幅に短縮でき
凸分解処理を高速に行なうことができる。
However, in the merging possibility determination processing, it is not necessary to check whether or not the midpoints match in all combinations of polygon subsets and in brute force combinations of polygon sides constituting the boundary ridge line. Therefore, it takes a considerable amount of time to determine the possibility of Merge,
This limits the speed of convex decomposition. By the way, when the boundary ridge line of the convex element CLi and the boundary ridge line of the convex element CHj have a common boundary ridge portion, the convex object formed by the boundary ridge line of the convex element CLi and the convex object formed by the boundary ridge line of the convex element CHj And interfere. Therefore, before executing a process for obtaining a common boundary ridge line of the convex elements CLi and CLj, the boundary between the convex object and the convex element CHj formed by the boundary ridge line of the convex element CLi is calculated by an O (N) interference check method. It is checked whether there is any interference between the ridge and the convex object. Then, when no interference occurs, the subsequent merge processing is skipped, and only when interference occurs, the subsequent merge processing is continued. In this way, the time required for the Merge processing can be greatly reduced, and the convex decomposition processing can be performed at high speed.

【0117】(b) 干渉チェック前処理の概略 図37は第5実施例の干渉チェック前処理の別の概略的
処理フローであり、図3の第1実施例と同一部分には同
一符号を付している。第1実施例と異なる点は、ステッ
プ1003′において、分割統治法による凸分解基本ア
ルゴリズムに替えて干渉チェック組込型の分割統治法に
よる凸分解基本アルゴリズム(高速凸分解基本アルゴリ
ズム)を適用している点である。
(B) Outline of interference check pre-processing FIG. 37 is another schematic processing flow of the interference check pre-processing of the fifth embodiment, and the same reference numerals are assigned to the same parts as those of the first embodiment of FIG. are doing. The difference from the first embodiment is that in step 1003 ', instead of the convex decomposition basic algorithm based on the divide-and-conquer method, a basic convex decomposition algorithm based on the divide-and-conquer method incorporating an interference check (a fast convex decomposition basic algorithm) is applied. It is a point.

【0118】図38は高速凸分解基本アルゴリズムの処
理のフローである。初期ポリゴン集合(非凸多面体のポ
リゴン集合)Pを入力し(ステップ1101)、つい
で、初期ポリゴン集合Pに対して高速凸分解アルゴリズ
ムによる凸分解処理を施す(ステップ1102′)。す
なわち、初期ポリゴン集合Pを第1、第2の2つのグル
ープに分割し、各グループにおいて隣接ポリゴンとの関
係が凸であるポリゴン部分集合を求める。ついで、共通
の境界稜線を有する第1グループのポリゴン部分集合と
第2グループのポリゴン部分集合とが凸関係にあるもの
を併合(マージング)して凸要素毎の複数の新たなポリ
ゴン部分集合DP1,DP2,・・・を求める。しかる
後、ポリゴン部分集合DP1,DP2,・・・を出力す
る(ステップ1103)。尚、各ポリゴン部分集合DP
1,DP2,・・・に基づいて凸多面体が生成される。
分割統治法において問題依存性が存在する最も重要な個
所は、「併合」過程、すなわち、関数Mergeの構成方法
である。
FIG. 38 is a flowchart of the processing of the basic algorithm for high-speed convex decomposition. An initial polygon set (polygon set of a non-convex polyhedron) P is input (step 1101), and then the initial polygon set P is subjected to convex decomposition processing by a high-speed convex decomposition algorithm (step 1102 '). That is, the initial polygon set P is divided into first and second groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Next, a polygonal subset of the first group and a polygonal subset of the second group having a common boundary edge are merged (merged) in a convex relationship, and a plurality of new polygon subsets DP1 for each convex element are merged. DP2,... Thereafter, the polygon subsets DP1, DP2,... Are output (step 1103). Note that each polygon subset DP
A convex polyhedron is generated based on 1, DP2,.
The most important place where problem dependence exists in the divide-and-conquer method is the "merging" process, that is, the method of constructing the function Merge.

【0119】(c) 分割統治法におけるMergeプロセス 凸要素CLi,CHjがMerge可能であるためには、C
Li,CHjが共通の境界稜線を有することである。す
なわち、凸要素CLi,CHjが互いに境界稜線を通じ
て干渉していることが必要条件である。従って、凸要素
CLi,CHj間に干渉チェックアルゴリズムを 適用
し、干渉していなければ、CLi,CHjに対して以後
のMerge処理をスキップできる。図39は分割統治
法におけるMergeプロセスの流れ図である。 1) 凸要素集合DC(PL),DC(PH)を用意する
(ステップ1111a,1111b)。 DC(PL)={CL1,CL2,・・・CLi,・・・} i=1,
2,・・・NDC(PL) CLi{polygons={pCL11,pCL12,pCL13,・
・・pNCLP1}boundary edges=[bCL11,bCL1
2,bCL13,・・・bNCLB1}} DC(PH)={CH1,CH2,・・CHi,・・・} i=1,
2,・・・NDC(PH) CLi{polygons={pCH11,pCH12,pCH13,・
・・pNCHP1}boundary edges=[bCH11,bCH1
2,bCH13,・・・bNCHB1}} 凸要素集合DC(PL),DC(PH)の各要素はポリ
ゴン部分集合(polygons)とその要素の境界をなす境界
稜線の集合(boundary edges)で構成される。
(C) Merge process in the divide-and-conquer method In order for the convex elements CLi and CHj to be mergeable, C
Li and CHj have a common boundary edge. That is, it is a necessary condition that the convex elements CLi and CHj interfere with each other through the boundary ridge line. Therefore, the interference check algorithm is applied between the convex elements CLi and CHj, and if there is no interference, the subsequent merge processing can be skipped for CLi and CHj. FIG. 39 is a flowchart of the Merge process in the divide-and-conquer method. 1) Prepare convex element set DC (PL), DC (PH)
(Steps 1111a and 1111b). DC (PL) = {CL1, CL2, ... CLi, ...} i = 1,
2, ... NDC (PL) CLi {polygons = {pCL11, pCL12, pCL13,
・ ・ PNCLP1} boundary edges = [bCL11, bCL1
2, bCL13,... BNCLB1} DC (PH) = {CH1, CH2,... CHi,.
2, ... NDC (PH) CLi {polygons = {pCH11, pCH12, pCH13,
・ ・ PNCHP1} boundary edges = [bCH11, bCH1
2, bCH13,..., BNCB1} Each element of the convex element set DC (PL), DC (PH) is composed of polygon subsets (polygons) and a set of boundary edges forming the boundaries of the elements (boundary edges). You.

【0120】2) Merge 可能性の判定 凸要素CLi,CHjが互いにMerge可能か否かを判定
する(ステップ1112′)。判定条件は以下の通りで
ある。 条件1:凸要素CLi,CHjの境界稜線BedgeCL
i、BedgeCHj間で干渉チェックを行なう。干渉が無
ければMerge不可能と判定する。 条件2:干渉している可能性のある凸要素CLi,CH
jに対し、CLi,CHj間で共有している境界稜線を
全て取り出す。共有しているか否かは、境界稜線を構成
するポリゴン辺の中点を比較することにより判定でき
る。共有している境界稜線が1本もなければMerge不可
能と判定する。 条件3:共有している境界稜線に対し、その稜線を共有
するCLiのポリゴンとCHjのポリゴン間の凹凸関係
を調べる。1組でも凹の関係にあるポリゴンの組合せが
存在すれば、Merge不可能と判定する。 条件3:条件1、条件2、条件3をクリアした場合はMe
rege可能と判定する。
2) Judgment of Merge Possibility It is judged whether or not the convex elements CLi and CHj can be merged with each other (step 1112 '). The judgment conditions are as follows. Condition 1: Boundary ridge BedgeCL of convex elements CLi and CHj
An interference check is performed between i and BedgeCHj. If there is no interference, it is determined that Merge is impossible. Condition 2: convex elements CLi, CH possibly interfering
For j, all boundary edges shared between CLi and CHj are extracted. Whether or not they are shared can be determined by comparing the midpoints of the polygon sides constituting the boundary ridge line. If there is no shared border ridge, it is determined that merging is not possible. Condition 3: With respect to the shared boundary ridge line, the unevenness relationship between the CLi polygon and the CHj polygon sharing the ridge line is examined. If there is at least one combination of polygons having a concave relationship, it is determined that merging is impossible. Condition 3: Me when Condition 1, Condition 2, and Condition 3 are cleared
Judge that rege is possible.

【0121】3) Mergeの順序 凸要素のMergeは以下の順序で行なう。 3-1) 凸要素CL1がCHj(j=1,2,・・・NPH)とMerge可能
か否かを判定する。もし、CL1がCHjとMerge可能
であれば、それ以降は、CL1,DC(PH)を以下の
ようにする。 CL1∪CHj→CL1 DC(PH)={CH1,CH2,・・・CHj−1,C
Hj+1・・・} 3-2) CLi(i=2,3,・・・NPL)に対して同様の手順を実行す
る。 4) 併合凸要素集合DC(P)の構成 上記3)のプロセスにより併合凸要素集合DC(P)=Me
rge (DC(PL),DC(PH))が実行され、DC
(P)={CL1,CL2,・・・CLPNPL,CH
j′,CHj″・・・}で与えられる併合凸要素集合DC
(P)が出力される(ステップ1113′)。ここで、{C
Hj′,CHj″・・・}は、いかなるCLiともMergeし
ないDC(PH)の凸要素である。
3) Merge Order Merge of convex elements is performed in the following order. 3-1) It is determined whether or not the convex element CL1 can be merged with CHj (j = 1, 2,..., NPH). If CL1 can be merged with CHj, thereafter, CL1, DC (PH) is set as follows. CL1∪CHj → CL1 DC (PH) = {CH1, CH2,... CHj-1, C
Hj + 1...} 3-2) The same procedure is executed for CLi (i = 2, 3,..., NPL). 4) Configuration of merged convex element set DC (P) By the process of 3) above, merged convex element set DC (P) = Me
rge (DC (PL), DC (PH)) is executed and DC
(P) = {CL1, CL2,... CLPNPL, CH
j ′, CHj ″... {}
(P) is output (step 1113 '). Where {C
Hj ', CHj "...} Are DC (PH) convex elements that do not merge with any CLi.

【0122】(d) 干渉チェックアルゴリズム 凸物体間の干渉チェックアルゴリズムのうち、Bobrow
法、Lin/Canny法、Gilbert法が既存の計算負荷O(N)の干
渉チェック法として使用できる。図40は干渉チェック
アルゴリズムの概略処理フローである。凸要素CLi,
CHjの境界稜線BedgeCLi、BedgeCHjで構成され
る凸物体間に干渉チェックアルゴリズムを適用する(ス
テップ1401)。干渉チェックアルゴリズムの適用に
より境界稜線BedgeCLi、BedgeCHjの最接近点間の
距離dist(BedgeCLi、BedgeCHj)を求めて出力する
(ステップ1402)。最接近点間の距離が求まれば、
該距離dist(BedgeCLi、BedgeCHj)とεの大小を比
較し、dist(BedgeCLi、BedgeCHj)≦εの場合には
干渉すると判定し、dist(BedgeCLi、BedgeCHj)>
εの場合には干渉しないと判定する。尚、εは干渉チェ
ック判定の精度を決めるユーザ定義の微小定数である。
(D) Interference Check Algorithm Among the interference check algorithms between convex objects, Bobrow
Method, Lin / Canny method, and Gilbert method can be used as interference check methods for the existing computational load O (N). FIG. 40 is a schematic processing flow of the interference check algorithm. Convex element CLi,
An interference check algorithm is applied between convex objects formed by the boundary edges BedgeCLi and BedgeCHj of CHj (step 1401). The distance dist (BedgeCLi, BedgeCHj) between the closest points of the boundary edges BedgeCLi, BedgeCHj is obtained and output by applying the interference check algorithm.
(Step 1402). If you find the distance between the closest points,
The distance dist (BedgeCLi, BedgeCHj) is compared with the value of ε. If dist (BedgeCLi, BedgeCHj) ≦ ε, it is determined that interference occurs, and dist (BedgeCLi, BedgeCHj)>
In the case of ε, it is determined that there is no interference. Here, ε is a user-defined minute constant that determines the accuracy of the interference check determination.

【0123】(f) 干渉チェック方法(Gilbert法) 凸要素CLi,CHjの境界稜線BedgeCLi、BedgeC
Hjで構成される凸物体間の最接近点間の探索及びその
距離dist(BedgeCLi、BedgeCHj)は前述のGilbert
法により求める。尚、Gilbert法の初期格子点(初期
値)V0は一般には任意であるが、各物体の重心差分方
向の格子点から出発するのが効率的である。Gilbert法
により最接近点を求める時、以下の不等式が成立する
(図41参照) 。 rk=−hk(−νk)/|νk|≦ |ν(K)|≦|νk| (16) 従って、あるkに対し、rk>0ならば2凸物体間の干
渉は無いといえる。
(F) Interference Checking Method (Gilbert Method) Boundary ridges BedgeCLi, BedgeC of convex elements CLi, CHj
The search between the closest points between the convex objects constituted by Hj and the distance dist (BedgeCLi, BedgeCHj) are performed by the aforementioned Gilbert.
Determined by the law. The initial grid point (initial value) V0 of the Gilbert method is generally arbitrary, but it is efficient to start from the grid point of each object in the direction of the center of gravity difference. When finding the point of closest approach using the Gilbert method, the following inequality holds:
(See FIG. 41). rk = −hk (−νk) / | νk | ≦ | ν (K) | ≦ | νk | (16) Therefore, for a certain k, if rk> 0, it can be said that there is no interference between the biconvex objects.

【0124】(g) Gibert法に基づくMerge可能性判定処
理 図42はGilbert法に基づくMerge可能性判定処理フロー
である。凸要素CLi,CHjの境界稜線BedgeCL
i、BedgeCHjでそれぞれ構成される凸物体間にGilbe
rt法を適用して、(13)式のrkを計算する(ステップ1
411)。ついで、rk>0か判断し(ステップ141
2)、rk>0の場合には干渉しないから、Merge不可
能と判定する(ステップ1413)。しかし、rk≦0
の場合には、干渉しているからMerge干渉ありとして、
前述のMerge可能性の条件2〜条件4よりMerge可能/不
可能を判定する(ステップ1414)。
(G) Merge Possibility Judgment Processing Based on Gibert Method FIG. 42 is a flowchart of Merge possibility judgment processing based on the Gilbert method. Boundary edge BedgeCL of convex elements CLi, CHj
i, BedgeCHj
Apply the rt method to calculate rk in equation (13) (step 1)
411). Then, it is determined whether rk> 0 (step 141).
2) If rk> 0, there is no interference, so it is determined that merging is not possible (step 1413). However, rk ≦ 0
In the case of, because there is interference, there is Merge interference,
Merge availability / impossibility is determined from the above Merge possibility conditions 2 to 4 (step 1414).

【0125】(h) 簡略化したGibert法に基づくMerge可
能性判定処理 Gibert法に基づくMerge可能性判定処理を更に簡略化す
る。簡略化の要点はGilbert法の初期格子点V0として
境界稜線上の頂点集合BedgeCLi、BedgeCHjから任
意の頂点BedgeCLi0、BedgeCHji0を選んで、 V0=BedgeCLi0−BedgeCHji0 (17) を構成する。ついで、このV0を使って r=−hk(−V0)=−hk1(−V0)−hk2(V0) (18) を計算する。もし、r>0ならば、BedgeCLi、Bedge
CHj間は干渉が無く、凸要素CLi,CHjはMerge
する可能性が無いと判定する。
(H) Merge Possibility Determination Processing Based on Simplified Gibert Method Merge possibility determination processing based on the Gibert method is further simplified. The point of simplification is to select an arbitrary vertex BedgeCLi0 and BedgeCHji0 from the vertex set BedgeCLi and BedgeCHj on the boundary ridge line as the initial lattice point V0 of the Gilbert method, and construct V0 = BedgeCLi0−BedgeCHji0 (17). Then, using this V0, r = -hk (-V0) =-hk1 (-V0) -hk2 (V0) (18) is calculated. If r> 0, BedgeCLi, Bedge
There is no interference between CHj and the convex elements CLi and CHj are Merge
It is determined that there is no possibility of performing this.

【0126】図43は簡略化したGilbert法に基づくMer
ge可能性判定処理フローである。凸要素CLi,CHj
の境界稜線BedgeCLi、BedgeCHjでそれぞれ構成さ
れる凸物体間に簡略化したGilbert法を適用して、(15)
式のrを計算する(ステップ1411′)。ついで、r
>0か判断し(ステップ1412′)、r>0の場合に
は干渉しないから、Merge不可能と判定する(ステップ1
413′)。しかし、r≦0の場合には、干渉している
からMerge干渉ありとして、前述のMerge可能性の条件2
〜条件4よりMerge可能/不可能を判定する(ステップ1
414′)。
FIG. 43 shows Mer based on the simplified Gilbert method.
It is a ge possibility determination processing flow. Convex elements CLi, CHj
Applying the simplified Gilbert method between convex objects composed of the boundary edges BedgeCLi and BedgeCHj of (15)
The r of the equation is calculated (step 1411 '). Then r
> 0 (step 1412 ′). If r> 0, there is no interference, so it is determined that merge is impossible (step 1).
413 '). However, in the case of r ≦ 0, it is determined that there is Merge interference because of interference, and the above-mentioned Merge possibility condition 2
-Determine whether Merge is possible / impossible from condition 4 (step 1
414 ').

【0127】(K)凸分解の変形例 (a) 変形例1 以上の第5実施例の凸分解法に最適化処理を施して凸要
素数を減少するように構成することができる。この場合
の処理フローを図44に示す。図44において、第2実
施例の処理(図32参照)と異なる点は、ステップ12
02′、1204′において凸分解基本アルゴリズムに
替わって、干渉チェック組込型の高速凸分解アルゴリズ
ムを使用している点である。 (b) 変形例2 干渉チェック組込型の高速凸分解アルゴリズムを負物体
が存在する場合における凸分解処理に適用することがで
き、この場合の処理フローを図45に示す。図45にお
いて、第3実施例と異なる点は、ステップ1303′、
1306′において凸分解基本アルゴリズムに替わっ
て、干渉チェック組込型の高速凸分解アルゴリズムを使
用している点である。 (c) 変形例3 変形例2に更に最適化処理を施して凸要素数を減少する
ように構成することもできる。
(K) Modification of Convex Decomposition (a) Modification 1 The convex decomposition method of the fifth embodiment described above may be configured to perform optimization processing to reduce the number of convex elements. FIG. 44 shows a processing flow in this case. In FIG. 44, the difference from the process of the second embodiment (see FIG. 32) is that
02 ′, 1204 ′, a high-speed convex decomposition algorithm incorporating an interference check is used instead of the basic convex decomposition algorithm. (b) Modification 2 The high-speed convex decomposition algorithm incorporating the interference check can be applied to the convex decomposition processing in the presence of a negative object. FIG. 45 shows a processing flow in this case. In FIG. 45, the difference from the third embodiment is that step 1303 ′,
In 1306 ', a fast convex decomposition algorithm incorporating an interference check is used instead of the basic convex decomposition algorithm. (c) Modification 3 Modification 2 may be further optimized to reduce the number of convex elements.

【0128】(L)最接近点探索の前処理(近接点線形
リストの作成) 以上では、ポリゴンデータより有向グラフ型構造データ
を前処理により生成し、この有向グラフ型構造データを
用いて凸多面体間あるいは非凸多面体間の最接近点探索
処理を行なった場合である。有向グラフ構造データとは
別の構造データ、すなわち、近接点線形リストを前処理
により作成し、該リストを使用することにより最接近点
の連続探索を高速化することができる。近接点線形リス
トとは、形状モデル(CGモデル)を構成する各ポリゴ
ンの頂点を第1方向(next方向)にリンクし、各頂
点にポリゴン辺を介して繋がる頂点群を第2の方向(b
ranch方向)に該頂点にリンクしてなるデータ構造
を備えたリストである。リストの先頭から順次たどるこ
とにより、その頂点に繋がる全ての近接点を拾いだすこ
とができる。
(L) Preprocessing for Searching for Nearest Point (Formation of Linear List of Proximity Points) In the above description, directed graph type structural data is generated from polygon data by preprocessing, and between the convex polyhedrons or This is the case where the closest point search processing between non-convex polyhedrons is performed. Structural data different from the directed graph structure data, that is, a near-point linear list is created by preprocessing, and the use of the list can speed up the continuous search for the closest approach point. The near-point linear list is such that vertices of each polygon constituting a shape model (CG model) are linked in a first direction (next direction), and a vertex group connected to each vertex via a polygon side is defined in a second direction (b).
This is a list provided with a data structure linked to the vertex in the (rank direction). By sequentially tracing from the top of the list, it is possible to pick up all the proximity points connected to the vertex.

【0129】(a) 近接点線形リストの例 図46は、直方体の近接点線形リストの例を示してい
る。図示の通り、近接点線形リストは、頂点を順次繋い
だnext方向と、各頂点にポリゴン辺を介して連結する近
接点を配列するbranch方向の2方向を持つ。branch方向
の先頭には、その頂点自身が入る。 (b) 近接点線形リストの構成法 図47は近接点線形リストの作成処理のフローである。
尚、図48に示すように対象物体は三角形ポリゴンの集
合で構成されており、各三角形ポリゴンはvertexに続く
3つの頂点座標値とnormalに続く3つの各頂点における
光の反射方向データで表現される。
(A) Example of Proximity Point Linear List FIG. 46 shows an example of a rectangular parallelepiped proximity 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 polygon sides are arranged. The top of the branch direction contains the vertex itself. (b) Method of Constructing Proximity Point Linear List FIG. 47 is a flowchart of a process of creating a proximity point linear list.
As shown in FIG. 48, the target object is composed of a set of triangular polygons, and each triangular polygon is represented by three vertex coordinate values following vertex and light reflection direction data at three vertices following normal. You.

【0130】三次元CADシステムは形状モデルを作成
してポリゴンデータファイルを出力する(ステップ20
01、2002)。ついで、干渉チェック組込型分割統
治法による凸分解基本アルゴリズムに従って、上記ポリ
ゴンデータを凸要素毎に分割されたポリゴンデータの組
(ポリゴン部分集合)に分ける。すなわち、初期のポリ
ゴンデータを凸要素毎の部分集合の組に分割して出力す
る(ステップ2003,2004)。しかる後、各部分
集合毎に、すなわち凸多面体毎に近接点線形リスト構成
アルゴリズムを用いて近接点線形リストをを生成してメ
モリに展開する(ステップ2005、2006)。つい
で、該近接点線形リストを用いて最接近点探索処理(干
渉チェック処理)を実行すると共に近接点線形リストを
外部記憶媒体に記憶する(ステップ2007)。以後、
該近接点線形リストが必要な場合には、新たに作成せ
ず、外部記録媒体から読み出してメモリに展開する(ス
テップ2008)。
The three-dimensional CAD system creates a shape model and outputs a polygon data file (step 20).
01, 2002). Then, the polygon data is divided into sets of polygon data (polygon subsets) divided for each convex element according to a basic algorithm for convex decomposition based on an interference check built-in division and conquer method. That is, the initial polygon data is divided into sets of subsets for each convex element and output (steps 2003 and 2004). Thereafter, a near-point linear list is generated for each subset, that is, for each convex polyhedron using a near-point linear list construction algorithm, and is expanded in a memory (steps 2005 and 2006). Next, the closest point search processing (interference check processing) is executed using the close point linear list, and the close point linear list is stored in the external storage medium (step 2007). Since then
If the proximity point linear list is required, the list is read from an external recording medium and developed in a memory without newly creating the list (step 2008).

【0131】(c) 近接点線形リスト構成アルゴリズム 図49は対象物体の凸要素毎のポリゴンデータ説明図、
図50は近接点線形リスト構成アルゴリズムの説明図で
ある。対象物体が三角形ポリゴンの集合で構成されてい
るものとすると、近接点線形リストは以下のフローに従
って構成される。 1) 凸分解基本アルゴリズムにより、凸要素毎のポリゴ
ンデータを用意する(図49参照)。 2) 各々のポリゴンデータ(pi,qi,ri)に対し、各
頂点をリストLに繋げていく。next方向を頂点に対する
線形リスト方向、branch方向を各頂点の近接点方向とす
る。リストLの先頭要素は第1番目のポリゴンの第1頂
点であり、作成途中では図50(a)に示すデータ構造と
なっている。具体的には以下のようにリストを作成す
る。 2-1) リストLの先頭要素topを割り付ける。すなわち、
topとして最初のポリゴンの最初の頂点を割り付ける。
(C) Proximity point linear list construction algorithm FIG. 49 is an explanatory diagram of polygon data for each convex element of a target object.
FIG. 50 is an explanatory diagram of a neighboring point linear list construction algorithm. Assuming that the target object is constituted by a set of triangular polygons, the near point linear list is constituted according to the following flow. 1) Polygon data for each convex element is prepared by the convex decomposition basic algorithm (see FIG. 49). 2) For each polygon data (pi, qi, ri), connect each vertex to the list L. The next direction is defined as a linear list direction with respect to the vertices, and the branch direction is defined as a direction of a proximity point of each vertex. The head element of the list L is the first vertex of the first polygon, and has a data structure shown in FIG. Specifically, a list is created as follows. 2-1) Assign top element top of list L. That is,
Assign the first vertex of the first polygon as top.

【0132】2-2) ポリゴン(pi,qi,ri)に対し、
以下の割付けを繰り返す。 1) if(全てのjに対し、Lj≠pi)ならば、新しい要素
piをnext方向の端に割り付ける(図50(b)参照)。つい
で、頂点Lj+1のbranch方向に対し、自分自身pi及びq
i,riを割り付ける(図50(c)参照)。 2) if(あるjに対し、Lj=pi)ならば、Ljのbranch方
向に対し、qi,riを割り付ける。もし、branch方向に
既にqi,riと同一頂点があれば割り付けることはしな
い(図50(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-2) For the polygon (pi, qi, ri),
Repeat the following assignment. 1) If if (Lj ≠ pi for all j), assign a new element pi to the end in the next direction (see FIG. 50 (b)). Then, for the branch direction of the vertex Lj + 1, pi and q
i and ri are assigned (see FIG. 50 (c)). 2) If if (Lj = pi for a certain j), qi and ri are assigned to the branch direction of Lj. If there is already the same vertex as qi and ri in the branch direction, no assignment is made (see FIG. 50 (d)). 3) The above processes 1) and 2) are performed on the vertex qi. However, branch candidates other than qi for vertex qi are pi and ri. 4) The above processes 1) and 2) are executed for the vertex ri. However, 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).

【0133】(d) 近接点線形リストの作成例 図51、図52は近接点線形リストの作成例説明図であ
る。凸分解基本アルゴリズムにより、凸要素毎のポリゴ
ンデータを用意する(ステップ2011)。以後、第1
ポリゴンをリストに組み込み(ステップ2012)、つ
いで、第2ポリゴンをリストLに組み込む(ステップ2
013)。すなわち、ステップ2012において、ま
ず、第1ポリゴンの第1頂点V1をtopとして割り付け
る。すなわち、 top=L1=V1 とする(2012a)。ついで、頂点V1に対するbran
ch方向に第1ポリゴンの全頂点V1,V2,V3を割り
付ける(ステップ2012b)。しかる後、第2頂点V
2をnext方向に割り付け(ステップ2012c)、割付
け後、頂点V2に対するbranch方向に第1ポリゴンの全
頂点V2,V3,V1を割り付ける(ステップ2012
d)。以後、同様に第3頂点V3をnext方向に割り付け
(ステップ2012e)、割付け後、頂点V3に対するb
ranch方向に第1ポリゴンの全頂点V3,V1,V2を
割り付ける(ステップ2012f)。
(D) Example of Creating Proximate Point Linear List FIGS. 51 and 52 are explanatory diagrams of an example of creating a proximal point linear list. Polygon data for each convex element is prepared by the basic convex decomposition algorithm (step 2011). Since then,
The polygon is incorporated into the list (step 2012), and the second polygon is incorporated into the list L (step 2).
013). That is, in step 2012, first, the first vertex V1 of the first polygon is assigned as top. That is, top = L1 = V1 (2012a). Then, bran for vertex V1
All vertices V1, V2, V3 of the first polygon are allocated in the ch direction (step 2012b). Then, the second vertex V
2 are allocated in the next direction (step 2012c), and after the allocation, all the vertices V2, V3, and V1 of the first polygon are allocated in the branch direction with respect to the vertex V2 (step 2012).
d). Thereafter, the third vertex V3 is similarly allocated in the next direction.
(Step 2012e) After allocation, b for vertex V3
All vertices V3, V1, and V2 of the first polygon are allocated in the ranch direction (step 2012f).

【0134】ステップ2013において、第2ポリゴン
の第1頂点V1を割り付ける。この場合、next方向に頂
点V1は既に割り付けられているから、頂点V1のbran
ch方向に頂点V1,V3,V4を割り付ける。しかし、
既に、頂点V1,V3は割り付けられているから頂点V
4のみを割り付ける(ステップ2013a)。ついで、
第2頂点V3をnext方向に割り付ける。この場合、next
方向に頂点V3は既に割り付けられているから、頂点V
3のbranch方向に頂点V3,V4,V1を割り付ける。
しかし、既に、頂点V3,V1は割り付けられているか
ら頂点V4のみを割り付ける(ステップ2013b)。
しかる後、第3頂点V4をnext方向に割り付ける(ステ
ップ2013c)。ついで、頂点V4のbranch方向に頂
点V4,V1,V3を割り付ける(ステップ2013
d)。以上では、ポリゴンを三角形ポリゴンとして説明
したが、三角形ポリゴンに限定されず、任意の多角形ポ
リゴンでもよい。N個の頂点から近接点線形リストを作
成する計算負荷はO(N2)である。
In step 2013, the first vertex V1 of the second polygon is assigned. In this case, since the vertex V1 is already allocated in the next direction, the branch of the vertex V1 is
Vertices V1, V3, and V4 are allocated in the ch direction. But,
Since the vertices V1 and V3 have already been allocated, the vertex V
Only 4 is assigned (step 2013a). Then
The second vertex V3 is allocated in the next direction. In this case, next
Since the vertex V3 has already been allocated in the direction,
The vertices V3, V4, and V1 are allocated in the branch direction of No. 3.
However, since the vertices V3 and V1 have already been allocated, only the vertex V4 is allocated (step 2013b).
Thereafter, the third vertex V4 is allocated in the next direction (step 2013c). Next, the vertices V4, V1, and V3 are allocated in the branch direction of the vertex V4 (step 2013).
d). In the above, the polygon has been described as a triangular polygon, but is not limited to a triangular polygon, and may be any polygonal polygon. The computational load for creating a near-point linear list from N vertices is O (N2).

【0135】(M)最接近点探索の前処理(近接点多分
木リストの作成) 近接点線形リストを作成する計算負荷はN個の頂点の場
合O(N2)であり大きい。そこで、最接近点の連続探
索に使用できる別のデータ構造のリスト(近接点多分木
リスト)を作成し、該リストを使用することにより最接
近点の連続探索を高速化する。近接点多分木リストと
は、次のような頂点の配列リストである。すなわち、基
準頂点を定めると共に、該基準頂点のX座標値より大き
い第1ネクスト方向(xright)、X座標値より小さい第2
ネクスト方向(xleft)、Y座標値より大きい第3ネクス
ト方向(yright)、Y座標値より小さい第4ネクスト方向
(yleft)、Z座標値より大きい第5ネクスト方向(zrigh
t)、Z座標値より小さい第6ネクスト方向(zleft)を定
める。そして、基準頂点の各軸座標値と該基準頂点にポ
リゴン辺で繋がっている頂点(対象頂点という)の各軸
座標値とを比較し、その大小に応じて対象頂点をリンク
するネクスト方向を求めると共に、該ネクスト方向に基
準頂点に近い順に前記対象頂点をリンクする。ネクスト
方向に対象頂点をリンクする際、該ネクスト方向に既に
リンクされている他の頂点の座標値と対象頂点の座標値
が等しい場合には、該他の頂点と対象頂点の各軸座標値
を比較する。そして、その大小に応じたネクスト方向を
求め、対象頂点を前記他の頂点に関して該ネクスト方向
にリンクする。又、各頂点にbranch方向を定め、該方向
に該頂点にポリゴン辺で繋がる全頂点を配列する。以上
のように作成したものが近接点多分木リストである。
(M) Preprocessing for Searching for Nearest Point (Creation of Proximity Point Multi-Tree List) The computational load for creating a linear list of proximity points is O (N2) for N vertices, which is large. Therefore, a list (proximity point multi-tree list) of another data structure that can be used for continuous search for the closest point is created, and the continuous search for the closest point is speeded up by using the list. The proximity point multitree list is an array list of vertices as follows. That is, the reference vertex is determined, the first next direction (xright) larger than the X coordinate value of the reference vertex, and the second direction smaller than the X coordinate value.
Next direction (xleft), third next direction (yright) larger than Y coordinate value, fourth next direction smaller than Y coordinate value
(yleft), the fifth next direction (zrigh
t), a sixth next direction (zleft) smaller than the Z coordinate value is determined. Then, each axis coordinate value of the reference vertex is compared with each axis coordinate value of a vertex connected to the reference vertex by a polygon side (referred to as a target vertex), and a next direction for linking the target vertex is determined according to the magnitude. At the same time, the target vertices are linked in the next direction in the order closer to the reference vertex. When linking the target vertex in the next direction, if the coordinate value of the other vertex already linked in the next direction is equal to the coordinate value of the target vertex, the axis coordinates of the other vertex and the target vertex are changed. Compare. Then, a next direction corresponding to the magnitude is obtained, and the target vertex is linked to the other vertex in the next direction. Also, a branch direction is determined for each vertex, and all vertices connected to the vertex by polygon sides are arranged in the direction. The one created as described above is the proximity point multi-tree list.

【0136】(a) 近接点多分木リストの例 図53は、直方体の近接点多分木リストの例を示してい
る。図示の通り、近接点多分木リストにおいて、各頂点
はx,y,zの各軸方向の大小に相当する6つのリンク
方向xright、xleft、yright、yleft、zright、zleftを
備えると共に、1つのbranch方向を備えている。頂点の
branch方向には該頂点にポリゴン辺で繋がる全頂点が配
列され、その先頭には、該頂点自身が配置される。
(A) Example of Proximity Point Multi-Tree List FIG. 53 shows an example of a rectangular parallel-tree multi-point tree list. As shown in the drawing, each vertex has six link directions xright, xleft, yright, yleft, zright, and zleft corresponding to the magnitudes of the x, y, and z axes, and one branch. Has directions. Vertex
In the branch direction, all vertices connected to the vertices by polygon sides are arranged, and the vertices themselves are arranged at the head thereof.

【0137】(b) 近接点多分木リストの構成法 図54は近接点多分木リストの作成処理のフローであ
る。三次元CADシステムは形状モデルを作成してポリ
ゴンデータファイルを出力する(ステップ2101、2
102)。ついで、干渉チェック組込型分割統治法によ
る凸分解基本アルゴリズムに従って、上記ポリゴンデー
タを凸要素毎に分割されたポリゴンデータの組(ポリゴ
ン部分集合)に分ける。すなわち、初期のポリゴンデー
タを凸要素毎の部分集合の組に分割して出力する(ステ
ップ2103,2104)。しかる後、各部分集合毎
に、すなわち凸多面体毎に近接点多分木リスト構成アル
ゴリズムを用いて近接点多分木リストを生成する(ステ
ップ2105)。ついで、近接点多分木変換アルゴリズ
ムにより、近接点多分木リストを近接点線形リストに変
換してしてメモリに展開する(ステップ2106、21
07)。しかる後、該近接点線形リストを用いて最接近
点探索処理(干渉チェック処理)を実行すると共に近接
点線形リストを外部記憶媒体に記憶する(ステップ21
08)。以後、該近接点線形リストが必要な場合には、
新たに作成せず、外部記録媒体から読み出してメモリに
展開する(ステップ2109)。
(B) Method of Constructing Proximity Point Multi-Tree List FIG. 54 is a flowchart of a process of creating a proximity point multi-tree list. The three-dimensional CAD system creates a shape model and outputs a polygon data file (steps 2101, 2
102). Then, the polygon data is divided into sets of polygon data (polygon subsets) divided for each convex element according to a basic algorithm for convex decomposition based on an interference check built-in division and conquer method. That is, the initial polygon data is divided into sets of subsets for each convex element and output (steps 2103 and 2104). Thereafter, a near-point multitree list is generated for each subset, that is, for each convex polyhedron by using a near-point multitree list construction algorithm (step 2105). Next, the near-point multitree tree conversion algorithm is used to convert the near-point multitree tree list into a near-point linear list and expand it in the memory (steps 2106 and 21).
07). Thereafter, the closest point search processing (interference check processing) is executed using the close point linear list, and the close point linear list is stored in the external storage medium (step 21).
08). Thereafter, when the proximity point linear list is required,
Instead of creating a new one, it is read from the external recording medium and expanded in the memory (step 2109).

【0138】(c) 近接点多分木リスト構成アルゴリズム 対象物体が三角形ポリゴンの集合で構成されているもの
とすると、近接点多分木リストは以下のフローに従って
構成される。 1) 凸分解基本アルゴリズムにより、凸要素毎のポリゴ
ンデータを用意する(図49参照)。 2) 各々のポリゴンデータ(pi,qi,ri)に対し、各
頂点を多分木リストMLに繋げていく。多分木リストM
Lにおいて、xright、xleft、yright、yleft、zright、
zleftをそれぞれ着目している頂点から見たx,y,z
軸の大小方向とする。また、各頂点は近接点方向として
branch方向を持つ。具体的には以下の手続きに従って近
接点多分木リストMLを構成していく(図53参照)。
(C) Proximity point multitree list construction algorithm Assuming that the target object is composed of a set of triangular polygons, the proximity point multitree list is constructed according to the following flow. 1) Polygon data for each convex element is prepared by the convex decomposition basic algorithm (see FIG. 49). 2) For each polygon data (pi, qi, ri), connect each vertex to the multi-tree list ML. Maybe tree list M
In L, xright, xleft, yright, yleft, zright,
x, y, z as viewed from the vertex where zleft is focused
It is the direction of the axis. Also, each vertex is defined as
Has a branch direction. Specifically, the proximity point multi-tree list ML is constructed according to the following procedure (see FIG. 53).

【0139】2-1) MLの先頭要素topを割り付ける。to
pとしては、最初のポリゴンの最初の頂点を割り付け
る。 2-2) ポリゴン(pi,qi,ri)に対し、以下の割付け
を繰り返す。 (1)頂点piに対し、MLの先頭要素topから見てx座標
値の大小、y座標値の大小、z座標値の大小の順に辞書
式に比較し、割付けを行なう。すなわち、まず、頂点p
iのx座標値がtopのx座標値より大きい時は、topから
見てxright方向の配置済みの他の要素のx座標値と頂点
piのx座標値の大小を比較し、xright方向に対して昇
順になるようにpiを配置する。頂点piのx座標値がto
pのx座標値より小さい時は、topから見てxleft方向に
対して同様の配置を行う。頂点piのx座標値と一致す
るx座標値を有する配置済みの頂点が存在する場合に
は、y座標値の比較を行い、その配置済み頂点から見て
y座標方向に昇順になるように配置する。y座標値が一
致する配置済み頂点が存在する場合には、z座標値に対
して同様の昇順配置を行う。もし、x,y,zの全ての
座標値の一致する頂点が存在すれば、頂点piをその点
と同一と見做す。 (2)新しく割り付けた頂点piに対し、該頂点piのbranc
h方向に自分自身pi及びqi,riを割り付ける。も
し、既に、頂点piがbranch要素を有している場合に
は、各branch要素との比較を行い、同一点の割付けを避
けるようにする。
2-1) The top element top of the ML is allocated. to
As p, assign the first vertex of the first polygon. 2-2) The following assignment is repeated for polygons (pi, qi, ri). (1) The vertices pi are compared lexicographically in the order of the magnitude of the x coordinate value, the magnitude of the y coordinate value, and the magnitude of the z coordinate value as viewed from the top element top of the ML, and are assigned. That is, first, the vertex p
When the x-coordinate value of i is larger than the x-coordinate value of top, the x-coordinate value of another element arranged in the xright direction is compared with the x-coordinate value of the vertex pi when viewed from top. Are arranged in ascending order. The x coordinate value of vertex pi is to
When it is smaller than the x coordinate value of p, the same arrangement is performed in the xleft direction when viewed from the top. If there is a placed vertex having an x-coordinate value that matches the x-coordinate value of the vertex pi, the y-coordinate value is compared, and the vertices are arranged in ascending order in the y-coordinate direction when viewed from the placed vertex. I do. If there is an already-arranged vertex having the same y-coordinate value, a similar ascending arrangement is performed on the z-coordinate value. If there is a vertex at which all the coordinate values of x, y and z match, the vertex pi is regarded as the same. (2) For the newly allocated vertex pi, the branc of this vertex pi
Assign pi and qi, ri in the h direction. If the vertex pi already has a branch element, it is compared with each branch element to avoid assigning the same point.

【0140】(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)の処理を繰り返す。 以上では、ポリゴンを三角形
ポリゴンとして説明したが、三角形ポリゴンに限定され
ず、任意の多角形ポリゴンでもよい。N個の頂点から近
接点多分木リストを作成する計算負荷はO(NlogN)
である。
(3) The above processes (1) and (2) are performed on the vertex qi. However, a branch other than qi for vertex qi
Candidates are pi and ri. (4) The above processes (1) and (2) are performed on the vertex ri.
However, branch candidates other than ri for vertex ri are pi,
qi. 2-3) For all polygon sets ∪i (pi, qi, ri),
Repeat the process of 2-2). In the above, the polygon has been described as a triangular polygon, but is not limited to a triangular polygon, and may be any polygonal polygon. The computational load for creating a near-point multitree list from N vertices is O (NlogN)
It is.

【0141】(d) 近接点多分木リスト変換アルゴリズム 凸多面体同士の干渉チェック(最接近点探索処理)で
は、凸多面体を構成する各頂点とのベクトル内積を取
り、その最大値を検出する計算を繰返し行う。この時、
各頂点を近接点多分木リストの形式で持っていると、各
頂点を順次辿っていくときに煩雑な判定関数が多数絡む
ことになる。そこで、一端、近接点多分木リストの形式
で各頂点の近接点を構成した後は、多分木リストを線形
リストに変換しておくと以後の計算量が少なくてすむ。
多分木リストを線形リストに変換するには、例えば、以
下に示す再帰関数vertex * MultiToLinear( )を使用す
る。
(D) Proximity point multi-tree list conversion algorithm In the interference check between convex polyhedrons (closest point search processing), a calculation is performed to obtain a vector inner product with each vertex of the convex polyhedron and detect the maximum value. Repeat. At this time,
If each vertex is in the form of a proximity point multitree list, a large number of complicated determination functions will be involved when sequentially following each vertex. Therefore, once the proximity point of each vertex is formed in the form of the proximity point multi-tree list, the calculation amount can be reduced by converting the multi-tree list into a linear list.
To convert a multi-tree list into a linear list, for example, use the following recursive function vertex * MultiToLinear ().

【0142】 vertex * MultiToLinear( ) [ vertex *V; v = this; //thisは今いる頂点のポインタを表す if(next=0) [ if(xleft !=0)[ //xleftをnextに割り付ける next = xleft; v = xleft→MultiToLinear( ); //xleft方向に対し再帰的に 作用させる ] if(xright !=0)[ //xright, yleft, yright, zleft, zrightに対し以下同様 v→next = xright; v = xright→MultiToLinear( ); ] if(yleft !=0)[ v→next = yleft; v = yleft→MultiToLinear( ); ] if(yright !=0)[ v→next = yright; v = yright→MultiToLinear( ); ] if(zleft !=0)[ v→next = zleft; v = zleft→MultiToLinear( ); ] if(zright !=0)[ v→next = zright; v = zright→MultiToLinear( ); ] ] return V; ]上記関数を多分木リストMLの先頭要素topに作用させ
ると(top→MultiToLinear( ))、多分木リストMLは線
形リストLに変換される。近接点多分木リスト変換アル
ゴリズムの計算時間は、総頂点数をNとすればO(N)
である。従って、ポリゴンデータから近接点多分木リス
ト構成アルゴリズムを経て近接点線形リストLを生成す
るトータルの計算時間は、O(NlogN)である。
Vertex * MultiToLinear () [vertex * V; v = this; // this indicates the pointer of the current vertex if (next = 0) [if (xleft! = 0) [// allocates xleft to next next = xleft; v = xleft → MultiToLinear (); // act recursively in xleft direction] if (xright! = 0) [// same for xright, yleft, yright, zleft, zright v → next = xright; v = xright → MultiToLinear ();] if (yleft! = 0) [v → next = yleft; v = yleft → MultiToLinear ();] if (yright! = 0) [v → next = yright; v = yright → MultiToLinear ();] if (zleft! = 0) [v → next = zleft; v = zleft → MultiToLinear ();] if (zright! = 0) [v → next = zright; v = zright → MultiToLinear [] return V;] When the above function is applied to the top element top of the multi-tree list ML (top → MultiToLinear ()), the multi-tree list ML is converted into a linear list L. The calculation time of the neighboring point multitree list conversion algorithm is O (N), where N is the total number of vertices.
It is. Therefore, the total calculation time for generating the proximity point linear list L from the polygon data through the proximity point multi-tree list construction algorithm is O (NlogN).

【0143】(N)最接近点探索の前処理(近接点線形
リストのダンプ及びローデング) 最接近点探索処理、すなわち、干渉チェック処理で必要
となる近接点線形リスト情報は、全てメモリ上に展開し
ておかなければならない。もし、ダンプファイル(dump
file)からメモリ上へ展開するのに、近接点多分木リス
トを構成するのと同じ計算時間(総頂点数Nに対してO
(NlogN))を要してしまうならば、ダンプファイル
を作成する意味がなくなってしまう。そこで、本発明で
はダンプファイルからのローデング時間がO(N)とな
るようにダンプファイルのフォーマットを定めている。 (a) ダンプファイルのフォーマット ダンプファイルのフォーマットは、図55に示すような
形式とする。このファイルフォーマットにおいて、高速
ローデングの必須項目は以下の通りである。 1) 凸要素毎に区切られていること、 2) 凸要素を構成する総頂点数(count)の項目があるこ
と、 3) 各々の頂点に番号付けがされていること、 4) 各々の頂点に対し、その頂点の近接点個数(bcount)
を定義する項目があること、 5) 各々の頂点の座標を定義する項目があること である。
(N) Preprocessing for Searching for Nearest Point (Dumping and Loading of Near-Point Linear List) The near-point linear list information required for the closest-point search processing, that is, the interference check processing, is all expanded on the memory. Must be kept. If the dump file (dump
file) to the memory, the same calculation time as constructing the neighboring point multitree list (O for the total number of vertices N)
If (NlogN)) is required, there is no point in creating a dump file. Therefore, in the present invention, the format of the dump file is determined so that the loading time from the dump file becomes O (N). (a) Format of Dump File The format of the dump file is as shown in FIG. In this file format, essential items for high-speed loading are as follows. 1) Each convex element is separated, 2) There is an item of the total number of vertices (count) constituting the convex element, 3) Each vertex is numbered, 4) Each vertex , The number of neighboring points of the vertex (bcount)
5) There must be an item that defines the coordinates of each vertex.

【0144】(b) ダンプファイルからのローデング法 1) 凸要素を構成する総頂点数(count)を読み、各頂点を
収めるcount次元の配列を作る。 2) 配列に凸要素の各頂点を収めていくと共に、各頂点
間をnext方向に結び線形リストを構成する。例えば、Ve
rtexを収める配列をV[Ni]とする時、V[0],V
[1],・・・を順にnext方向に結び、線形リストを構
成する。 3) 1),2)の処理を各凸要素に施す。
(B) Loading Method from Dump File 1) The total number of vertices (count) constituting the convex element is read, and a count-dimensional array for storing each vertex is created. 2) Each vertex of the convex element is stored in the array, and each vertex is connected in the next direction to form a linear list. For example, Ve
When the array containing rtex is V [Ni], V [0], V
.. Are sequentially connected in the next direction to form a linear list. 3) Apply the processing of 1) and 2) to each convex element.

【0145】4) 各凸要素の各頂点に対し、branchの近
接点番号(配列内の位置を指定)をたよりに、branch方向
に近接点のリストを張る。例えば、Vertexを収める配列
をV[Ni]とする時、Vertex V[0]のbranchの番号が
(0,9,1,7,8)ならば、VertexV[0]のbranch方向にV
[0],V[9],V[1],V[7],V[8]を線形リ
ストに繋ぐ。 5) 4)の処理を各凸要素に施す。 上記ローデング法では、同じファイルに対して計2回
(1),2),3)が1回目、4),5)が2回目)の読み込みを行
う。各頂点のbranch数はほとんどの場合において数10個
以下で抑えられるため、合計のローデング時間はO
(N)である。図55のように、凸要素毎に分割された
ダンプファイルをLファイルという。 (c) 凸包に対するダンプファイル 非凸多面体を包む最小の凸多面体(凸包)に対して、図
55と同様のダンプファイルが定義される。この場に
は、凸要素数は1つであり、vertexは非凸多面体を構成
する全ての頂点からなる。凸包に対する図55の形式の
ファイルをHLファイルという。
4) For each vertex of each convex element, a list of adjacent points is set in the branch direction based on the adjacent point number of the branch (designating the position in the array). For example, when the array that stores the vertices is V [Ni], the number of the branch of the vertex V [0] is
If (0,9,1,7,8), V in the branch direction of VertexV [0]
[0], V [9], V [1], V [7], V [8] are linked to a linear list. 5) Apply the processing of 4) to each convex element. In the above loading method, the same file is read twice (1), 2), 3) for the first time and 4), 5) for the second time. In most cases, the number of branches at each vertex is suppressed to several tens or less, so that the total loading time is O
(N). As shown in FIG. 55, a dump file divided for each convex element is called an L file. (c) Dump file for convex hull A dump file similar to that in FIG. 55 is defined for the smallest convex polyhedron (convex hull) wrapping a non-convex polyhedron. In this case, the number of convex elements is one, and vertex consists of all vertices constituting the non-convex polyhedron. A file in the format shown in FIG. 55 for the convex hull is called an HL file.

【0146】(O)干渉チェックサブアルゴリズム(包
絡球による事前チェック) 任意の非凸多面体に対し、それを包絡する球を前処理に
おいて生成しておく。この時、非凸多面体間の干渉チェ
ックに入る前に、包絡球間で干渉チェックを行い、高速
化する。 (a) 包絡球の構成法 非凸多面体は三角形ポリゴンの集合で表現されており、
∪i(pi,qi,ri)と表現する。サフィックスiは各ポ
リゴンを識別する添字である。pi,qi,riの各座標
値をpi=(pix,piy,piz)、qi=(qix,qiy,
qiz)、ri=(rix,riy,riz)とする。この時、
凸包のmax点、min点を以下のようにして求める。 max=(MAXi(pix,qix,rix),MAXi(piy,qiy,riy),MAXi(pi
z,qiz,riz)) min=(MINi(pix,qix,rix),MINi(piy,qiy,riy),MINi(pi
z,qiz,riz)) 包絡球は、以下の計算式に基づいて定義される。 半径R=|max-min|/2 中心Pc=(max+min)/2
(O) Interference Check Sub-Algorithm (Preliminary Check Using Envelope Sphere) For an arbitrary non-convex polyhedron, a sphere that envelopes it is generated in preprocessing. At this time, before the interference check between the non-convex polyhedrons is started, the interference check is performed between the envelope spheres to increase the speed. (a) Construction method of envelope sphere A non-convex polyhedron is represented by a set of triangular polygons.
∪i (pi, qi, ri). The suffix i is a subscript for identifying each polygon. The coordinate values of pi, qi, ri are represented by pi = (pix, piy, piz), qi = (qix, qiy,
qiz), ri = (rix, riy, riz). At this time,
The max and min points of the convex hull are obtained as follows. max = (MAXi (pix, qix, rix), MAXi (piy, qiy, riy), MAXi (pi
z, qiz, riz)) min = (MINi (pix, qix, rix), MINi (piy, qiy, riy), MINi (pi
z, qiz, riz)) The envelope sphere is defined based on the following formula. Radius R = | max-min | / 2 center Pc = (max + min) / 2

【0147】(b) 凸要素に対する包絡球 各凸要素に対しても、それぞれの凸要素を包絡する球が
定義される。計算方法は、(a)と同様である。ただし、m
ax,minを定義する時のサフィックスiは各凸要素のポリ
ゴン集合を意味する。 (c) 包絡球による事前のチェックアルゴリズム図56は
包絡球による事前のチェックの処理フローである。各非
凸多面体A,Bの包絡球半径RA,RB、包絡球中心P
CA,PCBを前述の方法で求め(ステップ2201、
2202)、各包絡球の中心間距離rを次式 r=|PCA−PCB| により求め、r≦(RA+RB)かチェックする(ステ
ップ2203)。r>(RA+RB)であれば干渉なし
と判定する(ステップ2204)。r≦(RA+RB)
であれば、干渉するものと判定し、以後非凸多面体同士
の干渉チェックを行う(ステップ2205)。
(B) Envelope sphere for convex element For each convex element, a sphere that envelopes each convex element is defined. The calculation method is the same as in (a). Where m
The suffix i when defining ax, min means a polygon set of each convex element. (c) Preliminary Check Algorithm Using Envelope Sphere FIG. 56 is a processing flow of a prior check using an envelope sphere. Envelope sphere radii RA, RB of each non-convex polyhedron A, B, envelope sphere center P
CA and PCB are obtained by the above-described method (step 2201,
2202), the center-to-center distance r of each envelope sphere is determined by the following equation: r = | PCA-PCB |, and it is checked whether r ≦ (RA + RB) (step 2203). If r> (RA + RB), it is determined that there is no interference (step 2204). r ≦ (RA + RB)
If so, it is determined that they interfere with each other, and thereafter interference check between non-convex polyhedrons is performed (step 2205).

【0148】(P)干渉チェックサブアルゴリズム (凸多面体干渉チェックにおける連続探索)近接点線形
リストより、最新に求まっている最接近点に近接する頂
点を抽出し、これら頂点にGilbert法による干渉チェッ
ク法を適用して所定時間後の最接近点を探索する。この
ようにすることにより、干渉チェックに要する時間は凸
多面体を表現するポリゴン数にほとんど依存しない一定
数以下に抑えることができる。 (a) Gilbert法 凸多面体K1,K2間の最接近点間の距離ν(K)はg
K(νK)=0となるνKに対し、(12)′式を使って ν(K)=νk=ν(coVk)=Σλiyi(i∈Is) =Σλix1i(i∈IK1Sk)−Σλix2i(i∈IK2Sk ) (19) ただし、x1i:K1を構成する頂点 x2i:K2を構成する頂点 で与えられる。
(P) Interference Check Sub-Algorithm (Continuous Search in Convex Polyhedron Interference Check) Extract vertices that are closest to the closest approach point obtained from the nearest point linear list, and use the Gilbert's interference check method for these vertices. Is applied to search for the closest approach point after a predetermined time. By doing so, the time required for the interference check can be suppressed to a certain number or less that hardly depends on the number of polygons representing the convex polyhedron. (a) Gilbert method The distance ν (K) between the closest points between the convex polyhedrons K1 and K2 is g
For νK where K (νK) = 0, using equation (12) ′, ν (K) = νk = ν (coVk) = Σλiiy (i (Is) = Σλix1i (i∈IK1Sk) −Σλix2i (i∈) IK2Sk) (19) where x1i: a vertex of K1 and x2i: a vertex of K2.

【0149】(b) Gilbert法の直感的理解 図57はGilbert法による最接近点探索法を直感的に理
解できるようにした説明図である。その各プロセスを簡
単に説明すると以下のようになる。 1) ベクトルηの設定 2つの物体の幾何学的重心を結び、ν0とする(図57
図(a))。 2) 以下の内積計算 hK1(−ν0)=max[−x1i・ν0:i=1,・・・m1] (20) hK2(−ν0)=max[−x2i・ν0:i=1,・・・m2] (21) を行い、ベクトルν0の方向で互いに最も接近している
2点p0,q0を選びだす(図57図(a))。 3) ν1の更新 2点p0,q0を結んでν1とする(図57図(b))。 4) 内積計算 ν1に対して2)と同じ内積計算を行い、新たな2点p
1,q1を選びだす(図57図(b))。 5) 内積計算とν1の更新を繰り返して、最終的な最接
近点ベクトルνfinalを求める(図57図(c))。 上記のプロセスから判る通り、Gilbert法における主な
計算負荷は内積計算の過程で発生する。従って、Gilber
t法における最接近点探索の計算時間はO(m1+m2)とな
る。
(B) Intuitive Understanding of the Gilbert Method FIG. 57 is an explanatory diagram for intuitively understanding the closest approach point searching method by the Gilbert method. Each process is briefly described as follows. 1) Setting of vector η The geometric centroids of two objects are connected to each other and set to ν0 (FIG. 57).
Figure (a)). 2) Calculation of the following inner product hK1 (−ν0) = max [−x1i · ν0: i = 1,... M1] (20) hK2 (−ν0) = max [−x2i · ν0: i = 1,. [M2] (21) to select the two points p0 and q0 that are closest to each other in the direction of the vector ν0 (FIG. 57 (a)). 3) Update of ν1 The two points p0 and q0 are connected to form ν1 (FIG. 57 (b)). 4) Inner product calculation The same inner product calculation as in 2) is performed on ν1 and two new points p
1 and q1 are selected (FIG. 57 (b)). 5) The inner product calculation and the update of ν1 are repeated to obtain the final closest approach point vector νfinal (FIG. 57 (c)). As can be seen from the above process, the main computational load in the Gilbert method occurs during the dot product calculation. Therefore, Gilber
The calculation time of the closest approach point search in the t method is O (m1 + m2).

【0150】(c) 凸多面体における連続干渉チェック Gilbert法における計算負荷はサポート関数hK1,h
K2の内積計算の過程で発生する。そこで、この内積計
算の回数を減らすために最接近ベクトルν(K)の近接
点を効率的に見つけだす方法を考える。凸多面体K1,
K2の最接近点νK1,νK2は(19)式から次式で与え
られる。 νK1=Σλix1i (i∈IK1Sk) (22) νK2=Σλix2i (i∈IK2Sk) (23) 最接近点を連続的にサーチする場合、所定時間後の最接
近点は(22),(23)式で与えられるνK1,νK2の近傍
に存在する。従って、サポート関数hK1,hK2を計
算する場合の頂点は(22),(23)式における頂点x1i,
x2iの近接点に限ることができる。
(C) Continuous interference check in convex polyhedron The computation load in the Gilbert method is determined by the support functions hK1, h
It occurs in the process of calculating the inner product of K2. Therefore, in order to reduce the number of times of calculating the inner product, a method of efficiently finding a proximity point of the closest approach vector ν (K) will be considered. Convex polyhedron K1,
The closest approach points νK1 and νK2 of K2 are given by the following equations from equation (19). νK1 = Σλix1i (i∈IK1Sk) (22) νK2 = Σλix2i (i∈IK2Sk) (23) In the case of continuously searching for the closest approach point, the closest approach point after a predetermined time is given by formulas (22) and (23). It exists near the given νK1 and νK2. Therefore, the vertices for calculating the support functions hK1 and hK2 are vertices x1i,
x2i.

【0151】図58は凸多面体における連続的干渉チェ
ックアルゴリズムのフローである。まず、2つの凸多面
体のそれぞれの幾何中心GK1,GK2を求め、ベクト
ル ν0=GK1−GK2 を求める(ステップ2301)。ついで、ν0を初期値
としてGilbert法による干渉チェックアルゴリズムを実
行し、(22),(23)式で与えられるνK1,νK2を求める
(ステップ2302)。しかる後、ν0=νK1−νK
2としてGilbert法による干渉チェックアルゴリズムを
実行する(ステップ2303)。ただし、サポート関数 hK(−ν1)=hK1(−ν1)+hK2(ν1) の計算において、hK1(−ν1),hK2(ν1)は
以下の式に基づいて計算する。 hK1(−ν1)=max[−x1i・ν1:p=(22)式で与えられるx1i の近接点 集合の番号] hK2(−ν1)=max[−x2i・ν1:p=(22)式で与えられるx1i の近接点 集合の番号] ついで、(22),(23)式により最接近点を算出し、以後g
K(νK)=0となるまでステップ2303以降の処理
を繰り返す。図58における頂点x1i,x2iの近接
点の個数は、殆どのCGモデル(形状モデル)において
数10以下に抑えることができる。従って、連続的干渉
チェックアルゴリズムの計算負荷は、CGモデルのポリ
ゴン数に関係なく一定である。
FIG. 58 is a flowchart of a continuous interference check algorithm for a convex polyhedron. First, the geometric centers GK1 and GK2 of the two convex polyhedrons are obtained, and the vector ν0 = GK1-GK2 is obtained (step 2301). Then, an interference check algorithm by the Gilbert method is executed using ν0 as an initial value, and νK1 and νK2 given by the equations (22) and (23) are obtained.
(Step 2302). Then, ν0 = νK1-νK
As 2, an interference check algorithm by the Gilbert method is executed (step 2303). However, in the calculation of the support function hK (−ν1) = hK1 (−ν1) + hK2 (ν1), hK1 (−ν1) and hK2 (ν1) are calculated based on the following equations. hK1 (−ν1) = max [−x1i · ν1: p = number of sets of adjacent points of x1i given by equation (22)] hK2 (−ν1) = max [−x2i · ν1: p = p22 The number of the set of proximity points of given x1i] Then, the closest point is calculated by the equations (22) and (23), and thereafter g
The process from step 2303 is repeated until K (νK) = 0. The number of points near the vertices x1i and x2i in FIG. 58 can be suppressed to several tens or less in most CG models (shape models). Therefore, the calculation load of the continuous interference check algorithm is constant regardless of the number of polygons in the CG model.

【0152】(Q)干渉チェックサブアルゴリズム(凸
包の動的構成/解除) 非凸多面体に対し、それを包絡する最小の凸多面体とし
て凸包を定義する。非凸多面体間の距離が十分離れてい
る場合には凸包間の干渉チェックを行い、凸包同士が干
渉し始めたら、非凸多面体を構成する凸要素間の干渉チ
ェックに自動的に移行する。非凸多面体間の距離が再び
大きくなった場合には、凸包が回復し、凸包間の干渉チ
ェックに戻す。 (a) 凸包の動的構成/解除の基本的な考え方 図59、図60はは凸包の構成/解除の基本的な考え方
を示す説明図である。図59において、A,Bは第1、
第2の非凸多面体、CA1,CA2は非凸多面体Aを構
成する凸多面体、CB1,CB2は非凸多面体Bを構成
する凸多面体である。 1) 非凸多面体A,Bが十分離れている場合には凸包
A′、B′間の干渉チェックを行う(図60(a)参照)。
(Q) Interference Check Sub-Algorithm (Dynamic Construction / Release of Convex Hull) For a non-convex polyhedron, a convex hull is defined as the smallest convex polyhedron that envelopes it. When the distance between the non-convex polyhedrons is sufficiently large, an interference check between the convex hulls is performed. When the convex hulls start to interfere with each other, the process automatically shifts to an interference check between the convex elements constituting the non-convex polyhedron. . When the distance between the non-convex polyhedrons is increased again, the convex hull is recovered, and the process returns to the check for interference between convex hulls. (a) Basic Concept of Dynamic Configuration / Release of Convex Hull FIGS. 59 and 60 are explanatory diagrams showing the basic concept of configuration / release of a convex hull. In FIG. 59, A and B are the first,
The second non-convex polyhedron, CA1 and CA2, are convex polyhedrons constituting the non-convex polyhedron A, and CB1, CB2 are convex polyhedrons constituting the non-convex polyhedron B. 1) If the non-convex polyhedrons A and B are sufficiently separated, an interference check between the convex hulls A 'and B' is performed (see FIG. 60 (a)).

【0153】2) 凸包A′、B′同士が干渉を始めると
(図60(b)参照)、一方の凸包A′を解除し、凸要素C
A1,CA2と凸包B′との干渉チェックを行い、干渉
する場合には凸要素CA1を取り出す(図60(c)参
照)。 3) ついで、凸要素と凸包との立場を入れ替えて、もう
一方の凸包B′を解除し、解除した凸包の凸要素CB
1,CB2と凸包A′との干渉をチェックを行い、干渉
している凸要素CB1を取り出す(図60(d)参照)。 4) 最後に、取り出した凸要素のすべての組合せ(図6
0ではCA1,CB1)について干渉チェックを行い、
それらの内で距離が最小となる距離を求める。(図60
(e))。 2)において、例えば、図61(a)に示すように、凸要素
CA1,CA2と凸包B′間の干渉が存在しないような
場合、凸要素CA1,CA2と凸包B′間の最接近ベク
トルを求め、該ベクトルを与える2つの端点p,qを最
接近点とする。又、図61(b)のように、凸要素CB
1,CB2と凸包A′間の立場を入れ替えた場合におい
て、凸包と凸要素間の干渉が存在しない場合には、凸要
素CB1,CB2と凸包A′間の最接近ベクトルを求
め、該ベクトルを与える2つの端点p′,q′を最接近
点とする。
2) When convex hulls A 'and B' start to interfere with each other
(See FIG. 60 (b)), one convex hull A 'is released, and the convex element C
An interference check between A1 and CA2 and the convex hull B 'is performed, and if there is interference, the convex element CA1 is taken out (see FIG. 60 (c)). 3) Next, the positions of the convex element and the convex hull are exchanged, the other convex hull B 'is released, and the convex element CB of the released convex hull is released.
1, CB2 and the convex hull A 'are checked for interference, and the interfering convex element CB1 is extracted (see FIG. 60 (d)). 4) Finally, all combinations of the extracted convex elements (Fig. 6
At 0, interference check is performed for CA1, CB1),
The distance that minimizes the distance is calculated. (FIG. 60
(e)). In 2), for example, as shown in FIG. 61 (a), when there is no interference between the convex elements CA1, CA2 and the convex hull B ', the closest approach between the convex elements CA1, CA2 and the convex hull B' A vector is obtained, and two end points p and q giving the vector are set as points of closest approach. In addition, as shown in FIG.
1, CB2 and the convex hull A 'are interchanged, and if there is no interference between the convex hull and the convex hull, the closest approach vector between the convex elements CB1 and CB2 and the convex hull A' is obtained. The two end points p 'and q' giving the vector are the closest points.

【0154】図62は凸包の動的構成/解除アルゴリズ
ムの処理フローである。非凸多面体A,Bの凸包A′、
B′間に干渉チェック処理(最接近探索処理)を施し、
最接近点間の距離r(A′,B′)を求める。ついで、
r(A′,B′)とεCHの大小を判断する(ステップ
2401)。εCHはユーザ定義の微小定数である。r
(A′,B′)>εCHの場合には凸包A′、B′は干
渉しないから、凸包A′、B′間の最接近点を非凸多面
体A,B間の最接近点とし、出力する(ステップ240
2)。以後、凸包を維持したまま上記処理を繰り返す。
一方、r(A′,B′)≦εCHの場合には、凸包同士
が干渉するから一方の凸包、例えば凸包A′を解除す
る。非凸多面体Aの凸要素CAiの和集合を∪iCAi
と表現する。ついで、凸包B′と各凸要素CAi間の距
離r(CAi,B′)がεCCH以下の凸要素の部分集
合∪iCCAiを求める(ステップ2403)。εCC
Hはユーザ定義の微小定数である。しかる後、部分集合
∪iCCAiを構成する凸要素数が0であるかチェック
する(ステップ2404)。∪iCCAi=0の場合に
は、r(CAi,B′)のうち最小距離 MINir(CA
i,B′)を与える凸要素CAkを求め、該凸要素CA
kと凸包B′間の最接近点を求め、該最接近点を非凸多
面体A,B間の最接近点として出力する(ステップ24
05)。
FIG. 62 is a processing flow of a dynamic construction / cancellation algorithm of a convex hull. Convex hull A 'of non-convex polyhedrons A and B,
Interference check processing (closest search processing) is performed between B '
The distance r (A ', B') between the closest points is obtained. Then
It is determined whether r (A ′, B ′) and εCH are large or small (step 2401). εCH is a user-defined minute constant. r
When (A ′, B ′)> εCH, the convex hulls A ′ and B ′ do not interfere with each other, so the closest point between the convex hulls A ′ and B ′ is the closest point between the non-convex polyhedrons A and B. Output (step 240
2). Thereafter, the above processing is repeated while maintaining the convex hull.
On the other hand, when r (A ′, B ′) ≦ εCH, one convex hull, for example, the convex hull A ′ is released because the convex hulls interfere with each other. Let the union of the convex elements CAi of the non-convex polyhedron A be ∪iCAi
Is expressed as Next, a subset 凸 iCCAi of convex elements whose distance r (CAi, B ′) between the convex hull B ′ and each convex element CAi is equal to or smaller than εCCH is obtained (step 2403). εCC
H is a user-defined minute constant. Thereafter, it is checked whether the number of convex elements constituting the subset ∪iCCAi is 0 (step 2404). ∪If iCCAi = 0, the minimum distance MINir (CA) of r (CAi, B ′)
i, B '), and finds the convex element CAk.
The closest point between k and the convex hull B 'is determined, and the closest point is output as the closest point between the non-convex polyhedrons A and B (step 24).
05).

【0155】しかし、∪iCCAi>0の場合には、他
方の凸包B′を解除する。非凸多面体Bの凸要素CBj
の和集合を∪jCBjと表現する。ついで、凸包A′と
各凸要素CBj間の距離r(CBj,A′)がεCCH
以下の凸要素の部分集合∪jCCBjを求める(ステッ
プ2406)。しかる後、部分集合∪jCCBjを構成
する凸要素数が0であるかチェックする(ステップ24
07)。∪jCCBj=0の場合には、r(CBj,
A′)のうち最小距離 MINjr(CBj,A′)を与え
る凸要素CBkを求め、該凸要素CBkと凸包A′間の
最接近点を求め、該最接近点を非凸多面体A,B間の最
接近点として出力する(ステップ2408)。しかし、
∪jCCBj>0の場合には、部分集合∪iCCAiと
∪jCCBj間の最小距離 MINi,j R(CCAi,
CCBj)を与える凸要素CCAp、CCBqを求め、
その間の最接近点を求め、非凸多面体A,B間の最接近
点として出力する(ステップ2409)。以後、初めに
戻り以降の処理を繰り返す。
However, if ∪iCCAi> 0, the other convex hull B ′ is released. Convex element CBj of non-convex polyhedron B
Is expressed as ∪jCBj. Next, the distance r (CBj, A ') between the convex hull A' and each convex element CBj is εCCH
The following subset of convex elements ∪jCCBj is obtained (step 2406). Thereafter, it is checked whether the number of convex elements constituting the subset ∪jCCBj is 0 (step 24).
07). ∪ If jCCBj = 0, r (CBj,
A ′), a convex element CBk that gives the minimum distance MINjr (CBj, A ′) is obtained, the closest point between the convex element CBk and the convex hull A ′ is obtained, and the closest point is determined as a non-convex polyhedron A, B It is output as the point of closest approach (step 2408). But,
If ∪jCCBj> 0, the minimum distance MINi, j R (CCAi,
CCBj) to obtain convex elements CCAp and CCBq
The closest point between them is determined and output as the closest point between the non-convex polyhedrons A and B (step 2409). Thereafter, the process returns to the beginning and the subsequent processes are repeated.

【0156】(R)干渉チェックサブアルゴリズム(凸
包の動的構成/解除及び凸多面体連続干渉チェック) 非凸多面体に対し、それを包絡する最小の凸多面体とし
て凸包を定義する。非凸多面体間の距離が十分離れてい
る場合には凸包間の連続干渉チェックを行い、凸包同士
が干渉し始めたら、非凸多面体を構成する凸要素間の干
渉チェックに自動的に移行する。非凸多面体間の距離が
再び大きくなった場合には、凸包が回復し、凸包間の連
続干渉チェックに戻す。図63は凸包の動的構成/解除
及び凸多面体連続干渉チェックのアルゴリズムの処理フ
ロー、図64〜図66はその説明図である。非凸多面体
A,Bの凸包A′、B′間に干渉チェック処理(最接近
探索処理)を施し、最接近点間の距離r(A′,B′)
を求める。ついで、r(A′,B′)とεCHの大小を
判断する。又、フラグcontflgA′=1とする(ステッ
プ2501)。r(A′,B′)>εCHの場合には凸
包A′、B′は干渉しないから、凸包A′、B′間の最
接近点を非凸多面体A,B間の最接近点とし、出力する
(ステップ2502)。以後、凸包を維持したまま上記
処理を繰り返す。
(R) Interference Check Sub-Algorithm (Dynamic Construction / Canceling of Convex Hull and Convex Polyhedron Continuous Interference Check) For a non-convex polyhedron, a convex hull is defined as the smallest convex polyhedron that envelopes it. If the distance between the non-convex polyhedrons is sufficiently large, a continuous interference check between the convex hulls is performed. If the convex hulls start to interfere with each other, the system automatically shifts to the interference check between the convex elements constituting the non-convex polyhedron I do. When the distance between the non-convex polyhedrons is increased again, the convex hull is recovered, and the process returns to the continuous interference check between convex hulls. FIG. 63 is a processing flow of an algorithm for dynamically constructing / releasing a convex hull and checking for a convex polyhedron continuous interference, and FIGS. 64 to 66 are explanatory diagrams thereof. An interference check process (closest search process) is performed between the convex hulls A 'and B' of the non-convex polyhedrons A and B, and a distance r (A ', B') between the closest points.
Ask for. Then, the magnitudes of r (A ', B') and εCH are determined. Also, the flag contflgA '= 1 is set (step 2501). When r (A ', B')> εCH, the convex hulls A 'and B' do not interfere with each other, so the closest point between the convex hulls A 'and B' is the closest point between the non-convex polyhedrons A and B. Is output (step 2502). Thereafter, the above processing is repeated while maintaining the convex hull.

【0157】図64はステップ2501、2502のプ
ロセスを具体的に示すものである。図64に示すとお
り、凸包間の干渉チェックでは、初回のサポート関数h
の計算は、全点に対する内積計算に基づいて算出される
が、次回以降は連続型干渉チェックのアルゴリズムに基
づいて算出される。すなわち、内積計算は最接近点の近
接点に限られる。連続型干渉チェックでは、前回の最接
近点情報を保持しておくことが必要であるが、この情報
は、凸包A′、B′の片方の属性として保持される。ス
テップ2502の過程では、contflgA′=1のフラグ
が立ち、(A′,B′)間の干渉チェックが連続型とな
る。ステップ2501において、r(A′,B′)≦ε
CHの場合には、凸包同士が干渉するから一方の凸包、
例えば凸包A′を解除する。非凸多面体Aの凸要素CA
iの和集合を∪iCAiと表現する。ついで、凸包B′
と各凸要素CAi間の距離r(CAi,B′)がεCC
H以下の凸要素の部分集合∪iCCAiを求める。又、
フラグcontflgCCA1=1とする(ステップ250
3)。
FIG. 64 specifically shows the process of steps 2501 and 2502. As shown in FIG. 64, in the interference check between convex hulls, the first support function h
Is calculated based on the inner product calculation for all points, but is calculated based on the algorithm of the continuous interference check from the next time onward. That is, the inner product calculation is limited to the closest point to the closest point. In the continuous interference check, it is necessary to hold the information of the closest point of last time, but this information is held as one attribute of the convex hulls A ′ and B ′. In the process of step 2502, the flag of contflg A '= 1 is set, and the interference check between (A', B ') becomes a continuous type. In step 2501, r (A ′, B ′) ≦ ε
In the case of CH, the convex hulls interfere with each other,
For example, the convex hull A 'is released. Convex element CA of non-convex polyhedron A
The union of i is expressed as ∪iCAi. Then, the convex hull B '
And the distance r (CAi, B ') between each convex element CAi is εCC
A subset 凸 iCCAi of convex elements equal to or less than H is obtained. or,
The flag contflgCCA1 = 1 (step 250)
3).

【0158】しかる後、部分集合∪iCCAiを構成す
る凸要素数が0であるかチェックする(ステップ250
4)。∪iCCAi=0の場合には、r(CAi,
B′)のうち最小距離 MINir(CAi,B′)を与え
る凸要素CAkを求め、該凸要素CAkと凸包B′間の
最接近点を求める。そして、該最接近点を非凸多面体
A,B間の最接近点として出力する(ステップ250
5)。r(CAi,B′)は連続型干渉チェックで求め
る。
Thereafter, it is checked whether the number of convex elements constituting the subset ∪iCCAi is 0 (step 250).
4). ∪ If iCCAi = 0, r (CAi,
B ′), a convex element CAk that gives the minimum distance MINir (CAi, B ′) is determined, and the closest point between the convex element CAk and the convex hull B ′ is determined. Then, the closest point is output as the closest point between the non-convex polyhedrons A and B (step 250).
5). r (CAi, B ') is obtained by a continuous interference check.

【0159】図65(a)は、ステップ2503〜250
5の具体的な説明図である。連続型干渉チェックにおけ
る前回の最接近点情報は、非凸多面体Aの凸要素CAi
の属性として保持される。ステップ2503においてco
ntflgCCA1=1のフラグが立ち、ステップ2505
における(CAi,B′)間の干渉チェックは連続型と
なる。ステップ2504において、∪iCCAi>0の
場合には他方の凸包B′を解除する。非凸多面体Bの凸
要素CBjの和集合を∪jCBjと表現する。ついで、
凸包A′と各凸要素CBj間の距離r(CBj,A′)
がεCCH以下の凸要素の部分集合∪jCCBjを求め
る。又、フラグcontflgCCB1=1とする(ステップ
2506)。しかる後、部分集合∪jCCBjを構成す
る凸要素数が0であるかチェックする(ステップ250
7)。∪jCCBj=0の場合には、r(CBj,
A′)のうち最小距離 MINjr(CBj,A′)を与え
る凸要素CBkを求め、該凸要素CBkと凸包A′間の
最接近点を求め、該最接近点を非凸多面体A,B間の最
接近点として出力する(ステップ2508)。
FIG. 65A shows steps 2503 to 250
FIG. 5 is a specific explanatory diagram of FIG. The previous closest point information in the continuous interference check is the convex element CAi of the non-convex polyhedron A.
Is retained as an attribute. In step 2503, co
The flag of ntflgCCA1 = 1 is set, and step 2505 is executed.
The interference check between (CAi, B ') is a continuous type. In step 2504, if ∪iCCAi> 0, the other convex hull B ′ is released. The union of the convex elements CBj of the non-convex polyhedron B is expressed as ∪jCBj. Then
Distance r (CBj, A ') between convex hull A' and each convex element CBj
Is a subset BjCCBj of convex elements of which are not more than εCCH. Also, the flag contflgCCB1 = 1 is set (step 2506). Thereafter, it is checked whether the number of convex elements constituting the subset ∪jCCBj is 0 (step 250).
7). ∪ If jCCBj = 0, r (CBj,
A ′), a convex element CBk that gives the minimum distance MINjr (CBj, A ′) is obtained, the closest point between the convex element CBk and the convex hull A ′ is obtained, and the closest point is determined as a non-convex polyhedron A, B It is output as the point of closest approach (step 2508).

【0160】図65(b)は、ステップ2506〜250
8の具体的な説明図である。連続型干渉チェックにおけ
る前回の最接近点情報は、非凸多面体Bの凸要素CBj
の属性として保持される。ステップ2506においてco
ntflgCCBj=1のフラグが立ち、ステップ2508
における(CAi,B′)間の干渉チェックは連続型と
なる。ステップ2507において、∪jCCBj>0の
場合には、部分集合∪iCCAiと∪jCCBj間の最
小距離 MINi,j R(CCAi,CCBj)を与える
凸要素CCAp、CCBqを求め、その間の最接近点を
求め、非凸多面体A,B間の最接近点として出力する。
又、全てのフラグcontflgA′、contflgB′、contflg
CCA1、contflgCCBjを0にリセットする(ステ
ップ2509)。以後、初めに戻り以降の処理を繰り返
す。図66は以上の流れを全体的に示す説明図である。
FIG. 65 (b) shows steps 2506 to 250
FIG. 8 is a specific explanatory diagram of FIG. The previous closest point information in the continuous interference check is the convex element CBj of the non-convex polyhedron B.
Is held as an attribute. In step 2506, co
The flag of ntflgCCBj = 1 is set, and step 2508 is executed.
The interference check between (CAi, B ') is a continuous type. In step 2507, if ∪jCCBj> 0, convex elements CCAPp and CCBq that give the minimum distance MINi, jR (CCAi, CCBj) between subsets ∪iCCAi and ∪jCCBj are obtained, and the closest approach point therebetween is obtained. , Is output as the point of closest approach between the non-convex polyhedrons A and B.
Also, all flags contflgA ', contflgB', contflg
CCA1 and contflgCCBj are reset to 0 (step 2509). Thereafter, the process returns to the beginning and the subsequent processes are repeated. FIG. 66 is an explanatory diagram showing the entire flow described above.

【0161】(S)干渉チェックサブアルゴリズム(凸
包の動的構成/解除及び包絡球干渉チェック) 非凸多面体に対し、それを包絡する最小の凸多面体とし
て凸包を定義する。非凸多面体間の距離が十分離れてい
る場合には凸包を包絡する凸包包絡球同士の干渉チェッ
クを行い、凸包包絡球同士が干渉し始めたら凸包同士の
干渉チェックを行う。凸包同士が干渉し始めたら、非凸
多面体を構成する凸要素に対して、包絡球干渉チェック
と凸多面体干渉チェックを行う。非凸多面体間の距離に
応じて包絡球干渉チェックと凸包の構成/解除が動的に
切り替わる。図67は凸包の動的構成/解除及び包絡球
干渉チェックの処理フローである。各非凸多面体A,B
の包絡球半径RA,RB、包絡球中心PCA,PCBを
求め(ステップ2501、2502)、各包絡球の中心
間距離rを次式 r=|PCA−PCB| により求め、r≦(RA+RB)かチェックする(ステ
ップ2503)。
(S) Interference Check Sub-Algorithm (Dynamic Construction / Release of Convex Hull and Envelope Sphere Interference Check) For a non-convex polyhedron, a convex hull is defined as the smallest convex polyhedron that envelopes it. When the distance between the non-convex polyhedrons is sufficiently large, an interference check is performed between the convex envelope spheres that envelope the convex hull, and when the convex envelope spheres start to interfere with each other, an interference check between the convex hulls is performed. When the convex hulls start to interfere with each other, an envelope sphere interference check and a convex polyhedron interference check are performed on the convex elements constituting the non-convex polyhedron. The envelope sphere interference check and the configuration / cancellation of the convex hull are dynamically switched according to the distance between the non-convex polyhedrons. FIG. 67 is a processing flow of dynamic configuration / cancellation of a convex hull and an envelope sphere interference check. Each non-convex polyhedron A, B
Of the envelope spheres RA, RB and the centers of the envelope spheres PCA, PCB (steps 2501, 2502), and the distance r between the centers of the envelope spheres is determined by the following equation: r = | PCA-PCB |, and r ≦ (RA + RB) Check (step 2503).

【0162】r>(RA+RB)であれば干渉なしと判
定し、最接近点間距離としてrを出力する(ステップ2
504)。r≦(RA+RB)であれば、非凸多面体
A,Bの凸包A′、B′間に干渉チェック処理(最接近
探索処理)を施し、最接近点間の距離r(A′,B′)
を求める。ついで、r(A′,B′)とεCHの大小を
判断する(ステップ2505)。r(A′,B′)>ε
CHの場合には凸包A′、B′は干渉しないから、凸包
A′、B′間の最接近点を非凸多面体A,B間の最接近
点とし、出力する(ステップ2506)。一方、r
(A′,B′)≦εCHの場合には、凸包同士が干渉す
るから一方の凸包、例えば凸包A′を解除する。非凸多
面体Aの凸要素CAiの和集合を∪iCAiと表現す
る。ついで、各凸要素CAiの包絡球と非凸多面体Bの
包絡球間の干渉チェックを行い、干渉する各凸要素CA
iと凸包B′間で干渉チェックを行う。しかる後、凸包
B′と各凸要素CAi間の距離r(CAi,B′)がε
CCH以下の凸要素の部分集合∪iSCCAiを求める
(ステップ2507)。
If r> (RA + RB), it is determined that there is no interference, and r is output as the distance between the closest approach points (step 2).
504). If r ≦ (RA + RB), an interference check process (closest search process) is performed between the convex hulls A ′ and B ′ of the non-convex polyhedrons A and B, and a distance r (A ′, B ′) between the closest approach points )
Ask for. Next, the magnitudes of r (A ', B') and εCH are determined (step 2505). r (A ′, B ′)> ε
In the case of CH, since the convex hulls A 'and B' do not interfere with each other, the point of closest approach between the convex hulls A 'and B' is set as the point of closest approach between the non-convex polyhedrons A and B and is output (step 2506). On the other hand, r
If (A ′, B ′) ≦ εCH, one convex hull, for example, the convex hull A ′ is released because the convex hulls interfere with each other. The union of the convex elements CAi of the non-convex polyhedron A is expressed as ∪iCAi. Next, an interference check between the envelope sphere of each convex element CAi and the envelope sphere of the non-convex polyhedron B is performed, and each interfering convex element CAi
An interference check is performed between i and the convex hull B '. Thereafter, the distance r (CAi, B ') between the convex hull B' and each convex element CAi is ε.
A subset ∪iSCCAi of convex elements below CCH is obtained (step 2507).

【0163】ついで、部分集合∪iSCCAiを構成す
る凸要素数が0であるかチェックする(ステップ250
8)。∪iSCCAi=0の場合には、r(CAi,
B′)のうち最小距離 MINir(CAi,B′)を与え
る凸要素CAkを求め、該凸要素CAkと凸包B′間の
最接近点を求め、該最接近点を非凸多面体A,B間の最
接近点として出力する(ステップ2509)。∪iSC
CAi>0の場合には、他方の凸包B′を解除する。非
凸多面体Bの凸要素CBjの和集合を∪jCBjと表現
する。ついで、各凸要素CBjの包絡球と非凸多面体A
の包絡球間の干渉チェックを行い、干渉する各凸要素C
Bjと凸包A′間で干渉チェックを行う。しかる後、凸
包A′と各凸要素CBj間の距離r(CBj,A′)が
εCCH以下の凸要素の部分集合∪jSCCBjを求め
る(ステップ2510)。ついで、部分集合∪jSCC
Bjを構成する凸要素数が0であるかチェックする(ス
テップ2511)。∪jSCCBj=0の場合には、r
(CBj,A′)のうち最小距離 MINir(CBj,
A′)を与える凸要素CBkを求め、該凸要素CBkと
凸包A′間の最接近点を求め、該最接近点を非凸多面体
A,B間の最接近点として出力する(ステップ251
2)。
Next, it is checked whether the number of convex elements constituting the subset ∪iSCCAi is 0 (step 250).
8). ∪ If iSCCAi = 0, r (CAi,
B ′), a convex element CAk that gives the minimum distance MINir (CAi, B ′) is determined, the closest point between the convex element CAk and the convex hull B ′ is determined, and the closest point is defined as a non-convex polyhedron A, B It is output as the point of closest approach (step 2509). ∪iSC
If CAi> 0, the other convex hull B 'is released. The union of the convex elements CBj of the non-convex polyhedron B is expressed as ∪jCBj. Next, the envelope sphere of each convex element CBj and the non-convex polyhedron A
Check for interference between the envelope spheres of
An interference check is performed between Bj and the convex hull A '. Thereafter, a subset 凸 jSCCBj of convex elements whose distance r (CBj, A ′) between the convex hull A ′ and each convex element CBj is equal to or smaller than εCCH is obtained (step 2510). Then, the subset ∪jSCC
It is checked whether the number of convex elements constituting Bj is 0 (step 2511). R If jSCCBj = 0, r
(CBj, A ') minimum distance MINir (CBj,
A ′) is obtained, the closest point between the convex element CBk and the convex hull A ′ is obtained, and the closest point is output as the closest point between the non-convex polyhedrons A and B (step 251).
2).

【0164】しかし、∪jSCCBj>0の場合には、
部分集合∪iSCCAiと∪jSCCBj間の最小距離
MINi,j r(SCCAi,SCCBj)を与える凸
要素SCCAp、SCCBqを求め、その間の最接近点
を求め、非凸多面体A,B間の最接近点として出力する
(ステップ2513)。以後、初めに戻り以降の処理を
繰り返す。尚、図67のアルゴリズムに図63の凸多面
体の連続干渉チェック処理を組み込むことにより、干渉
チェックを高速化することができる。
However, when ∪jSCCBj> 0,
Minimum distance between subsets ∪iSCCAi and ∪jSCCBj
The convex elements SCCAp and SCCBq that give MINi, jr (SCCAi, SCCBj) are obtained, the closest approach point between them is obtained, and output as the closest approach point between the non-convex polyhedrons A and B (step 2513). Thereafter, the process returns to the beginning and the subsequent processes are repeated. The interference check can be speeded up by incorporating the continuous interference check processing of the convex polyhedron shown in FIG. 63 into the algorithm shown in FIG.

【0165】(T)干渉チェックシステムの構成 図68は本発明の干渉チェックシステムの構成図であ
り、21は形状モデルを生成してポリゴンデータファイ
ルを出力する三次元CADシステム、22はポリゴンデ
ータファイルや前処理により求めた凸要素データ、近接
点多分木リスト、近接点線形リスト等を記憶するメモ
リ、23はポリゴンデータファイルより近接点多分木リ
ストを作成する近接点多分木リスト作成部、24は近接
点多分木リストより近接点線形リストを生成する近接点
線形リスト作成部、25は非凸多面体を凸要素の集合に
分解する凸分解部、26は干渉チェック部、27は近接
点線形リストを外部記録媒体に出力すると共に、適宜読
み出してメモリ22に展開するリスト入出力部、28は
ハードディスク等の外部記録媒体である。
(T) Structure of Interference Check System FIG. 68 is a diagram showing the structure of the interference check system of the present invention. Reference numeral 21 denotes a three-dimensional CAD system for generating a shape model and outputting a polygon data file. 23 is a memory that stores convex element data obtained by pre-processing, a proximity point multi-tree list, a proximity point linear list, etc., 23 is a proximity point multi-tree list creation unit that creates a proximity point multi-tree list from a polygon data file, and 24 is A near-point linear list creation unit that generates a near-point linear list from a near-point multitree list, 25 is a convex decomposition unit that decomposes a non-convex polyhedron into a set of convex elements, 26 is an interference check unit, and 27 is a near-point linear list. A list input / output unit 28 that outputs the data to an external recording medium, reads the data as appropriate, and expands the data in the memory 22. Medium.

【0166】(U)本発明の応用分野 本発明は以下のような分野における応用が可能である。 (a) 機構設計用CADシステム 機構設計では、製品を組み立てる時に不用意な干渉が度
々発生する。このようなことを事前に防ぐためには、機
構設計用CADシステム上にて部品間の接合関係、マー
ジンを入念にチェックしておくことが重要になる。リア
ルタイム干渉チェックシステムを機構設計用CADシス
テムに組み込むことにより、実際の製品に近い形での事
前チェックが可能となる。 (b) 移動ロボットの経路計画 マニピュレータや自走車などの移動ロボットでは、他の
物体と衝突しないよう経路計画を事前に行った後に駆動
させる場合が多い。例えば、マニピュレータを使った部
品組立てにおいては、部品間の干渉、部品とマニピュレ
ータ間との干渉をチェックしながら経路計画をする必要
がある。また、掃除ロボット、警護ロボット、運搬ロボ
ットなどの自走ロボットでは、地点間の移動において壁
や柱又は机等の障害物との衝突を回避した経路計画が必
要である。かかる場合、マニピュレータあるいはロボッ
ト制御部に高速の干渉チェックシステムを組込み、事前
にチェックする方法が有効である。
(U) Field of Application of the Present Invention The present invention can be applied in the following fields. (a) CAD system for mechanical design In mechanical design, inadvertent interference often occurs when assembling products. In order to prevent such a situation in advance, it is important to carefully check the bonding relationship between components and the margin on the CAD system for mechanical design. By incorporating the real-time interference check system into the CAD system for mechanical design, it is possible to perform a preliminary check in a form close to an actual product. (b) Path planning for mobile robots Mobile robots such as manipulators and self-propelled vehicles are often driven after performing path planning in advance so as not to collide with other objects. For example, in assembling parts using a manipulator, it is necessary to plan a path while checking interference between parts and interference between the part and the manipulator. In addition, a self-propelled robot such as a cleaning robot, a guard robot, or a transport robot needs a path plan that avoids collision with an obstacle such as a wall, a pillar, or a desk when moving between points. In such a case, it is effective to incorporate a high-speed interference check system into the manipulator or the robot control unit and perform a check in advance.

【0167】(c) マルチメディアにおけるアニメーショ
ン作成 アニメーションの分野では、グラフィックコンピュータ
を用いたリアリティの高いアニメーションの作成が望ま
れている。例えば、アンドロイドモデルを歩かせる場合
には、アンドロイドモデルと地上との接触問題を解かな
ければならず、又、自動車の衝突をシミュレーションす
る場合には、まさしく自動車間の干渉問題を解く必要が
ある。 (d) ゲームソフト 従来のゲームソフトはもっぱら二次元的なものが多かっ
たが、今後は、グラフコンピュータを使い、三次元的に
表示するものが主流になると予想される。ゲームソフト
では、例えば、シュ−ティングゲームにおけるミサイル
と戦闘機の衝突、レーシングゲームにおける車同士の衝
突など物体間の干渉問題が多い。本発明のリアルタイム
干渉チェックシステムは、上記応用分野において強力な
手段を提供するものである。以上、本発明を実施例によ
り説明したが、本発明は請求の範囲に記載した本発明の
主旨に従い種々の変形が可能であり、本発明はこれらを
排除するものではない。
(C) Creation of Animation in Multimedia In the field of animation, creation of highly realistic animation using a graphic computer is desired. For example, to make an android model walk, it is necessary to solve a contact problem between the android model and the ground, and to simulate an automobile collision, it is necessary to solve an interference problem between automobiles. (d) Game software Conventional game software was mostly two-dimensional, but in the future it is expected that those that use graph computers and display three-dimensionally will become mainstream. In game software, for example, there are many interference problems 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. The real-time interference check system of the present invention provides a powerful means in the above application field. As described above, the present invention has been described with reference to the embodiments. However, the present invention can be variously modified in accordance with the gist of the present invention described in the claims, and the present invention does not exclude these.

【0168】[0168]

【発明の効果】以上本発明によれば、前処理において近
接点線形リストを作成し、干渉チェックに際して最新に
求まっている最接近点に近接する頂点を該近接点線形リ
ストより求め、これら頂点の中より次の時刻における最
接近点を連続的に探索するようにしたから、全ての頂点
に最接近点探索処理を施す必要がないため、高速に干渉
チェックを行うことができる。又、包絡球や凸包を生成
し、離れている場合にはこれら包絡球や凸包を用いて干
渉チェックを行うようにしたから、高速の干渉チェック
を行うことができる。
As described above, according to the present invention, a near-point linear list is created in the preprocessing, and vertices close to the closest point closest to the latest point obtained at the time of interference check are obtained from the near-point linear list. Since the closest approach point at the next time from the middle is continuously searched, it is not necessary to perform the closest approach point search processing on all vertices, so that the interference check can be performed at high speed. Further, since an envelope sphere or a convex hull is generated and the interference check is performed by using these envelope spheres or the convex hull when the sphere is apart, a high-speed interference check can be performed.

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

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

【図2】凸多面体の表面多角形への分解説明図(6面体
の場合)である。
FIG. 2 is an exploded explanatory view of a convex polyhedron into surface polygons (in the case of a hexahedron).

【図3】最接近点探索のための凸多面体データ構造説明
図(6面体の場合)である。
FIG. 3 is an explanatory view of a convex polyhedron data structure for searching for a point of closest approach (in the case of a hexahedron).

【図4】本発明の第1の最接近点探索方法の処理フロー
図である。
FIG. 4 is a processing flowchart of a first closest approach point search method of the present invention.

【図5】凸多面体データ入力の説明図である。FIG. 5 is an explanatory diagram of convex polyhedral data input.

【図6】第1の最接近点探索装置の構成図である。FIG. 6 is a configuration diagram of a first closest point searching device.

【図7】凸多面体の三角形分割説明図である。FIG. 7 is an explanatory diagram of triangulation of a convex polyhedron.

【図8】多角形の三角形分割説明図である。FIG. 8 is an explanatory diagram of triangulation of a polygon.

【図9】第2の最接近点探索方法の処理フロー図であ
る。
FIG. 9 is a processing flowchart of a second closest approach point search method.

【図10】第2の最接近点探索装置の構成図である。FIG. 10 is a configuration diagram of a second closest point searching device.

【図11】マージング処理説明図である。FIG. 11 is an explanatory diagram of a merging process.

【図12】マージングデータ構造の説明図である。FIG. 12 is an explanatory diagram of a merging data structure.

【図13】マージングアルゴリズムの流れ図である。FIG. 13 is a flowchart of a merging algorithm.

【図14】凸包データ説明図である。FIG. 14 is an explanatory diagram of convex hull data.

【図15】タスクによるマージング処理の説明図であ
る。
FIG. 15 is an explanatory diagram of merging processing by a task.

【図16】While文を用いたマージング処理の説明図で
ある。
FIG. 16 is an explanatory diagram of a merging process using a While sentence.

【図17】環境が動的に変化する場合の本発明の説明図
(その1)である。
FIG. 17 is an explanatory diagram of the present invention when the environment changes dynamically.
(Part 1).

【図18】環境が動的に変化する場合の本発明の説明図
(その2)である。
FIG. 18 is an explanatory diagram of the present invention when the environment changes dynamically.
(Part 2).

【図19】マージング及びリカバリ処理説明図である。FIG. 19 is an explanatory diagram of merging and recovery processing.

【図20】While文を用いたリカバリ処理の説明図であ
る。
FIG. 20 is an explanatory diagram of a recovery process using a While statement.

【図21】非凸多面体間の最接近点探索の全体の処理フ
ロー図である。
FIG. 21 is an overall processing flowchart of searching for a point of closest approach between non-convex polyhedrons.

【図22】本発明の非凸多面体間の最接近点探索装置の
構成図である。
FIG. 22 is a configuration diagram of a device for searching for a point of closest approach between non-convex polyhedrons according to the present invention.

【図23】非凸多面体間の最接近点連続探索の第1の方
法説明図である。
FIG. 23 is an explanatory diagram of a first method of continuous search for the closest point between non-convex polyhedrons.

【図24】非凸多面体間の第1の最接近点連続探索処理
のフロー図である。
FIG. 24 is a flowchart of a first closest point continuous search process between non-convex polyhedrons.

【図25】非凸多面体間の最接近点連続探索の第2の方
法説明図である。
FIG. 25 is an explanatory diagram of a second method of continuous search for the closest point between non-convex polyhedrons.

【図26】非凸多面体間の第2の最接近点連続探索処理
のフロー図である。
FIG. 26 is a flowchart of a second closest point continuous search process between non-convex polyhedrons.

【図27】システム構成図である。FIG. 27 is a system configuration diagram.

【図28】干渉チェック前処理の概略的処理フローであ
る。
FIG. 28 is a schematic processing flow of an interference check pre-processing;

【図29】凸分解基本アルゴリズムの処理フローであ
る。
FIG. 29 is a processing flow of a convex decomposition basic algorithm.

【図30】Mergeプロセスの流れ図である。FIG. 30 is a flowchart of the Merge process.

【図31】ポリゴン間の凹凸関係判定説明図である。FIG. 31 is an explanatory diagram for determining the unevenness relationship between polygons.

【図32】凸分解前処理の第2実施例処理フローであ
る。
FIG. 32 is a process flow of a second embodiment of the pre-decomposition processing.

【図33】ブール集合演算による物体表現説明図であ
る。
FIG. 33 is an explanatory diagram of object representation by a Boolean set operation.

【図34】凸分解前処理の第3実施例処理フローであ
る。
FIG. 34 is a processing flow of a third embodiment of the pre-decomposition processing.

【図35】負物体がある場合の凸分割の結果説明図であ
る。
FIG. 35 is an explanatory diagram of a result of convex division when there is a negative object.

【図36】凸分解前処理の第4実施例処理フローであ
る。
FIG. 36 is a processing flow of the fourth embodiment of the pre-decomposition processing.

【図37】本発明の干渉チェック前処理の別の概略的処
理フローである。
FIG. 37 is another schematic processing flow of the interference check pre-processing of the present invention.

【図38】高速凸分解基本アルゴリズムのフロー図であ
る。
FIG. 38 is a flowchart of a fast convex decomposition basic algorithm.

【図39】Mergeプロセスの流れ図である。FIG. 39 is a flow chart of a Merge process.

【図40】干渉チェックアルゴリズムの概略処理フロー
である。
FIG. 40 is a schematic processing flow of an interference check algorithm.

【図41】Gilbert法による干渉チェック原理説明図で
ある。
FIG. 41 is an explanatory diagram of the principle of interference check by the Gilbert method.

【図42】Gilbert法に基づくMerge可能性判定のフロー
である。
FIG. 42 is a flowchart of Merge possibility determination based on the Gilbert method.

【図43】簡略化したGilbert法に基づくMerge可能性判
定のフローである。
FIG. 43 is a flowchart of Merge possibility determination based on the simplified Gilbert method.

【図44】凸分解の第1変形例の処理フローである。FIG. 44 is a processing flow of a first modified example of convex decomposition.

【図45】凸分解の第2変形例の処理フローである。FIG. 45 is a processing flow of a second modified example of the convex decomposition.

【図46】近接点リストの例である。FIG. 46 is an example of a proximity point list.

【図47】近接点線形リスト作成の前処理フローであ
る。
FIG. 47 is a pre-processing flow for creating a proximity point linear list.

【図48】三角形ポリゴンに分割した直方体及びポリゴ
ンデータの説明図である。
FIG. 48 is an explanatory diagram of a rectangular parallelepiped divided into triangular polygons and polygon data.

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

【図50】近接点線形リストを生成するアルゴリズムの
説明図である。
FIG. 50 is an explanatory diagram of an algorithm for generating a proximity point linear list.

【図51】近接点線形リストを生成するアルゴリズムの
別の説明図である。
FIG. 51 is another explanatory diagram of the algorithm for generating the proximity point linear list.

【図52】近接点線形リストの作成説明図である。FIG. 52 is an explanatory diagram of creation of a proximity point linear list.

【図53】近接点多分木リストの例である。FIG. 53 is an example of a proximity point multi-tree list.

【図54】近接点多分木リスト作成の前処理フローであ
る。
FIG. 54 is a preprocessing flow for creating a proximity point multi-tree list.

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

【図56】包絡球による事前チェックアルゴリズムのフ
ローである。
FIG. 56 is a flowchart of a pre-check algorithm using an envelope sphere.

【図57】Gilbert法の基本的な考え方の説明図であ
る。
FIG. 57 is an explanatory diagram of a basic concept of the Gilbert method.

【図58】凸多面体における連続的干渉チェックアルゴ
リズムのフローである。
FIG. 58 is a flowchart of a continuous interference check algorithm for a convex polyhedron.

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

【図60】凸包の動的構成/解除の基本的な考え方の説
明図である。
FIG. 60 is an explanatory diagram of a basic concept of dynamic configuration / cancellation of a convex hull.

【図61】凸包、凸要素間の干渉チェック説明図であ
る。
FIG. 61 is an explanatory diagram of interference check between a convex hull and a convex element.

【図62】凸包の動的構成/解除アルゴリズムののフロ
ーである。
FIG. 62 is a flowchart of a dynamic hull dynamic configuration / cancellation algorithm.

【図63】凸包の動的構成/解除及び凸多面体連続干渉
チェックのフローである。
FIG. 63 is a flowchart of dynamic configuration / release of a convex hull and a continuous polyhedron continuous interference check.

【図64】凸包間の連続型干渉チェックの説明図であ
る。
FIG. 64 is an explanatory diagram of a continuous interference check between convex hulls.

【図65】凸要素、凸包間の連続型干渉チェックの説明
図である。
FIG. 65 is an explanatory diagram of a continuous interference check between a convex element and a convex hull.

【図66】凸要素間の干渉チェック説明図である。FIG. 66 is an explanatory diagram of interference check between convex elements.

【図67】凸包の動的構成/解除及び包絡球干渉チェッ
クアルゴリズムのフローである。
FIG. 67 is a flowchart of an algorithm for dynamically constructing / releasing a convex hull and checking for an envelope sphere interference.

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

【図69】最接近点アルゴリズムの解決すべき点の説明
図(その1)である。
FIG. 69 is an explanatory diagram (part 1) of points to be solved by the closest approach algorithm.

【図70】最接近点アルゴリズムの解決すべき点の説明
図(その2)である。
FIG. 70 is an explanatory diagram (part 2) of points to be solved by the closest approach point algorithm;

【図71】サポート関数の説明図である。FIG. 71 is an explanatory diagram of a support function.

【図72】Gilbert法による最接近点探索の説明図であ
る。
FIG. 72 is an explanatory diagram of the search for the closest approach point by the Gilbert method.

【図73】Gilbert法の説明図である。FIG. 73 is an explanatory diagram of the Gilbert method.

【図74】Gilbert法の数値試験結果説明図である。FIG. 74 is an explanatory diagram of a numerical test result of the Gilbert method.

【図75】Gilbert法による非凸多面体間の最接近点探
索の説明図である。
FIG. 75 is an explanatory diagram of a search for a point of closest approach between non-convex polyhedrons by the Gilbert method.

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

22a・・ポリゴンデータ記憶部 22b・・近接点線形リスト記憶部 24・・近接点線形リスト作成部 26・・最接近点探索処理部 22a: polygon data storage unit 22b: proximity point linear list storage unit 24: proximity point linear list creation unit 26: closest point search processing unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 永嶋 史朗 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 丸山 次人 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 Fターム(参考) 5B046 FA07 FA16 5L096 BA04 BA05 FA66 FA77  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Shiro Nagashima 4-1-1, Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Prefecture Inside Fujitsu Limited (72) Inventor Tsutomu Maruyama 4-chome, Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa No. 1 No. 1 Fujitsu Limited F term (reference) 5B046 FA07 FA16 5L096 BA04 BA05 FA66 FA77

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 凸多面体間の最接近点を連続的に探索す
ることにより両者の干渉チェックを行なう最接近点探索
方装置において、 凸多面体を覆う全ポリゴンの頂点座標を入力する手段、 各ポリゴンの頂点を第1方向(next方向)にリンク
し、各頂点にポリゴン辺を介して繋がる頂点群を第2の
方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストを作成する近接点線
形リスト作成手段、 最新に求まっている最接近点に近接する頂点を前記近接
点線形リストより求める近接頂点取得部、 前記求まった頂点の中より次の時刻における最接近点を
探索して干渉チェックを行なう最接近点探索手段、を有
することを特徴とする最接近点探索装置。
1. An apparatus for searching for a point of closest approach which continuously checks for points of closest approach between convex polyhedrons to check for interference between them, means for inputting vertex coordinates of all polygons covering the convex polyhedron, Is provided in a first direction (next direction), and a vertex group connected to each vertex via a polygon side is linked to the vertex in a second direction (branch direction). Proximity point linear list creation means for creating a list, a proximity vertex acquisition unit for obtaining a vertex that is closest to the closest approach point obtained latest from the proximity point linear list, a closest approach point at the next time from among the obtained vertices A closest point searching means for searching for an interference and performing an interference check.
【請求項2】 第1、第2の非凸多面体をそれぞれ凸多
面体に分解し、凸多面体間の最接近点を連続的に探索す
ることにより非凸多面体間の干渉チェックを行なう最接
近点探索装置において、 前記凸多面体毎に、該凸多面体を覆う全ポリゴンの頂点
を第1方向(next方向)にリンクし、各頂点にポリ
ゴン辺を介して繋がる頂点群を第2の方向(branc
h方向)に該頂点にリンクしてなるデータ構造を備えた
近接点線形リストを作成する近接点線形リスト作成手
段、 前記非凸多面体毎に、該非凸多面体の頂点座標値のう
ち、各軸方向の最大座標値及び最小座標値を求め、該最
大座標値及び最小座標値により該非凸多面体を包む包絡
球を生成する包絡球生成手段、 第1、第2の非凸多面体の包絡球が干渉するかチェックす
るチェック手段、 干渉した後は前記非凸多面体を分解して得られている凸
多面体間の最接近点を探索し、最新に求まっている最接
近点に近接する頂点を前記近接点線形リストより求め、
これら頂点の中より次の時刻における最接近点を探索す
る最接近点探索手段、各凸多面体間の最接近点間距離が
最も短いものを用いて干渉チェックを行なう干渉チェッ
ク部、 を有することを特徴とする最接近点探索装置。
2. A closest approach point search for decomposing each of the first and second non-convex polyhedrons into a convex polyhedron and continuously searching for the closest approach point between the convex polyhedrons to check for interference between the non-convex polyhedrons. In the apparatus, for each convex polyhedron, vertices of all polygons covering the convex polyhedron are linked in a first direction (next direction), and a vertex group connected to each vertex via a polygon side is defined in a second direction (branch).
a near-point linear list creating means for creating a near-point linear list having a data structure linked to the vertices in the h-direction), for each of the non-convex polyhedrons, among the vertex coordinate values of the non-convex polyhedron, Envelope sphere generating means for obtaining the maximum coordinate value and the minimum coordinate value of the non-convex polyhedron based on the maximum coordinate value and the minimum coordinate value, and the envelope spheres of the first and second non-convex polyhedrons interfere with each other. After the interference, the non-convex polyhedron is searched for the closest approach point between the convex polyhedrons obtained by decomposing the non-convex polyhedron. From the list,
Closest point searching means for searching for the closest point at the next time from among the vertices, and an interference check unit for performing an interference check using the shortest distance between the closest points between the convex polyhedrons. The closest point search device.
【請求項3】 前記各非凸多面体を包む最小の凸多面体
(凸包)を生成する凸包生成部、 を備え、前記チェック手段は、第1第2の非凸多面体の包
絡球が干渉した後は、第1、第2の非凸多面体の凸包が
干渉するかチェックし、前記最接近点探索手段は、第1、
第2の凸包同士が干渉した後は、前記非凸多面体を分解
して得られている凸多面体間の最接近点を探索し、干渉
チェック部は各凸多面体間の最接近点間距離が最も短い
ものを用いて干渉チェックを行なうことを特徴とする請
求項2記載の最接近点探索装置。
3. A convex hull generating unit that generates a minimum convex polyhedron (convex hull) wrapping each of the non-convex polyhedrons, wherein the checking unit interferes with an envelope sphere of the first and second non-convex polyhedrons. Thereafter, it is checked whether or not the convex hulls of the first and second non-convex polyhedrons interfere with each other.
After the second convex hulls interfere with each other, a search is made for the closest point between the convex polyhedrons obtained by decomposing the non-convex polyhedron. 3. The closest point searching device according to claim 2, wherein the shortest one is used for interference check.
【請求項4】 第1、第2の非凸多面体をそれぞれ凸多
面体に分解し、凸多面体間の最接近点を連続的に探索す
ることにより非凸多面体間の干渉チェックを行なう最接
近点探索装置において、 前記凸多面体毎に、該凸多面体を覆う全ポリゴンの頂点
を第1方向(next方向)にリンクし、各頂点にポリ
ゴン辺を介して繋がる頂点群を第2の方向(branc
h方向)に該頂点にリンクしてなるデータ構造を備えた
近接点線形リストを作成する近接点線形リスト作成手
段、 前記各非凸多面体を包む最小の凸多面体(凸包)を生成
する凸包生成手段、 第1、第2の非凸多面体の凸包が干渉するかチェックす
るチェック手段、 干渉した後は凸多面体間の最接近点を探索し、最新に求
まっている最接近点に近接する頂点を前記近接点線形リ
ストより求め、これら頂点の中より次の時刻における最
接近点を探索する最接近点探索手段、 各凸多面体間の最接近点間距離が最も短いものを用いて
干渉チェックを行なう干渉チェック部、 を有することを特徴とする最接近点探索装置。
4. A closest approach point search for decomposing each of the first and second non-convex polyhedrons into a convex polyhedron and continuously searching for the closest approach point between the convex polyhedrons to check for interference between the non-convex polyhedrons. In the apparatus, for each of the convex polyhedrons, vertices of all polygons covering the convex polyhedron are linked in a first direction (next direction), and a vertex group connected to each vertex via a polygon side is defined in a second direction (branch).
a near-point linear list creating means for creating a near-point linear list having a data structure linked to the vertices in the h-direction); a convex hull for generating a minimum convex polyhedron (convex hull) enclosing each non-convex polyhedron Generating means, checking means for checking whether the convex hulls of the first and second non-convex polyhedrons interfere with each other, searching for the closest point between the convex polyhedrons after the interference, and approaching the closest approach point obtained latest The closest point search means for obtaining the vertices from the linear list of the close points and searching for the closest point at the next time from the vertices. The interference check using the shortest distance between the closest points between the convex polyhedrons. An interference check unit that performs the following.
【請求項5】 前記チェック手段は凸包同士が干渉した
後は、一方の凸包を解除し、非凸多面体を分解して得ら
れている各凸多面体と他方の凸包の干渉チェックを行な
い、前記最接近点探索手段は、凸多面体と他方の凸包が
干渉した後は、他方の凸包を解除し、各非凸多面体を分
解して得られている凸多面体間の最接近点を探索し、干
渉チェック部は各凸多面体間の最接近点間距離が最も短
いものを用いて、干渉チェックを行なうことを特徴とす
る請求項4記載の最接近点探索装置。
5. The checking means, after the convex hulls interfere with each other, cancels one convex hull and checks the interference between each convex polyhedron obtained by decomposing the non-convex polyhedron and the other convex hull. After the convex polyhedron interferes with the other convex hull, the closest approach point searching means cancels the other convex hull and determines the closest point between the convex polyhedrons obtained by decomposing each non-convex polyhedron. 5. The closest approach point searching device according to claim 4, wherein the search is performed, and the interference check unit performs the interference check using the shortest distance between the closest approach points between the convex polyhedrons.
JP2002061723A 1993-09-14 2002-03-07 Closest point search device Expired - Lifetime JP3556644B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002061723A JP3556644B2 (en) 1993-09-14 2002-03-07 Closest point search device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP22879493 1993-09-14
JP5-228794 1993-09-14
JP2002061723A JP3556644B2 (en) 1993-09-14 2002-03-07 Closest point search device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP20900894A Division JP3316092B2 (en) 1993-09-14 1994-09-02 Closest point search device

Publications (2)

Publication Number Publication Date
JP2002312409A true JP2002312409A (en) 2002-10-25
JP3556644B2 JP3556644B2 (en) 2004-08-18

Family

ID=26528461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002061723A Expired - Lifetime JP3556644B2 (en) 1993-09-14 2002-03-07 Closest point search device

Country Status (1)

Country Link
JP (1) JP3556644B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015136625A (en) * 2014-01-23 2015-07-30 三菱電機株式会社 Method for optimizing radiation dose for radiation therapy treatment and radiation therapy system
JP2016009374A (en) * 2014-06-25 2016-01-18 株式会社東芝 Information processing device, method, and program
JP2019030930A (en) * 2017-08-08 2019-02-28 トヨタ自動車株式会社 Calculation method of closest point between relatively-moving substances and interference evaluation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015136625A (en) * 2014-01-23 2015-07-30 三菱電機株式会社 Method for optimizing radiation dose for radiation therapy treatment and radiation therapy system
JP2016009374A (en) * 2014-06-25 2016-01-18 株式会社東芝 Information processing device, method, and program
JP2019030930A (en) * 2017-08-08 2019-02-28 トヨタ自動車株式会社 Calculation method of closest point between relatively-moving substances and interference evaluation method

Also Published As

Publication number Publication date
JP3556644B2 (en) 2004-08-18

Similar Documents

Publication Publication Date Title
US5675720A (en) Method of searching for points of closest approach, and preprocessing method therefor
Samareh Aerodynamic shape optimization based on free-form deformation
Gálvez et al. Particle swarm optimization for non-uniform rational B-spline surface reconstruction from clouds of 3D data points
Cetin et al. Real-time autonomous UAV formation flight with collision and obstacle avoidance in unknown environment
EP0753837B1 (en) Interference checking method
JP3316092B2 (en) Closest point search device
Toma et al. Waypoint planning networks
Mirolo et al. A solid modelling system for robot action planning
Rubio et al. Trajectory planning and collisions detector for robotic arms
Sanders et al. A method to produce minimal real time geometric representations of moving obstacles
Ruan et al. Efficient exact collision detection between ellipsoids and superquadrics via closed-form Minkowski sums
Dai et al. A framework for multi-robot coverage analysis of large and complex structures
Lyu et al. Tool-path generation for industrial robotic surface-based application
US5761391A (en) Arithmetic unit for calculating distance between objects
Andre et al. Error robust and efficient assembly sequence planning with haptic rendering models for rigid and non-rigid assemblies
JP3556644B2 (en) Closest point search device
Emad Path-Planning Dynamic 3D Space Using Modified A* Algorithm
Hegewald et al. Iterative Mesh Modification Planning: A new Method for Automatic Disassembly Planning of Complex Industrial Components
Edelkamp et al. Surface inspection via hitting sets and multi-goal motion planning
Polyzos et al. Solving the inverse kinematics of robotic arm using autoencoders
Coulombe et al. High precision real time collision detection
JP3391657B2 (en) Inter-object distance calculation device and inter-object distance calculation program storage medium
Zhang et al. Bi-RRT* based trajectory optimization and obstacle avoidance for a serial manipulator
Pisarenko et al. Application of Recursive Algorithms for Optimization and Approximation of Workspace of Parallel Robots
Cetin et al. GPGPU accelerated real-time potential field based formation control for Unmanned Aerial Vehicles

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040511

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040512

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080521

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090521

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090521

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100521

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100521

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110521

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120521

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130521

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130521

Year of fee payment: 9

EXPY Cancellation because of completion of term