JPH07134735A - Closest point search method and preprocessing method thereof - Google Patents
Closest point search method and preprocessing method thereofInfo
- Publication number
- JPH07134735A JPH07134735A JP6209008A JP20900894A JPH07134735A JP H07134735 A JPH07134735 A JP H07134735A JP 6209008 A JP6209008 A JP 6209008A JP 20900894 A JP20900894 A JP 20900894A JP H07134735 A JPH07134735 A JP H07134735A
- Authority
- JP
- Japan
- Prior art keywords
- convex
- polygon
- point
- closest
- polyhedron
- 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
Links
Landscapes
- Numerical Control (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
(57)【要約】
【目的】 少ない計算負荷で凸多面体間あるいは非凸多
面体間の最接近点探索を実行する。
【構成】 2つの凸多面体K1,K2の最接近点を探索す
る場合、有向グラフ型構造データを作成して各凸多面体
を表現する。最接近点探索処理部15は、2つの凸多面
体K1,K2の差集合(K1−K2)である差凸多面体まで
の最接近点を逐次的に求めて最終的に各凸多面体K1,
K2上の最接近点を求める。最接近点を求める過程で実
行される内積評価において、最接近点探索処理部15は
逐次的に求まる差凸多面体までの最接近点に対応する各
凸多面体上の最接近点が格子点上に存在するか、辺上に
存在するか、ポリゴン上に存在するか判断し、有向グラ
フ型構造データよりそれぞれの場合において内積評価に
使用する格子点を求め、該格子点の位置ベクトルを用い
て内積評価する。
(57) [Summary] [Purpose] Performs the closest point search between convex polyhedrons or non-convex polyhedrons with a small calculation load. [Structure] When the closest points of two convex polyhedra K 1 and K 2 are searched, directed polyhedral structure data is created to represent each convex polyhedron. The closest point search processing unit 15 sequentially obtains the closest point to the difference convex polyhedron which is the difference set (K 1 −K 2 ) of the two convex polyhedra K 1 and K 2 , and finally obtains each convex polyhedron. K 1 ,
Find the closest point on K 2 . In the inner product evaluation executed in the process of obtaining the closest point, the closest point search processing unit 15 determines that the closest point on each convex polyhedron corresponding to the closest point to the difference convex polyhedron that is sequentially obtained is on the grid point. It is determined whether it exists, it exists on the side, or it exists on the polygon, and the grid point used for the inner product evaluation in each case is obtained from the directed graph structure data, and the inner product evaluation is performed using the position vector of the grid point. To do.
Description
【0001】[0001]
【産業上の利用分野】本発明はロボットや自走車の運用
における衝突回避や経路走行設計(パスプランニング)
に適用できる最接近点探索方法に係わり、特にコンピュ
ータ上に構築された複数の物体の形状モデル(CGモデ
ル)に対してそれらが互いに離れているか、接触してい
るか、干渉しているかを判定でき、しかも、物体間の最
接近点、接触点、距離をリアルタイムに算出できる最接
近点探索方法及びその前処理方法に関する。本発明は、
機械設計用CADシステム、マニピュレータや自走車等
の移動ロボットのパス生成、マルチメディアにおけるア
ニメーション作成、ゲームソフトウェア等コンピュータ
グラフィックスを応用した様々な分野に適用できる。The present invention relates to collision avoidance and route design (path planning) in the operation of robots and self-propelled vehicles.
It is possible to determine whether or not they are apart from each other, are in contact with each other, or interfere with a shape model (CG model) of a plurality of objects constructed on a computer. In addition, the present invention relates to a closest approach point search method and a preprocessing method therefor capable of calculating the closest approach point, contact point, and distance between objects in real time. The present invention is
It can be applied to various fields such as CAD system for machine design, path generation of mobile robots such as manipulators and self-propelled vehicles, animation creation in multimedia, computer graphics such as game software.
【0002】[0002]
【従来の技術】通常、ロボットはオペレータによる遠隔
操作、あるいは計算機上で作成したデータに基づくプロ
グラム操作により運用される。ロボットを遠隔操作する
場合には、オペレータはロボットを取り囲む他の物体と
の不意な衝突、干渉を避けながら運用しなければならな
い。又、ロボットをプログラム操作する場合には、予
め、計算機上にて障害物との衝突や干渉が生じないよう
にパスプランニングを行う必要がある。一方、自走車を
運用する場合、自走車は走行しようとする方向の環境地
図データをセンサを通して取り込み、障害物を回避しな
がら自律走行し、あるいは、予め計算機上に格納されて
いる地図情報に基づいて作成されたパスに従ってプログ
ラム走行する。これらの場合にも、ロボットの場合と同
じように逐次的な衝突回避や干渉の生じないパスプラン
ニングが必要となる。2. Description of the Related Art Usually, a robot is operated by remote operation by an operator or by program operation based on data created on a computer. When operating the robot remotely, the operator must operate it while avoiding unexpected collision and interference with other objects surrounding the robot. Further, when the robot is operated by a program, it is necessary to perform path planning in advance so as not to cause collision or interference with an obstacle on a computer. On the other hand, when operating a self-propelled vehicle, the self-propelled vehicle takes in environmental map data of the direction in which it is going to travel through a sensor and runs autonomously while avoiding obstacles, or map information stored in advance on a computer. The program runs according to the path created based on. In these cases as well, as in the case of the robot, sequential collision avoidance and path planning without interference are required.
【0003】物体間の最接近点及び距離を測定すること
ができれば、障害物を回避しながらロボットあるいは自
走車を移動することができ、あるいは衝突や干渉が生じ
ない走行経路をプログラムしてプログラム走行すること
ができる。このため、ロボット、自走車における逐次的
な衝突回避、事前のパスプランニングにおいて、物体間
の最接近点探索方法が要望されている。すなわち、複数
の物体が存在する時、それらが互いに離れているか、接
触しているか、干渉しているかを判定し、かつ、物体間
の最接近点(接触又は干渉している場合には、各々、接
触点または干渉点)及び距離を効率良く算出する最接近
点探索方法が要望されている。If the closest point and the distance between the objects can be measured, the robot or the self-propelled vehicle can be moved while avoiding obstacles, or a travel route that does not cause collision or interference can be programmed and programmed. Can drive. Therefore, there is a demand for a method of searching for the closest point between objects in sequential avoidance of collisions in robots and self-propelled vehicles and in advance path planning. That is, when a plurality of objects are present, it is determined whether they are separated from each other, touching, or interfering with each other, and the closest points between the objects (in the case of contacting or interfering, respectively, , A contact point or an interference point) and a method for searching for the closest point that efficiently calculates the distance.
【0004】最接近点探索問題に対する基本的なアプロ
ーチは、対象となる物体の形状、位置、姿勢データを計
算機上に取り込み、初等幾何学的計算により解決する方
法である。通常、CAD分野で使われているグラフィッ
クシミュレータでは、平面的な凸多角形(凸ポリゴン)
を複数枚貼付けて1つの物体を表現している。従って、
2つの物体間の干渉状態をチェックする最も素朴な方法
は、各々の物体を構成している凸ポリゴン間に対する最
接近点探索を全ての凸ポリゴンの組み合わせについて行
うものである。具体的には、空間上に任意に配置された
2つの物体を構成する各凸ポリゴンに対し、最も近接し
ているポイントを各格子点(頂点)、辺、面について探
索し、最接近距離を算出することである。勿論、最接近
距離がゼロの場合には、2つの物体は干渉状態にあると
いえる。この方法では、2つの物体を表現している格子
点数をM1,M2としたときに、O(M1・M2)の計算負荷
を伴う。尚、O( )は計算負荷のオーダを示す関数であ
る。The basic approach to the problem of searching for the closest point is a method in which the shape, position, and orientation data of the target object are loaded into a computer and solved by elementary geometric calculation. Usually, in a graphic simulator used in the CAD field, a planar convex polygon (convex polygon) is used.
Is attached to represent one object. Therefore,
The simplest method of checking the interference state between two objects is to search the closest point between the convex polygons forming each object for all combinations of convex polygons. Specifically, for each convex polygon that forms two objects arbitrarily arranged in space, the closest point is searched for at each lattice point (vertex), side, and face, and the closest distance is calculated. 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 way, the number of lattice points that represent the two objects when the M 1, M 2, involves the computational load of O (M 1 · M 2) . Note that O () is a function indicating the order of 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 calculation load of O (M 1 · M 2 ) is mainly studied in the field of computational geometry, and O (MlogM) (M = M 1 + M 2 ). An algorithm having the asymptotic property (when M 1 and M 2 are very large) has been developed. Although this kind of algorithm is theoretically correct, they all focus on the asymptotic property,
There is no practical discussion on how much the calculation load is reduced when M 1 and M 2 have a practical size, and it cannot be said to be a truly practical algorithm. On the other hand, historically,
A method that uses a Voronoi diagram that connects neighboring bisectors between grid points to illustrate the proximity of each grid point, or divides a three-dimensional space into quadrants one after another and occupies the target There is also known a method of searching for the closest point by the oct-tree method that makes a region into a database. All of these methods are effective when the object is static and constant, and are not suitable when the object dynamically changes one after another due to disassembly and assembly.
【0006】さて、最接近点探索アルゴリズムの実用度
を上げるためには、次の1)〜5)に示す要件をカバーする
必要がある。 1) 非凸多面体への拡張 計算幾何学などで従来開発されてきた最接近点探索アル
ゴリズムでは、取り扱う対象を凸多面体に限っている
(図69(a)参照)。しかし、実際には、図69(b)に示
すように非凸多面体との干渉問題が多数発生する。この
ため、最接近点探索アルゴリズムを非凸多面体まで拡張
する必要がある。尚、凸多面体(convex polyhedron)と
は多面体内部の任意の2点を結ぶ線分がその多面体の内
部に含まれるような多面体である。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 in computational geometry, the target is limited to the convex polyhedron (see Fig. 69 (a)). However, in reality, 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. A convex polyhedron is a polyhedron in which a line segment connecting any two points inside the polyhedron is included inside the polyhedron.
【0007】2) 非単連結多面体への拡張 トラス(truss)の組み立てや配管工事などでは穴が開い
た物体との干渉性を考慮する必要がある。図69(c)は
トラスの組み立てを示すもので、TRはトラス、RBH
はロボットハンドである。 3) 一般自由曲面を持った物体への拡張 一般自由曲面を持った物体は、グラフィックシミュレー
タ上では複数のポリゴンの張り合わせで表現される。図
69(d)は自由曲面を有するアンテナの組み立てを示す
もので、ATはアンテナ、RBHはロボットハンドであ
る。一般自由曲面を持った物体との干渉問題を扱うに
は、ポリゴン数を増やして近似の精度を上げるか、また
は曲面をスプライン曲面などで解析的に表現して取り扱
う必要がある。2) Expansion to a non-single-connected polyhedron In assembling a truss or piping work, it is necessary to consider interference with an object having a hole. 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 on a graphic simulator by combining multiple polygons. FIG. 69 (d) shows an 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 improve the accuracy of approximation or to express the surface analytically as a spline curved surface.
【0008】4) 環境変動への対応性 干渉問題で取り扱う対象物は、いつも静止しているとは
限らず、一般には分解、運搬、組み立てなどの作業を通
して環境が動的に変動していく。凸多面体を組み合わせ
て非凸の構造物を組み上げていくといったことは、しば
しば発生することである。又、アームの各リングを凸多
面体で表現した時、アーム自身は動的に動く凸多面体の
集合体(一般には非凸物体)とみなすことができる。こ
の時、図70(a)に示すようにアームAM先端のロボッ
トハンドRBHで対象物体OBJを把持しようとする場
合には、ハンドと対象物体との干渉だけでなくアーム肘
と他の物体OBSとの干渉も考慮しなければならない。
実用的なアルゴリズムはこのような動的な環境変動に柔
軟、迅速に対応できるものでなければならない。4) Responsiveness to environmental fluctuations Objects to be dealt with due to interference problems are not always stationary, and generally the environment dynamically changes through operations such as disassembly, transportation, and assembly. It is often the case that convex polyhedrons are combined to build up a non-convex structure. Also, 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 polyhedra (generally a non-convex object). At this time, as shown in FIG. 70 (a), when the target object OBJ is grasped by the robot hand RBH at the tip of the arm AM, not only the interference between the hand and the target object but also the arm elbow and the other object OBS. Interference must also be considered.
Practical algorithms must be flexible and able to quickly respond to such dynamic environmental changes.
【0009】5) 形状変化への対応 対象物体が柔軟性を有する場合などでは、物体自身の形
状が動的に変化する(図70(b)参照)。これは4) の環
境変動の一種とも捉えることができるが、取扱は形状変
化の方が難しい。このため、Michigan大学のGilbert教
授は凸多面体間の最接近点探索問題に対する極めて実用
的な方法(Gilbert法という)を提案している。このGilbe
rt法によれば、アルゴリズムの計算負荷は、非常に病的
な例外を除いてほとんどの凸多面体の組合せに対してO
(M1+M2)となる。又、非凸多面体を複数の凸ポリゴンの
集合とみなすことによりGilbert法を非凸多面体へ拡張
している。以下、Gilbert法について詳述する。5) Correspondence 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 it is more difficult to handle the shape change. For this reason, Professor Gilbert of the University of Michigan has proposed a very practical method (called Gilbert method) for the closest point search problem between convex polyhedra. This Gilbe
According to the rt method, the computational load of the algorithm is O for most combinations of convex polyhedra with very pathological exceptions.
(M 1 + M 2 ). The Gilbert method is extended to a non-convex polyhedron by treating the non-convex polyhedron as a set of multiple convex polygons. The Gilbert method will be described in detail below.
【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,K2
を考える。この時、2物体間の最接近距離は以下で定義
される。Finding the closest point between convex polyhedra by the Gilbert method
Search algorithm (a) Object representation method and distance between objects Consider a convex polyhedron X in three-dimensional space. At this time, an arbitrary point x in X is a grid point (vertex) xi ∈ located at the boundary of X.
It can be expressed as follows using X. x = Σλixi (i = 1 to m): xiεX, λi ≧ 0 λ 1 + λ 2 + ... + λm = 1 (1) .. may be defined as a convex polyhedron stretched by m}. The {xi} is called the base of the convex polyhedron X. Now, the two convex polyhedra K 1 and K 2
think of. At this time, the closest 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−y3)}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 (K 1 , K 2 ) = min {| x−y |: xεK 1 , yεK 2 ) (2) where x and y are position vectors, and | x−y | = √ {(x 1 -y 1 ) 2 + (x 2 -y 2) 2 + (x 3 -y 3)} 2. Therefore, the problem of finding the closest point between two convex polyhedra is to find x and y that satisfy the equation (2) by the following equation. x = Σλi · xi (i = 1 to m 1 ): xi i K 1 , λi ≧ 0 λ 1 + λ 2 + ... + λm 1 = 1 y = Σμi · yi (i = 1 to m 2 ): yi ∈ K 2 , μi ≧ 0 μ 1 + μ 2 + ... + μm 2 = 1 (3) Simply thinking, in equation (3), both λ and μ are variables, so the calculation load is O (M 1 · M 2 ). Equation (2) can be rewritten as follows.
【0012】任意の物体K1,K2の和集合、差集合をK
1±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は以下で与えられる。Let K be the union and difference sets of arbitrary objects K 1 and K 2.
When 1 ± K 2 = {x ± y: x∈K 1 , y∈K 2 } is defined,
Equation (2) is equivalent to the following equation. d 12 = min {| z |: zεK}, K = K 1 −K 2 (4) The union of the objects K 1 and K 2 is the vector addition of arbitrary position vectors x and y of each object. Is an object composed of a set of position vectors z obtained by the above, and the difference set of the objects X 1 and X 2 is a set of position vectors z obtained by vector subtraction of arbitrary position vectors x and y of each object. It is an object that has been destroyed. In equation (4), the problem of searching for the closest point is the coordinate origin O
Tells that it is equivalent to the problem of finding the closest point to polyhedron K. When both the polyhedra K 1 and K 2 are convex polyhedrons, the polyhedron K is also a convex polyhedron, and the set Z of lattice points forming 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の格子点数、m 2:K2の格子点数)の格子点{zi=
xj−yk}で張られた凸多面体である。」Z = {zi = xj-yk: xjεK1, Yk ∈ K2, I = 1, 2, ... m1m2 j = 1, 2, ... m1 k = 1, 2, ... m2} (5) Summarizing the above, the following conclusions are derived. Sanawa
Then, "Two convex polyhedra K1, K2The question to find the closest point between
The problem is the convex polyhedron K (= K1-K2Up to)
It is equivalent to the problem of finding the approach point. However, K is m1m2Pieces (m1:
K1Number of grid points of, m 2: K2Number of grid points) of the grid points {zi =
It is a convex polyhedron stretched by 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) From the conclusion in the outline (a) of Gilbert's method, the problem of finding the closest point between two convex polyhedra K 1 and K 2 is the problem of finding the closest point from one point O to the convex polyhedron K. Be reduced to. Gilbert's method uses this fact and a function called the Support Function described below. Support function hx for convex polyhedron
(η): R 3 → R is defined below. hx (η) = max {xi · η: i = 1 to m} (6) where {xi} is the set of lattice points that are the base of the convex polyhedron X, and ・ means the vector inner product , Also R
3 → R means conversion from 3D to 1D. Therefore, the support function hx (η) of the 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 obtained. ing. Now, assuming that the vector (position vector) from the coordinate origin O to this grid point is sx (η), the equation (6) is as follows.
【0015】hx(η)=sx(η)・η (7) Gilbert法による最接近点探索の計算負荷はO(M1+M2)
となる。その理由は、凸多面体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 for the closest point search by the Gilbert method is O (M 1 + M 2 ).
Becomes The reason is based on that the following law holds for the support function hk (η) and the position vector sk (η) of the difference set K of the convex polyhedra K 1 and K 2 . hk (η) = hk 1 (η) + hk 2 (−η), sk (η) = sk 1 (η) −sk 2 (−η) (8) The above equation is calculated from m 1 m 2 lattice points. Convex polyhedron K = K 1 −K 2
It means that the support function for is composed of the sum of the support functions for the convex polyhedra K 1 and K 2 . Therefore, as is clear from the definition of equation (6), the calculation load for obtaining hx (η) is O (M 1 + M 2 ). The essence of the Gilbert method for searching for the closest point is that the closest point is gradually approached by repeatedly using the support function hx (η). That is, the Gilbert method is composed of the following four processes.
【0016】(c) Gilbert法による最接近点探索アルゴ
リズム 1) 初期化 凸多面体K1,K2に対し、差凸多面体K1−K2をKとす
る。凸多面体K内の任意の点を取り、それらをy1,y2
・・・yp∈Kとする。尚、y1,y2・・・ypは必ずも
凸多面体Kのベース格子点である必要はない。pは一般
に1≦p≦4とする。この時、初期格子点の集合V
k(=V0)を Vk={y1,y2・・・yp}, k=0 とする。(C) Closest point search algorithm by Gilbert method 1) Initialization The difference convex polyhedron K 1 -K 2 is set to K with respect to the convex polyhedrons K 1 and K 2 . Take arbitrary points in the convex polyhedron K and set them as y 1 , y 2
... Let ypεK. Note that y 1 , y 2 ... Yp do not necessarily have to be the base lattice points of the convex polyhedron K. In general, p is 1 ≦ p ≦ 4. At this time, the set V of initial grid points
Let k (= V 0 ) be V k = {y 1 , y 2 ... Yp}, k = 0.
【0017】2) 基本多面体に対する最接近点探索 要素数p(4個以下)からなる格子点の集合Vkに対
し、 νk=ν(co Vk) (9) を計算する。ここで、co Vkは、格子点集合Vkをベー
スとする凸多面体、ν(X)は座標原点Oから凸多面体X
への最接近点ベクトル(位置ベクトル)を表す。2) Closest point search for the basic polyhedron For the set Vk of lattice points consisting of the number p (4 or less) of elements, ν k = ν (co V k ) (9) is calculated. Here, co V k is a convex polyhedron based on the lattice point set V k , and ν (X) is a convex polyhedron X from the coordinate origin O.
Represents the closest point vector (position vector) to.
【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 ROBOT
ICS ANDAUTOMATION, VOL.4, NO.2, APRIL 1988、頁193
〜203「A Fast Procedure for Computing the Distance
Between Complex Objects in Three-Dimensional Spac
e」を参照されたい。以上より、もし、(9)式で求めたνk
に対し、 gK(νk)=0 (10) ならば、ν(K)=νkとし、最接近点探索処理を終了
する。3) Closest point determination The function g K (x) from R 3 → R is defined as follows. g K (x) = | x | 2 + h K (−x) In the above equation, the first term on the right side means the square of the distance to the point when the position vector of a given point on the convex polyhedron K is x. The second term on the right side means the inner product of the vector −x and the lattice point position vector closest to the origin in the vector x direction. In other words, h K (−x) is the minimum value of the inner products of the position vector of the lattice points and x. g K (x)
Is a decision function of the closest point, and if x is the closest point from the origin O to K, then only then, g K (x) = 0. Incidentally, it can be proved that g K (x) is the decision function of the closest point, but it is omitted here. For details, see "IEEE JOUNAL OF ROBOT
ICS AND AUTOMATION, VOL.4, NO.2, APRIL 1988, p.193
~ 203 "A Fast Procedure for Computing the Distance
Between Complex Objects in Three-Dimensional Spac
See e. From the above, if ν k obtained by Eq. (9)
On the other hand, if g K (ν k ) = 0 (10), then ν (K) = ν k is set, and the closest point search processing ends.
【0019】4) kのインクリメント (10)式が成立しなければ、kをインクリメントする。す
なわち、V(k+1)を V(k+1)=Vk′∪{sK(−νk)} (11) とする。ここで、Vk′はVk′⊆Vkであり、かつ、νk
∈co Vk′となるVkの最小部分集合である。(11)式
は、Vkの部分集合Vk′(νkを含む)と、Vkにおける
最接近点ベクトルνk方向に原点から最も近い最小の格
子点sK(−νk)を含む集合を意味する。以上から、(1
0)式が成立しなければ、(11)式によりkをインクリメン
トして2)へ戻り以降の処理を(10)式が成立するまで繰り
返す。4) Increment of k If the equation (10) is not established, k is incremented. That is, V (k + 1) is set to V (k + 1) = V k ′ ∪ {s K (−ν k )} (11). Where V k ′ is V k ′ ⊆V k , and ν k
It is the smallest subset of V k which is a ∈co V k '. (11) includes a subset V k of V k '(including [nu k), the minimum of the lattice points nearest the origin at the closest point vector [nu k direction in V k s K a (-v k) Means a set. From the above, (1
If the expression (0) is not established, k is incremented by the expression (11), the process returns to step 2), and the subsequent processing is repeated until the expression (10) is established.
【0020】(d) Gilbert法による最接近点探索アルゴ
リズムの適用 上記Gilbert法による最接近点探索アルゴリズムの理解
度を深めるために図72を参照して最接近点探索を説明
する。図72において、初期値V0={z1,z2,z3}
とし、V0における最接近点ベクトルを求めるとν0とな
る。この時、(10)式は満たされないからkをインクリメ
ントする。 V1=V0′∪{sk(−ν0)}=V0′∪{z4} であり、又、V0′={z2,z3}となるからV1={z
2,z3,z4}となる。V1における最接近点ベクトルを
求めるとν1となる。この時、(10)式は満たされないか
らkをインクリメントする。(D) Application of Closest Point Search Algorithm by Gilbert Method In order to deepen the understanding of the above-mentioned Gilbert method, the closest point search algorithm will be described with reference to FIG. In FIG. 72, initial values V 0 = {z 1 , z 2 , z 3 }
Then, the closest point vector at V 0 is calculated as ν 0 . At this time, since the expression (10) is not satisfied, k is incremented. Since V 1 = V 0 ′ ∪ {s k (−ν 0 )} = V 0 ′ ∪ {z 4 } and V 0 ′ = {z 2 , z 3 }, V 1 = {z
2 , z 3 , z 4 }. The closest point vector at V 1 is ν 1 . At this time, since the expression (10) is not satisfied, k is incremented.
【0021】 V2=V1′∪{sk(−ν1)}=V1′∪{z5} であり、又、V1′={z3,z4}となるからV2={z
3,z4,z5}となる。V1における最接近点ベクトルを
求めるとν2となり、このν2により(10)式が満たされ、
ν2は最接近点ベクトルとなり、 ν2=ν(K)∈co {z4,z5} となる。この結果、最接近距離dはd=|ν2|とな
る。同じことを初期値を変えて行ってみる。図72にお
いて、初期値V0={z2}とし、V0における最接近点
ベクトルを求めるとν0′(=z2)となる。この時、(1
0)式は満たされないからkをインクリメントする。 V1=V0′∪{sK(−ν0′)}=V0′∪{z5} であり、又、V0′={z2}であるからV1={z2,z
5}となる。Since V 2 = V 1 ′ ∪ {s k (−ν 1 )} = V 1 ′ ∪ {z 5 } and V 1 ′ = {z 3 , z 4 }, V 2 = {Z
3 , z 4 , z 5 }. When the vector of the closest point at V 1 is calculated, it becomes ν 2 , and this ν 2 satisfies the equation (10),
ν 2 is the closest point vector, and ν 2 = ν (K) εco {z 4 , z 5 }. As a result, the closest distance d becomes d = | ν 2 |. Try the same thing with different initial values. In FIG. 72, the initial value V 0 = {z 2 } is set, and the closest point vector at V 0 is calculated to be ν 0 ′ (= z 2 ). At this time, (1
Since 0) is not satisfied, k is incremented. Since V 1 = V 0 ′ ∪ {s K (−ν 0 ′)} = V 0 ′ ∪ {z 5 } and V 0 ′ = {z 2 }, V 1 = {z 2 , z
5 }.
【0022】V1における最接近点ベクトルを求めると
ν1′となる。この時、(10)式は満たされないからkを
インクリメントする。 V2=V1′∪{sK(−ν1′)}=V1′∪{z4} であり、又、V1′={z2,z5}であるからV2={z
2,z4,z5}となる。V2における最接近点ベクトルを
求めるとν2′(=ν2)となり、このν2′により(10)
式が満たされ、ν2は最接近点ベクトルとなり、 ν2′=ν2=ν(K)∈co {z4,z5} となる。この結果、最接近距離dはd=|ν2|とな
り、初期値V0を V0={z1,z2,z3} とした場合と同じ結果が得られる。The closest point vector at V 1 is calculated as ν 1 ′. At this time, since the expression (10) is not satisfied, k is incremented. V 2 = V 1 ′ ∪ {s K (−ν 1 ′)} = V 1 ′ ∪ {z 4 } and V 1 ′ = {z 2 , z 5 }, so V 2 = {z
2 , z 4 , z 5 }. When the vector of the closest point at V 2 is calculated, it becomes ν 2 ′ (= ν 2 ), and by this ν 2 ′, (10)
The expression is satisfied, and ν 2 becomes the closest point vector, and ν 2 ′ = ν 2 = ν (K) εco {z 4 , z 5 }. As a result, the closest distance d becomes d = | ν 2 |, and the same result as when the initial value V 0 is V 0 = {z 1 , z 2 , z 3 } 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) Consideration In the above algorithm, calculation is required in (9), (1
This is the part of equations (0) and (11). First, regarding the expression (9), the meaning of this expression is to calculate the closest point from one point O to a point, an edge, a surface, or a tetrahedron. This part is a part that is not related to the complexity of the convex polyhedron, and can be executed by preparing a subroutine to be described later in advance. Next, regarding the calculation of the equation (10), g K (ν k )
When calculating h K (−ν k ) of, the decomposition law of Eq. (8) is used. This portion is calculated only by evaluating the inner product (the inner product of the position vector of the base lattice point and ν k ) of each convex polyhedron K 1 , K 2 with respect to the base lattice point, as shown in equation (6). That is, h K (−ν k ) is to find the minimum inner product of the position vector of the base lattice point and ν k , and therefore the calculation load of this part is O (M 1 + M 2 ). ..
【0024】(11)式は、gK(νk)を計算する過程でs
K(−νk)が求まり、後述する補題アルゴリズムから自
動的にVk′が求まるため、この部分の計算負荷はM1,
M2に依存しない無視可能な定数(negligible constan
t)である。Gilbert法の優れたところは、ほとんど全て
の凸多面体に対し、上記1) 〜4)の4つのプロセスを数
回繰り返すだけで最接近点に到達することである。多く
の場合、3〜4回の繰返しにより収束することが数値実
験により確かめられている。以上より、Gilbert法によ
る最接近点探索法の本質を一言でいうならば、次のよう
に要約できる。すなわち、2つの凸多面体K1,K2間の
最接近点は、凸多面体K=K1−K2に対し、判定関数g
K(x)=|x|2+hK(−x)を繰返し適用することによ
って求めることができる。そして、繰返しの回数は殆ど
の凸多面体に対して3ないし4回で収束する。Equation (11) is s in the process of calculating g K (ν k ).
Since K (−ν k ) is obtained and V k ′ is automatically obtained from the lemma algorithm described later, the calculation load of this part is M 1 ,
Negligible constan that does not depend on M 2
t). The advantage of Gilbert's method is that it reaches the closest point for almost all convex polyhedrons by repeating the above four processes 1) to 4) several times. In many cases, it has been confirmed by numerical experiments that convergence occurs after 3 to 4 iterations. From the above, the essence of the method of searching for the closest point by the Gilbert method can be summarized as follows. That is, the closest point between the two convex polyhedra K 1 and K 2 is the decision function g for the convex polyhedron K = K 1 −K 2.
It can be obtained by repeatedly applying K (x) = | x | 2 + h K (−x). Then, the number of iterations converges to 3 to 4 for most convex polyhedra.
【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 grid points of Gilbert's method (initial values)
V 0 is generally arbitrary, but it is efficient to start from lattice points in the direction of the difference in the center of gravity of each convex polyhedron as shown below. v 0 = {s K (−z c1 + z c2 )} (12) where z c1 and z c2 are respectively z c1 = Σ (xi / M 1 ) (i = 1 to M 1 ) xi: convex polyhedron Base grid point of K 1 z c2 = Σ (yi / M 2 ) (i = 1 to M 2 ) yi: Base grid point of convex polyhedron K 2 .
【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−yiyj)
(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∪
{yj})≦0 (j∈Is)(F) Gilbert's method lemma In step 2) of the Gilbert method, the closest point from one point (origin O) to the convex polyhedron (point, side, face, tetrahedron) stretched on the lattice points of 4 or less. An algorithm to find the vector was needed. The lemma described below holds for a convex polyhedron stretched by 5 or more lattice points, but is particularly efficient when the number of lattice points is small. 1) Lemma 1 For a lattice point set Y = {y 1 , y 2 , ... Ym} ∈ R 3 ,
Let any subset of Y be Ys = {y i : i∈Is⊆ {1,2,
... m}} and the complement of Is is Is'. At this time, the sequence Δ i (Ys) is created based on the following law. Δ i ({y i }) = 1, i ∈ Is Δ j (Ys ∪ {y j }) = ΣΔ i (Ys) (y i y k −y i y j ).
(iεIs) However, k = min {i: iεIs}, jεIs At this time, Ys exists as a subset of Y satisfying the following property. (1) Δ i (Ys)> 0 for each i where i ∈ Is
(I ∈ Is) (2) For each j with 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)とする時、ν(co Y)
は以下の公式で与えられる。 ν(co Y)=Σλiyi,i∈Is⊆{1,2,・・・
m} ここで、比例定数λiは、補題1で求めた部分集合Ysに
対するΔi(Ys)を使って次式で与えられる。 λi=Δi(Ys)/Δ(Ys) ,Ys={yi:i∈Is} Δ(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 lattice point set Y = {y 1 , y 2 , ... Y m} εR 3 ,
When the convex polyhedron stretched by Y is co Y and the vector of the closest point from the origin O to co Y is ν (co Y), ν (co Y)
Is given by the following formula. ν (co Y) = Σλ i y i , i ∈ Is ⊆ {1, 2, ...
m} Here, the proportionality constant λ i is given by the following equation using Δ i (Ys) for the subset Ys obtained in Lemma 1. λ i = Δ i (Ys) / Δ (Ys), Ys = {y i : iεIs} Δ (Ys) = ΣΔ i (Ys) (iεIs) The detailed proof of the above lemma is omitted here, The meaning of the lemma is easy to understand. Apply the above lemma to a tetrahedron. As shown in FIGS. 73 (a) to 73 (d), the closest approach vector between a point O and a tetrahedron is calculated by calculating the lattice points, edges, and
It may exist inside a surface or a tetrahedron. Therefore, if the subset Ys of Y consists of one point,
If it consists of 2 points, it corresponds to the case where the closest point exists on the side if it consists of 3 points, and if it consists of 4 points it 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 actually executing the lemmas 1 and 2, the following algorithm is followed. (g) Gilbert's lemma algorithm For a lattice point set Y = {y 1 , y 2 , ... Ym} ∈ R 3 ,
Let Ys = {y i : iεIs⊆ {1, 2, ...
m}}, the complement of Is is Is'. Also, s = 1, 2,
It is assumed that all subsets of Y are designated by setting σ. At this time, the Gilbert's algorithm 2) 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)を計算して以後Gilber
t法のアルゴリズ3)を実行する。2) 1 1 → s 2) 2 If Δ i (Ys)> 0 (iεIs) for each i in iεIs, and for each j in jεIs, then If Δ j (Ys∪ {y j }) ≦ 0 (jεIs), then λ i = Δ i (Ys) / Δ (Ys), Ys = {y i : iεIs} Δ (Ys) = stop the ΣΔ i (Ys) (i∈Is) ν (co Y) = Σλ i y i (i∈Is) (12) ', executing the algorithm 3) subsequent 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, steps 2) 2 and 2) 3 are repeated until the condition 2) 2 is satisfied, and 2) 2
When the condition of is satisfied, ν (co Y) is calculated and then Gilber
Carry out the algorithm of t method 3).
【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 in a subroutine having the following inputs and outputs. Input: Coordinate value of each grid point of the bi-convex polyhedron Output: Coordinate value of the closest point, closest distance FIG. 74 is a numerical test example when the Gilbert method is executed by fault run and applied to various convex polyhedrons. A star mark indicates that two objects are close to each other (free), a white circle indicates that two objects are in contact, and a square black mark indicates that two objects interfere with each other. The computer used is Harris 800, which is slightly faster than the VAX 780 and has the performance of a current PC.
【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を掛けた値がCP
Uスケールに相当する。Sparcチップ(CPUのチップ)
を使ったワークステーションの場合には更に一桁以上の
高速性を期待できる。M on the horizontal axis of FIG. 74 is the number of lattice points, and EF on the vertical axis is the amount defined by the following equation. EF = (t M N M + t A N A + t D N D + t C N C ) / (t M + t A ) (13) Where, N M is the number of times of addition, N A is the number of times of addition, and N D is the number of times of division. ,
N C is the number of comparison operations, t M , t A , t D , and t C are the calculation times required for each. In the case of Harris 800, t M = 3.8 μ
s, t A = 2.1 μs, t D = 6.7 μs, t C = 1.7 μs. EF
The value of does not change greatly by 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/10 6 is CP
Corresponds to the U scale. Sparc chip (CPU chip)
In the case of a workstation using, you can expect an increase in speed of one digit or more.
【0032】(j) 結論 1) 以上からGilbert法による最接近点探索は、2つの凸
多面体の格子点の総数をMとした時、干渉している場
合、接触している場合、フリーの場合それぞれにおい
て、ほぼMに比例した計算負荷を有し、比例定数はEF
/Mの値で見て14〜19の値に収まる。 2) Gilbert法を1M Flops程度のワークステーション上
で2つの凸多面体に適用する場合、格子点の総数が20
0程度でも数msで最接近点の算出が可能である。(J) Conclusion 1) From the above, the closest point search by the Gilbert method is when the total number of lattice points of two convex polyhedra is M, when they interfere, when they are in contact, when they are free. Each of them has a calculation load proportional to M, and the proportional constant is EF.
The value of / M falls within the range of 14 to 19. 2) When the Gilbert method is applied to two convex polyhedra on a workstation of about 1 M Flops, the total number of grid points is 20.
It is possible to calculate the closest point in a few ms even if it is about zero.
【0033】[0033]
【発明が解決しようとする課題】以上より、Gilbert法
によれば、2物体間の最接近点探索を短時間で効率良く
実行できる効果がある。しかし、Gilbert法には以下の
ような限界ないしは制約条件が存在する。 1) Gilbert法の限界:連続探索問題への対応 2つの凸多面体間の最接近点を連続的に追い掛ける場合
を考察する。このように2つの凸多面体間の最接近点を
連続的に追い掛ける問題を連続探索問題という。物体の
移動に伴い、最接近点は各々の凸多面体において、面か
ら辺、辺から頂点、頂点から面へと渡り歩くように遷移
していく。従って、ある時点で最接近点が求まった場
合、次の時点における最接近点は前の最接近点の近傍に
存在するはずである。換言すれば、最接近点の探索は局
所的な問題であり、凸多面体全領域の複雑度とは無関係
のはずである。As described above, according to the Gilbert method, there is an effect that the search for the closest point between two objects can be executed efficiently in a short time. However, the Gilbert method has the following limits or constraints. 1) Limits of Gilbert's method: Correspondence to continuous search problem Let us consider the case of continuously chasing the closest point between two convex polyhedra. Such a problem of continuously chasing the closest point between two convex polyhedra is called a continuous search problem. As the object moves, the closest point transitions in each convex polyhedron such that it walks from face to side, side to vertex, and vertex to face. Therefore, when the closest point is obtained at a certain time point, the closest point at the next time point should be near the previous closest point. In other words, the search for the closest point is a local problem and should be independent of the complexity of the entire area of the convex polyhedron.
【0034】しかし、Gilbert法では、連続探索問題に
おいて全格子点を考慮した最接近探索処理を行うため、
凸多面体の全格子点数M1,M2に依存したO(M1+M2)
の計算負荷が最接近点探索の都度必要となる問題があ
る。又、計算負荷が大きいため、ロボット、自走車が高
速で移動する場合には最接近点探索処理が間にあわなく
なる問題がある。However, in the Gilbert method, since the closest search process considering all grid points in the continuous search problem is performed,
O (M 1 + M 2 ) depending on the total number of lattice points M 1 and M 2 of the convex polyhedron
There is a problem that the calculation load of is required each time the closest point is searched. Further, since the calculation load is large, there is a problem that the closest approach point search processing cannot be completed in time when the robot and the self-propelled vehicle move at high speed.
【0035】2) Gilbert法の制約条件:非凸多面体への
対応 Gilbert法は凸多面体間の最接近点を探索するアルゴリ
ズムである。このため、実用度を上げるために、非凸多
面体、非単連結多面体、自由曲面を持った物体への拡張
が必要である。Gilbert法により非凸多面体間の最接近
点探索を行う場合には、図75に示すように、各非凸多
面体K1,K2を複数の凸多面体A,B;a,b,cに分
割し、全ての凸多面体の組み合わせについて最接近点探
索アルゴリズムを適用し、得られた最接近距離のうち最
も短いものを選択する。しかし、かかる方法では組み合
わせの数が多くなり、計算負荷が大きくなる問題があ
る。以上から本発明の目的は、物体間の連続探索問題を
少ない計算負荷で高速に実行できる最接近点探索方法及
びその前処理方法を提供することである。本発明の別の
目的は、少なくとも一方が非凸多面体の物体間の最接近
点探索を少ない計算負荷で高速に実行できる最接近点探
索方法及びその前処理方法を提供することである。2) Constraint condition of Gilbert method: Correspondence to non-convex polyhedron Gilbert method is an algorithm for searching the closest point between convex polyhedra. Therefore, in order to improve the practicality, it is necessary to extend to non-convex polyhedrons, non-singly connected polyhedrons, and objects having free-form surfaces. When the closest point search between non-convex polyhedrons is performed by the Gilbert method, each non-convex polyhedron K 1 , K 2 is divided into a plurality of convex polyhedrons A, B; a, b, c as shown in FIG. Then, the closest point search algorithm is applied to all combinations of convex polyhedra, and the shortest one among the obtained closest distances is selected. However, such a method has a problem that the number of combinations increases and the calculation load increases. In view of the above, an object of the present invention is to provide a closest point search method and a preprocessing method thereof capable of executing a continuous search problem between objects at high speed with a small calculation load. Another object of the present invention is to provide a closest point search method and a preprocessing method thereof, which can perform a closest point search between objects, at least one of which is a non-convex polyhedron, at high speed with a small calculation load.
【0036】[0036]
【課題を解決するための手段】図1は本発明の原理説明
図である。図1(a)において、12は対象となる2つの
凸多面体を特定する凸多面体データを記憶する記憶部、
13は凸多面体データを用いて有向グラフで凸多面体を
定義する有向グラフデータ作成部、14は有向グラフ型
構造データを記憶する記憶部、15はGilbert法に基づ
いて2物体間の最接近点探索処理を行なう最接近点探索
処理部である。図1(b)において、22aは対象となる
2つの凸多面体を覆う全ポリゴンデータを記憶するポリ
ゴンデータ記憶部、22bは近接点線形リスト記憶部、
23は各ポリゴンの頂点を第1方向(next方向)に
リンクし、各頂点にポリゴン辺を介して繋がる頂点群を
第2の方向(branch方向)に該頂点にリンクして
なるデータ構造を備えた近接点線形リストを作成する近
接点線形リスト作成部、26は最接近点探索処理部であ
る。FIG. 1 is a diagram for explaining the principle of the present invention. In FIG. 1A, reference numeral 12 denotes a storage unit that stores convex polyhedron data that specifies two target convex polyhedrons,
13 is a directed graph data creation unit that defines a convex polyhedron in a directed graph using convex polyhedron data, 14 is a storage unit that stores directed graph structure data, and 15 is the closest point search process between two objects based on the Gilbert method The closest point search processing unit. In FIG. 1 (b), 22a is a polygon data storage unit that stores all polygon data that covers two target convex polyhedra, and 22b is a near-point linear list storage unit.
Reference numeral 23 has a data structure in which the vertices of each polygon are linked in the first direction (next direction), and a group of vertices connected to each vertex via polygon sides are linked to the vertices in the second direction (branch direction). A proximity point linear list creation unit that creates a proximity point linear list, and 26 is a closest approach point search processing unit.
【0037】[0037]
【作用】第1の最接近点探索方法 2つの凸多面体K1,K2の最接近点を探索する場合、有
向グラフデータ作成部13は記憶部12に記憶されてい
る各凸多面体データを用いてそれぞれの凸多面体K1,
K2を表現する有向グラフ型構造データを作成する。こ
の有向グラフ型構造データは、凸多面体の各表面多角形
(ポリゴン)の下方に該ポリゴンの要素である格子点、
辺を配列し、格子点、辺の下方にそれぞれ格子点、辺を
構成するポリゴンを配列したものである。ついで、最接
近点探索処理部(プロセッサ)15は最接近点探索処理
を実行する。すなわち、2つの凸多面体K1,K2の差集
合(K1−K2)である差凸多面体上のp個のポイントを
要素とする部分集合で形成される形状迄の最接近点を求
め、該最接近点の位置ベクトルと各凸多面体K1,K2の
格子点の位置ベクトルとの内積を評価し、評価結果に基
づいて該最接近点が、原点から差凸多面体(K1−K2)
までの最接近点と一致するか判定し、一致しない場合に
は部分集合を変更し、最終的に原点から差凸多面体まで
の最接近点を求めて各凸多面体K1,K2の最接近点を求
める。 First Closest Point Search Method When searching for the closest points of two convex polyhedra K 1 and K 2 , the directed graph data creation unit 13 uses each convex polyhedron data stored in the storage unit 12. Each convex polyhedron K 1 ,
Create a directed graph structure data representing K 2 . This directed graph type structure data includes lattice points which are elements of the polygon below each surface polygon (polygon) of the convex polyhedron,
The sides are arranged, and the lattice points are arranged, and the polygons forming the lattice points and the sides are arranged below the sides, respectively. Then, the closest point search processing unit (processor) 15 executes a closest point search process. That is, the closest point to the shape formed by the subset having p points on the difference convex polyhedron, which is the difference set (K 1 −K 2 ) of the two convex polyhedra K 1 and K 2 , is found. , The inner vector of the position vector of the closest point and the position vector of the lattice point of each convex polyhedron K 1 , K 2 is evaluated, and based on the evaluation result, the point of the closest point is a difference convex polyhedron (K 1 − K 2 )
Determines whether it matches with the point of closest approach to, and change the subset if they do not match, eventually each convex polyhedrons K 1 seeking the point of closest approach from the origin to Satotsu polyhedron, closest approach of K 2 Ask for points.
【0038】かかる内積評価において、最接近点探索処
理部15は部分集合で形成される形状の最接近点に対応
する各凸多面体の最接近点が格子点上に存在するか、辺
上に存在するか、ポリゴン上に存在するか判断する。各
凸多面体の最接近点が、1)格子点上に存在する場合には
有向グラフ型構造データより該格子点を構成するポリゴ
ンを求め、該ポリゴンの格子点を前記内積評価に用い、
2) 辺上に存在する場合には有向グラフ型構造データよ
り該辺を構成するポリゴンを求め、該ポリゴンの格子点
を前記内積評価に用い、3)ポリゴン上に存在する場合に
は該ポリゴンの格子点を前記内積評価に用いる。このよ
うすれば、内積評価に適用する格子点数を減少すること
ができ、内積評価を全格子点に適用する従来例に比べ計
算負荷を減少することができる。In the inner product evaluation, the closest point search processing unit 15 determines that the closest point of each convex polyhedron corresponding to the closest point of the shape formed by the subset exists on the grid point or on the side. Yes, or whether it exists on the polygon. The closest point of each convex polyhedron, 1) when present on the grid point, to find the polygons forming the grid point from the directed graph structure data, using the grid point of the polygon for the inner product evaluation,
2) If it exists on the side, the polygons that compose the side are obtained from the directed graph structure data, and the grid points of the polygon are used for the inner product evaluation. 3) If it exists on the polygon, the grid of the polygon Points are used for the inner product evaluation. In this way, the number of grid points applied to the inner product evaluation can be reduced, and the calculation load can be reduced as compared with the conventional example in which the inner product evaluation is applied to all the grid points.
【0039】第2の最接近点探索方法 凸多面体を構成する表面多角形(ポリゴン)を三角形に
分割し、三角形ポリゴンの下方に該三角形ポリゴンの要
素である格子点、辺を配列し、格子点、辺の下方にそれ
ぞれ格子点、辺を構成する三角形ポリゴンを配列してな
る有向グラフ型構造データを作成して各凸多面体を表現
する。最接近点探索処理部15は部分集合で形成される
形状の最接近点に対応する各凸多面体の最接近点が格子
点上に存在するか、辺上に存在するか、三角形ポリゴン
上に存在するか判断する。各凸多面体の最接近点が、1)
格子点上に存在する場合には有向グラフ型構造データ
より該格子点を構成する三角形ポリゴンを求め、該三角
形ポリゴンの格子点を内積評価に用い、2) 辺上に存在
する場合には有向グラフ型構造データより該辺を構成す
る三角形ポリゴンを求め、該三角形ポリゴンの格子点を
内積評価に用い、3)三角形ポリゴン上に存在する場合に
は該三角形ポリゴンの格子点を内積評価に用いる。この
ようにすれば、三角形を構成する格子点数は最小(3
個)であるため、内積評価に適用する格子点数を第1の
最接近点探索方法に比べて更に減少することができ、計
算負荷を減少することができる。 Second Closest Point Search Method A surface polygon (polygon) forming a convex polyhedron is divided into triangles, and the lattice points and sides which are elements of the triangular polygon are arranged below the triangular polygon, and the lattice points are arranged. , Each of the convex polyhedrons is created by creating directed graph structure data in which grid points and triangular polygons forming the sides are arranged below the sides. The closest point search processing unit 15 has the closest point of each convex polyhedron corresponding to the closest point of the shape formed by the subset on the grid point, on the side, or on the triangular polygon. Decide whether to do it. The closest point of each convex polyhedron is 1)
If it exists on a grid point, the triangular polygons that compose the grid point are obtained from the directed graph structure data, and the grid points of the triangular polygon are used for the inner product evaluation. 2) If it exists on the side, the directed graph structure A triangular polygon forming the side is obtained from the data, and the lattice points of the triangular polygon are used for inner product evaluation. 3) When the triangular polygon exists on the triangular polygon, the lattice point of the triangular polygon is used for inner product evaluation. In this way, the number of grid points forming a triangle is the minimum (3
The number of grid points applied to the inner product evaluation can be further reduced as compared with the first closest point searching method, and the calculation load can be reduced.
【0040】第3の最接近点探索方法 非凸多面体間の最接近点を探索する場合には、非凸多面
体を包む最小の凸多面体(凸包:convex hullという)
を生成する。そして、該凸包の有向グラフ型構造データ
を作成し、該凸包の有向グラフ型構造データを用いて第
1又は第2の最接近点探索方法を適用して非凸多面体間
の最接近点探索を行う。又、凸包を構成する表面凸多角
形が元の非凸多面体の表面凸多角形と一致する場合には
バーチャリティ(virtuality)=0,一致しない場合には
バーチャリティ=1とし、バーチャリティ=1の表面凸
多角形が他の物体と干渉した場合には、凸包を解除し、
以後非凸多面体を構成する複数の凸多面体に対して第1
又は第2の最接近点探索処理を適用して非凸多面体間の
最接近点探索を行う。このようにすれば、非凸多面体間
同士の最接近点探索が可能になると共に、バーチャリテ
ィ=1の表面凸多角形が他の物体と干渉するまでは最接
近点探索処理に要する計算負荷を減少することができ
る。又、バーチャリティ=1の表面凸多角形が他の物体
と干渉して凸包を解除後、該表面凸多角形が他の物体と
干渉しなくなった時、凸包を復元して最接近点探索処理
を行うようにすれば、復元後の最接近点探索処理の計算
負荷を軽減できる。 Third Closest Point Search Method When searching for the closest point between non-convex polyhedra, the smallest convex polyhedron that encloses the non-convex polyhedron (convex hull).
To generate. Then, the directed graph type structural data of the convex hull is created, and the first or second closest point searching method is applied using the directed graph type structural data of the convex hull to search for the closest point between non-convex polyhedra. To do. Also, if the surface convex polygons forming the convex hull match the surface convex polygons of the original non-convex polyhedron, virtuality = 0, otherwise virtuality = 1, and virtuality = When the surface convex polygon of 1 interferes with other objects, the convex hull is released,
Hereafter, the first is applied to a plurality of convex polyhedrons forming the non-convex polyhedron.
Alternatively, the second closest point search process is applied to perform the closest point search between non-convex polyhedra. By doing this, it is possible to search for the closest point between the non-convex polyhedrons, and the calculation load required for the closest point search processing until the surface convex polygon of virtuality = 1 interferes with other objects. Can be reduced. Further, when the surface convex polygon of virtuality = 1 interferes with another object to cancel the convex hull, and when the surface convex polygon no longer interferes with another object, the convex hull is restored to obtain the closest point. If the search process is performed, the calculation load of the closest point search process after restoration can be reduced.
【0041】第4の最接近点探索方法 凸多面体を覆う全ポリゴンの頂点座標を入力し、近接点
線形リスト作成部24により、各ポリゴンの頂点を第1
方向(next方向)にリンクし、各頂点にポリゴン辺
を介して繋がる頂点群を第2の方向(branch方
向)に該頂点にリンクしてなるデータ構造を備えた近接
点線形リストを最接近点探索処理の実行前に作成する。
しかる後、最接近点探索処理部26は、最新に求まって
いる最接近点に近接する頂点を近接点線形リストより求
め、これら頂点の中より次の時刻における最接近点を探
索して干渉チェックを行なう。 Fourth Closest Point Search Method The vertex coordinates of all polygons covering the convex polyhedron are input, and the near point linear list creation unit 24 sets the first vertex of each polygon.
A closest point linear list having a data structure in which a vertex group linked to a direction (next direction) and connected to each vertex via a polygon edge is linked to the vertex in a second direction (branch direction) Created before executing the search process.
After that, the closest point search processing unit 26 obtains the vertex closest to the latest closest point from the closest point linear list, searches the closest point at the next time from these vertices, and checks the interference. Do.
【0042】[0042]
(A) 凸多面体間の最接近点探索の第1の方法 (a) 原理 Gilbert法でO(M1+M2)の計算負荷が発生するプロセス
は、ステップ3)における判定関数gK(νk)のhK(−
νk)の内積計算においてである。すなわち、h K(−ν
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)の計算負荷が発生する。 (A) First method for searching for the closest point between convex polyhedra (a) Principle Gilbert's method O (M1+ M2) The process that causes the computational load
Is the decision function g in step 3)K(Νk) HK(-
νk) In the inner product calculation. That is, h K(-Ν
k) Is from equation (8) hK(-Νk) = HK1(-Νk) + HK2(-Νk) = -Min {xi・ Νk: I = 1, 2, ... M1} + −min {yi・ Νk: I = 1, 2, ... M2} (14), so hKIn the process of evaluating1, K2of
Calculate inner product over all grid points to determine minimum
O (M1+ M2) Calculation load occurs.
【0043】内積の計算回数を減らす有効な方策は、凸
多面体K1,K2を格子点数がより少ない凸多面体又は凸
多角形に分割し、現在の最接近点の近傍に位置する凸多
面体又は凸多角形についてのみ内積を評価する方法であ
る。最も簡単な分割法は、図2に示すように、凸多面体
を表面多角形の集合に分割する方法である。この時、凸
多面体における最接近点は、 1)格子点上に存在する場合、 2)辺上に存在する場合、 3)面上に存在する場合 の3通りがあり得る。An effective measure for reducing the number of inner product calculations is to divide the convex polyhedrons K 1 and K 2 into convex polyhedrons or convex polygons having a smaller number of grid points, and to project the convex polyhedrons or the convex polygons located in the vicinity of the current closest point. This is a method for evaluating the inner product only for a convex polygon. The simplest division method is a method of dividing a convex polyhedron into a set of surface polygons, as shown in FIG. At this time, the closest point in the convex polyhedron can be one of 1) on the lattice point, 2) on the side, and 3) on the surface.
【0044】そこで、それぞれに対して内積を評価する
表面多角形を以下のように制限すれば良い。すなわち、
最接近点が 1)格子点上に存在する場合には、その格子点を頂点に持つ表面多角形の全て、 2)辺上に存在する場合には、その辺を1辺として持つ表面多角形の全て、 3)面上に存在する場合には、現在最接近点が存在する表面多角形 ・・・(15) を、内積を評価する表面多角形とする。すなわち、最接
近点が存在する位置に応じて(15)の1)〜3)で示す表面多
角形を構成する格子点(頂点)についてのみ内積を評価
し(内積が最小となる格子点を求め)、判定関数g
K(νk)を演算すればよい。このようにすれば、内積評
価に必要となる格子点数が減り、計算負荷が減少する。Therefore, the surface polygons whose inner products are evaluated may be limited as follows. That is,
If the closest point is on 1) a grid point, all surface polygons that have that grid point as a vertex, and 2) if they are on a side, a surface polygon that has that side as one side. 3) If it exists on the surface, the surface polygon where the closest point currently exists ... (15) is the surface polygon whose inner product is evaluated. That is, the inner product is evaluated only for the lattice points (vertices) that form the surface polygon shown in 1) to 3) of (15) according to the position where the closest point exists ( ), The decision function g
It suffices to calculate K (ν k ). In this way, the number of grid points required for inner product evaluation is reduced, and the calculation load is reduced.
【0045】(b) 最接近点探索のための凸多面体のデー
タ構造 上記1)〜3)により連続的に内積評価に必要となる表面多
角形を求めるためには、凸多面体を定義するデータ構造
に工夫を要する。図3は図2の6面体の場合のデータ構
造例であり、有向グラフ型構造データを採用している。
この有向グラフ型構造データは抽象化すると以下のよう
に表現できる。 1)凸多面体を構成する表面多角形に番号を付け、各々に
1つずつポリゴンノード(polygon node)を割り付け
る。 2)各ポリゴンノードの下に、その多角形を構成する全格
子点と全辺を並べるための格子点ノード(Vertex node)
とエッジノード(Edge node)を割り付ける。多角形を構
成する格子点の集合と辺の集合は、格子点ノードとエッ
ジノードに対してそれぞれブラザーノード(brother nod
e)として存在する。 3)格子点ノードとエッジノードの下に、それらの格子点
又は辺を構成要素として持つ多角形をポリゴンノードと
して割り付ける。多角形が複数存在する場合にはブラザ
ーノードとして割り付ける。(B) Data structure of convex polyhedron for closest point search In order to continuously obtain the surface polygons required for inner product evaluation by the above 1) to 3), a data structure defining a convex polyhedron is used. Need some ingenuity. FIG. 3 is an example of the data structure in the case of the hexahedron of FIG. 2, and uses directed graph type structure data.
This directed graph type structured data can be expressed as follows when abstracted. 1) Number the surface polygons that make up the convex polyhedron and assign one polygon node to each. 2) Under each polygon node, a lattice node (Vertex node) for arranging all lattice points and all sides that compose the polygon.
And an edge node. The set of grid points and the set of edges that make up a polygon are
exists as e). 3) Under the grid point node and the edge node, a polygon having those grid points or edges as constituent elements is allocated as a polygon node. If there are multiple polygons, assign them as brother nodes.
【0046】(c) 判定関数gK(νk)の内積評価法 以上のように、凸多面体のデータ構造を作成すると、(1
5)は以下のように表現できる。判定関数gK(νk)の計
算におけるhK(−νk)の評価は、 1)最接近点が格子点上に存在する場合には、該格子点に対応する格子点ノード の下に連なる全てのポリゴンノードに応じた表面多角形の格子点について内積評 価を行う、 2)最接近点が辺上に存在する場合には、該辺に対応するエッジノードの下に連 なる全てのポリゴンノードに応じた多角形の格子点について内積評価を行う、 3)最接近点が面上に存在する場合は、該面の格子点について内積評価を行う。 ・・・(15)′ 内積評価を(15)′のように制限した場合には、判定関数
gK(νk)の計算負荷は、凸多面体の表面凸多角形の格
子点数の最大値をLとすると、O(L)以下に抑えるこ
とができる。(C) Inner product evaluation method of decision function g K (ν k ) As described above, when the data structure of the convex polyhedron is created, (1
5) can be expressed as follows. The evaluation of h K (−ν k ) in the calculation of the decision function g K (ν k ) is as follows: 1) If the closest point is on a grid point, it is placed below the grid point node corresponding to the grid point. Inner product evaluation is performed on the surface polygon points corresponding to all the continuous polygon nodes. 2) When the closest point exists on the side, all the continuous points under the edge node corresponding to the side The inner product is evaluated for the polygonal grid points corresponding to the polygon node. 3) If the closest point is on the surface, the inner product is evaluated for the grid points on the surface.・ ・ ・ (15) ′ If the inner product evaluation is limited to (15) ′, the calculation load of the decision function g K (ν k ) is the maximum value of the number of grid points of the surface convex polygon of the convex polyhedron. When it is L, 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) Closest Point Search Algorithm Employing Inner Product Evaluation Method of the Present Invention FIG. 4 is a flow chart of the closest point search algorithm between two convex polyhedra according to the present invention. First, data that specifies two target convex polyhedra is input (initial input: environment model setting of convex polyhedron). In this case, data specifying each convex polyhedron is input in the following method (see FIG. 5). That is, the polygon number P1i (i = 1, 2, ..., M) is assigned to the surface polygon forming the first convex polyhedron PH1. Then, the i-th polygon number P1i is input, 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 P1 are input.
The polygon number for 1i (i = 1, 2, ... M),
Enter the grid point coordinate values and the outward normal direction. The coordinate values of the lattice 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,
... n) is attached. Then, the i-th polygon number P2i
Then, the coordinate values of the lattice points forming the polygon number P2i and the outward normal direction of the polygon number P2i are input, and all polygons P2i (i = 1, 2, ... N) are input.
For, the polygon number, the coordinate value of the grid point, and the outward normal direction are input (above step 101). When the input of the data specifying each convex polyhedron is completed, the directed graph structure data is created based on the input data (step 10).
2). When the creation of the directed graph structure data is completed, the Gilbert method is applied to the convex polyhedra PH1 and PH2. First, the initial lattice point set V k (k = 0) is determined (step 103), and the closest point vector ν k is calculated for the initial lattice point set V 0 and output (step 104).
【0049】ついで、該最接近点に対応する各凸多面体
PH1,PH2上の最接近点が格子点上、辺上、面上の
いずれに存在するか調べ、存在位置に基づいて(15)′に
より内積評価に使用する格子点を決定し、判定関数gK
(νk)を演算する(ステップ105)。尚、凸多面体P
H1上の格子点をx1i、凸多面体PH2上の格子点をx
2iとすると(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上の最接近点を求
めることができる。Then, it is checked whether the closest point on each convex polyhedron PH1, PH2 corresponding to the closest point is on a grid point, on a side or on a surface, and based on the existing position, (15) ' determining the grid points to be used for the inner product evaluation, the decision function g K
(Ν k ) is calculated (step 105). Incidentally, the convex polyhedron P
Let x 1i be the grid point on H1 and x be the grid point on the convex polyhedron PH2.
Assuming 2i , the expression (12) ′ is ν (co Y) = Σλ i y i (iεIs) = Σλ i (x 1i −x 2i ) (iεIs) = Σλ i x 1i −Σλ i x 2i ( i∈Is) (12) ″. The first term on the right side of (12) ″ is the position vector of the closest point on the convex polyhedron PH1, and the second term on the right side is the convex polyhedron PH1.
2 is the position vector of the closest point on 2. Therefore, in the process of computing the closest point vector ν k ,
The closest point on each convex polyhedron PH1, PH2 corresponding to the closest point vector can be obtained by calculating the term and the second term on the right side.
【0050】判定関数が求まれば、gK(νk)=0にな
ったか調べ(ステップ106)、g K(νk)=0であれ
ば最接近点探索は終了する。しかし、gK(νk)が0で
なければ、kをインクリメントし、次の格子点集合V1
について最接近点ベクトルを出力する(ステップ10
7)。以後ステップ105以降の処理を繰り返せば、最
終的にgK(νk)=0となり、最接近距離、最接近点が
求まる。すなわち、2つの凸多面体PH1,PH2の差
集合凸多面体までの最接近点ベクトルは(12)′式で求ま
るから、原点Oから該最接近点までの距離が最接近距離
となる。又、この時、(12)″式の右辺第1項、第2項に
より各凸多面体PH1,PH2上の最接近点を求めるこ
とができる。Once the decision function is obtained, gK(Νk) = 0
Check if there is any (step 106), g K(Νk) = 0
If so, the closest point search ends. But gK(Νk) Is 0
If not, k is incremented and the next grid point set V1
Output the closest point vector for (step 10
7). After that, if you repeat the processing after step 105,
Finally gK(Νk) = 0, the closest distance and the closest point are
I want it. That is, the difference between the two convex polyhedrons PH1 and PH2
The vector of the closest point to the set convex polyhedron is calculated by Eq. (12) '.
Therefore, the distance from the origin O to the closest point is the closest distance.
Becomes Also, at this time, in the first term and the second term on the right side of the equation (12) ″,
The closest point on each convex polyhedron PH1 and PH2 can be found from
You can
【0051】(e) 本発明の内積評価法を採用した最接近
点探索装置の構成図 図6は2つの凸多面体間の最接近点探索装置の構成図で
ある。図中、11は対象となる2つの凸多面体を特定す
るデータ(図5参照)を入力する入力部、12は入力さ
れた凸多面体データを記憶する記憶部、13は凸多面体
毎に凸多面体データを用いて有向グラフ型構造データを
作成する有向グラフ型構造データ作成部、14は有向グ
ラフ型構造データを記憶する記憶部、15はGilbert法
に基づいて2物体間の最接近点探索処理を行なう最接近
点探索処理部、16は最接近点が存在する位置(格子
点、辺、面)に応じた内積評価用の格子点を有向グラフ
型構造データ記憶部14より読出して最接近点探索処理
部15に入力する内積評価用格子点読み出し部である。(E) Configuration diagram of the closest point search device adopting the inner product evaluation method of the present invention FIG. 6 is a configuration diagram of the closest point search device between two convex polyhedrons. In the figure, 11 is an input unit for inputting data (see FIG. 5) that specifies two target convex polyhedrons, 12 is a storage unit for storing the input convex polyhedron data, and 13 is convex polyhedron data for each convex polyhedron. A directed graph structure data creating unit that creates directed graph structure data using 14; a storage unit 14 that stores directed graph structure data; The search processing unit 16 reads the grid points for inner product evaluation corresponding to the position (grid point, side, surface) where the closest point exists from the directed graph structure data storage unit 14 and inputs it to the closest point search processing unit 15. This is a grid point reading unit for inner product evaluation.
【0052】入力部11から凸多面体PH1,PH2を
特定するデータを入力して記憶部12に記憶する。有向
グラフ型構造データ作成部13は入力データに基づいて
有向グラフ型構造データを作成し、記憶部14に記憶す
る。有向グラフ型構造データの作成が完了すると最接近
点探索処理部15は凸多面体PH1,PH2に対してGi
lbert法を適用する。まず、初期格子点集合Vk(k=
0)を決定し、該初期格子点集合V0について最接近ベ
クトルνkを計算する。ついで、最接近ベクトルν kに応
じた各凸多面体上の最接近点を求め、それぞれの最接近
点が格子点上、辺上、面上のいずれに存在するか調べ、
存在位置(格子点、辺、面)を内積評価用格子点読み出
し部16に入力する。読み出し部16は最接近点位置に
基づいて定まる内積評価に使用する格子点を有向グラフ
型構造データ記憶部14より読出して最接近点探索処理
部15に入力する。最接近点探索処理部15は入力され
た格子点を用いて内積評価を行なって判定関数g
K(νk)を演算する。しかる後、判定関数が求まれば、
gK(νk)=0になったか調べ、gK(νk)=0であれ
ば最接近点探索は終了し、最接近距離、最接近点を出力
する。しかし、gK(νk)が0でなければ、kをインク
リメントし、次の格子点集合V1について最接近点ベク
トルを出力する。以後、同様な処理が行なわれ、最終的
にgK(νk)=0となり、最接近距離、最接近点が出力
される。尚、凸多面体PH1,PH2が移動すれば、所
定時間毎の移動データに基づいて移動後の各凸多面体の
格子点位置を求め、上記処理を行う。From the input unit 11, connect the convex polyhedrons PH1 and PH2
The data to be specified is input and stored in the storage unit 12. Directed
The graph type structure data creation unit 13 is based on the input data.
Create directed graph type structure data and store it in the storage unit 14.
It Closest when creation of directed graph structure data is completed
The point search processing unit 15 applies Gi to the convex polyhedrons PH1 and PH2.
The lbert method is applied. First, the initial grid point set Vk(K =
0) is determined, and the initial grid point set V0About the closest
Cutle νkTo calculate. Then, the closest vector ν kIn response
Find the closest point on each convex polyhedron, and find the closest point
Check whether the point is on the grid point, on the side, or on the surface,
Read out existing positions (grid points, sides, faces) for inner product evaluation grid points
It is input to the output section 16. The reading unit 16 is at the closest point position.
Directed graph of grid points used for inner product evaluation
Read from the type structure data storage unit 14 and search for the closest point
Input to the section 15. The closest point search processing unit 15 is input
The inner product is evaluated using the determined grid points to determine the decision function g
K(Νk) Is calculated. After that, if the decision function is obtained,
gK(Νk) = 0 is checked, gK(Νk) = 0
If the closest point search is completed, the closest distance and the closest point are output.
To do. But gK(Νk) Is not 0, ink k
The next grid point set V1About the closest point
Output toll. After that, the same process is performed and finally
To gK(Νk) = 0, the closest distance and the closest point are output
To be done. If the convex polyhedrons PH1 and PH2 move,
Based on the movement data for each fixed time,
The grid point position is obtained 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 for Searching for Closest Point between Convex Polyhedra (a) Principle In the first method for searching for the closest point, the convex polyhedron that is the target object is divided into surface convex polygons that respectively enclose it. , The calculation load was on the order of the number of grid points of the convex polygon. When the idea of the first closest approach search method is further investigated, it is clear that if the surface of the convex polygon is covered with triangular polygons, the number of times of one inner product evaluation will be minimized. Figure 7 (a)
FIG. 4 is an explanatory diagram of a state in which the closest point to the convex polyhedron K moves along the surface polygon along with the movement of the origin O. Origin O
The closest point S is a convex polygon P1 → convex polygon P according to the movement of
2 → Transition continuously on the convex polygon P3. Therefore,
If the convex polygon is divided into triangles Tij as shown in FIG. 7 (b), the closest point S becomes a triangle T11 → as the origin O moves.
T12 → T21 → T22 → T23 → T24 → T25 → T
It will continuously change from 26 to 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 forming the convex polyhedron are divided into triangles and the first closest 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'is present on the side E11 in FIGS. 7A and 7B, in the case of FIG. 7A, the grid points used for the inner product evaluation are V1 to V6. Although there are six, four in the case of FIG. 7B, V1, V3, V4, and V6 are sufficient, and the number of times of one inner product evaluation can be reduced. From the above, if the target convex polyhedron is preprocessed and the surface convex polygons are all divided into triangular polygons, then the calculation load when continuously evaluating g K (ν k ) is 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を参照されたい。As a method of dividing an arbitrary convex polygon into triangular polygons, some algorithms 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 thereof. The strings are L1 to L6
Is a line segment for dividing into triangles. The calculation load of this algorithm is O (n 3 ) where n is the number of grid points of the first polygon. Regarding algorithms for polygons into triangles, 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〜
233, 1984.
【0056】以上より、最接近点の連続探索問題への対
応法(第2の最接近点探索方法)は以下のようにまとめ
ることができる。 1)前処理1:対象凸多面体を包む各表面凸多角形に対
し、三角形分割を施す(Triangulation algorithm) 2)前処理2:三角形を用いて第1の最接近点探索方法に
おけると同様に有向グラフ型構造データを作成する。 3)内積評価:(15)′にしたがってgK(νk)をにおける
内積評価の範囲を限定する。From the above, the method for dealing with the continuous search problem for the closest point (second closest point search method) can be summarized as follows. 1) Preprocessing 1: Triangulation algorithm is applied to each surface convex polygon that wraps the target convex polyhedron (Triangulation algorithm) 2) Preprocessing 2: Using a triangle, a directed graph as in the first closest point search method Create type structure data. 3) Inner product evaluation: Limit the range of inner product evaluation at g K (ν k ) 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 Closest Point Search Algorithm of the Present Invention FIG. 9 is a flow chart of the closest approach point search algorithm according to the second closest approach point search method of the present invention. First, data that specifies two target convex polyhedra is input (initial input: environment model setting of convex polyhedron). Data specifying each convex polyhedron is input in the following method (see FIG. 5). That is,
The number P1 is assigned to the surface polygon forming 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 forming the polygon of the number P1i and the outward normal direction of the polygon are input, and similarly all polygons P1i (i =
1, 2, ..., M), the polygon number, the grid point coordinate value, and the outward normal direction are input. The coordinate values of the lattice points forming the polygon are input clockwise toward the outward normal vector. Similarly, a polygon number P2i (i = 1, 2, ...) Is assigned to the surface polygon forming the second convex polyhedron PH2.
・ ・ Add n). Next, the i-th polygon number P2i is input, and thereafter, the coordinate values of the lattice points forming the polygon number P2i and the outward normal direction of the polygon number P2i are input, and all polygons P2i (i = 1, 2 ,. .. for n), the polygon number, grid point coordinate value, and outward normal direction are input (above 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 specifying each convex polyhedron is completed, the surface convex polygon forming the convex polyhedron is divided into triangles based on the input data, and the polygon number T is assigned to each triangle.
ij is added (step 202). Then, using the obtained triangle as a polygon node, directed graph type structure data is created in the same manner as in the first closest point searching method (step 203). When the data creation of the directed graph type structure is completed, the Gilbert method is applied to the convex polyhedrons PH1 and PH2. First, the initial grid point set V k (k = 0) is determined (step 204), and the closest point vector ν k is calculated and output for the initial grid point set V 0 (step 20).
5).
【0059】ついで、最接近点ベクトルνkに応じた各
凸多面体上の最接近点を求め、それぞれの最接近点が格
子点上、辺上、面上のいずれに存在するか調べ、存在位
置に基づいて(15)′により内積評価に使用する格子点を
決定し、判定関数gK(νk)を演算する(ステップ20
6)。判定関数が求まれば、gK(νk)=0になったか
調べ(ステップ207)、g K(νk)=0であれば最接
近点探索は終了する。しかし、gK(νk)が0でなけれ
ば、kをインクリメントし、次の格子点集合V1につい
て最接近点ベクトルを出力する(ステップ208)。以
後ステップ105以降の処理を繰り返せば、最終的にg
K(νk)=0となり、最接近距離、最接近点が求まる。
尚、凸多面体PH1,PH2が移動すれば、所定時間毎
の移動データに基づいて移動後の各凸多面体の格子点位
置を求め、上記処理を行う。Then, the closest point vector νkAccording to each
Find the closest points on the convex polyhedron, and calculate the closest points
Examine whether it exists on the child point, on the side, or on the surface, and
The grid points used for the inner product evaluation are determined by (15) ′
Determine and judge function gK(Νk) Is calculated (step 20)
6). If the decision function is obtained, gK(Νk) = 0
Examine (step 207), g K(Νk) = 0 is the closest
The near point search ends. But gK(Νk) Must be 0
If k is incremented, the next grid point set V1About
And outputs the closest point vector (step 208). Since
If you repeat the processing after step 105, g
K(Νk) = 0, and the closest distance and the closest point are obtained.
It should be noted that if the convex polyhedrons PH1 and PH2 move, then at predetermined time intervals.
Position of each convex polyhedron after movement based on the movement data
Then, the above processing is performed.
【0060】(c) 本発明の第2の最接近点探索装置の構
成図 図10は本発明の第2の最接近点探索方法を実現する装
置の構成図であり、図6と同一部分には同一符号を付し
ている。図6と異なる点は、 1)凸多面体を特定する凸多面体データに基づいて該凸多
面体を構成する表面凸多角形を三角形に分割する三角形
分割部17が設けられている点、 2)有向グラフ型構造データ作成部13は各三角形をポリ
ゴンノードとして有向グラフ型構造データを作成して記
憶部14に記憶する点、である。(C) Configuration diagram of the second closest point searching device of the present invention FIG. 10 is a configuration diagram of a device that realizes the second closest point searching method of the present invention. Are given the same reference numerals. 6 is different from FIG. 6 in that 1) a triangle dividing unit 17 that divides a surface convex polygon forming the convex polyhedron into triangles based on convex polyhedron data that specifies the convex polyhedron, 2) directed graph type The structure data creation unit 13 is a point that creates the 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 advantages 1) and 2) are obtained. 1) High speed: When chasing the closest point continuously, the calculation load can be made almost constant regardless of the complexity of the target polyhedron except for the time required for initialization. The constant value is almost equal to the search time of the closest point between the triangular polygons. 2) Application to free-form surface: When a free-form surface is represented by combining triangular polygons, the time to search for the closest point is always constant even if the number of polygons is increased to improve 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 Method for Searching for Closest Point between Non-Convex Polyhedra (a) Principle The basic principle for extending the Gilbert method to a non-convex polyhedron is to define a non-convex polyhedron as a set of convex polyhedra. The goal is to reduce the number of convex polyhedron combinations that must be checked for interference when captured. Of course, the Gilbert method is used to check the interference between convex polyhedra. To reduce the number of convex polyhedra, merging (mergin
Introduce the concept of g). The merging of object A and object B is the smallest convex object (Copnvex hull) that includes A and B.
Is to configure. In FIG. 11, a non-convex polyhedron K is divided into two convex polyhedrons A and B, and A and B are subjected to merging processing.
It is the example which constituted the minimum convex object (convex hull) C containing. When the convex hull is generated, the interference check of the non-convex polyhedron results in the interference check of the convex hulls (the 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 of a plurality of convex polyhedra. In the example of FIG. 11, the virtuality is “for a polygon (polygons 4, 5, 6) that straddles two existing convex polyhedra (rectangular solids) A and B.
1 ", and for other polygons that actually exist, the virtuality is" 0. "A convex hull is created by merging, and the first closest point search method is applied to the convex hull. 12 creates the effective graph type structural data of the convex hull, and Fig. 12 shows the directed graph type structural data of the convex hull shown in Fig. 11, in which the surface polygon polygons 1, 2, ... of the convex hull are polygon nodes. A lattice point node and an edge node are arranged below, and a polygon node is arranged below each lattice point node and an edge node, and a virtuality is added to the polygon.
【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 polyhedra, and the data specifying each convex polyhedron is input (initial input: environment model setting of convex polyhedron). That is, the first convex polyhedron PH1
The polygon number P1i (i = 1,
2, ... m). Then, the i-th polygon number P
1i, and then 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, ...
For m), enter the polygon number, grid point coordinate value, and outward normal direction. Thereafter, similarly, polygon numbers P2i (i = 1, 1) are assigned to the surface polygons forming the other convex polyhedron PH2.
2, ... n), all polygons P2i (i = 1, 1,
2, ... n), polygon number, grid point coordinate value,
The outward normal direction is input (above 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, the data of the directed graph type structure is created based on the input data (step 302). Then, the smallest convex hull PH (1,2) including the respective convex polyhedrons PH1, PH2 is generated (step 303). Then, the polygon number P PH (1,2) i (i = 1,2, ... r) is added to the surface polygon forming the convex hull PH (1,2).
After inputting the i-th polygon number P PH (1,2) i , the coordinate values of the lattice points forming the i-th polygon, the virtuality of the polygon, and the outward normal direction are obtained and stored (see FIG. 14). ). After that, similarly, all polygons P PH (1,2 ) i (i = 1,2,
... r), the polygon number, the grid point coordinate value, and the virtuality outward normal direction are obtained, and the directed graph type structural data of the convex hull is created and stored in the memory. If the polygon P PH (1,2) i includes both grid points of the convex polyhedron PH1 and PH2, the virtuality is “1”, and if only one grid point is included, the virtuality is “1”. It becomes 0 "(the above 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 which creates a convex hull from a plurality of convex polyhedra and creates directed graph structure data. Algorithms for creating convex hulls are well known in computational geometry. For a three-dimensional convex hull, the computational load is O (M
-Log M) algorithm is known. For example, F.
P. Preparata and SJ Hong, "Convex hulls of finit
e sets of points intwo and three dimensions ", Com
m. ACM 2 (20), pp.87-93, 1977. The merging algorithm causes convex polyhedrons that are relatively stationary to act on each other, and cancels merging when a polygon of virtuality "1" contacts or collides with another object. As a result, thereafter, the closest point search processing is performed on the set state of the lower convex polyhedra. In addition, after the merging is released (after the convex hull is released), when the interference with other objects does not occur 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) Activation of the merging algorithm The merging algorithm is caused to act offline on the target object in the initial setting, and when the environment starts to change dynamically, that is, a convex polyhedron in the environment. If is started, the merging process is temporarily stopped while maintaining the current state, and an interference check is performed. Then, when the environment stops, merging processing is executed to create a convex hull after the environment change and to create a directed graph structure data of the convex hull. FIG. 15 is an explanatory diagram of the merging process by the processor in consideration of the above. A flag ms (i) for monitoring the static motion of the convex hull is prepared for all convex hulls. If the static / moving flag ms (i) = "1", move, ms (i)
When = “0”, it is static, and i covers the entire convex hull.
【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
By the state monitoring task Task1 that monitors the value of s (i) to monitor the static state of the convex hull, and if any ms (i) is “1”, the above first closest point search method Task2 (interference check task) that executes other processes for interference check, and Task3 (merging task that executes 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.
It is written as "0". Status monitoring task Task
1 monitors the content of ms (i), and when all are "0", the merging task Task3 is activated to execute a merging process to create a convex hull and directed graph structure data. The merging task Task3 is stopped after forming one convex hull, and waits for the next activation instruction. On the other hand, either 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 point search method. After that, the above operation is repeated and the interference check is executed.
【0069】以上はタスク切り換えによりマージング処
理、干渉チェック処理等を実行する場合であるが、Wh
ile文を用いてシーケンシャルにマージング処理を行
うようにもできる。図16はWhile文を用いてマー
ジング処理を実行する場合の説明図である。While
文において全ての凸包のms(i)が”0”か監視し、全
て”0”の場合にはマージングプロセスを実行して1つ
の凸包を作成する(ステップ401)。しかる後、Wh
ile文を抜け出し、干渉チェックその他の処理を実行
し(ステップ402)、再びWhile文を実行する。
以後、常時マージング処理、干渉チェック処理を繰返し
連続的に実行する。The above is the case of executing the merging process, the interference check process, etc. by switching the task.
It is also possible to perform merging processing sequentially by using an ile statement. FIG. 16 is an explanatory diagram of a case where the merging process is executed using the While statement. While
In the sentence, ms (i) of all convex hulls is monitored for "0", and if all "0", the merging process is executed to create one convex hull (step 401). After that, Wh
The ile statement is exited, interference check and other processing are executed (step 402), and the While statement is executed again.
After that, the merging process and the interference check process are constantly executed repeatedly.
【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, as shown in FIG.
When the robot arm AM passes through the arch AC, which is a non-convex polyhedron, and grabs the object OB on the opposite side, as shown in FIG. In this case, the merging is released when the robot arm AM comes into contact with the convex polygon of the convex hull virtuality "1". After that, the individual convex polyhedrons AC1 to AC1 that form the robot arm AM and the arch AC1.
An interference check with AC3 is performed, and the robot arm reaches the object OB so as not to contact the arch AC, grasps the object, and carries it to the target location. The convex hull from which the merging has been canceled is restored by the recovery algorithm described below. Fig. 18 (a) shows a convex hull CH on the work table BS and arch AC.
18B is an example in which the arch AC and the object O are generated.
This is an example of the case where convex hulls CH2 and CH3 are generated for B respectively, and the robot arm AM has a convex hull CH1 composed of a work table BS and an arch AC, and a convex hull formed of an arch as shown in FIG. 18 (c). Object OB pierced by parcel CH2 one after another
Reach the target object, grasp the object and carry it to the desired location.
【0071】(d) リカバリアルゴリズム 干渉によって分解した凸包は、一定時間、他の物体と干
渉が生じない場合には回復する。リカバリ処理は、マー
ジング状態のデータ構造が残っている凸包に対してのみ
作用する。従って、相対位置関係が動いてしまい、元の
凸包のデータ構造が失われている凸多面体集合は、リカ
バリ処理では回復せず、マージングアルゴリズムの適用
により新しい凸包が構成される。(D) Recovery Algorithm The convex hull decomposed by interference is recovered for a certain period of time when it does not interfere with other objects. The recovery process operates only on the convex hull in which the merging state data structure remains. Therefore, the convex polyhedron set in which the relative positional relationship has moved and the data structure of the original convex hull is lost is not recovered by the recovery process, and a new convex hull is constructed 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 motion of the convex hull is prepared for all convex hulls. If the static / moving flag ms (i) = "1", move, ms (i)
When = “0”, it is static, and i covers the entire convex hull. As a task of the processor, a status monitoring task Tas that constantly monitors all ms (i) values to monitor the static state of the convex hull
k1 and Task2 (interference check / recovery task) that executes interference check processing, recovery processing, and other processing by the first closest point search method when any ms (i) is “1”, and When ms (i) = “0”, that is, when all the convex hulls are stationary, there is Task3 (merging task) for executing the merging process.
【0073】凸包全ての静動状態は図示しないロボット
制御装置により監視され、メモリMEMにms(i)=”
1”あるいはms(i)=”0”として書き込まれる。状
態監視タスクTask1はms(i)の内容を監視し、全
て”0”の場合にはマージングタスクTask3が起動
する。マージングタスクTask3はマージング処理を
実行して凸包の作成、有向グラフ型構造データの作成を
行う。マージングタスクTask3は凸包を1つ構成す
ると停止し、次の起動指示を待つ。一方、いずれかのm
s(i)が”1”の場合には、換言すればいずれかの凸包
が動いている場合には、干渉チェックタスクTask2
は第1の最接近点探索方法により干渉チェックを実行す
ると共に、リカバリ処理その他の処理を実行する。以
後、上記動作が繰り返されて干渉チェックが実行され
る。The static / moving state of all the convex hulls is monitored by a robot controller (not shown), and ms (i) = ”is stored in the memory MEM.
It is written as 1 ”or ms (i) =“ 0 ”. The state monitoring task Task1 monitors the contents of ms (i), and if all“ 0 ”, the merging task Task3 is activated. The merging task Task3 is merging. By executing the processing, a convex hull is created, and directed graph type structure data is created.The merging task Task3 stops after forming one convex hull, 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
Performs the interference check by the first closest point searching method and also executes the recovery process and other processes. After that, the above operation is repeated and the interference check is executed.
【0074】リカバリ処理は、凸包のバーチャリティ”
1”の凸多角形が他の物体と接触してマージングが解除
された時、凸包が該物体と干渉しなくなったか監視し、
干渉しなくなってから連続して所定時間干渉しない場合
には凸包を復元する。図17の例では、ロボットアーム
AMが対象物OBを把持してアーチACを通り抜けると
凸包とアームの干渉がなくなるから、干渉しなくなって
から所定時間経過した時凸包を復元する。The recovery process is a convex hull virtuality "
When the convex polygon of 1 "comes into contact with another object and the merging is released, it is monitored whether the convex hull does not interfere with the object,
When the interference does not occur and the interference does not occur for a predetermined time continuously, the convex hull is restored. In the example of FIG. 17, when the robot arm AM grips the object OB and passes through the arch AC, the convex hull and the arm do not interfere with each other.
【0075】以上はタスク切り換えによりリカバリ処理
等を実行する場合であるが、While文を用いてシー
ケンシャルにリカバリ処理を行うようにもできる。図2
0はWhile文を用いてリカバリ処理を実行する場合
の説明図である。While文において全ての凸包のm
s(i)が”0”か監視し、全て”0”の場合にはマージ
ングプロセスを実行して1つの凸包を作成する(ステッ
プ501)。しかる後、While文を抜け出し、干渉
チェック処理、リカバリ処理、その他の処理を実行し
(ステップ502)、再びWhile文を実行する。以
後、常時マージング処理、干渉チェック処理、リカバリ
処理を繰返し連続的に実行する。Although the above is the case where the recovery processing and the like is executed by switching the tasks, the recovery processing can be performed sequentially by using the While statement. Figure 2
Reference numeral 0 is an explanatory diagram in the case where the recovery process is executed using the While statement. M of all convex hulls in a While sentence
It is monitored whether s (i) is "0", and if all are "0", a merging process is executed to create one convex hull (step 501). Then, the While statement is exited, interference check processing, recovery processing, and other processing are executed (step 502), and the While statement is executed again. After that, the merging process, the interference check process, and the recovery process are constantly and repeatedly executed.
【0076】(e) 非凸多面体間の最接近点探索の全体の
処理 図21は非凸多面体間の最接近点探索の全体の処理フロ
ー図である。対象となる非凸多面体を特定するデータを
入力する(初期入力:環境モデル設定)。・・・ステッ
プ601 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiの有向グラフ型構造データを作成する。又、マージ
ング処理により凸包を生成すると共に、凸包の有向グラ
フ型構造データを作成する(ステップ602)。以上の
初期化処理が終了すると第1の最接近点探索処理(干渉
チェック)処理を実行する(ステップ603)。つい
で、干渉するかチェックし(ステップ604)、干渉す
ればバーチャリティ=”1”の部分が干渉したかチェッ
クし(ステップ605)、バーチャリティ=”0”であ
れば、ただちに移動を停止し(ステップ606)、バー
チャリティ=”1”であればマージングを解除し(ステ
ップ607)、ステップ603に戻る。以後、凸包が回
復するまで、非凸多面体を構成する個々の凸多面体に対
する最接近点探索処理を実行する。(E) Overall Process of Searching for Closest Point between Non-Convex Polyhedra FIG. 21 is an overall process flow diagram for searching for a closest point between non-convex polyhedrons. Input the data that specifies the target non-convex polyhedron (initial input: environment model setting). ... Step 601 Then, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P is divided.
Create a directed graph structure data of Hi. Further, the convex hull is generated by the merging process, and the directed graph structure data of the convex hull is created (step 602). When the above initialization process is completed, a first closest point search process (interference check) process is executed (step 603). Next, it is checked whether they interfere (step 604). If they interfere, it is checked whether the virtuality = "1" portion interferes (step 605). If the virtuality = "0", the movement is immediately stopped ( If the virtuality is "1" (step 606), the merging is canceled (step 607), and the process returns to step 603. After that, the closest point search process is executed for each convex polyhedron forming the non-convex polyhedron until the convex hull is recovered.
【0077】一方、ステップ604において、干渉して
いなければリカバリ処理を実行する(ステップ60
6)。リカバリ処理においては、マージングが解除され
た凸包が存在するか調べ、存在する場合には、他の物体
と干渉しているかチェックし、干渉してなければ非干渉
時間を計時する。そして、マージングが解除された凸包
の非干渉時間が設定値以上になっていれば、該凸包を復
元する。しかし、他の物体と干渉していたり、非干渉時
間が設定値以上でない場合には凸包を復元せず次のステ
ップを実行する。尚、凸包を構成する部分の相対位置関
係が動いて元の凸包データが失われている場合には凸包
の回復は行わない。ついで、凸包の全ての部分が静止し
ているかチェック(ステップ609)、静止していない
場合にはステップ603に戻り以降の処理を繰返し、静
止している場合にはマージング処理を実行して新たな凸
包を作成し(ステップ610)、以後ステップ603に
戻り以降の処理を繰り返す。On the other hand, if there is no interference at step 604, recovery processing is executed (step 60).
6). In the recovery process, it is checked whether or not there is a convex hull in which merging has been canceled, and if it exists, it is checked whether or not it interferes with another object, and if it does not interfere, the non-interference time is counted. Then, if the non-interference time of the convex hull in which the merging is canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or if the non-interference time is not longer than the set value, the convex hull is not restored and the next step is executed. When the relative positional relationship of the parts forming the convex hull moves and the original convex hull data is lost, the convex hull is not recovered. Then, it is checked whether or not all the parts of the convex hull are stationary (step 609). If not stationary, the process returns to step 603 to repeat the subsequent processes, and if stationary, the merging process is executed and a new process is performed. A convex hull is created (step 610), and then 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 Closest Point Searching Device between Non-Convex Polyhedrons FIG. 22 is a configuration diagram of a closest approaching point searching device between non-convex polyhedrons. Reference numeral 21 is an input unit for inputting data for identifying a target non-convex polyhedron, 22 is a storage unit for storing the input non-convex polyhedron data, and 23 is a non-convex polyhedron divided into a plurality of convex polyhedra. A convex polyhedron division / directed graph creation unit that creates directed graph structure data for each, 24 is a convex hull of a non-convex polyhedron, and a convex hull creation / directed graph creation unit that creates directed graph structure data of the convex hull is A storage unit that stores the directed graph structure data CVD of each convex polyhedron and the directed graph structure data CHD of the convex hull, 26 is a processor that performs state monitoring, interference check, merging, and recovery processing, and 27 is sent from the robot controller. A memory that stores the static / moving flag ms (i) and the position data of each object, and 28 is a memory that stores whether or not the merging of the convex hull is released for each convex hull. 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 the non-convex polyhedron into convex polyhedra, and the directed graph structure data CVD of each convex polyhedron.
Is created and stored in the memory 25. Further, the convex hull creating / directed graph creating unit 24 creates a convex hull by merging processing, creates the 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-mentioned first closest point search processing (interference check) processing using the directed graph type structure data of the convex hull. For moving objects, calculate the grid point position based on the movement data input from the robot controller,
The closest point search process is performed based on the grid point position. Convex hull (virtuality = "1") by the closest point search process
When the interference with 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 refers to the release flag FR to check whether the convex hull has been recovered, and if not recovered, the closest point search process is performed using the directed flag structure data of each convex polyhedron forming the non-convex polyhedron. Run. Further, the processor 26 executes the recovery process unless it interferes with the convex hull (virtuality = “1”).
【0081】リカバリ処理においては、解除フラグメモ
リ28を参照してマージングが解除された凸包が存在す
るか調べ、存在する場合には、他の物体と干渉している
かチェックし、干渉してなければ非干渉時間Tを計時す
る。そして、マージングが解除された凸包の非干渉時間
Tが設定値以上になっていれば、該凸包を復元する。す
なわち、解除フラグFRを0にする。しかし、他の物体
と干渉していたり、非干渉時間が設定値以上でない場合
には凸包を復元しない。ついで、ロボット制御装置から
入力されている静止フラグms(i)を参照して凸包の全
てが静止しているかチェック、静止していない場合には
上記干渉チェックを繰り返す。静止している場合、非凸
多面体を構成する凸多面体の相対的位置関係が変化して
いる場合にはマージング処理を実行して新たな凸包を作
成してメモリ25に記憶し、以後同様な処理を繰り返
す。In the recovery process, the cancellation flag memory 28 is referred to check whether or not there is a convex hull in which the merging has been cancelled. For example, the non-interference time T is measured. Then, if the non-interference time T of the convex hull in which the merging is 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 the convex hulls are stationary, and if they are not stationary, the interference check is repeated. When stationary, when the relative positional relationship of the convex polyhedrons forming the non-convex polyhedron has changed, merging processing is executed to create a new convex hull, which is stored in the memory 25. Repeat the process.
【0082】以上より、本発明の非凸多面体間の最接近
点探索方法によれば、凸包を作成し、凸包の有向グラフ
型構造データを作成し、該凸包の有向グラフ型構造デー
タに基づいて最接近点探索処理を行うようにしたから、
凸多面体の組み合わせ数を大幅に減らすことができる。
又、環境が動的に変化することによって凸包が崩壊した
場合には、その後、一定時間、他の物体との干渉が生じ
なければ元の凸包を回復し、凸多面体の数を最小に保持
でき、計算負荷を現象できる。As described above, according to the method of searching for the closest point between non-convex polyhedra of the present invention, a convex hull is created, directed graph type structural data of the convex hull is created, and based on the directed graph type structural data of the convex hull. Since the closest point search process is performed,
The number of combinations of convex polyhedra can be significantly reduced.
Also, if the convex hull collapses due to a dynamic change in the environment, then the original convex hull is restored for a certain period of time without interference with other objects, and the number of convex polyhedra is minimized. It can be held and the calculation load can be realized.
【0083】(D) 非凸多面体間の最接近点連続探索に
おける第1の方法 (a) 原理 複数の非凸多面体間の最接近点を連続的に追い掛ける
「最接近点の連続探索問題」において、各々の非凸多面
体に対してマージング処理を施し、形式上凸多面体間の
最接近点の連続問題にリダクションして解決する。この
とき、マージングにより求めた各凸多面体に対し、凸多
面体を構成する表面凸多角形に番号を付け、各々の凸多
角形の近傍に位置する格子点、辺、凸多角形を登録する
ための有向グラフ型構造データを作成し、最接近点探索
の計算負荷を表面多角形の格子点数の最大値のオーダO
(L)以下に抑える。マージングするに当たり、バーチ
ャリティという指標を導入する。バーチャリティとは、
マージングの過程で求まる凸多面体の表面多角形におい
て、元の非凸多面体の表面多角形と一致する場合にはバ
ーチャリティ=0,一致しない場合にはバーチャリティ
=1とする。(D) First method in continuous search for closest points between non-convex polyhedrons (a) Principle In the "continuous search problem for closest points" in which the closest points between a plurality of non-convex polyhedrons are continuously tracked , We perform merging processing on each non-convex polyhedron, and reduce and solve the continuous problem of the closest points between formally convex polyhedra. At this time, for each convex polyhedron obtained by merging, number the surface convex polygons that form the convex polyhedron, and register the grid points, edges, and convex polygons that are located near each convex polygon. Creates a directed graph type structure data and sets the calculation load of the closest point search to the order of the maximum value of the number of grid points of the surface polygon.
(L) Keep below. For merging, we will introduce an index called virtuality. What is virtuality?
In the surface polygon of the convex polyhedron obtained in the merging process, virtuality = 0 if it matches the original surface polygon of the non-convex polyhedron, and virtuality = 1 if they do not match.
【0084】バーチャリティ=1の凸多角形との干渉が
発生した場合には、マージングを解除し、元の非凸多面
体を構成する凸多面体間の組み合わせに対して凸多面体
における本発明の第1の最接近点探索方法を適用する。
マージングの解除に伴う規則は以下の通りとする。 1)バーチャリティ=1の多角形(凸包Aの成分)とバー
チャリティ=0の多角形(凸包Bの成分)が干渉したな
らば、バーチャリティ=1の多角形を有する凸包Aを解
除する。 2)バーチャリティ=1の多角形(凸包Aの成分)とバー
チャリティ=1の多角形(凸包Bの成分)が干渉したな
らば、凸包を凸多面体に分解した時の構成凸多面体数の
少ない方の凸包を解除する。 3) バーチャリティ=0の多角形同士が干渉した場合に
は、どちらの凸包も解除しない。When interference with a convex polygon of virtuality = 1 occurs, merging is canceled and the first non-convex polyhedron of the present invention is applied to the combination of convex polyhedrons constituting the original non-convex polyhedron. The nearest point search method of 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, then a convex hull A having a polygon with virtuality = 1 is selected. To release. 2) If a polygon with virtuality = 1 (component of convex hull A) and a polygon with virtuality = 1 (component of convex hull B) interfere with each other, a configuration when the convex hull is decomposed into a convex polyhedron Release the convex hull with the smaller number. 3) If 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 polyhedra appears ((( See 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) Closest point search algorithm between convex polyhedron set and convex hull 1) PA (Virt
uality (PA) = 1). At this time, each side of the interference surface PA is composed of the element Edge (DA, PA) of the set DA and the side of the virtuality = 1, and the lattice points of the interference surface PA are the elements Verte of the set DA.
It is composed of 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) Constitution Checking the interference between the set of convex polyhedra DA and the convex hull B is Edge (DA, PA), Vertex (DA, PA) and the convex hull B.
This is performed by applying the first closest point search method of the present invention in a convex polyhedron. That is, Edge (DA, PA),
Each convex polyhedron (A ′, which forms a non-convex polyhedron) is a surface convex polygon of DA including Vertex (DA, PA) (see the hatched portion in (c)).
A ″) is searched from the directed graph type structure data. Then, the first closest approach point search method is applied in parallel between the surface polygon and the convex hull B that are respectively obtained to perform interference check ((d)). 3) If you get out of the state of interference with the convex polygon with virtuality = 1, the convex hull released by the recovery process is recovered, and the closest point search process is applied to the convex hull (see (e)). By the process of 2), the convex polyhedron A ′ which is the target of the closest point search,
The number of faces of A ″ can be reduced (one face for the convex polyhedron A ′ and two faces for the 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 point continuous search process FIG. 24 is a process flow diagram of the closest point continuous search process between non-convex polyhedra. Input the data that specifies the target non-convex polyhedron (initial input: environment model setting). ... Step 701 Then, the non-convex polyhedron is divided into convex polyhedra, and each convex polyhedron P is divided.
Create a directed graph structure data of Hi. Further, the convex hull is generated by the merging process, and the directed graph structure data of the convex hull is created (step 702). When the above initialization processing is completed, the first aspect of the present invention for the convex polyhedron
The closest point search process (interference check) is executed (step 703). Next, it is checked whether they interfere with each other (step 704), and if they do interfere with each other, it is checked whether polygons with virtuality = 0 interfere with each other (step 705), and YES.
If so, neither convex hull is released and the process is stopped, and the next instruction is awaited. However, if the polygons with virtuality = 0 do not interfere with each other, it is checked whether the polygon with virtuality = 1 (component of convex hull A) and the polygon with virtuality = 0 (component of convex hull B) interfere with each other. (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 a polygon of virtuality = 1 is released (step 707). NO
In other words, in other words, if the polygon with virtuality = 1 (component of convex hull A) and the polygon with virtuality = 1 (component of convex hull B) interfere, decompose the convex hull into a convex polyhedron. The convex hull having the smaller number of constituent convex polyhedrons is obtained (step 708) and the convex hull is canceled (step 707). Then, the surface convex polygons of the set DA including Edge (DA, PA) and Vertex (DA, PA) of the interference surface PA are retrieved from the directed graph structure data of each convex polyhedron and passed to the processor (step 7).
09). After that, the processor finds the surface polygon and the convex hull B
In parallel with this, the first closest approach point search method is applied to perform interference check (step 703).
【0089】一方、ステップ704において、物体間が
干渉していなければリカバリ処理を実行する(ステップ
710)。リカバリ処理においては、マージングが解除
された凸包が存在するか調べ、存在する場合には、他の
物体と干渉しているかチェックし、干渉してなければ非
干渉時間を計時する。そして、マージングが解除された
凸包の非干渉時間が設定値以上になっていれば、該凸包
を復元する。しかし、他の物体と干渉していたり、非干
渉時間が設定値以上でない場合には凸包を復元せず次の
ステップを実行する。以後ステップ703に戻り以降の
処理を繰り返す。ついで、凸包の全ての部分が静止して
いるかチェック(ステップ711)、静止していない場
合にはステップ703に戻り以降の処理を繰返し、静止
している場合にはマージング処理を実行して新たな凸包
を作成し(ステップ712)、以後ステップ703に戻
り以降の処理を繰り返す。On the other hand, in step 704, if there is no interference between the objects, recovery processing is executed (step 710). In the recovery process, it is checked whether or not there is a convex hull in which merging has been canceled, and if it exists, it is checked whether or not it interferes with another object, and if it does not interfere, the non-interference time is counted. Then, if the non-interference time of the convex hull in which the merging is canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or if the non-interference time is not longer than the set value, the convex hull is not restored and the next step is executed. After that, the process returns to step 703 and the subsequent processes are repeated. Then, it is checked whether or not all the parts of the convex hull are stationary (step 711). If not stationary, the process returns to step 703 to repeat the subsequent processes, and if stationary, the merging process is executed to newly execute. A convex hull is created (step 712), and then the process returns to step 703 to repeat the subsequent processing.
【0090】(E) 非凸多面体間の最接近点連続探索に
おける第2の方法 (a) 原理 複数の非凸多面体間の最接近点を連続的に追い掛ける
「最接近点の連続探索問題」において、各々の非凸多面
体に対してマージング処理を施し、形式上凸多面体間の
最接近点の連続問題にリダクションして解決する。この
とき、本発明の第2の最接近点探索方法を適用する。す
なわち、マージングにより求めた各凸多面体に対し、凸
多面体を包む各表面凸多角形に三角形分割(Triangulat
ion)を施し、三角形分割した結果に対して有向グラフ型
のデータ構造を取り、最接近点探索の計算負荷を対象凸
多面体の複雑度に関係せずに一定に抑える。マージング
するに当たり、バーチャリティという指標を導入する。
バーチャリティとは、マージングの過程で求まる凸多面
体の表面多角形において、元の非凸多面体の表面多角形
と一致する場合にはバーチャリティ=0,一致しない場
合にはバーチャリティ=1とする。(E) Second method in continuous search for closest points between non-convex polyhedrons (a) Principle In the "continuous search problem for closest points" in which the closest points between a plurality of non-convex polyhedrons are continuously tracked , We perform merging processing on each non-convex polyhedron, and reduce and solve the continuous problem of the closest points between formally convex polyhedra. At this time, the second closest point searching method of the present invention is applied. That is, for each convex polyhedron obtained by merging, triangulation (Triangulat) into each surface convex polygon enclosing the convex polyhedron.
Ion) and takes a directed graph type data structure for the result of triangulation to keep the calculation load of the closest point search constant regardless of the complexity of the target convex polyhedron. For merging, we will introduce an index called virtuality.
In the surface polygon of the convex polyhedron obtained in the process of merging, the virtuality is set to virtuality = 0 when it matches the surface polygon of the original non-convex polyhedron, and virtuality = 1 when they do 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 of virtuality = 1 occurs, merging is canceled (convex hull is canceled), and the combination of convex polyhedrons constituting the original non-convex polyhedron of the present invention is canceled. The second closest point search method is applied. The rules for canceling merging are as follows. 1) If a triangular polygon with a virtuality = 1 (a component of convex hull A) and a triangular polygon with a virtuality = 0 (a component of convex hull B) interfere with each other, a convex hull A having a triangular polygon with virtuality = 1 is created. 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 with each other, the configuration when the convex hull is decomposed into a convex polyhedron Release the convex hull with the smaller number. 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 polyhedra appears ((( See 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) Let TA (Virtuality (TA) = 1) be the interference triangular polygon of the convex hull A when the convex hull A is released. 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 points of the interference triangular polygon TA are the elements Vertex (DA, PA) of the set DA. 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) Constitution Checking the interference between the set of convex polyhedra DA and convex hull B is 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 DA triangular polygon including Vertex (DA, PA) (see the hatched portion in (c)) is searched from the directed graph structure data of each convex polyhedron (A ′, A ″) that constitutes the non-convex polyhedron.
Then, the second closest approaching point search method is applied in parallel between the triangular polygons and the convex hull B obtained from the respective interference checks (see (d)). 3) When exiting from the state of interference with the triangular polygon of virtuality = 1, the convex hull released by the recovery process is recovered, and the closest point search process is performed on the convex hull ((e)). By the process of 2), the convex polyhedron A ′, which is the target of the closest point search,
The number of triangular polygons in A ″ can be reduced (convex polyhedron A ′,
It is possible to reduce the calculation load of the closest point search process by using A ″.
【0094】(b) 非凸多面体間の最接近点連続探索処理 図26は非凸多面体間の第2の最接近点連続探索処理の
フロー図である。対象となる非凸多面体を特定するデー
タを入力する(初期入力:環境モデル設定)。・・・ス
テップ801 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiに対して三角形分割を行い、しかる後、各凸多面体
の有向グラフ型構造データを作成する。又、マージング
処理により凸包を生成すると共に、凸包の有向グラフ型
構造データを作成する(ステップ802)。(B) Closest point continuous search process between non-convex polyhedrons FIG. 26 is a flow chart of a second closest point continuous search process between non-convex polyhedra. Input the data that specifies the target non-convex polyhedron (initial input: environment model setting). ... Step 801 Then, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P is divided.
Triangulation is performed on Hi, and then directed graph structure data of each convex polyhedron is created. Further, the convex hull is generated by the merging process, and the directed graph structure data of the convex hull is created (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 process is completed, a second closest point search process (interference check) between non-convex polyhedrons is executed (step 803). It is checked whether they interfere with each other (step 804), and if they do interfere with each other, it is checked whether the triangular polygons with virtuality = 0 interfere with each other (step 80).
5) If YES, neither convex hull is released, the process is stopped, and the next instruction is awaited. However, virtuality = 0
If there is no interference between the triangular polygons of (1), it is checked whether or not the triangular polygon of virtuality = 1 (component of convex hull A) and the triangular polygon of virtuality = 0 (component of convex hull B) interfered (step 806). If YES, the convex hull A having the triangular polygon of virtuality = 1 is canceled (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 becomes a convex polyhedron. The convex hull with the smaller number of constituent convex polyhedra when decomposed is obtained (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)。Then, the edge of the interference triangular polygon TA
(DA, PA) and Vertex (DA, PA) are searched for triangular polygons of the set DA from the directed graph structure data of each convex polyhedron and passed to the processor (step 809). After that, the processor applies the second closest approach point search method in parallel between the obtained triangular polygon and the convex hull B to perform the interference check (step 803). On the other hand, in step 804, if there is no interference between the objects, recovery processing is executed (step 810).
【0097】リカバリ処理においては、マージングが解
除された凸包が存在するか調べ、存在する場合には、他
の物体と干渉しているかチェックし、干渉してなければ
非干渉時間を計時する。そして、マージングが解除され
た凸包の非干渉時間が設定値以上になっていれば、該凸
包を復元する。しかし、他の物体と干渉していたり、非
干渉時間が設定値以上でない場合には凸包を復元せず次
のステップを実行する。 ついで、凸包の全ての部分が
静止しているかチェック(ステップ811)、静止して
いない場合にはステップ803に戻り以降の処理を繰返
し、静止している場合にはマージング処理を実行して新
たな凸包を作成し(ステップ812)、以後ステップ8
03に戻り以降の処理を繰り返す。In the recovery processing, it is checked whether or not there is a convex hull from which merging has been canceled, and if it exists, it is checked whether or not it interferes with another object, and if there is no interference, the non-interference time is counted. Then, if the non-interference time of the convex hull in which the merging is canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or if the non-interference time is not longer than the set value, the convex hull is not restored and the next step is executed. Next, it is checked whether all the parts of the convex hull are stationary (step 811). If not stationary, the process returns to step 803 to repeat the processing thereafter, and if stationary, the merging processing is executed to newly execute. A convex hull (step 812), and then step 8
Return to 03 and repeat the subsequent processing.
【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 Processing of Non-Convex Polyhedron into Convex Polyhedron (Preprocessing) (a) System Configuration To execute the closest point search between non-convex polyhedrons, the non-convex polyhedron is converted into a convex polyhedron. Need to be disassembled. FIG. 27 is a system configuration diagram in the case of performing preprocessing for searching for the closest point on the shape model on the graphic workstation,
GWS is a graphic workstation, CPU is a processor that performs preprocessing for the closest point search, closest point search processing, and other processing, MEM is a memory, and shape data FD designed by a three-dimensional CAD system (not shown).
T and a preprocessing program ICP for searching for the closest point are stored, DPL is a display unit, OPS is an operation unit such as a keyboard and mouse, and OPR is an operator. Operator O
The PR uses the operation unit OPS to input a command to the processor CPU to perform preprocessing on the geometric model on the graphic workstation GWS. When the preprocessing command is input, the processor CPU causes the memory ME
Preprocessing program I for searching for the closest point stored in M
Preprocessing (division processing of the polygon set of the non-convex polyhedron) is executed using the shape data FDT of the non-convex polyhedron based on the CP. 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 Pre-Processing for Closest-Point Searching FIG. 28 is a schematic process flow of pre-processing for the closest-point searching according to the present invention. The three-dimensional CAD system creates a shape model (non-convex polyhedron) and performs graphic work step GW.
Input to S (steps 1001 and 1002). CAD
The system inputs all polygon data when an 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 general polygon data is represented by combining triangular polygons as shown in FIG. In the case of the triangular polygon data shown in FIG. 28, three real numbers following normal represent the light reflection direction, and three real numbers following vertex represent the vertex coordinate values. The procedure for outputting polygon data from a shape model in a three-dimensional CAD system is usually three-dimensional CA.
It is prepared in the D system. Then, the polygon data is divided into a set of polygon data (polygon subset) divided for each convex element in accordance with the convex decomposition basic algorithm by the division and conquer method. That is, the initial polygon data (polygon set of non-convex polyhedron) is divided into sets of subsets for each convex element and output (steps 1003, 100).
4). After that, a convex polyhedron is generated for each subset.
Incidentally, although each shape of the polygon is generally arbitrary, each polygon is assumed to satisfy the convexity.
【0100】(c) 分割統治法による凸分解基本アルゴリ
ズム 図29は分割統治法による凸分解基本アルゴリズムのフ
ロー図である。初期ポリゴン集合(非凸多面体のポリゴ
ン集合)Pを入力し(ステップ1101)、ついで、初
期ポリゴン集合Pに対して分割統治法による処理を施す
(ステップ1102)。すなわち、初期ポリゴン集合P
を第1、第2の2つのグループに分割し、各グループに
おいて隣接ポリゴンとの関係が凸であるポリゴン部分集
合を求める。ついで、共通の境界稜線を有する第1グル
ープのポリゴン部分集合と第2グループのポリゴン部分
集合とが凸関係にあるものを併合して凸要素毎の複数の
新たなポリゴン部分集合DP1,DP2,・・・を求め
る。しかる後、ポリゴン部分集合DP1,DP2,・・
・を出力する(ステップ1103)。(C) Convex Decomposition Basic Algorithm by Divide and Conquer Method FIG. 29 is a flowchart of the convex decomposition basic algorithm by the divide and conquer method. An initial polygon set (polygon set of non-convex polyhedron) P is input (step 1101), and then the initial polygon set P is processed by the division and conquer method (step 1102). That is, the initial polygon set P
Is divided into two groups, a first group and a second group, and a polygon subset having a convex relationship with an adjacent polygon in each group is obtained. Then, a plurality of new polygon subsets DP1, DP2, ... for each convex element are merged by merging those in which the polygon subsets of the first group and the polygon subsets of the second group having a common boundary edge are in a convex relationship. · Ask for. 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 = {p 1 , p 2 , p 3 , ...}: Initial polygon set DC (P) = {DP1 = { 1 p 1 , 1 p 2 , 1 p 3 , ...}, DP2 = { 2 p 1 , 2 p 2 , 2 p 3 , ...}, ...}: P divided polygon set NoP: P number of elements Algorithm (divided and controlled) if (input polygon number is 1, ie, NoP = 1) then DC (P) = P else DIVIDE: k = [number of elements of P / 2] PL = {p 1 , p 2 , p 3 , ..., P k }: polygon set of k or less PH = { Pk + 1 , pk + 2 , pk + 3 , ..., pNoP }: Polygon set larger than k RECUR: Costruct DC (PL) and DC (PH) recursively. MERGE: Merge DC (PL) and DC (PH) DC (P) = Merge (DC (PL), DC (PH)) endif As can be seen from the above algorithm, in the division-and-conquer method, division and governance processes are repeated recursively. The most important point where problem dependence exists in the divide-and-conquer law 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 Divide-and-Conquer Method FIG. 30 is a flowchart of the Merge process in the divide-and-conquer method. 1) Prepare convex element sets DC (PL), DC (PH)
(Steps 1111a, 1111b). Convex element set DC
Each element of (PL) and DC (PH) is CLi,
As indicated by CHj, it is composed of a set of polygons forming the element and a set of boundary edges forming the boundary of the element. 2) Judgment of possibility of merging 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 that form the boundary ridge. If there is no shared boundary edge line, it is determined that Merge is impossible. Condition 2: With respect to the shared boundary ridge, the uneven relationship between the CLi polygon and the CHj polygon sharing the ridge is checked. If there is a combination of polygons that are in a concave relationship, it is determined that the merge is impossible. Condition 3: When condition 1 and condition 2 are cleared, that is,
It is determined that Merege is possible when polygons have a convex relationship in all combinations of polygons sharing a boundary ridge.
【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,CHj+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) Convex element CL1Is CHjIs it possible to merge with (j = 1,2, ... NPH)?
Determine whether or not. If CL1Is CHjAnd Merge is possible
Then, after that, CL1, DC (PH) as follows
To do. CL1∪CHj→ CL1 DC (PH) = {CH1, CH2・ ・ ・ CHj-1, CHj + 1・
..} 3-2) Perform the same procedure for CLi (i = 2,3, ... NPL)
It 4) Construction 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
Hj′, CHjThe merged convex element set DC (P) given by ″ ...} is output.
(Step 1113). Where {CHj′, CHj″ ・ ・
・} Is for DC (PH) that does not merge with any CLi
It is a convex element.
【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 Concavo-convex Relationship between Polygons FIG. 31 is an explanatory diagram of the concavo-convex relationship judgment processing between polygons. As shown in FIG. 31 (a), assume two polygons A and B that share one boundary ridgeline BEG. The relative positional relationship of the polygons is either distant from each other or contacting each other via a ridgeline as shown in FIG. 31 (a), and other relationships (for example, intersecting at a portion other than the ridgeline). etc)
There is no. In FIG. 31 (a), the vector b,
c is a perpendicular vector drawn from the centers of gravity p and q of the polygon B and the polygon A to the boundary edge line x 1 −x 0 = a. Also, unitized vectors a, b, and c are referred to as e 0 , e 1 , and e 2 , respectively. n A and n B represent outward normal vectors of the polygon A and the polygon B (the averages of the light reflection directions at the respective lattice points defining the polygon). At this time, b, c, e 0 , e 1 and e 2 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・ Ha
It is the inner product of cuttles = p-x0-e0・ (P-x0) e0 c = q-x0-e0・ (Q-x0) e0 e0= A / | a | e1= B / | b | e2= C / | c |
Vector b is X like 6 (b)0Coordinates to match the axis
Convert. The transformation matrix at this time is
【数1】 で与えられる。[Equation 1] Given in.
【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 either of the following two conditions is satisfied depending on the direction of the normal vector n B , it can be said that the polygon A and the polygon B have a convex relationship. That is, 1) when (e 0 × e 1 ) · n B > 0, [T · c] Z <0, and when (e 1 × e 2 ) · n A > 0, 2) ( When e 0 × e 1 ) · n B ≦ 0 [T · c] Z ≧ 0 and (e 1 × e 2 ) · n A ≦ 0, polygon A and polygon B are convex. It can be said that there is a relationship. When handling actual CAD data, the judgment conditions are as follows in consideration of the error.
【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) In the case of (e 0 × e 1 ) · n B > 0 [T · c] Z <ε and (e 1 × e 2 ) · n A > −ε, 2 ) (e 0 × e 1 ) · n B ≦ 0 [T · c] Z ≧ −ε and (e 1 × e 2 ) · n A ≦ ε are satisfied, polygon A and polygon B Have a convex relationship. Where ε
Is a minute amount determined by the object to be handled. Each element of the set DC (P) of polygon subsets obtained by the division and conquer method is not always convex. The unevenness determination condition shown in FIG. 31 is a local condition. However, when the initial polygon set is divided under the conditions shown in FIG. 31, very good convexity is shown 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 Example of Decomposition Processing into Convex Polyhedron (Preprocessing) When convex decomposition is performed by the basic algorithm by the division and convolution 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 convex decomposition basic algorithm. The optimization method of the second embodiment is not a method of minimizing the number of convex elements in a strict sense, but is 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 (non-convex polyhedron polygon set) P is input from a three-dimensional CAD system or the like (step 1201), and then a convex decomposition basic algorithm by the division-and-conquer method is applied to the initial polygon set P (step 1202). . That is, the initial polygon set P
Is divided into two groups, a first group and a second group, and a polygon subset having a convex relationship with an adjacent polygon in each group is obtained. Then, a plurality of new polygon subsets DP1, DP2, ... for each convex element are merged by merging those in which the polygon subsets of the first group and the polygon subsets of the second group having a common boundary edge are in a convex relationship. · Ask for.
【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 and DP
A convex element set DC (P) whose elements are 2, ... Is output (step 1203). The number of convex elements is NDC (P)
Is. Then, the convex decomposition basic algorithm based on the divide and conquer method is applied again to the convex element set DC (P) (step 1204). That is, a plurality of polygon subsets forming the convex element set DC (P) are divided into first and second groups, and in each group, a subset of polygons having a convex relationship with an adjacent polygon is obtained, and common polygon subsets are obtained. A plurality of new polygon sub-sets DDP1, DDP2, ... Are obtained by merging the polygon sub-sets of the first group and the polygon sub-sets of the second group having the boundary ridges in a convex relationship. After that, polygon subsets DDP1 and DDP
A convex element set DC (DC (P)) having 2, 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 NDC (P) of polygon subsets obtained last time and the number ND of polygon subsets obtained this time
DC (P) are compared (step 1206), and if they match, the convex element set DC (DC (P)) is finally output (step 1207). And this convex element set DC
While a convex polyhedron will be generated using the polygon subset forming (DC (P)), NDDC (P) and N
If DC (P) is not equal (eg NDDC
(P) <NDC (P)), DC (DC (P)) → DC
(P) (step 1208), and then step 12
The processing from 04 is repeated. That is, the convex decomposition processing by the division-and-conquer method is repeatedly applied to the newly obtained polygon subsets DC (DC (P)). In the optimization method,
The convex decomposition basic algorithm is repeatedly applied to the output DC (P) until the number of convex elements is not further reduced.
【0111】 (H)凸多面体への分解処理の第3実施例(前処理) 分割統治法による基本アルゴリズムを用いる方法では、
穴等の認識において分割した凸要素数が予想以上に増え
る可能性がある。第3実施例では、凸要素数を減少する
ために、穴等の物体に対してブール代数を負とみなして
凸分解処理を行ない、その他の正物体に対して第1実施
例の凸分解処理を施すものである。ブール代数を負とみ
なすとは、端的に各ポリゴンの法線方向の符号を反転
(法線方向を逆転)することである。通常の分割統治法
による基本アルゴリズムと負物体認識法とを組み合わせ
ることにより、凸要素数の少ない凸分解が可能となる。
図33は穴等の形状(負物体)を含む物体のブール集合
演算による物体表現法の説明図である。HLは穴、H
L′は法線方向を逆転した穴部、BDYは穴のない物体
(穴なし物体)である。穴付き物体は穴なし物体BDY
から法線方向を逆転した穴部分を差し引くことにより表
現される。(H) Third Example of Decomposition Processing into Convex Polyhedron (Preprocessing) In the method using the basic algorithm by the division and conquer method,
There is a possibility that the number of divided convex elements in recognizing holes etc. will increase more than expected. In the third embodiment, in order to reduce the number of convex elements, the Boolean algebra is regarded as negative for an object such as a hole and the convex decomposition processing is performed, and for other positive objects, the convex decomposition processing of the first embodiment is performed. Is to be applied. To regard a Boolean algebra as negative means to simply reverse the sign of the normal direction of each polygon (reverse the normal direction). By combining the basic algorithm based on the ordinary divide-and-conquer method with the negative object recognition method, convex decomposition with a small number of convex elements becomes possible.
FIG. 33 is an explanatory diagram of an object representation method by a Boolean set operation of an object including a shape such as a hole (negative object). HL is a hole, H
L'denotes a hole with the normal direction reversed, and BDY is an object without a hole (object without a hole). Objects with holes are objects without holes BDY
It is expressed by subtracting the hole part with the normal direction 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 flow chart of the convex decomposition process of the third embodiment, and FIG. 35 is an explanatory diagram of the convex decomposition result. Three-dimensional C
An initial polygon set (non-convex polyhedron polygon set) P is input from an AD system or the like (step 1301), and then a polygon set P B in which all the normal directions of the initial polygon set P are reversed is created (step 1302). After that,
The convex decomposition basic algorithm is applied to the polygon set P B (step 1303). That is, the polygon set P B is divided into two groups, a first group and a second group, and a polygon subset having a convex relationship with an adjacent polygon in each group is obtained. Then the first with a common boundary ridge
The polygon subsets of the group and the polygon subsets of the second group are merged to obtain 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))を求める(ステップ130
5)。正物体を構成するポリゴン集合(差集合)が求ま
れば、該差集合P-P2(DC(PB))に対して分割統治法による
凸分解基本アルゴリズムを適用する(ステップ130
6)。すなわち、差集合P-P2(DC(PB))を第1、第2の2
つのグループに分割し、各グループにおいて隣接ポリゴ
ンとの関係が凸であるポリゴン部分集合を求める。つい
で、共通の境界稜線を有する第1グループのポリゴン部
分集合と第2グループのポリゴン部分集合とが凸関係に
あるものを併合して凸要素毎の複数の新たなポリゴン部
分集合を求める。しかる後、該複数のポリゴン部分集合
を要素とする凸要素集合DC(P-P2(DC(PB)))を出力し(ス
テップ1307、図35)、正物体の認識を行なう。最
後に、DC(P-P2(DC(PB)))を正物体の凸要素、DC
(PB)を負物体の凸要素として出力する(ステップ1
308)。以後、各凸要素のポリゴン部分集合を用いて
凸多面体が生成されることになる。Thereafter, a convex element set DC (P B ) (see FIG. 35) having the plurality of polygon subsets as elements is output, and each convex element of the convex element set DC (P B )
The convex elements composed of two or more polygons are taken out, and all the polygon sets forming these convex elements are set to P 2 (D
C (P B )). That is, the polygons forming the negative object convex elements such as holes are collected and set as P 2 (DC (P B )) (step 1304). Next, a difference set between the initial polygon sets P and P 2 (DC (P B )) is taken to obtain a polygon set PP 2 (DC (P B )) that constitutes a true object (step 130).
5). When the polygon set (difference set) that constitutes the true object is obtained, the convex decomposition basic algorithm by the division and convolution method is applied to the difference set PP 2 (DC (P B )) (step 130).
6). That is, the difference set PP 2 (DC (P B )) is divided into the first and second 2
Divide into one group, and find a polygon subset in which the relationship with adjacent polygons is convex in each group. Then, the polygon subsets of the first group and the polygon subsets of the second group having a common boundary edge are merged to obtain a plurality of new polygon subsets for each convex element. Thereafter, a convex element set DC (PP 2 (DC (P B ))) having the plurality of polygon subsets as elements is output (step 1307, FIG. 35) to recognize a true object. Finally, DC (PP 2 (DC (P B ))) is the convex element of the positive object, DC
Output (P B ) as the convex element of the negative object (step 1
308). After that, a convex polyhedron is generated using the polygon subset of each convex element.
【0114】 (I)凸多面体への分解処理の第4実施例(前処理) 凸分解の第1実施例に最適化法を施すことにより凸要素
数を減少したのと同様に、第3実施例に最適化法を施し
て凸要素数を減少することができる。図36はかかる場
合の凸分解処理の流れ図であり、第3実施例と異なる点
は、ステップ1303′、1306′において凸分解基
本アルゴリズムの替わりに最適化法を適用した点であ
る。(I) Fourth Example of Decomposition Processing into Convex Polyhedron (Pre-Processing) Similarly to the case where the number of convex elements is reduced by applying the optimization method to the first example of convex decomposition, the third embodiment The example can be subjected to an optimization method to reduce the number of convex elements. FIG. 36 is a flowchart of the convex decomposition processing in such a case, and the difference from the third embodiment is that the optimization method is applied instead of the convex decomposition basic algorithm in steps 1303 'and 1306'.
【0115】 (J)凸多面体への分解処理の第5実施例(前処理) (a) 考察 以上の実施例では、第1グループのポリゴン部分集合C
Liと第2グループのポリゴン部分集合CHjのMerge
可能性を以下のように判定している。すなわち、ポリゴ
ン部分集合CLiとポリゴン部分集合CHjが共通稜線
を有しているのか、いないのかに関係なく、CLiの境
界稜線を構成する全ポリゴン辺とCHjの境界稜線を構
成する全ポリゴン辺の中点が一致するか否かにより共通
の境界稜線を求めている。(J) Fifth Example of Decomposition Processing into Convex Polyhedron (Preprocessing) (a) Consideration In the above examples, the polygon subset C of the first group is used.
Merge of Li and polygon subset CHj of the second group
The possibility is judged as follows. That is, regardless of whether the polygon subset CLi and the polygon subset CHj have a common edge or not, among all the polygon edges forming the boundary edge of CLi and all the polygon edges forming the boundary edge of CHj. A common boundary ridge line is obtained depending on whether the points match.
【0116】しかし、かかるMerge可能性の判定処理で
は、あらゆるポリゴン部分集合の組合せにおいて、しか
も、境界稜線を構成するポリゴン辺の総当たり的な組合
せにおいて中点が一致するか否かを調べなくてはならな
いため、Merge可能性の判定処理に相当の時間を要し、
凸分解の高速化に限界を与えている。ところで、凸要素
CLiの境界稜線と凸要素CHjの境界稜線が共通の境
界稜線部分を有する場合には、凸要素CLiの境界稜線
で構成する凸物体と凸要素CHjの境界稜線で構成する
凸物体とが干渉する。そこで、凸要素CLi,CLjの
共通の境界稜線を求める処理を実行する前に、計算負荷
がO(N)の干渉チェック法により凸要素CLiの境界稜線
で構成する凸物体と凸要素CHjの境界稜線で構成する
凸物体とが干渉するかチェックする。そして、干渉しな
い場合には以降のmerge処理をスキップし、干渉する場
合のみ以降のMerge処理を継続するようにする。このよ
うにすれば、Merge処理に要する時間を大幅に短縮でき
凸分解処理を高速に行なうことができる。However, in the merge possibility determination process, it is not necessary to check whether or not the midpoints match in any combination of polygon subsets, and in a brute force combination of polygon edges forming a boundary ridge. Since it does not happen, it takes a considerable amount of time to process the merge possibility determination,
It limits the speed of convex decomposition. By the way, when the boundary ridgeline of the convex element CLi and the boundary ridgeline of the convex element CHj have a common boundary ridgeline portion, a convex object constituted by the boundary ridgeline of the convex element CLi and a convex object constituted by the boundary ridgeline of the convex element CHj. Interfere with. Therefore, before executing the process of obtaining the common boundary ridgeline of the convex elements CLi and CLj, the boundary between the convex object and the convex element CHj formed by the boundary ridgeline of the convex element CLi by the interference check method with a calculation load of O (N). Check if the convex object formed by the ridge line interferes. Then, when there is no interference, the subsequent merge processing is skipped, and only when there is interference, the subsequent Merge processing is continued. By doing so, the time required for the Merge processing can be significantly 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 Preprocessing FIG. 37 is another schematic processing flow of the interference check preprocessing of the fifth embodiment. The same parts as those in the first embodiment of FIG. is doing. The difference from the first embodiment is that, in step 1003 ′, a convex decomposition basic algorithm (fast convex decomposition basic algorithm) by an interference check built-in type divide-conquer method is applied in place of the convex decomposition basic algorithm by the divide-conquer method. That is the 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 processing flow of the fast convex decomposition basic algorithm. An initial polygon set (non-convex polyhedron polygon set) 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 two groups, a first group and a second group, and a polygon subset having a convex relationship with an adjacent polygon in each group is obtained. Next, a plurality of new polygon subsets DP1 for each convex element are merged by merging the polygonal subsets of the first group and the polygonal subsets of the second group having a common boundary ridge in a convex relationship. Find DP2, ... Thereafter, the polygon subsets DP1, DP2, ... Are output (step 1103). Incidentally, each polygon subset DP
A convex polyhedron is generated based on 1, DP2, ...
The most important point where problem dependence exists in the divide-and-conquer law 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,bCL12,bCL13,・・・bNCLB1}} DC(PH)={CH1,CH2,・・CHi,・・・} i=1,2,・・・NDC(PH) CLi{polygons={pCH11,pCH12,pCH13,・・・pNCHP1} boundary edges={bCH11,bCH12,bCH13,・・・bNCHB1}} 凸要素集合DC(PL),DC(PH)の各要素はポリ
ゴン部分集合(polygons)とその要素の境界をなす境界
稜線の集合(boundary edges)で構成される。(C) Merge Process in 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 line. That is, it is a necessary condition that the convex elements CLi and CHj interfere with each other through the boundary ridge. Therefore, the interference check algorithm is applied between the convex elements CLi and CHj, and if there is no interference, the subsequent Merge process for CLi and CHj can be skipped. FIG. 39 is a flowchart of the Merge process in the Divide and Conquer method. 1) Prepare convex element sets DC (PL), DC (PH)
(Steps 1111a, 1111b). DC (PL) = {CL1, CL2, ··· CLi, ···} i = 1,2, ··· NDC (PL) CLi {polygons = {p CL11, p CL12, p CL13, ··· p NCLP1} boundary edges = {b CL11 , b CL12, b CL13, ··· b NCLB1}} DC (PH) = {CH1, CH2, ·· CHi, ···} i = 1,2, ··· NDC (PH) CLi {polygons = {p CH11 , p CH12 , p CH13 , ・ ・ ・ p NCHP1 } boundary edges = {b CH11 , b CH12 , b CH13 , ・ ・ ・ b NCHB1 }} Convex element set DC (PL) Each element of DC (PH) is composed of polygon subsets and a set of boundary edges that form the boundary of the elements.
【0120】2) Merge 可能性の判定 凸要素CLi,CHjが互いにMerge可能か否かを判定
する(ステップ1112′)。判定条件は以下の通りで
ある。 条件1:凸要素CLi,CHjの境界稜線BedgeCLi、Be
dgeCHj間で干渉チェックを行なう。干渉が無ければMerg
e不可能と判定する。 条件2:干渉している可能性のある凸要素CLi,CH
jに対し、CLi,CHj間で共有している境界稜線を
全て取り出す。共有しているか否かは、境界稜線を構成
するポリゴン辺の中点を比較することにより判定でき
る。共有している境界稜線が1本もなければMerge不可
能と判定する。 条件3:共有している境界稜線に対し、その稜線を共有
するCLiのポリゴンとCHjのポリゴン間の凹凸関係
を調べる。1組でも凹の関係にあるポリゴンの組合せが
存在すれば、Merge不可能と判定する。 条件3:条件1、条件2、条件3をクリアした場合はMe
rege可能と判定する。2) Judgment of Possibility of Merging 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 edge lines Bedge CLi , Be of the convex elements CLi, CHj
Interference check between dge CHj . If there is no interference, Merg
e Determined as impossible. Condition 2: Convex elements CLi and CH that may interfere with each other
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 that form the boundary ridge. If there is no shared boundary edge line, it is determined that Merge is impossible. Condition 3: With respect to the shared boundary ridge line, the uneven relationship between the CLi polygon and the CHj polygon sharing the ridge line is checked. If there is a combination of polygons that are in a concave relationship, it is determined that the merge is impossible. Condition 3: Me if 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,CHj+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) Convex element CL1Is CHjIs it possible to merge with (j = 1,2, ... NPH)?
Determine whether or not. If CL1Is CHjAnd Merge is possible
Then, after that, CL1, DC (PH) as follows
To do. CL1∪CHj→ CL1 DC (PH) = {CH1, CH2・ ・ ・ CHj-1, CHj + 1・
..} 3-2) Perform the same procedure for CLi (i = 2,3, ... NPL)
It 4) Construction 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
Hj′, CHjThe merged convex element set DC (P) given by ″ ...} is output.
(Step 1113 '). Where {CHj′, CHj″ ・
..} is a DC (PH) that does not merge with any CLi
It is a convex element.
【0122】(d) 干渉チェックアルゴリズム 凸物体間の干渉チェックアルゴリズムのうち、Bobrow
法、Lin/Canny法、Gilbert法が既存の計算負荷O(N)の干
渉チェック法として使用できる。図40は干渉チェック
アルゴリズムの概略処理フローである。凸要素CLi,
CHjの境界稜線BedgeCLi、BedgeCHjで構成される凸物
体間に干渉チェックアルゴリズムを適用する(ステップ
1401)。干渉チェックアルゴリズムの適用により境
界稜線BedgeCLi、BedgeCHjの最接近点間の距離dist(Bed
geCLi、BedgeCHj)を求めて出力する(ステップ140
2)。最接近点間の距離が求まれば、該距離dist(Bedge
CLi、BedgeCHj)とεの大小を比較し、dist(BedgeCLi、B
edgeCHj)≦εの場合には干渉すると判定し、dist(Bedge
CLi、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 the interference check method of the existing calculation 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 the convex objects formed by the boundary edges Bedge CLi and Bedge CHj of CHj (step 1401). By applying the interference check algorithm, the distance dist (Bed between the closest points of the boundary edges Bedge CLi and Bedge CHj
ge CLi , Bedge CHj ) and output (step 140
2). If the distance between the closest points is found, the distance dist (Bedge
CLi , Bedge CHj ) and ε are compared, and dist (Bedge CLi , B
edge CHj ) ≦ ε, it is determined that interference occurs, and dist (Bedge
If CLi and Bedge CHj )> ε, it is determined that there is no interference.
Note that ε is a user-defined minute constant that determines the accuracy of interference check determination.
【0123】(f) 干渉チェック方法(Gilbert法) 凸要素CLi,CHjの境界稜線BedgeCLi、BedgeCHjで
構成される凸物体間の最接近点間の探索及びその距離di
st(BedgeCLi、BedgeCHj)は前述のGilbert法により求め
る。尚、Gilbert法の初期格子点(初期値)V0は一般に
は任意であるが、各物体の重心差分方向の格子点から出
発するのが効率的である。Gilbert法により最接近点を
求める時、以下の不等式が成立する(図41参照)。 r
k=−hk(−νk)/|νk|≦ |ν(K)|≦|νk
| (16) 従って、あるkに対し、rk>0ならば2凸物体間の干渉
は無いといえる。(F) Interference check method (Gilbert method) Search between the closest points between convex objects formed by the boundary edges Bedge CLi and Bedge CHj of the convex elements CLi and CHj and their distance di
st (Bedge CLi , Bedge CHj ) is obtained by the Gilbert method described above. The initial grid point (initial value) V 0 of the Gilbert method is generally arbitrary, but it is efficient to start from the grid point in the direction of the center of gravity difference of each object. When finding the closest point by the Gilbert method, the following inequalities hold (see FIG. 41). r
k = −h k (−ν k ) / | ν k | ≦ | ν (K) | ≦ | ν k
| (16) Therefore, if r k > 0 for a certain k, it can be said that there is no interference between two convex objects.
【0124】(g) Gibert法に基づくMerge可能性判定処
理 図42はGilbert法に基づくMerge可能性判定処理フロー
である。凸要素CLi,CHjの境界稜線BedgeCLi、Be
dgeCHjでそれぞれ構成される凸物体間にGilbert法を適
用して、(13)式のrkを計算する(ステップ141
1)。ついで、rk>0か判断し(ステップ141
2)、rk>0の場合には干渉しないから、Merge不可能
と判定する(ステップ1413)。しかし、rk≦0の場
合には、干渉しているからMerge干渉ありとして、前述
のMerge可能性の条件2〜条件4よりMerge可能/不可能
を判定する(ステップ1414)。(G) Merge Possibility Judgment Process Based on Gibert Method FIG. 42 is a merge possibility judgment process flow based on the Gilbert method. Boundary edge lines of convex elements CLi, CHj Bedge CLi , Be
by applying the Gilbert method between each composed convex object with dge CHj, it computes the r k of (13) (step 141
1). Then, it is determined whether r k > 0 (step 141
2) If r k > 0, there is no interference, so it is determined that merge is impossible (step 1413). However, if r k ≦ 0, it is determined that there is merge interference because of interference, and whether merge is possible / impossible is determined from the conditions 2 to 4 of merge possibility described above (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、BedgeCHj
間は干渉が無く、凸要素CLi,CHjはMergeする可
能性が無いと判定する。(H) Simplified Merge possibility determination process based on Gibert method The merge possibility determination process based on Gibert method is further simplified. The point of simplification is to set the initial lattice point V 0 of the Gilbert method as an arbitrary vertex from the set of vertices Bedge CLi and Bedge CHj on the boundary edge line.
By selecting Bedge CLi0 and Bedge CHji0 , V 0 = Bedge CLi0 −Bedge CHji0 (17) is constructed. Then, using this V 0 , r = −h k (−V 0 ) = − h k1 (−V 0 ) −h k2 (V 0 ) (18) is calculated. If r> 0, Bedge CLi , Bedge CHj
It is determined that there is no interference between the convex elements CLi and CHj and there is no possibility of merging.
【0126】図43は簡略化したGilbert法に基づくMer
ge可能性判定処理フローである。凸要素CLi,CHj
の境界稜線BedgeCLi、BedgeCHjでそれぞれ構成される凸
物体間に簡略化したGilbert法を適用して、(15)式のr
を計算する(ステップ1411′)。ついで、r>0か
判断し(ステップ1412′)、r>0の場合には干渉
しないから、Merge不可能と判定する(ステップ141
3′)。しかし、r≦0の場合には、干渉しているから
Merge干渉ありとして、前述のMerge可能性の条件2〜条
件4よりMerge可能/不可能を判定する(ステップ141
4′)。FIG. 43 shows Mer based on the simplified Gilbert method.
It is a ge possibility determination processing flow. Convex element CLi, CHj
Applying the simplified Gilbert method between the convex objects composed of the boundary edges Bedge CLi and Bedge CHj of
Is calculated (step 1411 '). Next, it is judged whether r> 0 (step 1412 '). If r> 0, there is no interference, so it is judged that merge is impossible (step 141).
3 '). However, if r ≦ 0, there is interference.
It is determined that merge is possible / impossible based on the conditions 2 to 4 of the possibility of merge described above as the presence of merge interference (step 141).
4 ').
【0127】(K)凸分解の変形例 (a) 変形例1 以上の第5実施例の凸分解法に最適化処理を施して凸要
素数を減少するように構成することができる。この場合
の処理フローを図44に示す。図44において、第2実
施例の処理(図32参照)と異なる点は、ステップ12
02′、1204′において凸分解基本アルゴリズムに
替わって、干渉チェック組込型の高速凸分解アルゴリズ
ムを使用している点である。 (b) 変形例2 干渉チェック組込型の高速凸分解アルゴリズムを負物体
が存在する場合における凸分解処理に適用することがで
き、この場合の処理フローを図45に示す。図45にお
いて、第3実施例と異なる点は、ステップ1303′、
1306′において凸分解基本アルゴリズムに替わっ
て、干渉チェック組込型の高速凸分解アルゴリズムを使
用している点である。 (c) 変形例3 変形例2に更に最適化処理を施して凸要素数を減少する
ように構成することもできる。(K) Modified Example of Convex Decomposition (a) Modified Example 1 It is possible to reduce the number of convex elements by performing optimization processing on the convex decomposition method of the fifth embodiment described above. The processing flow in this case is shown in FIG. In FIG. 44, step 12 is different from the processing of the second embodiment (see FIG. 32).
In 02 ′ and 1204 ′, the convex decomposition basic algorithm is replaced with a high-speed convex decomposition algorithm of a built-in interference check. (b) Modification 2 The interference check built-in type high-speed convex decomposition algorithm can be applied to the convex decomposition process when a negative object exists, and the processing flow in this case is shown in FIG. In FIG. 45, the difference from the third embodiment is that step 1303 ′,
In 1306 ′, the convex decomposition basic algorithm is replaced by a high-speed convex decomposition algorithm of interference check built-in type. (c) Modification 3 The modification 2 may be further subjected to an optimization process to reduce the number of convex elements.
【0128】(L)最接近点探索の前処理(近接点線形
リストの作成) 以上では、ポリゴンデータより有向グラフ型構造データ
を前処理により生成し、この有向グラフ型構造データを
用いて凸多面体間あるいは非凸多面体間の最接近点探索
処理を行なった場合である。有向グラフ構造データとは
別の構造データ、すなわち、近接点線形リストを前処理
により作成し、該リストを使用することにより最接近点
の連続探索を高速化することができる。近接点線形リス
トとは、形状モデル(CGモデル)を構成する各ポリゴ
ンの頂点を第1方向(next方向)にリンクし、各頂
点にポリゴン辺を介して繋がる頂点群を第2の方向(b
ranch方向)に該頂点にリンクしてなるデータ構造
を備えたリストである。リストの先頭から順次たどるこ
とにより、その頂点に繋がる全ての近接点を拾いだすこ
とができる。(L) Preprocessing of Closest Point Search (Creation of Proximity Point Linear List) In the above, the directed graph type structure data is generated from the polygon data by the preprocessing, and this directed graph type structure data is used to convert between convex polyhedrons or This is a case where the closest point search process between non-convex polyhedra is performed. Structure data different from the directed graph structure data, that is, a proximity point linear list is created by preprocessing and the continuous search of the closest points can be sped up by using this list. The close point linear list links the vertices of each polygon forming the shape model (CG model) in the first direction (next direction), and a group of vertices connected to each vertex via polygon sides in the second direction (b).
It is a list having a data structure formed by linking to the apex in the (runch direction). By sequentially tracing from the head of the list, it is possible to find all the neighboring 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, that is, a next direction in which vertices are sequentially connected and a branch direction in which proximity points connected to each vertex via a polygon edge are arranged. At the beginning of the branch direction, the vertex itself enters. (b) Construction Method of Proximity Point Linear List FIG. 47 is a flow chart of processing for 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 the coordinate values of three vertexes following the vertex and the light reflection direction data at each of the three vertexes following normal. It
【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 polygon data sets (polygon subsets) divided for each convex element according to a convex decomposition basic algorithm based on the interference check built-in division-and-conquer method. That is, the initial polygon data is divided into a set of subsets for each convex element and output (steps 2003 and 2004). After that, a proximity point linear list is generated using the proximity point linear list construction algorithm for each subset, that is, for each convex polyhedron, and expanded in the memory (steps 2005 and 2006). Then, the closest point linear list is used to perform the closest point search process (interference check process), and the closest point linear list is stored in the external storage medium (step 2007). After that,
If the proximity point linear list is required, it is not newly created, but is read from the external recording medium and expanded in the memory (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 the target object,
FIG. 50 is an explanatory diagram of a near-point linear list construction algorithm. Assuming that the target object is composed of a set of triangular polygons, the near point linear list is structured according to the following flow. 1) Prepare polygon data for each convex element 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 the linear list direction with respect to the vertices, and the branch direction is the neighboring point direction of each vertex. The first element of the list L is the first vertex of the first polygon, and has a data structure shown in FIG. Specifically, the list is created as follows. 2-1) Allocate the top element top of list L. That is,
Assign the first vertex of the first polygon as top.
【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 allocation. 1) If if (Lj ≠ pi for all j), a new element p i is assigned 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 allocated (see FIG. 50 (c)). 2) If if (Lj = pi for a certain j), then 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, it will not be assigned (see FIG. 50 (d)). 3) Perform the processes 1) and 2) for the vertex qi. However, branch candidates other than qi for the vertex qi are pi and ri. 4) The above processes 1) and 2) are executed for the vertex ri. However, the branch candidates other than ri for the vertex ri are pi and qi. 2-3) For all polygon sets ∪i (pi, qi, ri),
Repeat the process of 2-2).
【0133】(d) 近接点線形リストの作成例 図51、図52は近接点線形リストの作成例説明図であ
る。凸分解基本アルゴリズムにより、凸要素毎のポリゴ
ンデータを用意する(ステップ2011)。以後、第1
ポリゴンをリストに組み込み(ステップ2012)、つ
いで、第2ポリゴンをリストLに組み込む(ステップ2
013)。すなわち、ステップ2012において、ま
ず、第1ポリゴンの第1頂点V1をtopとして割り付け
る。すなわち、 top=L1=V1 とする(2012a)。ついで、頂点V1に対するbranc
h方向に第1ポリゴンの全頂点V1,V2,V3を割り付け
る(ステップ2012b)。しかる後、第2頂点V2をne
xt方向に割り付け(ステップ2012c)、割付け後、
頂点V2に対するbranch方向に第1ポリゴンの全頂点
V2,V3,V1を割り付ける(ステップ2012d)。以
後、同様に第3頂点V3をnext方向に割り付け(ステップ
2012e)、割付け後、頂点V3に対するbranch方向
に第1ポリゴンの全頂点V3,V1,V2を割り付ける(ス
テップ2012f)。(D) Example of Producing Near-Point Linear List FIGS. 51 and 52 are explanatory diagrams of an example of producing a near-point linear list. Polygon data for each convex element is prepared by the convex decomposition basic algorithm (step 2011). After that, the first
The polygon is incorporated into the list (step 2012), and then the second polygon is incorporated into the list L (step 2).
013). That is, in step 2012, first, the first vertex V 1 of the first polygon is assigned as top. That is, top = L 1 = V 1 (2012a). Then, branc for vertex V 1
All vertices V 1 , V 2 , V 3 of the first polygon are assigned in the h direction (step 2012b). Then, the second vertex V 2 is ne
Allocation in the xt direction (step 2012c), after allocation,
Vertex V 2 all vertices V 2 of the first polygon in the branch direction for, V 3, allocate V 1 (step 2012d). Thereafter, similarly allocated a third vertex V 3 in the next direction (step 2012E), after allocation, all vertices V 3 of the first polygon in the branch direction for vertices V 3, allocate V 1, V 2 (step 2012f).
【0134】ステップ2013において、第2ポリゴン
の第1頂点V1を割り付ける。この場合、next方向に頂
点V1は既に割り付けられているから、頂点V1のbranch
方向に頂点V1,V3,V4を割り付ける。しかし、既
に、頂点V1,V3は割り付けられているから頂点V4の
みを割り付ける(ステップ2013a)。ついで、第2
頂点V3をnext方向に割り付ける。この場合、next方向
に頂点V3は既に割り付けられているから、頂点V3のbr
anch方向に頂点V3,V4,V1を割り付ける。しかし、
既に、頂点V3,V1は割り付けられているから頂点V4
のみを割り付ける(ステップ2013b)。しかる後、
第3頂点V4をnext方向に割り付ける(ステップ201
3c)。ついで、頂点V4のbranch方向に頂点V4,
V1,V3を割り付ける(ステップ2013d)。以上で
は、ポリゴンを三角形ポリゴンとして説明したが、三角
形ポリゴンに限定されず、任意の多角形ポリゴンでもよ
い。N個の頂点から近接点線形リストを作成する計算負
荷はO(N2)である。In step 2013, the first vertex V 1 of the second polygon is assigned. In this case, since the vertex V 1 has already been allocated in the next direction, the branch of the vertex V 1
The vertices V 1 , V 3 and V 4 are assigned to the direction. However, since the vertices V 1 and V 3 have already been assigned, only the vertex V 4 is assigned (step 2013a). Then, the second
Allocate vertex V 3 in the next direction. In this case, since the vertex V 3 has already been allocated in the next direction, br of the vertex V 3
The vertices V 3 , V 4 and V 1 are assigned in the anch direction. But,
Since the vertices V 3 and V 1 have already been assigned, the vertex V 4
Allocate only (step 2013b). After that,
The third vertex V 4 is allocated in the next direction (step 201).
3c). Then, the vertex V 4 in the branch direction of the vertex V 4,
V 1 and V 3 are assigned (step 2013d). In the above description, the polygon is described as a triangular polygon, but the polygon is not limited to a triangular polygon, and any polygonal polygon may be used. The computational load of creating a near-point linear list from N vertices is O (N 2 ).
【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 of Closest Point Search (Creation of Proximity Point Multi-Tree List) The calculation load for generating a proximity point linear list is O (N 2 ) for N vertices, which is large. Therefore, a list of another data structure (proximity point branch tree list) 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 this list. The near point multi-branch tree list is an array list of the following vertices. 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 second 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 5th next direction larger than the Z coordinate value (zrigh
t) and the sixth next direction (zleft) smaller than the Z coordinate value. Then, each axis coordinate value of the reference vertex is compared with each axis coordinate value of a vertex (referred to as a target vertex) connected to the reference vertex by a polygon side, and the next direction linking the target vertex is obtained according to the size. At the same time, the target vertices are linked in the order of being closer to the reference vertex in the next direction. When linking target vertices in the next direction, if the coordinate values of the other vertices already linked in the next direction and the coordinate values of the target vertices are equal, set the coordinate values of the axes of the other vertices and the target vertices. Compare. Then, the next direction according to the magnitude is obtained, and the target vertex is linked to the next direction with respect to the other vertices. Further, a branch direction is set for each vertex, and all the vertices connected to the vertex by polygon sides are arranged in that direction. The neighbor point multi-tree list is created as described above.
【0136】(a) 近接点多分木リストの例 図53は、直方体の近接点多分木リストの例を示してい
る。図示の通り、近接点多分木リストにおいて、各頂点
はx,y,zの各軸方向の大小に相当する6つのリンク
方向xright、xleft、yright、yleft、zright、zleftを
備えると共に、1つのbranch方向を備えている。頂点の
branch方向には該頂点にポリゴン辺で繋がる全頂点が配
列され、その先頭には、該頂点自身が配置される。(A) Example of Proximity Point Multitree Tree List FIG. 53 shows an example of a rectangular parallelepiped multipoint tree list. As shown in the figure, in the near-point multi-branch tree list, each vertex has six link directions xright, xleft, yright, yleft, zright, zleft corresponding to the magnitude of each axis in x, y, z, and one branch. It has a direction. Apex
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 for Constructing Proximity Point Multi-Tree List FIG. 54 is a flow chart of the processing for creating the 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 polygon data sets (polygon subsets) divided for each convex element according to a convex decomposition basic algorithm based on the interference check built-in division-and-conquer method. That is, the initial polygon data is divided into subset sets for each convex element and output (steps 2103 and 2104). Thereafter, a near-point multi-tree list is generated using the near-point multi-tree list construction algorithm for each subset, that is, for each convex polyhedron (step 2105). Next, the near-point multi-tree conversion algorithm is used to convert the near-point multi-tree list into a near-point linear list and expand it in the memory (steps 2106 and 21).
07). Then, the closest point search process (interference check process) is executed using the near point linear list, and the near point linear list is stored in the external storage medium (step 21).
08). After that, when the neighborhood point linear list is required,
Instead of newly creating it, 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 Multi-Tree List Construction Algorithm Assuming that the object is composed of a set of triangular polygons, the proximity point multi-tree list is constructed according to the following flow. 1) Prepare polygon data for each convex element 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 seen from the vertices that focus on zleft
The direction of the axis is large or small. In addition, each vertex is a near point direction
It has a branch direction. Specifically, the neighboring 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) Allocate the top element top of ML. to
As p, assign the first vertex of the first polygon. 2-2) Repeat the following allocation for polygons (pi, qi, ri). (1) Compared to the apex p i in the order of magnitude of x coordinate value, y coordinate value, and z coordinate value as viewed from the top element ML of the ML in a lexicographical manner, and allocation is performed. 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 that has been arranged in the xright direction from the top is compared with the x coordinate value of the vertex p i to compare with the xright direction. And arrange p i in ascending order. 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 top. If there is an already-placed vertex having an x-coordinate value that matches the x-coordinate value of the vertex p i, the y-coordinate values are compared, and the y-coordinates are arranged in ascending order when viewed from the already-placed vertex. To do. When there is an already-arranged vertex whose y-coordinate value matches, the same ascending order arrangement is performed for the z-coordinate value. If there is a vertex with the same coordinate values of x, y, and z, the vertex p i is regarded as the same as that point. (2) For the newly allocated vertex p i, the branc of the vertex p i
Allocate 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 the allocation of 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 executed for the vertex qi. However, the branch other than qi for the vertex qi
The candidates are pi and ri. (4) The above processes (1) and (2) are executed for 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 description, the polygon is described as a triangular polygon, but the polygon is not limited to a triangular polygon, and any polygonal polygon may be used. The calculation load for creating a neighbor multi-tree list from N vertices is O (NlogN)
Is.
【0141】(d) 近接点多分木リスト変換アルゴリズム 凸多面体同士の干渉チェック(最接近点探索処理)で
は、凸多面体を構成する各頂点とのベクトル内積を取
り、その最大値を検出する計算を繰返し行う。この時、
各頂点を近接点多分木リストの形式で持っていると、各
頂点を順次辿っていくときに煩雑な判定関数が多数絡む
ことになる。そこで、一端、近接点多分木リストの形式
で各頂点の近接点を構成した後は、多分木リストを線形
リストに変換しておくと以後の計算量が少なくてすむ。
多分木リストを線形リストに変換するには、例えば、以
下に示す再帰関数vertex * MultiToLinear( )を使用す
る。(D) Proximity point multi-tree list conversion algorithm In the interference check between convex polyhedra (closest point search processing), the vector inner product with each vertex forming the convex polyhedron is taken and the maximum value is detected. Repeat. This time,
If each vertex is in the form of a near-point multi-tree tree, many complicated decision functions will be involved when sequentially tracing each vertex. Therefore, once the proximity points of the vertices are constructed in the form of the proximity point multi-branch list, if the multi-branch tree list is converted into a linear list, the amount of calculation thereafter will be small.
To convert a multi-branch tree list to a linear list, for example, the recursive function vertex * MultiToLinear () shown below is used.
【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 represents the pointer of the current vertex if (next = 0) {if (xleft! = 0) {// assign xleft to next next = xleft; v = xleft → MultiToLinear (); // act recursively in the xleft direction} if (xright! = 0) {// for xright, yleft, yright, zleft, zright and so on 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 to the linear list L. The calculation time of the near-point multi-tree list conversion algorithm is O (N) where N is the total number of vertices.
Is. Therefore, the total calculation time for generating the adjacent point linear list L from the polygon data through the adjacent 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) Pre-processing of closest point search (dumping and loading of linear list of closest points) The closest point linear list information required for the closest point search processing, that is, the interference check processing is all developed on the memory. I have to keep it. If it takes the same calculation time (O (NlogN) for the total number N of vertices) to construct the near-point multi-tree list, it is necessary to expand the dump file into the memory. , It makes no sense to create 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 is O (N). (a) Dump file format The dump file format is as shown in FIG. In this file format, the essential items for high-speed loading are as follows. 1) Each convex element is separated, 2) Total number of vertices that make up a convex element (count), 3) Each vertex is numbered, 4) Each vertex , The number of neighboring points of that vertex (bcount)
5) There is 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) Read the total number of vertices (count) forming the convex element, and create a count-dimensional array containing each vertex. 2) While accommodating each vertex of the convex element in the array, connect each vertex in the next direction to form a linear list. For example, Ve
When the array containing rtex is V [Ni], V [0], V
[1], ... 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) With respect to each vertex of each convex element, a list of neighboring points in the branch direction is set according to the number of neighboring points of branch (designate the position in the array). For example, when the array that contains Vertex is V [Ni], the branch number of Vertex V [0] is
If (0,9,1,7,8), V in the branch direction of VertexV [0]
Connect [0], V [9], V [1], V [7], V [8] into a linear list. 5) The process of 4) is applied to each convex element. In the above loading method, a total of 2 times (1), 2), 3) for the same file,
4) and 5) read the second time). In most cases, the number of branches at each vertex can be kept below several tens, so
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 For the smallest convex polyhedron (convex hull) that wraps a non-convex polyhedron, the same dump file as in FIG. 55 is defined. In this case, the number of convex elements is one, and the vertex is composed of all the vertices forming the non-convex polyhedron. A file in the format of FIG. 55 for a 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 by envelope sphere) For an arbitrary non-convex polyhedron, a sphere that envelopes it is generated in preprocessing. At this time, before starting the interference check between the non-convex polyhedrons, the interference check is performed between the envelope spheres to increase the speed. (a) Envelope sphere construction method A non-convex polyhedron is represented by a set of triangular polygons.
It is expressed as ∪i (pi, qi, ri). The suffix i is a subscript that identifies each polygon. The coordinate values of pi, qi, ri are pi = (pix, piy, piz), qi = (qix, qiy,
qiz) and ri = (rix, riy, riz). This time,
Find the max and min points of the convex hull 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、包絡球
中心PCA,PCBを前述の方法で求め(ステップ220
1、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 enclosing each convex element is defined. The calculation method is the same as in (a). However, m
The suffix i when defining ax, min means the polygon set of each convex element. (c) Preliminary Check Algorithm Using Envelope Sphere FIG. 56 is a processing flow of preliminary check using the envelope sphere. Envelope sphere radii R A , R B of each non-convex polyhedron A, B and envelope sphere centers P CA , P CB are determined by the method described above (step 220).
1,2202), the following equation r = distance between the centers r of each envelope spheres | P CA -P CB | determined by, r ≦ (R A + R B) or check (step 2203). If r> (R A + R B ), it is determined that there is no interference (step 2204). If r ≦ (R A + R B ), it is determined that they interfere with each other, and thereafter, an interference check between non-convex polyhedrons is performed (step 2205).
【0148】(P)干渉チェックサブアルゴリズム (凸多面体干渉チェックにおける連続探索)近接点線形
リストより、最新に求まっている最接近点に近接する頂
点を抽出し、これら頂点にGilbert法による干渉チェッ
ク法を適用して所定時間後の最接近点を探索する。この
ようにすることにより、干渉チェックに要する時間は凸
多面体を表現するポリゴン数にほとんど依存しない一定
数以下に抑えることができる。 (a) Gilbert法 凸多面体K1,K2間の最接近点間の距離ν(K)はgK
(νK)=0となるνKに対し、(12)′式を使って ν(K)=νk=ν(coVk)=Σλiyi(i∈Is) =Σλix1 i(i∈IK1Sk)−Σλix2 i(i∈IK2Sk) (19) ただし、x1 i:K1を構成する頂点 x2 i:K2を構成する頂点 で与えられる。(P) Interference check sub-algorithm (continuous search in convex polyhedron interference check) From the adjacent point linear list, the vertices that are closest to the closest approach point are extracted, and the interference check method by the Gilbert method is applied to these vertices. Is applied to search for the closest point after a predetermined time. By doing so, the time required for the interference check can be suppressed to a fixed number or less, which hardly depends on the number of polygons expressing the convex polyhedron. (a) Gilbert method The distance ν (K) between the closest points between convex polyhedra K 1 and K 2 is g K
To (ν K) = 0 and becomes ν K, (12) 'by using the equation ν (K) = ν k = ν (coV k) = Σλ i y i (i∈Is) = Σλ i x 1 i (IεI K1Sk ) −Σλ i x 2 i (iεI K2Sk ) (19) where, vertices forming x 1 i : K 1 and vertices forming x 2 i : K 2 are given.
【0149】(b) Gilbert法の直感的理解 図57はGilbert法による最接近点探索法を直感的に理
解できるようにした説明図である。その各プロセスを簡
単に説明すると以下のようになる。 1) ベクトルηの設定 2つの物体の幾何学的重心を結び、ν0とする(図57
図(a))。 2) 以下の内積計算 hK1(−ν0)=max{−x1 i・ν0:i=1,・・・m1} (20) hK2(−ν0)=max{−x2 i・ν0:i=1,・・・m2} (21) を行い、ベクトルν0の方向で互いに最も接近している
2点p0,q0を選びだす(図57図(a))。 3) ν1の更新 2点p0,q0を結んでν1とする(図57図(b))。 4) 内積計算 ν1に対して2)と同じ内積計算を行い、新たな2点p1,
q1を選びだす(図57図(b))。 5) 内積計算とν1の更新を繰り返して、最終的な最接近
点ベクトルνfinalを求める(図57図(c))。 上記のプロセスから判る通り、Gilbert法における主な
計算負荷は内積計算の過程で発生する。従って、Gilber
t法における最接近点探索の計算時間はO(m1+m 2)とな
る。(B) Intuitive understanding of Gilbert's method FIG.
It is an explanatory view that can be solved. Simplify each process
To explain it simply: 1) Set vector η Connect the geometric centers of gravity of two objects,0(Fig. 57
(Figure (a)). 2) The following inner product calculation hK1(-Ν0) = Max {−x1 i・ Ν0: I = 1, ... m1} (20) hK2(-Ν0) = Max {−x2 i・ Ν0: I = 1, ... m2} (21) is performed and the vector ν0Are closest to each other in
2 points p0, Q0Is selected (Fig. 57 (a)). 3) ν1Update 2 points p0, Q0Tie together ν1(FIG. 57 (b)). 4) Inner product calculation ν1The same inner product calculation as 2) is performed for 2 new points p1,
q1Is selected (FIG. 57 (b)). 5) Inner product calculation and ν1Repeatedly update the final closest
Point vector νfinalIs obtained (FIG. 57 (c)). As can be seen from the above process, the main Gilbert method
The calculation load occurs in the process of inner product calculation. Therefore, Gilber
The calculation time for the closest point search in the t method is O (m1+ m 2) Tona
It
【0150】(c) 凸多面体における連続干渉チェック Gilbert法における計算負荷はサポート関数hK1,hK2
の内積計算の過程で発生する。そこで、この内積計算の
回数を減らすために最接近ベクトルν(K)の近接点を
効率的に見つけだす方法を考える。凸多面体K1,K2の
最接近点νK1,νK2は(19)式から次式で与えられる。 νK1=Σλix1 i (i∈IK1Sk) (22) νK2=Σλix2 i (i∈IK2Sk) (23) 最接近点を連続的にサーチする場合、所定時間後の最接
近点は(22),(23)式で与えられるνK1,νK2の近傍に存
在する。従って、サポート関数hK1,hK2を計算する場
合の頂点は(22),(23)式における頂点x1 i,x2 iの近接
点に限ることができる。(C) Continuous interference check in convex polyhedron The calculation load in the Gilbert method depends on the support functions h K1 and h K2.
It occurs in the process of calculating the inner product of. Therefore, in order to reduce the number of inner product calculations, a method of efficiently finding the closest point of the closest vector ν (K) will be considered. The closest points ν K1 and ν K2 of the convex polyhedra K 1 and K 2 are given by the following equation from the equation (19). ν K1 = Σλ i x 1 i ( i ∈ I K1Sk ) (22) ν K2 = Σ λ i x 2 i ( i ∈ I K2Sk ) (23) When searching for the closest point continuously, The approach points exist near ν K1 and ν K2 given by Eqs. (22) and (23). Therefore, the vertices for calculating the support functions h K1 and h K2 can be limited to the neighboring points of the vertices x 1 i and x 2 i in the expressions (22) and (23).
【0151】図58は凸多面体における連続的干渉チェ
ックアルゴリズムのフローである。まず、2つの凸多面
体のそれぞれの幾何中心GK1,GK2を求め、ベクトル ν0=GK1−GK2 を求める(ステップ2301)。ついで、ν0を初期値
としてGilbert法による干渉チェックアルゴリズムを実
行し、(22),(23)式で与えられるνK1,νK2を求める(ス
テップ2302)。しかる後、ν0=νK1−νK2としてG
ilbert法による干渉チェックアルゴリズムを実行する
(ステップ2303)。ただし、サポート関数 hK(−ν1)=hK1(−ν1)+hK2(ν1) の計算において、hK1(−ν1),hK2(ν1)は以下の
式に基づいて計算する。 hK1(−ν1)=max{−x1 i・ν1:p=(22)式で与えら
れるx1 iの近接点集合の番号} hK2(−ν1)=max{−x2 i・ν1:p=(22)式で与えら
れるx1 iの近接点集合の番号} ついで、(22),(23)式により最接近点を算出し、以後gK
(νK)=0となるまでステップ2303以降の処理を
繰り返す。図58における頂点x1 i,x2 iの近接点の個
数は、殆どのCGモデル(形状モデル)において数10
以下に抑えることができる。従って、連続的干渉チェッ
クアルゴリズムの計算負荷は、CGモデルのポリゴン数
に関係なく一定である。FIG. 58 is a flow of a continuous interference check algorithm for a convex polyhedron. First, the geometric centers G K1 and G K2 of the two convex polyhedrons are calculated , and the vector ν 0 = G K1 −G K2 is calculated (step 2301). Next, an interference check algorithm by the Gilbert method is executed with ν 0 as an initial value, and ν K1 and ν K2 given by the equations (22) and (23) are obtained (step 2302). Then, ν 0 = ν K1 −ν K2 and G
Execute the interference check algorithm by the ilbert method
(Step 2303). However, in the calculation of the support function h K (−ν 1 ) = h K1 (−ν 1 ) + h K2 (ν 1 ), h K1 (−ν 1 ) and h K2 (ν 1 ) are calculated based on the following equations. calculate. h K1 (−ν 1 ) = max {−x 1 i · ν 1 : p = the number of the neighboring point set of x 1 i given by the formula (22)} h K2 (−ν 1 ) = max {−x 2 i · ν 1 : p = the number of the neighbor point set of x 1 i given by equation (22)} Then, the closest point is calculated by equations (22) and (23), and then g K
The processing after step 2303 is repeated until (ν K ) = 0. The number of adjacent points of the vertices x 1 i and x 2 i in FIG. 58 is 10 in most CG models (shape models).
It can be suppressed to the following. Therefore, the calculation load of the continuous interference check algorithm is constant regardless of the number of polygons of 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, the interference check between the convex hulls is performed. When the convex hulls start to interfere with each other, the process automatically shifts to the interference check between the convex elements forming the non-convex polyhedron. . When the distance between the non-convex polyhedra becomes large again, the convex hulls are restored and the interference check between the convex hulls is restored. (a) Basic Concept of Convex Hull Dynamic Configuration / Release FIG. 59 and FIG. 60 are explanatory views showing the basic concept of convex hull configuration / release. In FIG. 59, A and B are the first,
The second non-convex polyhedron, C A1 and C A2, are convex polyhedrons forming the non-convex polyhedron A, and C B1 and C B2 are convex polyhedrons forming the non-convex polyhedron B. 1) When the non-convex polyhedrons A and B are sufficiently separated, the interference between the convex hulls A ′ and B ′ is checked (see FIG. 60 (a)).
【0153】2) 凸包A′、B′同士が干渉を始めると
(図60(b)参照)、一方の凸包A′を解除し、凸要素C
A1,CA2と凸包B′との干渉チェックを行い、干渉する
場合には凸要素CA1を取り出す(図60(c)参照)。 3) ついで、凸要素と凸包との立場を入れ替えて、もう
一方の凸包B′を解除し、解除した凸包の凸要素CB1,
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)のように、凸要素CB1,CB2と
凸包A′間の立場を入れ替えた場合において、凸包と凸
要素間の干渉が存在しない場合には、凸要素CB1,CB2
と凸包A′間の最接近ベクトルを求め、該ベクトルを与
える2つの端点p′,q′を最接近点とする。2) When convex hulls A'and B'begin to interfere with each other
(See FIG. 60 (b)), one convex hull A'is released, and the convex element C
The interference between A1 and C A2 and the convex hull B ′ is checked, and if they interfere, the convex element C A1 is taken out (see FIG. 60 (c)). 3) Then, the positions of the convex hull and the convex hull are exchanged, the other convex hull B ′ is released, and the convex element C B1 of the released convex hull,
The interference between C B2 and the convex hull A ′ is checked and the interfering convex element C B1 is taken out (see FIG. 60 (d)). 4) Finally, all the combinations of extracted convex elements (Fig. 6)
At 0, interference check is performed on C A1 , C B1 ) and the distance that minimizes the distance is obtained. (Fig. 60
(e)). In 2), for example, as shown in FIG. 61 (a), convex elements C A1, C A2 and the convex hull B 'if such interference does not exist between the convex elements C A1, C A2 and the convex hull B' The closest vector between the two is obtained, and the two end points p and q that give the vector are the closest points. Also, as shown in FIG. 61 (b), when the positions between the convex elements C B1 and C B2 and the convex hull A ′ are exchanged, and there is no interference between the convex hull and the convex hull, the convex hull C B1 , C B2
And the convex hull A ', the closest vector is obtained, and the two end points p', q'that give the vector are the closest points.
【0154】図62は凸包の動的構成/解除アルゴリズ
ムの処理フローである。非凸多面体A,Bの凸包A′、
B′間に干渉チェック処理(最接近探索処理)を施し、
最接近点間の距離r(A′,B′)を求める。ついで、
r(A′,B′)とεCHの大小を判断する(ステップ2
401)。ε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′)がεCC H以下の凸要素の部分集合∪iCC
Aiを求める(ステップ2403)。εCCHはユーザ定義
の微小定数である。しかる後、部分集合∪iCCAiを構
成する凸要素数が0であるかチェックする(ステップ2
404)。∪iCCAi=0の場合には、r(CAi,
B′)のうち最小距離 MINir(CAi,B′)を与える
凸要素CAkを求め、該凸要素CAkと凸包B′間の最接近
点を求め、該最接近点を非凸多面体A,B間の最接近点
として出力する(ステップ2405)。FIG. 62 is a processing flow of the dynamic construction / cancellation algorithm of the convex hull. Convex hulls A'of non-convex polyhedra A, B,
Interference check processing (closest search processing) is performed between B ',
The distance r (A ', B') between the closest points is obtained. Then,
The magnitude of r (A ', B') and ε CH is judged (step 2).
401). ε CH is a user-defined small constant. r
When (A ′, B ′)> ε CH , the convex hulls A ′ and B ′ do not interfere, so the closest point between the convex hulls A ′ and B ′ is the closest point between the non-convex polyhedrons A and B. And output (step 240
2). After that, the above process is repeated while maintaining the convex hull.
On the other hand, when r (A ′, B ′) ≦ ε CH , the convex hulls interfere with each other, so that one convex hull, for example, convex hull A ′ is released.
The union of the convex elements C Ai of the non-convex polyhedron A is expressed as ∪ i C Ai . Then, the distance r between the convex hull B ′ and each convex element C Ai
A subset ∪ i CC of convex elements whose (C Ai , B ′) is ε CC H or less
Ai is calculated (step 2403). ε CCH is a user-defined small constant. Then, it is checked whether the number of convex elements forming the subset ∪ i CC Ai is 0 (step 2
404). When ∪ i CC Ai = 0, r (C Ai ,
B ′), the convex element C Ak that gives the minimum distance MIN i r (C Ai , B ′) is determined, the closest point between the convex element C Ak and the convex hull B ′ is determined, and the closest point is determined as It is output as the closest point between the convex polyhedrons A and B (step 2405).
【0155】しかし、∪iCCAi>0の場合には、他方
の凸包B′を解除する。非凸多面体Bの凸要素CBjの和
集合を∪jCBjと表現する。ついで、凸包A′と各凸要
素CB j間の距離r(CBj,A′)がεCCH以下の凸要素
の部分集合∪jCCBjを求める(ステップ2406)。
しかる後、部分集合∪jCCBjを構成する凸要素数が0
であるかチェックする(ステップ2407)。∪jCC
Bj=0の場合には、r(CBj,A′)のうち最小距離 M
INjr(CBj,A′)を与える凸要素CBkを求め、該凸
要素CBkと凸包A′間の最接近点を求め、該最接近点を
非凸多面体A,B間の最接近点として出力する(ステッ
プ2408)。しかし、∪jCCBj>0の場合には、部
分集合∪iCCAiと∪jCCBj間の最小距離 MINi,j R
(CCAi,CCBj)を与える凸要素CCAp、CCBqを求
め、その間の最接近点を求め、非凸多面体A,B間の最
接近点として出力する(ステップ2409)。以後、初
めに戻り以降の処理を繰り返す。However, when ∪ i CC Ai > 0, the other convex hull B ′ is released. The union of the convex elements C Bj of the non-convex polyhedron B is expressed as ∪ j C Bj . Then, a subset ∪ j CC Bj of convex elements whose distance r (C Bj , A ') between the convex hull A'and each convex element C B j is ε CCH or less is obtained (step 2406).
Then, the number of convex elements forming the subset ∪ j CC Bj is 0.
Is checked (step 2407). ∪ j CC
When Bj = 0, the minimum distance M out of r (C Bj , A ′)
A convex element C Bk that gives IN j r (C Bj , A ′) is obtained, the closest point between the convex element C Bk and the convex hull A ′ is obtained, and the closest point is between the non-convex polyhedrons A and B. It is output as the closest point (step 2408). However, when ∪ j CC Bj > 0, the minimum distance MIN i, j R between the subsets ∪ i CC Ai and ∪ j CC Bj.
The convex elements CC Ap and CC Bq that give (CC Ai , CC Bj ) are found, the closest point between them is found, and output as the closest point between the non-convex polyhedrons A and B (step 2409). After that, 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 / Release 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, continuous interference check between convex hulls is performed, and if the convex hulls start to interfere with each other, automatically shift to interference check between convex elements that compose the non-convex polyhedron. To do. When the distance between the non-convex polyhedrons becomes large again, the convex hulls are restored and the continuous interference check between the convex hulls is restored. FIG. 63 is a process flow of the algorithm of the dynamic construction / cancellation of the convex hull and the continuous polyhedron interference check, and FIGS. 64 to 66 are explanatory diagrams thereof. Interference check processing (closest approach search processing) is performed between the convex hulls A ′ and B ′ of the non-convex polyhedrons A and B, and the distance r (A ′, B ′) between the closest points is obtained.
Ask for. Then, the magnitude of r (A ', B') and ε CH is determined. Further, the flag contflg A ′ = 1 is set (step 2501). When r (A ′, B ′)> ε CH , convex hulls A ′ and B ′ do not interfere, so the closest point between convex hulls A ′ and B ′ is the closest point between non-convex polyhedrons A and B. It is output as a point (step 2502). After that, the above process 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の凸要素C Aiの
和集合を∪iCAiと表現する。ついで、凸包B′と各凸
要素CAi間の距離r(CAi,B′)がεCCH以下の凸要
素の部分集合∪iCCAiを求める。又、フラグcontflg
CCA1=1とする(ステップ2503)。FIG. 64 shows the steps 2501 and 2502.
It specifically shows the process. As shown in FIG.
In the interference check between convex hulls, the first support function h
Is calculated based on inner product calculation for all points
However, from the next time onward, it will be based on the continuous interference checking algorithm.
It is calculated based on That is, the inner product calculation is performed near the closest point.
Limited to contact points. In the continuous interference check, the last contact
It is necessary to retain near-point information, but this information
Is held as an attribute of one of the convex hulls A ′ and B ′. Su
In the process of step 2502, contflgA′ = 1 flag
Stands, and the interference check between (A ', B') is continuous.
It In step 2501, r (A ′, B ′) ≦ ε
CH, The convex hulls interfere with each other, so one convex hull, eg
For example, the convex hull A'is released. Convex element C of non-convex polyhedron A Aiof
Union ∪iCAiExpress. Then, the convex hull B'and each convex
Element CAiDistance r (CAi, B ′) is εCCHThe following points
Prime subset ∪iCCAiAsk for. Also flag contflg
CCA1= 1 (step 2503).
【0158】しかる後、部分集合∪iCCAiを構成する
凸要素数が0であるかチェックする(ステップ250
4)。∪iCCAi=0の場合には、r(CAi,B′)の
うち最小距離 MINir(CAi,B′)を与える凸要素C
Akを求め、該凸要素CAkと凸包B′間の最接近点を求め
る。そして、該最接近点を非凸多面体A,B間の最接近
点として出力する(ステップ2505)。r(CAi,
B′)は連続型干渉チェックで求める。After that, it is checked whether the number of convex elements forming the subset ∪ i CC Ai is 0 (step 250).
4). ∪ i CC in the case of Ai = 0 is, r (C Ai, B ' ) ( convex element C giving the minimum distance MIN i r C Ai, B) of the'
Ak 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 2505). r (C Ai ,
B ') is obtained by continuous interference check.
【0159】図65(a)は、ステップ2503〜250
5の具体的な説明図である。連続型干渉チェックにおけ
る前回の最接近点情報は、非凸多面体Aの凸要素CAiの
属性として保持される。ステップ2503においてcont
flgCCA1=1のフラグが立ち、ステップ2505におけ
る(CAi,B′)間の干渉チェックは連続型となる。ス
テップ2504において、∪iCCAi>0の場合には他
方の凸包B′を解除する。非凸多面体Bの凸要素CBjの
和集合を∪jCBjと表現する。ついで、凸包A′と各凸
要素CBj間の距離r(CBj,A′)がεCCH以下の凸要
素の部分集合∪jCCBjを求める。又、フラグcontflg
CCB1=1とする(ステップ2506)。しかる後、部分
集合∪jCCBjを構成する凸要素数が0であるかチェッ
クする(ステップ2507)。∪jCCBj=0の場合に
は、r(CBj,A′)のうち最小距離 MINjr(CBj,
A′)を与える凸要素CBkを求め、該凸要素CBkと凸包
A′間の最接近点を求め、該最接近点を非凸多面体A,
B間の最接近点として出力する(ステップ2508)。FIG. 65 (a) shows steps 2503 to 250.
5 is a specific explanatory diagram of FIG. The previous closest point information in the continuous interference check is held as an attribute of the convex element C Ai of the non-convex polyhedron A. In step 2503 cont
The flag of flg CCA1 = 1 is set, and the interference check between (C Ai , B ′) in step 2505 is continuous. In step 2504, if ∪ i CC Ai > 0, the other convex hull B ′ is released. The union of the convex elements C Bj of the non-convex polyhedron B is expressed as ∪ j C Bj . Then, a subset ∪ j CC Bj of convex elements in which the distance r (C Bj , A ′) between the convex hull A ′ and each convex element C Bj is ε CCH or less is obtained. Also flag contflg
CCB1 = 1 is set (step 2506). Then, it is checked whether the number of convex elements forming the subset ∪ j CC Bj is 0 (step 2507). When ∪ j CC Bj = 0, the minimum distance MIN j r (C Bj , r (C Bj , A ′))
'Obtains a convex element C Bk giving), convex element C Bk and the convex hull A' A search of the point of closest approach between the outermost approach point non-convex polyhedron A,
It is output as the closest point between B (step 2508).
【0160】図65(b)は、ステップ2506〜250
8の具体的な説明図である。連続型干渉チェックにおけ
る前回の最接近点情報は、非凸多面体Bの凸要素CBjの
属性として保持される。ステップ2506においてcont
flgCCBj=1のフラグが立ち、ステップ2508におけ
る(CAi,B′)間の干渉チェックは連続型となる。ス
テップ2507において、∪jCCBj>0の場合には、
部分集合∪iCCAiと∪jCCBj間の最小距離 MINi,j R
(CCAi,CCBj)を与える凸要素CCAp、CCBqを求
め、その間の最接近点を求め、非凸多面体A,B間の最
接近点として出力する。又、全てのフラグcontfl
gA′、contflgB′、contflgCCA1、contflgCCBjを0
にリセットする(ステップ2509)。以後、初めに戻
り以降の処理を繰り返す。図66は以上の流れを全体的
に示す説明図である。FIG. 65 (b) shows steps 2506-250.
It is a concrete explanatory view of No. 8. The previous closest point information in the continuous interference check is held as an attribute of the convex element C Bj of the non-convex polyhedron B. In step 2506, cont
The flag of flg CCBj = 1 is set, and the interference check between (C Ai , B ′) in step 2508 is a continuous type. In step 2507, if ∪ j CC Bj > 0,
Minimum distance between subsets ∪ i CC Ai and ∪ j CC Bj MIN i, j R
The convex elements CC Ap and CC Bq that give (CC Ai , CC Bj ) are found, the closest point between them is found, and output as the closest point between the non-convex polyhedrons A and B. Also, all flags contfl
g A ', contflg B', the contflg CCA1, contflg CCBj 0
(Step 2509). After that, the process returns to the beginning and the subsequent processes are repeated. FIG. 66 is an explanatory diagram showing the overall flow described above.
【0161】(S)干渉チェックサブアルゴリズム (凸包の動的構成/解除及び包絡球干渉チェック) 非凸多面体に対し、それを包絡する最小の凸多面体とし
て凸包を定義する。非凸多面体間の距離が十分離れてい
る場合には凸包を包絡する凸包包絡球同士の干渉チェッ
クを行い、凸包包絡球同士が干渉し始めたら凸包同士の
干渉チェックを行う。凸包同士が干渉し始めたら、非凸
多面体を構成する凸要素に対して、包絡球干渉チェック
と凸多面体干渉チェックを行う。非凸多面体間の距離に
応じて包絡球干渉チェックと凸包の構成/解除が動的に
切り替わる。図67は凸包の動的構成/解除及び包絡球
干渉チェックの処理フローである。各非凸多面体A,B
の包絡球半径RA,RB、包絡球中心PCA,PCBを求め
(ステップ2501、2502)、各包絡球の中心間距
離rを次式 r=|PCA−PCB| により求め、 r≦(RA+RB)かチェックする(ステップ250
3)。(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, the interference check of the convex envelope envelope spheres that envelope the convex hull is performed, and when the convex envelope envelope spheres start to interfere, the interference check of the convex hulls is performed. When the convex hulls start to interfere with each other, the envelope sphere interference check and the convex polyhedron interference check are performed on the convex elements forming the non-convex polyhedron. The envelope sphere interference check and the configuration / release of the convex hull are dynamically switched according to the distance between the non-convex polyhedra. FIG. 67 is a processing flow of dynamic configuration / cancellation of the convex hull and envelope sphere interference check. Each non-convex polyhedron A, B
Determined by, | the envelope spheres radius R A, R B, envelope spheres center P CA, obtains a P CB (step 2501, 2502), the distance between the centers following equation r r = in each envelope spheres | P CA -P CB r ≦ (R A + R B ) or to check (step 250
3).
【0162】r>(RA+RB)であれば干渉なしと判定
し、最接近点間距離としてrを出力する(ステップ25
04)。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の包絡球間の干渉チェック
を行い、干渉する各凸要素CAiと凸包B′間で干渉チェ
ックを行う。しかる後、凸包B′と各凸要素CAi間の距
離r(CAi,B′)がεCCH以下の凸要素の部分集合∪i
SCCAiを求める(ステップ2507)。If r> (R A + R B ), it is determined that there is no interference, and r is output as the distance between the closest points (step 25).
04). If r ≦ (R A + R B ), the non-convex polyhedron A, B
The interference check process (closest approach search process) is performed between the convex hulls A'and B'to obtain the distance r (A ', B') between the closest points. Then, the magnitude of r (A ', B') and ε CH is determined (step 2505). When r (A ', B')> ε CH , the convex hulls A'and B'do not interfere, so the convex hulls A'and B '
The closest point between them is set as the closest point between the non-convex polyhedrons A and B and output (step 2506). On the other hand, r (A ', B')
When ≦ ε CH , the convex hulls interfere with each other, so that one convex hull, for example, convex hull A ′ is released. The union of the convex elements C Ai of the non-convex polyhedron A is expressed as ∪ i C Ai . Next, an interference check is performed between the envelope sphere of each convex element C Ai and the envelope sphere of the non-convex polyhedron B, and an interference check is performed between each convex element C Ai and convex hull B ′ that interfere. Then, a subset ∪ i of convex elements whose distance r (C Ai , B ′) between the convex hull B ′ and each convex element C Ai is ε CCH or less.
SCC Ai is calculated (step 2507).
【0163】ついで、部分集合∪iSCCAiを構成する
凸要素数が0であるかチェックする(ステップ250
8)。∪iSCCAi=0の場合には、r(CAi,B′)
のうち最小距離 MINir(CAi,B′)を与える凸要素
CAkを求め、該凸要素CAkと凸包B′間の最接近点を求
め、該最接近点を非凸多面体A,B間の最接近点として
出力する(ステップ2509)。∪iSCCAi>0の場
合には、他方の凸包B′を解除する。非凸多面体Bの凸
要素CBjの和集合を∪jCBjと表現する。ついで、各凸
要素CBjの包絡球と非凸多面体Aの包絡球間の干渉チェ
ックを行い、干渉する各凸要素CBjと凸包A′間で干渉
チェックを行う。しかる後、凸包A′と各凸要素CBj間
の距離r(CBj,A′)がεCCH以下の凸要素の部分集
合∪jSCCBjを求める(ステップ2510)。つい
で、部分集合∪jSCCBjを構成する凸要素数が0であ
るかチェックする(ステップ2511)。∪jSCCBj
=0の場合には、r(CBj,A′)のうち最小距離 MIN
ir(CBj,A′)を与える凸要素CBkを求め、該凸要
素CBkと凸包A′間の最接近点を求め、該最接近点を非
凸多面体A,B間の最接近点として出力する(ステップ
2512)。Then, it is checked whether the number of convex elements forming the subset ∪ i SCC Ai is 0 (step 250).
8). When ∪ i SCC Ai = 0, r (C Ai , B ′)
Among them, the convex element C Ak that gives the minimum distance MIN i r (C Ai , B ′) is found, the closest point between the convex element C Ak and the convex hull B ′ is found, and the closest point is the non-convex polyhedron A. , B is output as the closest point (step 2509). If ∪ i SCC Ai > 0, the other convex hull B ′ is released. The union of the convex elements C Bj of the non-convex polyhedron B is expressed as ∪ j C Bj . Then, an interference check is performed between the envelope sphere of each convex element C Bj and the envelope sphere of the non-convex polyhedron A, and an interference check is performed between each convex element C Bj and the convex hull A ′ that interfere. Thereafter, a subset ∪ j SCC Bj of convex elements whose distance r (C Bj , A ') between the convex hull A'and each convex element C Bj is ε CCH or less is obtained (step 2510). Then, it is checked whether the number of convex elements forming the subset ∪ j SCC Bj is 0 (step 2511). ∪ j SCC Bj
= 0, the minimum distance MIN of r (C Bj , A ′)
The convex element C Bk that gives i r (C Bj , A ′) is obtained, the closest point between the convex element C Bk and the convex hull A ′ is obtained, and the closest point is determined as the closest point between the non-convex polyhedrons A and B. It is output as an approach point (step 2512).
【0164】しかし、∪jSCCBj>0の場合には、部
分集合∪iSCCAiと∪jSCCBj間の最小距離 MINi,j
r(SCCAi,SCCBj)を与える凸要素SCCAp、S
CC Bqを求め、その間の最接近点を求め、非凸多面体
A,B間の最接近点として出力する(ステップ251
3)。以後、初めに戻り以降の処理を繰り返す。尚、図
67のアルゴリズムに図63の凸多面体の連続干渉チェ
ック処理を組み込むことにより、干渉チェックを高速化
することができる。However, ∪jSCCBjIf> 0, then
Minute set ∪iSCCAiAnd ∪jSCCBjMinimum distance between MINi, j
r (SCCAi, SCCBj) Giving a convex element SCCAp, S
CC Bq, The closest point between them, and the non-convex polyhedron
It is output as the closest point between A and B (step 251).
3). After that, the process returns to the beginning and the subsequent processes are repeated. The figure
67 algorithm, the continuous interference check of the convex polyhedron of FIG.
Speed up interference check by incorporating a clock processing
can do.
【0165】(T)干渉チェックシステムの構成 図68は本発明の干渉チェックシステムの構成図であ
り、21は形状モデルを生成してポリゴンデータファイ
ルを出力する三次元CADシステム、22はポリゴンデ
ータファイルや前処理により求めた凸要素データ、近接
点多分木リスト、近接点線形リスト等を記憶するメモ
リ、23はポリゴンデータファイルより近接点多分木リ
ストを作成する近接点多分木リスト作成部、24は近接
点多分木リストより近接点線形リストを生成する近接点
線形リスト作成部、25は非凸多面体を凸要素の集合に
分解する凸分解部、26は干渉チェック部、27は近接
点線形リストを外部記録媒体に出力すると共に、適宜読
み出してメモリ22に展開するリスト入出力部、28は
ハードディスク等の外部記録媒体である。(T) Structure of Interference Check System FIG. 68 is a block diagram of the interference check system of the present invention, in which 21 is a three-dimensional CAD system for generating a shape model and outputting a polygon data file, and 22 is a polygon data file. Or a memory for storing the convex element data obtained by the preprocessing, the near-point multi-tree list, the near-point linear list, etc., 23 is a near-point multi-tree list creating unit for creating the near-point multi-tree list from the polygon data file, and 24 is A proximity point linear list creation unit that generates a proximity point linear list from the proximity point multi-tree 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 proximity point linear list. A list input / output unit 28 which outputs the data to an external recording medium and appropriately reads it and expands it in the memory 22 is an external recording device such as a hard disk. It is a medium.
【0166】(U)本発明の応用分野 本発明は以下のような分野における応用が可能である。 (a) 機構設計用CADシステム 機構設計では、製品を組み立てる時に不用意な干渉が度
々発生する。このようなことを事前に防ぐためには、機
構設計用CADシステム上にて部品間の接合関係、マー
ジンを入念にチェックしておくことが重要になる。リア
ルタイム干渉チェックシステムを機構設計用CADシス
テムに組み込むことにより、実際の製品に近い形での事
前チェックが可能となる。 (b) 移動ロボットの経路計画 マニピュレータや自走車などの移動ロボットでは、他の
物体と衝突しないよう経路計画を事前に行った後に駆動
させる場合が多い。例えば、マニピュレータを使った部
品組立てにおいては、部品間の干渉、部品とマニピュレ
ータ間との干渉をチェックしながら経路計画をする必要
がある。また、掃除ロボット、警護ロボット、運搬ロボ
ットなどの自走ロボットでは、地点間の移動において壁
や柱又は机等の障害物との衝突を回避した経路計画が必
要である。かかる場合、マニピュレータあるいはロボッ
ト制御部に高速の干渉チェックシステムを組込み、事前
にチェックする方法が有効である。(U) Application Fields of the Present Invention The present invention can be applied in the following fields. (a) CAD system for mechanical design In mechanical design, careless 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 parts and the margin on the mechanical design CAD system. 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 In many cases, mobile robots such as manipulators and self-propelled vehicles are driven after planning paths so that they do not collide with other objects. For example, in the assembly of parts using a manipulator, it is necessary to plan a route while checking the interference between the parts and the interference between the parts and the manipulator. In addition, self-propelled robots such as cleaning robots, guard robots, and transport robots require route planning that avoids collisions with obstacles such as walls, columns, or desks when moving between points. In such a case, it is effective to incorporate a high-speed interference check system into the manipulator or the robot control unit and 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, when walking an android model, it is necessary to solve a contact problem between the android model and the ground, and when simulating a car collision, it is necessary to solve an inter-car interference problem. (d) Game software Conventional game software was mostly two-dimensional, but it is expected that three-dimensional display using a graph computer will become mainstream in the future. In game software, there are many problems of interference between objects such as collision between missile and fighter in shooting game and collision between cars in racing game. The real-time interference checking system of the present invention provides a powerful tool in the above application fields. Although the present invention has been described above with reference to the embodiments, the present invention can be variously modified according to the gist of the present invention described in the claims, and the present invention does not exclude these.
【0168】[0168]
【発明の効果】以上本発明によれば、各凸多面体の最接
近点が格子点上に存在するか、辺上に存在するか、ポリ
ゴン上に存在するか判断し、(1)格子点上に存在する場
合には有向グラフ型構造データより該格子点を構成する
ポリゴンを求め、該ポリゴンの格子点をGIlbert法によ
る最接近点探索処理における内積評価に用い、(2)辺上
に存在する場合には該辺を構成するポリゴンを求め、該
ポリゴンの格子点を前記内積評価に用い、(3)ポリゴン
上に存在する場合には該ポリゴンの格子点を前記内積評
価に用いるように構成したから、内積評価に適用する格
子点数を減少することができ、計算負荷を減少すること
ができる。As described above, according to the present invention, it is determined whether the closest point of each convex polyhedron is on a grid point, on a side, or on a polygon, and (1) on the grid point. If it exists on the side (2), the polygon that composes the grid point is obtained from the directed graph structure data, and the grid point of the polygon is used for the inner product evaluation in the closest point search processing by the Gilbert method. Since the polygons forming the sides are obtained, the lattice points of the polygon are used for the inner product evaluation, and (3) the lattice points of the polygon are used for the inner product evaluation when they are present on the polygon. , The number of grid points applied to the inner product evaluation can be reduced, and the calculation load can be reduced.
【0169】又、本発明によれば、凸多面体を構成する
表面多角形(ポリゴン)を三角形に分割し、各凸多面体
の最接近点が格子点上に存在するか、辺上に存在する
か、三角形ポリゴン上に存在するか判断し、(1)格子点
上に存在する場合には有向グラフ型構造データより該格
子点を構成する三角形ポリゴンを求め、該三角形ポリゴ
ンの格子点を内積評価に用い、(2)辺上に存在する場合
には該辺を構成する三角形ポリゴンを求め、該三角形ポ
リゴンの格子点を内積評価に用い、(3)三角形ポリゴン
上に存在する場合には該三角形ポリゴンの格子点を内積
評価に用いるようにしたから、内積評価に適用する格子
点数を更に減少することができ、計算負荷を減少するこ
とができる。Further, according to the present invention, a surface polygon (polygon) forming a convex polyhedron is divided into triangles, and whether the closest point of each convex polyhedron is on a grid point or on a side. , It is determined whether or not it exists on a triangular polygon, and (1) if it exists on a lattice point, the triangular polygon that constitutes the lattice point is obtained from the directed graph structure data, and the lattice point of the triangular polygon is used for inner product evaluation. , (2) If it exists on the side, the triangular polygons that compose the side are obtained, and the grid points of the triangular polygon are used for the inner product evaluation. (3) If it exists on the triangular polygon, Since the grid points are used for the inner product evaluation, the number of grid points applied to the inner product evaluation can be further reduced and the calculation load can be reduced.
【0170】更に、本発明によれば、非凸多面体を包む
最小の凸多面体(凸包)を生成し、該凸包の有向グラフ
型構造データを作成し、該凸包の有向グラフ型構造デー
タを用いて最接近点探索処理を施して非凸多面体間の最
接近点探索を行い、バーチャリティ=1の表面凸多角形
が他の物体と干渉した場合には、凸包を解除し、以後非
凸多面体を構成する複数の凸多面体に対して最接近点探
索処理を施すようにしたから、非凸多面体間同士の最接
近点探索が可能になると共に、バーチャリティ=1の表
面凸多角形が他の物体と干渉するまでは最接近点探索処
理に要する計算負荷を減少することができる。又、本発
明によれば、バーチャリティ=1の表面凸多角形が他の
物体と干渉して凸包を解除後、該表面凸多角形が他の物
体と干渉しなくなった時、凸包を復元して最接近点探索
処理を行うようにしたから、復元後の最接近点探索処理
の計算負荷を軽減できる。Further, according to the present invention, the smallest convex polyhedron (convex hull) enclosing a non-convex polyhedron is generated, the directed graph type structural data of the convex hull is created, and the directed graph type structural data of the convex hull is used. To find the closest point between the non-convex polyhedrons, and if the surface convex polygon with virtuality = 1 interferes with another object, the convex hull is released, and then the non-convex Since the closest point search processing is performed on a plurality of convex polyhedrons that form a polyhedron, the closest point between non-convex polyhedrons can be searched, and surface convex polygons with virtuality = 1 can be used. It is possible to reduce the calculation load required for the closest point search process until the object interferes with the object. Further, according to the present invention, when the convex convex surface of the virtuality = 1 interferes with another object to cancel the convex hull, and when the convex polygon of the surface no longer interferes with another object, the convex convex hull is formed. Since the restoration is performed and the closest point search processing is performed, the calculation load of the restored closest point search processing can be reduced.
【0171】更に、本発明によれば、前処理において近
接点線形リストを作成し、干渉チェックに際して最新に
求まっている最接近点に近接する頂点を該近接点線形リ
ストより求め、これら頂点の中より次の時刻における最
接近点を連続的に探索するようにしたから、全ての頂点
に最接近点探索処理を施す必要がないため、高速に干渉
チェックを行うことができる。又、近接点多分木リスト
を作成し、該近接点多分木リストを近接点線形リストに
変換するようにしたから、高速に線形リストを作成で
き、結果的にますます高速に干渉チェックを行うことが
できる。又、近接点線形リストをファイルとして外部記
録媒体に記憶しておくことにより、適宜該ファイルを読
み出して干渉チェックを行うようにしたから、高速に干
渉チェックを行うことができる。又、包絡球や凸包を生
成し、離れている場合にはこれら包絡球や凸包を用いて
干渉チェックを行うようにしたから、高速の干渉チェッ
クを行うことができる。Further, according to the present invention, a close point linear list is created in the preprocessing, and a vertex close to the closest approach point which has been obtained most recently at the time of interference check is obtained from the close point linear list. Since the closest point at the next time is continuously searched for, it is not necessary to perform the closest point search process on all the vertices, so that the interference check can be performed at high speed. In addition, since the neighbor point multi-branch tree list is created and the neighbor point multi-branch tree list is converted into the neighbor point linear list, the linear list can be created at high speed, and as a result, the interference check can be performed even faster. You can Further, by storing the proximity point linear list as a file in the external recording medium and reading the file as appropriate to perform the interference check, the interference check can be performed at high speed. Further, since the envelope sphere and the convex hull are generated and the interference check is performed by using the envelope sphere and the convex hull when they are apart from each other, the high-speed interference check can be performed.
【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.
【図2】凸多面体の表面多角形への分解説明図(6面体
の場合)である。FIG. 2 is an exploded 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 the closest point (in the case of a hexahedron).
【図4】本発明の第1の最接近点探索方法の処理フロー
図である。FIG. 4 is a processing flow chart of a first closest point searching method of the present invention.
【図5】凸多面体データ入力の説明図である。FIG. 5 is an explanatory diagram of convex polyhedron 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 polygonal triangulation.
【図9】第2の最接近点探索方法の処理フロー図であ
る。FIG. 9 is a processing flow chart of a second closest point searching method.
【図10】第2の最接近点探索装置の構成図である。FIG. 10 is a block 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 flow chart 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 dynamically changes.
(Part 1).
【図18】環境が動的に変化する場合の本発明の説明図
(その2)である。FIG. 18 is an explanatory diagram of the present invention when the environment dynamically changes.
(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 flow diagram for searching for the closest point between non-convex polyhedra.
【図22】本発明の非凸多面体間の最接近点探索装置の
構成図である。FIG. 22 is a block diagram of the closest point search device between non-convex polyhedra of the present invention.
【図23】非凸多面体間の最接近点連続探索の第1の方
法説明図である。FIG. 23 is a diagram illustrating a first method of continuous search for closest points between non-convex polyhedra.
【図24】非凸多面体間の第1の最接近点連続探索処理
のフロー図である。FIG. 24 is a flowchart of a first closest point continuous search process between non-convex polyhedra.
【図25】非凸多面体間の最接近点連続探索の第2の方
法説明図である。FIG. 25 is a diagram illustrating a second method of continuous search for closest points between non-convex polyhedra.
【図26】非凸多面体間の第2の最接近点連続探索処理
のフロー図である。FIG. 26 is a flowchart of a second closest point continuous search process between non-convex polyhedra.
【図27】システム構成図である。FIG. 27 is a system configuration diagram.
【図28】干渉チェック前処理の概略的処理フローであ
る。FIG. 28 is a schematic process flow of a process before interference check.
【図29】凸分解基本アルゴリズムの処理フローであ
る。FIG. 29 is a processing flow of a convex decomposition basic algorithm.
【図30】Mergeプロセスの流れ図である。FIG. 30 is a flow chart of the Merge process.
【図31】ポリゴン間の凹凸関係判定説明図である。FIG. 31 is an explanatory diagram for determining a concave-convex relationship between polygons.
【図32】凸分解前処理の第2実施例処理フローであ
る。FIG. 32 is a processing flow of a second example of convex decomposition preprocessing.
【図33】ブール集合演算による物体表現説明図であ
る。FIG. 33 is an explanatory diagram of an object expression by a Boolean set operation.
【図34】凸分解前処理の第3実施例処理フローであ
る。FIG. 34 is a processing flow of a third example of convex decomposition preprocessing.
【図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 example of the convex decomposition preprocessing.
【図37】本発明の干渉チェック前処理の別の概略的処
理フローである。FIG. 37 is another schematic processing flow of the interference check preprocessing 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 the Merge process.
【図40】干渉チェックアルゴリズムの概略処理フロー
である。FIG. 40 is a schematic process 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 modification of convex decomposition.
【図45】凸分解の第2変形例の処理フローである。FIG. 45 is a processing flow of a second modification of convex decomposition.
【図46】近接点リストの例である。FIG. 46 is an example of a close point list.
【図47】近接点線形リスト作成の前処理フローであ
る。FIG. 47 is a pre-processing flow for creating a near point linear list.
【図48】三角形ポリゴンに分割した直方体及びポリゴ
ンデータの説明図である。FIG. 48 is an explanatory diagram of rectangular parallelepiped and polygon data divided into triangular polygons.
【図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 near point linear list.
【図51】近接点線形リストを生成するアルゴリズムの
別の説明図である。FIG. 51 is another explanatory diagram of an algorithm for generating a near point linear list.
【図52】近接点線形リストの作成説明図である。FIG. 52 is an explanatory diagram of creating a near point linear list.
【図53】近接点多分木リストの例である。[Fig. 53] Fig. 53 is an example of a near-point multi-tree list.
【図54】近接点多分木リスト作成の前処理フローであ
る。FIG. 54 is a preprocessing flow for creating a near-point multi-tree list.
【図55】近接点線形リストのダンプファイルフォーマ
ット説明図である。FIG. 55 is an explanatory diagram of a dump file format of a near point linear list.
【図56】包絡球による事前チェックアルゴリズムのフ
ローである。FIG. 56 is a flow of a pre-check algorithm using an envelope sphere.
【図57】Gilbert法の基本的な考え方の説明図であ
る。FIG. 57 is an explanatory diagram of a basic idea of the Gilbert method.
【図58】凸多面体における連続的干渉チェックアルゴ
リズムのフローである。FIG. 58 is a flow 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] 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 the convex hull and the convex element.
【図62】凸包の動的構成/解除アルゴリズムののフロ
ーである。FIG. 62 is a flow of a convex hull dynamic configuration / cancellation algorithm.
【図63】凸包の動的構成/解除及び凸多面体連続干渉
チェックのフローである。FIG. 63 is a flow chart of dynamic configuration / cancellation of a convex hull and continuous convex polyhedron interference check.
【図64】凸包間の連続型干渉チェックの説明図であ
る。FIG. 64 is an explanatory diagram of continuous interference check between convex hulls.
【図65】凸要素、凸包間の連続型干渉チェックの説明
図である。FIG. 65 is an explanatory diagram of continuous interference check between a convex element and a convex hull.
【図66】凸要素間の干渉チェック説明図である。66 is an explanatory diagram of interference check between convex elements. FIG.
【図67】凸包の動的構成/解除及び包絡球干渉チェッ
クアルゴリズムのフローである。FIG. 67 is a flow of a convex hull dynamic configuration / cancellation and envelope sphere interference check algorithm.
【図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 point algorithm.
【図70】最接近点アルゴリズムの解決すべき点の説明
図(その2)である。FIG. 70 is an explanatory diagram (part 2) of points to be solved by the closest point algorithm.
【図71】サポート関数の説明図である。71 is an explanatory diagram of a support function. FIG.
【図72】Gilbert法による最接近点探索の説明図であ
る。[Fig. 72] Fig. 72 is an explanatory diagram of searching for the closest 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] Fig. 75 is an explanatory diagram of searching for the closest point between non-convex polyhedra by the Gilbert method.
12・・凸多面体データを記憶する記憶部 13・・有向グラフデータ作成部 14・・有向グラフ型構造データを記憶する記憶部 15・・最接近点探索処理部 22a・・ポリゴンデータ記憶部 22b・・近接点線形リスト記憶部 24・・近接点線形リスト作成部 26・・最接近点探索処理部 12 ... Storage unit for storing convex polyhedron data 13 ... Directed graph data creation unit 14 ... Storage unit for storing directed graph type structure data 15 ... Closest point search processing unit 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)発明者 丸山 次人 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Tsujito Maruyama 1015 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Fujitsu Limited
Claims (17)
体上のp個のポイントを要素とする部分集合で形成され
る形状迄の最接近点を求め、該最接近点の位置ベクトル
と各凸多面体の格子点の位置ベクトルとの内積を評価
し、評価結果に基づいて該最接近点が、原点から差凸多
面体までの最接近点と一致するか判定し、一致しない場
合には部分集合を変更し、最終的に原点から差凸多面体
までの最接近点を求めて各凸多面体の最接近点を求める
最接近点探索方法において、 凸多面体の各表面多角形(ポリゴン)の下方に該ポリゴ
ンの要素である格子点、辺を配列し、格子点、辺の下方
にそれぞれ格子点、辺を構成するポリゴンを配列してな
る有向グラフ型構造データにより各凸多面体を表現し、 前記部分集合で形成される形状の最接近点に対応する各
凸多面体上の最接近点が格子点上に存在するか、辺上に
存在するか、ポリゴン上に存在するか判断し、 格子点上に存在する場合には有向グラフ型構造データよ
り該格子点を構成するポリゴンを求め、該ポリゴンの格
子点を前記内積評価に用い、 辺上に存在する場合には有向グラフ型構造データより該
辺を構成するポリゴンを求め、該ポリゴンの格子点を前
記内積評価に用い、 ポリゴン上に存在する場合には該ポリゴンの格子点を前
記内積評価に用いることにより原点から差凸多面体まで
の最接近点を求めて各凸多面体の最接近点を求める最接
近点探索方法。1. A closest point to a shape formed by a subset having p points on a difference convex polyhedron, which is a difference set of two convex polyhedrons, as an element, and a position vector of the closest point is obtained. Evaluate the inner product with the position vector of the lattice point of each convex polyhedron, and based on the evaluation result, determine whether the closest point matches the closest point from the origin to the differential convex polyhedron. Change the set, and finally find the closest point from the origin to the difference convex polyhedron to find the closest point of each convex polyhedron. In the closest point search method, below each surface polygon (polygon) of the convex polyhedron Each convex polyhedron is represented by directed graph structure data in which grid points and sides that are elements of the polygon are arranged, and grid points and polygons that form the grid are arranged below the sides, respectively. To the closest point of the shape formed by It is determined whether the closest point on each convex polyhedron is on a grid point, on a side, or on a polygon. If it is on a grid point, the grid is determined from the directed graph structure data. The polygons that make up the points are obtained, the grid points of the polygons are used for the inner product evaluation, and if they are on the sides, the polygons that make up the sides are obtained from the directed graph structure data, and the grid points of the polygons are set to the inner product. It is used for evaluation, and if it exists on a polygon, the grid points of the polygon are used for the inner product evaluation to find the closest point from the origin to the difference convex polyhedron, and find the closest point of each convex polyhedron. Search method.
には、非凸多面体をを包む最小の凸多面体(凸包)を生
成し、 該凸包の有向グラフ型構造データを作成し、 該凸包の有向グラフ型構造データを用いて非凸多面体間
の最接近点探索を行う請求項1記載の最接近点探索方
法。2. When searching for the closest point between non-convex polyhedra, the smallest convex polyhedron (convex hull) that encloses the non-convex polyhedron is generated, and directed graph structure data of the convex hull is created, The closest approach point search method according to claim 1, wherein the closest approach point search between non-convex polyhedrons is performed using the directed graph structure data of the convex hull.
多面体の表面凸多角形と一致する場合にはバーチャリテ
ィ=0,一致しない場合にはバーチャリティ=1とし、 バーチャリティ=1の表面凸多角形が他の物体と干渉し
た場合には、凸包を解除し、以後非凸多面体を構成する
複数の凸多面体に対して最接近点探索処理を施す請求項
2記載の最接近点探索方法。3. If the surface convex polygon forming the convex hull matches the surface convex polygon of the original non-convex polyhedron, then virtuality = 0, otherwise virtuality = 1, and virtuality = 3. When the surface convex polygon of No. 1 interferes with another object, the convex hull is released, and the closest approach point search process is performed on a plurality of convex polyhedrons that form the non-convex polyhedron thereafter. Approach point search method.
面凸多角形が他の物体と干渉しなくなった時、凸包を復
元して最接近点探索処理を行う請求項3記載の最接近点
探索方法。4. The method according to claim 3, wherein after the convex hull is released, when the surface convex polygon of virtuality = 1 does not interfere with other objects, the convex hull is restored to perform the closest point search process. Approach point search method.
には、非凸多面体をを包む最小の凸多面体(凸包)を生
成し、 該凸包を構成するポリゴンを三角形に分割し、ポリゴン
の最小単位を三角形ポリゴンとして有向グラフ型構造デ
ータを作成し、 該凸包の有向グラフ型構造データを用いて非凸多面体間
の最接近点探索を行う請求項1記載の最接近点探索方
法。5. When searching for the closest point between non-convex polyhedrons, the smallest convex polyhedron (convex hull) that encloses the non-convex polyhedron is generated, and the polygons forming the convex hull are divided into triangles. The closest approach point search method according to claim 1, wherein directed graph type structure data is created with the minimum unit of polygon as a triangular polygon, and the closest point search between non-convex polyhedra is performed using the directed graph type structure data of the convex hull.
凸多面体の三角形ポリゴンと一致する場合にはバーチャ
リティ=0,一致しない場合にはバーチャリティ=1と
し、 バーチャリティ=1の三角形ポリゴンが他の物体と干渉
した場合には、凸包を解除し、以後非凸多面体を構成す
る複数の凸多面体に対して最接近点探索処理を施す請求
項5記載の最接近点探索方法。6. A triangle polygon with a virtuality of 1 when the triangular polygons forming the convex hull and the original polygon of the non-convex polyhedron match, and a virtuality of 1 when they do not match. 6. The closest approach point search method according to claim 5, wherein when the object interferes with another object, the convex hull is released, and thereafter the closest point search process is performed on a plurality of convex polyhedrons forming the non-convex polyhedron.
角形ポリゴンが他の物体と干渉しなくなった時、凸包を
復元して最接近点探索処理を行う請求項6記載の最接近
点探索方法。7. The closest approach point according to claim 6, wherein the convex hull is restored and the closest point search processing is performed when the triangular polygon having the virtuality of 1 does not interfere with another object after the convex hull is released. Search method.
体上のp個のポイントを要素とする部分集合で形成され
る形状迄の最接近点を求め、該最接近点の位置ベクトル
と各凸多面体の格子点の位置ベクトルとの内積を評価
し、評価結果に基づいて該最接近点が、原点から差凸多
面体までの最接近点と一致するか判定し、一致しない場
合には部分集合を変更し、最終的に原点から差凸多面体
までの最接近点を求めて各凸多面体の最接近点を求める
最接近点探索方法において、 凸多面体の各表面多角形(ポリゴン)を三角形に分割
し、各三角形ポリゴンの下方に該三角形ポリゴンの要素
である格子点、辺を配列し、格子点、辺の下方にそれぞ
れ格子点、辺を構成する三角形ポリゴンを配列してなる
有向グラフ型構造データにより各凸多面体を表現し、 前記部分集合で形成される形状の最接近点に対応する各
凸多面体上の最接近点が格子点上に存在するか、辺上に
存在するか、三角形ポリゴン上に存在するか判断し、 格子点上に存在する場合には有向グラフ型構造データよ
り該格子点を構成する三角形ポリゴンを求め、該三角形
ポリゴンの格子点を前記内積評価に用い、 辺上に存在する場合には有向グラフ型構造データより該
辺を構成する三角形ポリゴンを求め、該三角形ポリゴン
の格子点を前記内積評価に用い、 三角形ポリゴン上に存在する場合には該三角形ポリゴン
の格子点を前記内積評価に用いることにより原点から差
凸多面体までの最接近点を求めて各凸多面体上の最接近
点を求める最接近点探索方法。8. A closest point up to a shape formed by a subset having p points on a difference convex polyhedron which is a difference set of two convex polyhedrons as an element is obtained, and a position vector of the closest point is obtained. Evaluate the inner product with the position vector of the lattice point of each convex polyhedron, and based on the evaluation result, determine whether the closest point matches the closest point from the origin to the differential convex polyhedron. Change the set and finally find the closest point from the origin to the difference convex polyhedron to find the closest point of each convex polyhedron. In the closest point search method, each surface polygon of the convex polyhedron is made into a triangle. Directed graph structure data obtained by dividing and arranging the grid points and sides that are elements of the triangle polygon under each triangle polygon, and arranging the grid points and the triangle polygons configuring the side below the side, respectively. Express each convex polyhedron by , Determining whether the closest point on each convex polyhedron corresponding to the closest point of the shape formed by the subset is on a grid point, on a side, or on a triangular polygon, If it exists on a grid point, the triangular polygons that compose the grid point are obtained from the directed graph structure data, and the grid points of the triangular polygon are used for the inner product evaluation. If it exists on the side, the directed graph structure data Then, the triangular polygons that form the sides are obtained, and the lattice points of the triangular polygon are used for the inner product evaluation. If they exist on the triangular polygon, the lattice points of the triangular polygon are used for the inner product evaluation to obtain the difference from the origin. A method for finding the closest point on each convex polyhedron by finding the closest point to the convex polyhedron.
ることにより両者の干渉チェックを行なうための最接近
点探索前処理方法において、 凸多面体を覆う全ポリゴンの頂点座標を入力し、 各ポリゴンの頂点を第1方向(next方向)にリンク
し、各頂点にポリゴン辺を介して繋がる頂点群を第2の
方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストを作成して出力する
ことを特徴とする最接近点探索前処理方法。9. A closest point search preprocessing method for checking the interference between the convex polyhedrons by continuously searching for the closest point between them, by inputting vertex coordinates of all polygons covering the convex polyhedron, Proximity with a data structure in which the vertices of each polygon are linked in the first direction (next direction), and the vertices that are connected to each vertex via polygon sides are linked to the vertices in the second direction (branch direction) A pre-processing method for searching for the closest point, which is characterized by creating and outputting a point linear list.
ァイルとして記憶しておき、必要時に所定の近接点線形
リストのファイルを読み出してシステムのメモリ上に展
開することを特徴とする請求項9記載の最接近点探索前
処理方法。10. The proximity point linear list is stored as a file in an external storage medium, and a file of a predetermined proximity point linear list is read out and expanded in the system memory when necessary. Preprocessing method for searching for the closest point of.
することにより両者の干渉チェックを行なうための最接
近点探索前処理方法において、 凸多面体を覆う全ポリゴンの頂点座標を入力し、 リスト上の基準頂点を定めると共に、該基準頂点のX座
標値より大きい第1ネクスト方向、X座標値より小さい
第2ネクスト方向、Y座標値より大きい第3ネクスト方
向、Y座標値より小さい第4ネクスト方向、Z座標値よ
り大きい第5ネクスト方向、Z座標値より小さい第6ネ
クスト方向を定め、 基準頂点の各軸座標値と該基準頂点にポリゴン辺で繋が
っている頂点(対象頂点)の各軸座標値とを比較してそ
の大小に応じてリンクするネクスト方向を求めると共に
該ネクスト方向において基準頂点に近い順に前記対象頂
点をリンクし、 該ネクスト方向における対象頂点の座標値が既にリンク
されている他の頂点の座標値と等しい場合には、該他の
頂点と対象頂点の各軸座標値を比較し、その大小に応じ
たネクスト方向を求め、該ネクスト方向においてリンク
済みの他の頂点に近い順に対象頂点をリンクし、 各頂点にポリゴン辺を介して繋がる頂点群を配列して近
接点多分木リストを作成することを特徴とする最接近点
探索前処理方法。11. A closest point search pre-processing method for checking interference between the convex polyhedrons by continuously searching for the closest points between them, by inputting vertex coordinates of all polygons covering the convex polyhedron, While defining the reference vertex on the list, a first next direction larger than the X coordinate value of the reference vertex, a second next direction smaller than the X coordinate value, a third next direction larger than the Y coordinate value, and a fourth smaller than the Y coordinate value. A next direction, a fifth next direction larger than the Z coordinate value, and a sixth next direction smaller than the Z coordinate value are defined, and each axis coordinate value of the reference vertex and each vertex (target vertex) connected to the reference vertex by a polygon edge. The axis coordinates are compared with each other to find the next direction to be linked according to the magnitude, and the target vertices are linked in the order of being closer to the reference vertex in the next direction. If the coordinate value of the target vertex in the direction is equal to the coordinate value of the other vertex already linked, the coordinate values of the axes of the other vertex and the target vertex are compared, and the next direction according to the magnitude is calculated. , The closest approach, characterized in that the target vertices are linked in the order of being closer to other vertices already linked in the next direction, and a group of vertices connected to each vertex via polygon edges is arranged to create a near-point multi-tree list. Pre-processing method for point search.
し、各頂点にポリゴン辺を介して繋がる頂点群を第2の
方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストに変換して出力する
ことを特徴とする請求項11記載の最接近点探索前処理
方法。12. The near-point multi-branch tree list links vertices of each polygon in a first direction (next direction), and a group of vertices connected to each vertex via polygon sides in a second direction (branch direction). 12. The closest approach point search preprocessing method according to claim 11, wherein the closest point linear list having a data structure linked to the vertices is converted and output.
することにより両者の干渉チェックを行なう最接近点探
索方法において、 凸多面体を覆う全ポリゴンの頂点座標を入力し、 各ポリゴンの頂点を第1方向(next方向)にリンク
し、各頂点にポリゴン辺を介して繋がる頂点群を第2の
方向(branch方向)に該頂点にリンクしてなるデ
ータ構造を備えた近接点線形リストを作成し、 最新に求まっている最接近点に近接する頂点を前記近接
点線形リストより求め、これら頂点の中より次の時刻に
おける最接近点を探索して干渉チェックを行なうことを
特徴とする最接近点探索方法。13. A closest point search method for checking the interference between the convex polyhedrons by continuously searching for the closest points between the convex polyhedrons, in which the vertex coordinates of all polygons covering the convex polyhedron are input and the vertices of each polygon are input. Is linked in the first direction (next direction) and a group of vertices connected to each vertex via polygon sides is linked to the vertex in the second direction (branch direction). Created, the vertex closest to the closest point obtained latest is obtained from the close point linear list, the closest point at the next time is searched from these vertexes, and the interference check is performed. Approach point search method.
多面体に分解し、凸多面体間の最接近点を連続的に探索
することにより非凸多面体間の干渉チェックを行なう最
接近点探索方法において、 前記凸多面体毎に、該凸多面体を覆う全ポリゴンの頂点
を第1方向(next方向)にリンクし、各頂点にポリ
ゴン辺を介して繋がる頂点群を第2の方向(branc
h方向)に該頂点にリンクしてなるデータ構造を備えた
近接点線形リストを作成し、 前記非凸多面体毎に、該非凸多面体の頂点座標値のう
ち、各軸方向の最大座標値及び最小座標値を求め、該最
大座標値及び最小座標値により該非凸多面体を包む包絡
球を生成し、 第1、第2の非凸多面体の包絡球が干渉するかチェック
し、 干渉した後は前記非凸多面体を分解して得られている凸
多面体間の最接近点を探索し、最新に求まっている最接
近点に近接する頂点を前記近接点線形リストより求め、
これら頂点の中より次の時刻における最接近点を探索
し、 各凸多面体間の最接近点間距離が最も短いものを用いて
干渉チェックを行なうことを特徴とする最接近点探索方
法。14. A closest approach point search for interfering between non-convex polyhedrons by disassembling each of the first and second non-convex polyhedrons into a convex polyhedron and continuously searching for closest points between the convex polyhedrons. In the method, for each convex polyhedron, the vertices of all polygons covering the convex polyhedron are linked in a first direction (next direction), and a group of vertices connected to each vertex via polygon sides is linked in a second direction (branc).
In the h direction), a near-point linear list having a data structure linked to the vertices is created, and for each non-convex polyhedron, among the vertex coordinate values of the non-convex polyhedron, the maximum coordinate value and the minimum coordinate value in each axis direction are generated. The coordinate values are obtained, an envelope sphere that encloses the non-convex polyhedron is generated based on the maximum coordinate value and the minimum coordinate value, and it is checked whether the envelope spheres of the first and second non-convex polyhedrons interfere with each other. The closest point between the convex polyhedrons obtained by decomposing the convex polyhedron is searched for, and the vertex closest to the latest closest point is obtained from the adjacent point linear list,
A method for searching for the closest point, wherein the closest point at the next time is searched from among these vertices, and interference is checked using the one with the shortest distance between the closest points between each convex polyhedron.
体(凸包)を生成し、 第1、第2の非凸多面体の包絡球が干渉した後は、第
1、第2の非凸多面体の凸包が干渉するかチェックし、 第1、第2の凸包同士が干渉した後は、前記非凸多面体
を分解して得られている凸多面体間の最接近点を探索し
て干渉チェックを行なうことを特徴とする請求項14記
載の最接近点探索方法。15. A minimum convex polyhedron (convex hull) that encloses each non-convex polyhedron is generated, and after the envelope spheres of the first and second non-convex polyhedrons interfere with each other, first and second non-convex polyhedrons are generated. After checking whether the convex hulls of the polyhedron interfere with each other, and after the first and second convex hulls interfere with each other, the closest points between the convex polyhedrons obtained by decomposing the non-convex polyhedron are searched for interference. 15. The closest approach point search method according to claim 14, wherein a check is performed.
多面体に分解し、凸多面体間の最接近点を連続的に探索
することにより非凸多面体間の干渉チェックを行なう最
接近点探索方法において、 前記凸多面体毎に、該凸多面体を覆う全ポリゴンの頂点
を第1方向(next方向)にリンクし、各頂点にポリ
ゴン辺を介して繋がる頂点群を第2の方向(branc
h方向)に該頂点にリンクしてなるデータ構造を備えた
近接点線形リストを作成し、 前記各非凸多面体を包む最小の凸多面体(凸包)を生成
し、 第1、第2の非凸多面体の凸包が干渉するかチェック
し、 干渉した後は凸多面体間の最接近点を探索し、最新に求
まっている最接近点に近接する頂点を前記近接点線形リ
ストより求め、これら頂点の中より次の時刻における最
接近点を探索し、 各凸多面体間の最接近点間距離が最も短いものを用いて
干渉チェックを行なうことを特徴とする最接近点探索方
法。16. A closest approach point search for performing interference check between the non-convex polyhedrons by disassembling each of the first and second non-convex polyhedrons into a convex polyhedron and continuously searching for a closest approach point between the convex polyhedrons. In the method, for each convex polyhedron, the vertices of all polygons covering the convex polyhedron are linked in a first direction (next direction), and a group of vertices connected to each vertex via polygon sides is linked in a second direction (branc).
A near-point linear list having a data structure linked to the vertices in the h direction) is created, and the smallest convex polyhedron (convex hull) that encloses each non-convex polyhedron is generated. It is checked whether the convex hulls of the convex polyhedron interfere with each other, and after the interference, the closest points between the convex polyhedrons are searched for, and the vertices close to the latest closest point are found from the adjacent point linear list. The closest approach point search method is characterized in that the closest point at the next time is searched from among, and the interference check is performed using the one having the shortest closest point distance between each convex polyhedron.
を解除し、非凸多面体を分解して得られている各凸多面
体と他方の凸包の干渉チェックを行ない、 凸多面体と他方の凸包が干渉した後は、他方の凸包を解
除し、各非凸多面体を分解して得られている凸多面体間
の最接近点を探索して干渉チェックを行なうことを特徴
とする請求項16記載の最接近点探索方法。17. After the convex hulls interfere with each other, one convex hull is released and each convex polyhedron obtained by decomposing the non-convex polyhedron and the other convex hull are checked for interference. After the interference of the other convex hull, the other convex hull is released, and the interference check is performed by searching for the closest point between the convex polyhedra obtained by decomposing each non-convex polyhedron. The closest approach point search method according to claim 16.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP20900894A JP3316092B2 (en) | 1993-09-14 | 1994-09-02 | Closest point search device |
| US08/710,550 US5675720A (en) | 1993-09-14 | 1996-09-19 | Method of searching for points of closest approach, and preprocessing method therefor |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP22879493 | 1993-09-14 | ||
| JP5-228794 | 1993-09-14 | ||
| JP20900894A JP3316092B2 (en) | 1993-09-14 | 1994-09-02 | Closest point search device |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002061723A Division JP3556644B2 (en) | 1993-09-14 | 2002-03-07 | Closest point search device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH07134735A true JPH07134735A (en) | 1995-05-23 |
| JP3316092B2 JP3316092B2 (en) | 2002-08-19 |
Family
ID=26517173
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP20900894A Expired - Fee Related JP3316092B2 (en) | 1993-09-14 | 1994-09-02 | Closest point search device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3316092B2 (en) |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09311883A (en) * | 1996-05-24 | 1997-12-02 | Fujitsu Ltd | Mechanical device design / manufacturing process support device |
| US5943056A (en) * | 1995-07-11 | 1999-08-24 | Fujitsu Ltd. | Interference checking method |
| US6157902A (en) * | 1997-03-13 | 2000-12-05 | Fujitsu Limited | Disassembly route producing apparatus, assembly route producing apparatus, and supporting system for mechanical system design |
| US6167142A (en) * | 1997-12-18 | 2000-12-26 | Fujitsu Limited | Object movement simulation apparatus |
| US6346941B1 (en) | 1998-03-19 | 2002-02-12 | Fujitsu Limited | Interference check result displaying method and interference check result displaying apparatus as well as computer-readable recording medium having interference check result displaying program recorded thereon |
| JP2003334777A (en) * | 2002-05-15 | 2003-11-25 | Yaskawa Electric Corp | Interference checking method of robot |
| JP2014521181A (en) * | 2011-07-15 | 2014-08-25 | サムスン ヘビー インダストリーズ カンパニー リミテッド | ROBOT TRAVEL RUNNING AREA CHECK METHOD, ROBOT AND RECORDING MEDIUM |
| CN104801044A (en) * | 2015-05-12 | 2015-07-29 | 深圳市腾讯计算机系统有限公司 | Method and device for generating trajectory vertex sequence |
| CN107735692A (en) * | 2015-06-01 | 2018-02-23 | 罗伯特·博世有限公司 | Method and apparatus for being positioned to vehicle |
| CN115268471A (en) * | 2022-09-27 | 2022-11-01 | 深圳市智绘科技有限公司 | Route generation method and device of sweeping robot and storage medium |
-
1994
- 1994-09-02 JP JP20900894A patent/JP3316092B2/en not_active Expired - Fee Related
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5943056A (en) * | 1995-07-11 | 1999-08-24 | Fujitsu Ltd. | Interference checking method |
| JPH09311883A (en) * | 1996-05-24 | 1997-12-02 | Fujitsu Ltd | Mechanical device design / manufacturing process support device |
| US6157902A (en) * | 1997-03-13 | 2000-12-05 | Fujitsu Limited | Disassembly route producing apparatus, assembly route producing apparatus, and supporting system for mechanical system design |
| US6167142A (en) * | 1997-12-18 | 2000-12-26 | Fujitsu Limited | Object movement simulation apparatus |
| US6346941B1 (en) | 1998-03-19 | 2002-02-12 | Fujitsu Limited | Interference check result displaying method and interference check result displaying apparatus as well as computer-readable recording medium having interference check result displaying program recorded thereon |
| JP2003334777A (en) * | 2002-05-15 | 2003-11-25 | Yaskawa Electric Corp | Interference checking method of robot |
| JP2014521181A (en) * | 2011-07-15 | 2014-08-25 | サムスン ヘビー インダストリーズ カンパニー リミテッド | ROBOT TRAVEL RUNNING AREA CHECK METHOD, ROBOT AND RECORDING MEDIUM |
| CN104801044A (en) * | 2015-05-12 | 2015-07-29 | 深圳市腾讯计算机系统有限公司 | Method and device for generating trajectory vertex sequence |
| CN104801044B (en) * | 2015-05-12 | 2017-12-12 | 深圳市腾讯计算机系统有限公司 | The method and apparatus for generating trajectory vertex sequence |
| CN107735692A (en) * | 2015-06-01 | 2018-02-23 | 罗伯特·博世有限公司 | Method and apparatus for being positioned to vehicle |
| JP2018523104A (en) * | 2015-06-01 | 2018-08-16 | ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh | Method and apparatus for locating a vehicle |
| US10698100B2 (en) | 2015-06-01 | 2020-06-30 | Robert Bosch Gmbh | Method and device for determining the position of a vehicle |
| CN115268471A (en) * | 2022-09-27 | 2022-11-01 | 深圳市智绘科技有限公司 | Route generation method and device of sweeping robot and storage medium |
| CN115268471B (en) * | 2022-09-27 | 2023-01-03 | 深圳市智绘科技有限公司 | Route generation method and device of sweeping robot and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3316092B2 (en) | 2002-08-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5675720A (en) | Method of searching for points of closest approach, and preprocessing method therefor | |
| Cetin et al. | Real-time autonomous UAV formation flight with collision and obstacle avoidance in unknown environment | |
| US5056031A (en) | Apparatus for detecting the collision of moving objects | |
| Samareh | Aerodynamic shape optimization based on free-form deformation | |
| EP1241628B1 (en) | Interference checking method | |
| Jaillet et al. | Asymptotically-optimal Path Planning on Manifolds. | |
| JP3316092B2 (en) | Closest point search device | |
| JPH11328233A (en) | Interference checking apparatus and method | |
| US20230418288A1 (en) | Path collision avoidance | |
| JP5269737B2 (en) | Interference check method, interference check device, and interference check program | |
| US5761391A (en) | Arithmetic unit for calculating distance between objects | |
| Sanders et al. | A method to produce minimal real time geometric representations of moving obstacles | |
| JP3556644B2 (en) | Closest point search device | |
| Andre et al. | Error robust and efficient assembly sequence planning with haptic rendering models for rigid and non-rigid assemblies | |
| Wang et al. | A partitioning-based approach for robot path planning problems | |
| Low et al. | An empirical evaluation of Q-learning in autonomous mobile robots in static and dynamic environments using simulation | |
| Edelkamp et al. | Surface inspection via hitting sets and multi-goal motion planning | |
| Panov et al. | Psychologically inspired planning method for smart relocation task | |
| JP3391657B2 (en) | Inter-object distance calculation device and inter-object distance calculation program storage medium | |
| Pisarenko et al. | Application of Recursive Algorithms for Optimization and Approximation of Workspace of Parallel Robots | |
| Hegewald et al. | Iterative Mesh Modification Planning: A new Method for Automatic Disassembly Planning of Complex Industrial Components | |
| Chembuly et al. | An Optimization-Based Approach for Redundancy Resolution of Spatial Robots in Realistic Working Environments | |
| Ng | Evaluation of euclidean shortest path, voronoi digram and line segement intersection using mass, spark, and mapreduce | |
| JPH0877210A (en) | Pretreatment method for interference check | |
| Fang et al. | Collision detection methodologies for rigid body assembly in a virtual environment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20020528 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090607 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100607 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110607 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120607 Year of fee payment: 10 |
|
| LAPS | Cancellation because of no payment of annual fees |