JP3316092B2 - Closest point search device - Google Patents
Closest point search deviceInfo
- Publication number
- JP3316092B2 JP3316092B2 JP20900894A JP20900894A JP3316092B2 JP 3316092 B2 JP3316092 B2 JP 3316092B2 JP 20900894 A JP20900894 A JP 20900894A JP 20900894 A JP20900894 A JP 20900894A JP 3316092 B2 JP3316092 B2 JP 3316092B2
- Authority
- JP
- Japan
- Prior art keywords
- convex
- point
- polygon
- 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.)
- Expired - Fee Related
Links
Landscapes
- Numerical Control (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明はロボットや自走車の運用
における衝突回避や経路走行設計(パスプランニング)
に適用できる最接近点探索装置に係わり、特にコンピュ
ータ上に構築された複数の物体の形状モデル(CGモデ
ル)に対してそれらが互いに離れているか、接触してい
るか、干渉しているかを判定でき、しかも、物体間の最
接近点、接触点、距離をリアルタイムに算出できる最接
近点探索装置に関する。本発明は、機械設計用CADシ
ステム、マニピュレータや自走車等の移動ロボットのパ
ス生成、マルチメディアにおけるアニメーション作成、
ゲームソフトウェア等コンピュータグラフィックスを応
用した様々な分野に適用できる。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to collision avoidance and path planning in the operation of robots and self-propelled vehicles (path planning).
The present invention relates to an apparatus for searching for the closest point which can be applied to a computer. In particular, it is possible to determine whether a plurality of shape models (CG models) of objects constructed on a computer are separated from each other, in contact with each other, or interfere with each other. Further, the present invention relates to an apparatus for searching for a closest approach point which can calculate a closest approach point, a contact point, and a distance between objects in real time. The present invention provides a CAD system for machine design, path generation for mobile robots such as manipulators and self-propelled vehicles, animation creation in multimedia,
It can be applied to various fields using computer graphics such as game software.
【0002】[0002]
【従来の技術】通常、ロボットはオペレータによる遠隔
操作、あるいは計算機上で作成したデータに基づくプロ
グラム操作により運用される。ロボットを遠隔操作する
場合には、オペレータはロボットを取り囲む他の物体と
の不意な衝突、干渉を避けながら運用しなければならな
い。又、ロボットをプログラム操作する場合には、予
め、計算機上にて障害物との衝突や干渉が生じないよう
にパスプランニングを行う必要がある。一方、自走車を
運用する場合、自走車は走行しようとする方向の環境地
図データをセンサを通して取り込み、障害物を回避しな
がら自律走行し、あるいは、予め計算機上に格納されて
いる地図情報に基づいて作成されたパスに従ってプログ
ラム走行する。これらの場合にも、ロボットの場合と同
じように逐次的な衝突回避や干渉の生じないパスプラン
ニングが必要となる。2. Description of the Related Art Normally, a robot is operated by a remote operation by an operator or a program operation based on data created on a computer. When remotely controlling the robot, the operator must operate the robot while avoiding unexpected collision or interference with other objects surrounding the robot. When a robot is operated by a program, it is necessary to perform path planning on a computer in advance so as not to cause collision or interference with an obstacle. On the other hand, when operating a self-propelled vehicle, the self-propelled vehicle fetches environmental map data in the direction in which the vehicle is going to travel through a sensor and autonomously runs while avoiding obstacles, or uses map information stored in advance on a computer. Program running according to the path created based on the. In these cases, it is necessary to perform sequential collision avoidance and path planning that does not cause interference as in the case of the robot.
【0003】物体間の最接近点及び距離を測定すること
ができれば、障害物を回避しながらロボットあるいは自
走車を移動することができ、あるいは衝突や干渉が生じ
ない走行経路をプログラムしてプログラム走行すること
ができる。このため、ロボット、自走車における逐次的
な衝突回避、事前のパスプランニングにおいて、物体間
の最接近点探索方法が要望されている。すなわち、複数
の物体が存在する時、それらが互いに離れているか、接
触しているか、干渉しているかを判定し、かつ、物体間
の最接近点(接触又は干渉している場合には、各々、接
触点または干渉点)及び距離を効率良く算出する最接近
点探索方法が要望されている。[0003] If the closest point and the distance between objects can be measured, a robot or a self-propelled vehicle can be moved while avoiding obstacles. You can run. For this reason, there is a demand for a method of searching for a point of closest approach between objects in sequential collision avoidance of robots and self-propelled vehicles and in advance path planning. That is, when there are a plurality of objects, it is determined whether they are separated from each other, in contact with each other, or interferes with each other, and the closest point between the objects (in the case of contact or interference, , A contact point or an interference point) and a closest approach point search method for efficiently calculating a distance.
【0004】最接近点探索問題に対する基本的なアプロ
ーチは、対象となる物体の形状、位置、姿勢データを計
算機上に取り込み、初等幾何学的計算により解決する方
法である。通常、CAD分野で使われているグラフィッ
クシミュレータでは、平面的な凸多角形(凸ポリゴン)
を複数枚貼付けて1つの物体を表現している。従って、
2つの物体間の干渉状態をチェックする最も素朴な方法
は、各々の物体を構成している凸ポリゴン間に対する最
接近点探索を全ての凸ポリゴンの組み合わせについて行
うものである。具体的には、空間上に任意に配置された
2つの物体を構成する各凸ポリゴンに対し、最も近接し
ているポイントを各格子点(頂点)、辺、面について探
索し、最接近距離を算出することである。勿論、最接近
距離がゼロの場合には、2つの物体は干渉状態にあると
いえる。この方法では、2つの物体を表現している格子
点数をM1,M2としたときに、O(M1・M2)の計算負荷
を伴う。尚、O( )は計算負荷のオーダを示す関数であ
る。The basic approach to the closest point search problem is a method in which shape, position, and orientation data of a target object is loaded on a computer and solved by elementary geometric calculation. Usually, a graphic simulator used in the CAD field uses a planar convex polygon (convex polygon).
Are attached to represent one object. Therefore,
The simplest method for checking the interference state between two objects is to search for the closest approach point between the convex polygons constituting each object for all the combinations of the convex polygons. Specifically, for each convex polygon constituting two objects arbitrarily arranged in space, the closest point is searched for each grid point (vertex), side, and surface, and the closest approach distance is determined. It is to calculate. Of course, when the closest approach distance is zero, it can be said that the two objects are in an interference state. In this 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) . O () is a function indicating the order of the calculation load.
【0005】O(M1・M2)の計算負荷を減らすためのアル
ゴリズムの開発が、主に、計算幾何学の分野において研
究されており、O(MlogM)(M=M1+M2)という漸近特性
(M1,M2が非常に大きい場合)を持ったアルゴリズム
が開発されている。この種のアルゴリズムは理論的に正
しいが、いずれも漸近特性に注目したものであり、
M1,M2が実用的な大きさの場合にどれだけ計算負荷が
減るかといった実際的な議論が欠けており、真に実用的
なアルゴリズムとはいえなかった。一方、歴史的には、
各格子点間の垂直2等分線を結んで各格子点の近接関係
を図示するボロノイ(Voronoi)図を使った方法や、三次
元空間を象限毎に次々に八等分して対象の専有領域をデ
ータベース化するオクトツリー(oct-tree)の方法によ
る最接近点の探索法も知られている。これらの方法はい
ずれも対象が静的に一定である場合に有効であり、分解
や組み立てなどにより対象が動的に次々と変化していく
場合には不向きであった。The development of algorithms for reducing the computational load of O (M 1 · M 2 ) has been studied mainly in the field of computational geometry, and O (MlogM) (M = M 1 + M 2 ) An algorithm having such an asymptotic characteristic (when M 1 and M 2 are very large) has been developed. Although this type of algorithm is theoretically correct, both focus on asymptotic properties,
There is no practical discussion on how much the computational load is reduced when M 1 and M 2 are of a practical size, and it cannot be said that it is a truly practical algorithm. On the other hand, historically,
A method using a Voronoi diagram that connects the perpendicular bisectors between the grid points to show the proximity of each grid point, or occupies the object by dividing the three-dimensional space into eight quadrants one after another A method of searching for the closest approach point using an oct-tree method for converting an area into a database is also known. Each of these methods is effective when the object is statically constant, and is not suitable when the object dynamically changes one after another due to disassembly or assembly.
【0006】さて、最接近点探索アルゴリズムの実用度
を上げるためには、次の1)〜5)に示す要件をカバーする
必要がある。 1) 非凸多面体への拡張 計算幾何学などで従来開発されてきた最接近点探索アル
ゴリズムでは、取り扱う対象を凸多面体に限っている
(図69(a)参照)。しかし、実際には、図69(b)に示
すように非凸多面体との干渉問題が多数発生する。この
ため、最接近点探索アルゴリズムを非凸多面体まで拡張
する必要がある。尚、凸多面体(convex polyhedron)と
は多面体内部の任意の2点を結ぶ線分がその多面体の内
部に含まれるような多面体である。Now, in order to improve the practicality of the closest point search algorithm, it is necessary to cover the following requirements 1) to 5). 1) Extension to non-convex polyhedron In the closest point search algorithm that has been conventionally developed for computational geometry, etc., the object to be handled is limited to a convex polyhedron (see FIG. 69 (a)). However, in practice, many interference problems with the non-convex polyhedron occur as shown in FIG. Therefore, it is necessary to extend the closest point search algorithm to a non-convex polyhedron. The convex polyhedron is a polyhedron in which a line connecting any two points inside the polyhedron is included in the polyhedron.
【0007】2) 非単連結多面体への拡張 トラス(truss)の組み立てや配管工事などでは穴が開い
た物体との干渉性を考慮する必要がある。図69(c)は
トラスの組み立てを示すもので、TRはトラス、RBH
はロボットハンドである。 3) 一般自由曲面を持った物体への拡張 一般自由曲面を持った物体は、グラフィックシミュレー
タ上では複数のポリゴンの張り合わせで表現される。図
69(d)は自由曲面を有するアンテナの組み立てを示す
もので、ATはアンテナ、RBHはロボットハンドであ
る。一般自由曲面を持った物体との干渉問題を扱うに
は、ポリゴン数を増やして近似の精度を上げるか、また
は曲面をスプライン曲面などで解析的に表現して取り扱
う必要がある。2) Extension to non-single connected polyhedron When assembling a truss or plumbing, it is necessary to consider the interference with a perforated object. FIG. 69 (c) shows the assembly of the truss, where TR is the truss and RBH.
Is a robot hand. 3) Extension to an object with a general free-form surface An object with a general free-form surface is represented by a combination of multiple polygons on a graphic simulator. FIG. 69 (d) shows the assembly of an antenna having a free-form surface, where AT is an antenna and RBH is a robot hand. In order to deal with the problem of interference with an object having a general free-form surface, it is necessary to increase the number of polygons to increase the approximation accuracy, or to treat the curved surface analytically using a spline surface or the like.
【0008】4) 環境変動への対応性 干渉問題で取り扱う対象物は、いつも静止しているとは
限らず、一般には分解、運搬、組み立てなどの作業を通
して環境が動的に変動していく。凸多面体を組み合わせ
て非凸の構造物を組み上げていくといったことは、しば
しば発生することである。又、アームの各リングを凸多
面体で表現した時、アーム自身は動的に動く凸多面体の
集合体(一般には非凸物体)とみなすことができる。こ
の時、図70(a)に示すようにアームAM先端のロボッ
トハンドRBHで対象物体OBJを把持しようとする場
合には、ハンドと対象物体との干渉だけでなくアーム肘
と他の物体OBSとの干渉も考慮しなければならない。
実用的なアルゴリズムはこのような動的な環境変動に柔
軟、迅速に対応できるものでなければならない。[0010] 4) Responsiveness to environmental fluctuation The object handled in the interference problem is not always stationary, and generally the environment dynamically fluctuates through operations such as disassembly, transportation, and assembly. Combining convex polyhedrons to assemble a non-convex structure often occurs. Further, when each ring of the arm is represented by a convex polyhedron, the arm itself can be regarded as an aggregate of dynamically moving convex polyhedrons (generally a non-convex object). At this time, when trying to grasp the target object OBJ with the robot hand RBH at the tip of the arm AM as shown in FIG. 70 (a), not only the interference between the hand and the target object but also the arm elbow and the other object OBS Interference must also be considered.
Practical algorithms must be able to respond flexibly and quickly to such dynamic environmental changes.
【0009】5) 形状変化への対応 対象物体が柔軟性を有する場合などでは、物体自身の形
状が動的に変化する(図70(b)参照)。これは4) の環
境変動の一種とも捉えることができるが、取扱は形状変
化の方が難しい。このため、Michigan大学のGilbert教
授は凸多面体間の最接近点探索問題に対する極めて実用
的な方法(Gilbert法という)を提案している。このGilbe
rt法によれば、アルゴリズムの計算負荷は、非常に病的
な例外を除いてほとんどの凸多面体の組合せに対してO
(M1+M2)となる。又、非凸多面体を複数の凸ポリゴンの
集合とみなすことによりGilbert法を非凸多面体へ拡張
している。以下、Gilbert法について詳述する。5) Response to Shape Change When the target object has flexibility, the shape of the object itself dynamically changes (see FIG. 70 (b)). This can be regarded as a kind of environmental change in 4), but handling is more difficult with shape change. For this reason, Professor Gilbert of Michigan University has proposed an extremely practical method (called the Gilbert method) for the search for the point of closest approach between convex polyhedrons. This Gilbe
According to the rt method, the computational load of the algorithm is O.sub.0 for most convex polyhedral combinations with very pathological exceptions.
(M 1 + M 2 ). The Gilbert method is extended to a non-convex polyhedron by considering the non-convex polyhedron as a set of a plurality of convex polygons. Hereinafter, the Gilbert method will be described in detail.
【0010】Gilbert法による凸多面体間の最接近点探
索アルゴリズム (a) 物体の表現法と物体間の距離 三次元空間上の凸多面体Xを考える。この時、X内の任
意の点xは、Xの境界に位置する格子点(頂点)xi∈
Xを使って以下のように表現できる。 x=Σλi・xi (i=1〜m) :xi∈X,λi≧0 λ1+λ2+・・・+λm=1 (1) 上式を格子点の集合{xi:i=1、2、・・・m}で張
られる凸多面体の定義としてもよい。{xi}のことを凸
多面体Xのベースという。今、2つの凸多面体K1,K2
を考える。この時、2物体間の最接近距離は以下で定義
される。[0010] Finding the closest point between convex polyhedrons using the Gilbert method
Search algorithm (a) Object representation method and distance between objects Consider a convex polyhedron X in a three-dimensional space. At this time, an arbitrary point x in X is a lattice point (vertex) xi∈ located at the boundary of X.
It can be expressed as follows using X. x = Σλi · xi (i = 1 to m): xi∈X, λi ≧ 0 λ 1 + λ 2 +... + λm = 1 (1) The above equation is expressed as a set of lattice points {xi: i = 1,2, .. May be defined as a convex polyhedron spanned by m}. {xi} is called the base of the convex polyhedron X. Now, two convex polyhedrons K 1 and K 2
think of. At this time, the closest approach distance between the two objects is defined as follows.
【0011】 d(K1,K2)=min{|x−y|:x∈K1,y∈K2) (2) ここで、x,yは位置ベクトルであり、 |x−y|=√{(x1−y1)2+(x2−y2)2+(x3−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 {| xy−: x∈K 1 , y∈K 2 ) (2) where x and y are position vectors, and | xy− = {(X 1 −y 1 ) 2 + (x 2 −y 2 ) 2 + (x 3 −y 3 )} 2 . Therefore, the problem of finding the point of closest approach between two convex polyhedrons is to find x and y that satisfy equation (2) by the following equations. x = {λi · xi (i = 1 to m 1 ): xi∈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) When simply considered, in equation (3), since both λ and μ are variables, 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は以下で与えられる。The union and difference sets of arbitrary objects K 1 and K 2 are represented by K
1 ± K 2 = {x ± y: x∈K 1, y∈K 2} when 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. 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. Object. Equation (4) shows that the search for the closest approach point
This is equivalent to the problem of finding the closest point to the polyhedron K from. When both the polyhedrons K 1 and K 2 are convex polyhedrons, the polyhedron K is also a convex polyhedron, and a set Z of lattice points constituting the convex polyhedron K is given below.
【0013】 Z={zi=xj−yk:xj∈K1,yk∈K2, i=1,2,・・・m1m2 j=1,2,・・・m1 k=1,2,・・・m2} (5) 以上をまとめると、以下の結論が導出される。すなわ
ち、「2つの凸多面体K1,K2間の最接近点を求める問
題は、座標原点Oから凸多面体K(=K1−K2)への最
接近点を求める問題に等しい。但し、Kはm1m2個(m1:
K1の格子点数、m 2:K2の格子点数)の格子点{zi=
xj−yk}で張られた凸多面体である。」Z = {zi = xj−yk: xj∈K1, Yk∈KTwo, I = 1,2, ... m1mTwo j = 1,2, ... m1 k = 1,2, ... mTwo} (5) Summarizing the above, the following conclusions are drawn. Sand
Chi, "Two convex polyhedrons K1, KTwoFor finding the closest point between
The title is a convex polyhedron K (= K1-KTwoThe best to
Equivalent to the problem of finding the approach point. Where K is m1mTwoPieces (m1:
K1Grid points of m Two: KTwoLattice points {zi =
xj-yk} is a convex polyhedron. "
【0014】(b) Gilbert法の概略 (a)における結論より、2つの凸多面体K1,K2間の最
接近点を求める問題は、一点Oから凸多面体Kへの最接
近点を求める問題に帰着される。Gilbert法では、この
事実と次に述べるサポート関数(Support Function)と呼
ばれる関数を使用する。凸多面体のサポート関数hx
(η):R3→Rとは以下で定義されるものである。 hx(η)=max{xi・η:i=1〜m} (6) ここで、{xi}は凸多面体Xのベースとなる格子点の
集合であり、・はベクトル内積を意味しており、又、R
3→Rは3次元より1次元への変換を意味している。従
って、(6)式のサポート関数hx(η)は、図71に示すよ
うにベクトルηを決めた時、その方向に対して原点から
最も離れた凸多面体Xの格子点を求めることを意味して
いる。今、座標原点Oからこの格子点に向かうベクトル
(位置ベクトル)を sx(η)とすると(6)式は以下の
ようになる。(B) Outline of Gilbert's Method From the conclusion in (a), the problem of finding the closest point between two convex polyhedrons K 1 and K 2 is the problem of finding the closest point from one point O to convex polyhedron K. Is returned to The Gilbert method uses this fact and a function called a support function described below. Support function hx for convex polyhedron
(η): R 3 → R is defined as follows. hx (η) = max {xi · η: i = 1 to m} (6) where {xi} is a set of lattice points serving as a base of the convex polyhedron X, and denotes a vector inner product. , And R
3 → R means conversion from three dimensions to one dimension. Therefore, the support function hx (η) in equation (6) means that, when the vector η is determined as shown in FIG. 71, the lattice point of the convex polyhedron X farthest from the origin in that direction is determined. ing. Now, assuming that a vector (position vector) from the coordinate origin O to this grid point is sx (η), the 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 of the closest approach point search by the Gilbert method is O (M 1 + M 2 ).
Becomes The reason is based on the fact that the following rule is satisfied for the support function hk (η) and the position vector sk (η) of the difference set K of the convex polyhedrons K 1 and K 2 . hk (η) = hk 1 ( η) + hk 2 (-η), sk (η) = sk 1 (η) -sk 2 (-η) (8) above equation, the m 1 m 2 grid points Convex polyhedron K = K 1 −K 2
Mean that the support function for is composed of the sum of the support functions for the convex polyhedrons 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 closest point search by the Gilbert method is that the support function hx (η) is repeatedly used to gradually approach the closest point. That is, the Gilbert method includes 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) Algorithm for searching for the closest point by the Gilbert method 1) Initialization For the convex polyhedrons K 1 and K 2 , let K be the difference convex polyhedron K 1 -K 2 . Take arbitrary points in the convex polyhedron K and denote them as y 1 , y 2
... Yp と す る K. Incidentally, y 1 , y 2, ... Yp do not necessarily have to be base lattice points of the convex polyhedron K. p is generally 1 ≦ p ≦ 4. At this time, a set V of initial lattice 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) Search for the closest point to the basic polyhedron With respect to a set Vk of lattice points consisting of the number of elements p (four or less), ν k = ν (coV 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 a vector (position vector) of the point of closest approach 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) Determination of closest approach point A function g K (x) for 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 a given point on the convex polyhedron K, where x is the position vector of the point. The second term on the right side means an inner product of the lattice point position vector closest to the origin in the vector x direction and the vector -x. In other words, h K (−x) is the minimum value of the inner product of the position vector of the grid point and x. g K (x)
Is the determination function of the closest approach point. If x is the closest approach point from the origin O to K, then g K (x) = 0 only at that time. Note that g K (x) can be proved to be a function of determining the closest approach point, but is omitted. See “IEEE JOUNAL OF ROBOT” for details.
ICS ANDAUTOMATION, VOL.4, NO.2, APRIL 1988, p.193
~ 203 `` A Fast Procedure for Computing the Distance
Between Complex Objects in Three-Dimensional Spac
Please refer to “e”. From the above, if ν k obtained by equation (9)
On the other hand, if g K (ν k ) = 0 (10), ν (K) = ν k , and the closest approach point search process 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 equation (10) does not hold, k is incremented. That is, V (k + 1) is set to V (k + 1) = V k ′ ∪ {s K (−ν k )} (11). Here, 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) does not hold, k is incremented by the expression (11), the process returns to the step 2), and the subsequent processing is repeated until the expression (10) holds.
【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 closest point search algorithm by Gilbert method, the closest point search will be described with reference to FIG. In FIG. 72, the initial value V 0 = {z 1 , z 2 , z 3 }
And then, the [nu 0 when obtaining the point of closest approach vector in V 0. At this time, since the expression (10) is not satisfied, k is incremented. V 1 = V 0 is' ∪ {s k (-ν 0 )} = V 0 '∪ {z 4}, also, V 0' = {z 2 , z 3} from the V 1 = {z
2, z 3, a z 4}. When the closest approach point vector at V 1 is obtained, ν 1 is obtained. 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}となる。V 2 = V 1 ′ {s k (−ν 1 )} = V 1 ′ {z 5 }, and V 1 ′ = {z 3 , z 4 }, so that V 2 = {Z
3, z 4, the z 5}. When the closest approach point vector in V 1 is obtained, it becomes ν 2 , and this ν 2 satisfies the expression (10),
ν 2 becomes the closest approach point vector, and ν 2 = ν (K) ∈co {z 4 , z 5 }. As a result, the closest approach distance d is d = | ν 2 |. Let's do the same with different initial values. In FIG. 72, when the initial value V 0 = {z 2 } and the closest point vector at V 0 is determined, ν 0 ′ (= z 2 ). At this time, (1
Since equation (0) is not satisfied, k is incremented. 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} とした場合と同じ結果が得られる。When the closest point vector at V 1 is obtained, it becomes ν 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 that V 2 = {z
2, z 4, the z 5}. Determining points of closest approach vector in V 2 When ν 2 '(= ν 2), and this [nu 2' (10)
The equation is satisfied, and ν 2 becomes the closest point vector, and ν 2 ′ = ν 2 = ν (K) ∈co {z 4 , z 5 }. As a result, the closest approach distance d is 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) Discussion In the above algorithm, the computations required are (9) and (1)
0) and (11). First, equation (9) means that this means that the closest point from one point O to a point, a side, a plane, or a tetrahedron is calculated. This part is not related to the complexity of the convex polyhedron, and can be executed by preparing a subroutine as described later in advance. Next, the calculation of equation (10), g K (ν k )
In calculating h K (−ν k ), the decomposition rule of equation (8) is used. This part is calculated only by evaluating the inner product of the convex polyhedrons K 1 and K 2 with respect to the base lattice point (the inner product of the position vector of the base lattice point and ν k ), as shown in equation (6). That is, h K (−ν k ) is to find the minimum of the inner product between 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) indicates that s in the process of calculating g K (ν k )
K (−ν k ) is obtained, and V k ′ is automatically obtained from the lemma algorithm described later. Therefore, the calculation load of this part is M 1 ,
Negligible constant that does not depend on M 2 (negligible constan
t). The advantage of Gilbert's method is that it can reach the point of closest approach by repeating the above four processes 1) to 4) several times for almost all convex polyhedrons. In many cases, it has been confirmed by numerical experiments that the convergence is achieved by repeating 3 to 4 times. From the above, the essence of the closest point search method by the Gilbert method can be summarized as follows in a word. That is, the point of closest approach between the two convex polyhedrons K 1 and K 2 is the judgment 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). The number of repetitions converges to 3 to 4 for most convex polyhedrons.
【0025】なお、Gilbert法の初期格子点(初期値)
V0は一般には任意であるが、以下に示すような各凸多
面体の重心差分方向の格子点から出発するのが効率的で
ある。 v0={sK(−zc1+zc2)} (12) ここで、zc1,zc2は、それぞれ zc1=Σ(xi/M1) (i=1〜M1) xi:凸多面
体K1のベース格子点 zc2=Σ(yi/M2) (i=1〜M2) yi:凸多面
体K2のベース格子点 である。The initial lattice point (initial value) of the Gilbert method
Although V 0 is generally arbitrary, it is efficient to start from a lattice point in the gravity center difference direction 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 lattice point of K 1 z c2 = Σ (yi / M 2 ) (i = 1 to M 2 ) yi: Base lattice 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) The lemma of the Gilbert method In step 2) of the Gilbert method, the point of closest approach from one point (origin O) to a convex polyhedron (point, side, surface, tetrahedron) spanning four or less grid points An algorithm for finding a vector was needed. The lemma described below also holds for a convex polyhedron spanned by five or more grid points, but is particularly efficient when the number of grid points is small. 1) Lemma 1 For a set of lattice points Y = {y 1 , y 2 ,... Ym 3R 3
An arbitrary subset of Y is represented by Ys = {y i : i∈Is⊆ {1,2,2
.. M, the complement of Is is Is'. At this time, the sequence Δ i (Ys) is created based on the following rule. Δ 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, there is a subset of Y satisfying the following property, Ys. (1) For each i where i) Is, Δ i (Ys)> 0
(I∈Is) (2) For each j for which 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 set of lattice points Y = {y 1 , y 2 ,... Ym} ∈R 3 ,
When the convex polyhedron spanned by Y is coY and the closest point vector from the origin O to coY is ν (coY), ν (coY)
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 = {yi: i∈Is} Δ (Ys) = ΣΔ i (Ys) (i∈Is) detailed proof of the lemma is omitted here, The meaning of the lemma is easy to understand. Let's apply the above lemma to a tetrahedron. As shown in FIGS. 73 (a) to 73 (d), the closest approach vector between the one point O and the tetrahedron is represented by each lattice point, side,
It may be in a plane or inside a tetrahedron. Therefore, if the subset Ys of Y consists of one point,
The case of two points corresponds to the case where the closest point exists on the side, and the case of three points corresponds to the case where the closest approach point exists on the surface. The case of four points corresponds to the case where the origin O exists inside the tetrahedron. .
【0028】補題1、2を実際に実行する場合には、以
下のアルゴリズムに従う。 (g) Gilbert法の補題アルゴリズム 格子点集合Y={y1,y2,・・・ym}∈R3に対し、
Yの部分集合をYs={yi:i∈Is⊆{1,2,・・・
m}}、Isの補集合をIs′とする。又、s=1、2、
・・・σとすることによりYの全ての部分集合が指示さ
れるものとする。この時、Gilbert法のアルゴリズ2) は
以下のようになる。When Lemma 1 and 2 are actually executed, the following algorithm is used. (g) The lemma algorithm of the Gilbert method For a set of lattice points Y = {y 1 , y 2 ,... ym} ∈R 3 ,
The subset of Y is represented by Ys = {y i : i∈Is⊆ {1,2,.
Let m 'and the complement of Is be Is'. Also, s = 1, 2,
.. Σ indicate all subsets of Y. At this time, the algorithm 2) of the Gilbert method is as follows.
【0029】2)1 1→s 2)2 もし、i∈Isの各々のiに対して Δi(Ys)>0 (i∈Is) であり、かつ、j∈Isの各々のjに対して Δj(Ys∪{yj})≦0 (j∈Is) ならば、 λi=Δi(Ys)/Δ(Ys),Ys={yi:i∈Is} Δ(Ys)=ΣΔi(Ys) (i∈Is) ν(co Y)=Σλiyi (i∈Is) (12)′ としてストップし、以後Gilbert法のアルゴリズ3)を実
行する。 2)3 しかし、2)2の条件が成立しなければ、sをインク
リメントしてステップ2)2を実行する。すなわち、2)2の
条件が成立する迄2) 2,2) 3 のステップを繰返し、2)2
の条件が成立した時、ν(co Y)を計算して以後Gilber
t法のアルゴリズ3)を実行する。[0029] 2) 1 1 → s 2) 2 If a delta i for each i of i∈Is (Ys)> 0 (i∈Is ), and, for each j for j∈Is If Te Δ j (Ys∪ {y j} ) ≦ 0 (j∈Is), λ i = Δ i (Ys) / Δ (Ys), Ys = {y i: i∈Is} Δ (Ys) = Stop as iΔ i (Ys) (i∈Is) ν (co Y) = Σλ i y i (i∈Is) (12) ′, and thereafter execute algorithm 3) of the Gilbert method. 2) 3 However, if the condition of 2) 2 is not satisfied, s is incremented and step 2) 2 is executed. That is, 2) 2 until second condition is satisfied) Repeat steps 2, 2) 3, 2) 2
Is satisfied, ν (co Y) is calculated, and then Gilber
Execute algorithm 3) of t method.
【0030】(i) 数値試験 Gilbert法による最接近点探索アルゴリズムは、次の入
出力を持つサブルーチンにまとめることができる。 入力:2凸多面体の各格子点の座標値 出力:最接近点の座標値、最接近距離 図74はGilbert法をフォルトランで実行し、各種凸多
面体に適用した場合の数値試験例であり、星印は2物体
が接近している場合(フリー)、白丸は2物体が接触し
ている場合、四角黒印は2物体が干渉している場合であ
る。尚、使用した計算機はHarris 800で、VAX 780より
少々速く現在のパソコン程度の性能である。(I) Numerical test The closest point search algorithm by the Gilbert method can be summarized into a subroutine having the following inputs and outputs. Input: Coordinate values of each grid point of the biconvex polyhedron Output: Coordinate values of the closest approach point, closest approach distance FIG. 74 is a numerical test example when the Gilbert method is executed in Fortran and applied to various convex polyhedrons. An asterisk indicates a case where two objects are approaching (free), an open circle indicates a case where the two objects are in contact, and a square black mark indicates a case where the two objects are interfering. The computer used is a Harris 800, which is a bit faster than the VAX 780 and has the performance of a current personal computer.
【0031】図74の横軸に示されているMは格子点
数、縦軸に示されているEFは次式で定義される量であ
る。 EF=(tMNM+tANA+tDND+tCNC)/(tM+tA) (13) ここで、NMは積算回数、NAは加算回数、NDは除算回数、
NCは比較演算回数であり、tM,tA,tD,tCは各々に要す
る計算時間であり、Harris 800の場合には、tM=3.8μ
s,tA=2.1μs,tD=6.7μs,tC=1.7μsである。EF
の値は、計算機によって大きく変動することはなくマシ
ーンインデペンデントな指標として使うことができる。
Harris 800の場合には、EFに6/106を掛けた値がCP
Uスケールに相当する。Sparcチップ(CPUのチップ)
を使ったワークステーションの場合には更に一桁以上の
高速性を期待できる。M shown on the horizontal axis of FIG. 74 is the number of grid points, and EF shown on the vertical axis is an 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 integrations, N A is the number of additions, N D is the division number ,
N C is the number of comparison operations, t M , t A , t D , and t C are the calculation time required for each. For Harris 800, t M = 3.8 μm
s, t A = 2.1 μs, t D = 6.7 μs, and t C = 1.7 μs. EF
Can be used as a machine-independent index without greatly fluctuating depending on the computer.
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, a speed of one digit or more can be expected.
【0032】(j) 結論 1) 以上からGilbert法による最接近点探索は、2つの凸
多面体の格子点の総数をMとした時、干渉している場
合、接触している場合、フリーの場合それぞれにおい
て、ほぼMに比例した計算負荷を有し、比例定数はEF
/Mの値で見て14〜19の値に収まる。 2) Gilbert法を1M Flops程度のワークステーション上
で2つの凸多面体に適用する場合、格子点の総数が20
0程度でも数msで最接近点の算出が可能である。(J) Conclusion 1) From the above, the search for the closest approach point by the Gilbert method is performed when the total number of lattice points of two convex polyhedrons is M, when there is interference, when there is contact, and when free. Each has a computational load approximately proportional to M, and the proportionality constant is EF
The value falls within the range of 14 to 19 in terms of the value of / M. 2) When applying the Gilbert method to two convex polyhedrons on a workstation of about 1M Flops, the total number of grid points is 20
Even at about 0, the closest approach point can be calculated in a few ms.
【0033】[0033]
【発明が解決しようとする課題】以上より、Gilbert法
によれば、2物体間の最接近点探索を短時間で効率良く
実行できる効果がある。しかし、Gilbert法には以下の
ような限界ないしは制約条件が存在する。 1) Gilbert法の限界:連続探索問題への対応 2つの凸多面体間の最接近点を連続的に追い掛ける場合
を考察する。このように2つの凸多面体間の最接近点を
連続的に追い掛ける問題を連続探索問題という。物体の
移動に伴い、最接近点は各々の凸多面体において、面か
ら辺、辺から頂点、頂点から面へと渡り歩くように遷移
していく。従って、ある時点で最接近点が求まった場
合、次の時点における最接近点は前の最接近点の近傍に
存在するはずである。換言すれば、最接近点の探索は局
所的な問題であり、凸多面体全領域の複雑度とは無関係
のはずである。As described above, according to the Gilbert method, there is an effect that the closest point search between two objects can be efficiently executed in a short time. However, the Gilbert method has the following limitations or constraints. 1) Limit of Gilbert's method: Support for continuous search problem Consider the case where the closest point between two convex polyhedrons is continuously chased. The problem of continuously following the point of closest approach between two convex polyhedrons is called a continuous search problem. With the movement of the object, the point of closest approach transitions in each convex polyhedron so as to walk from the surface to the side, from the side to the vertex, and from the vertex to the surface. Therefore, if the closest point is obtained at a certain point in time, the closest point at the next point in time should be near the previous closest point. In other words, the search for the point of closest approach is a local problem and should be independent of the complexity of the entire convex polyhedron.
【0034】しかし、Gilbert法では、連続探索問題に
おいて全格子点を考慮した最接近探索処理を行うため、
凸多面体の全格子点数M1,M2に依存したO(M1+M2)
の計算負荷が最接近点探索の都度必要となる問題があ
る。又、計算負荷が大きいため、ロボット、自走車が高
速で移動する場合には最接近点探索処理が間にあわなく
なる問題がある。However, in the Gilbert method, in the continuous search problem, the closest approach search processing considering all grid points is performed.
O (M 1 + M 2 ) depending on the total number of grid points M 1 and M 2 of the convex polyhedron
There is a problem that the calculation load of is required every time the closest approach point is searched. In addition, since the calculation load is large, there is a problem that the closest approach point search process cannot be completed when the robot or the self-propelled vehicle moves at high speed.
【0035】 2) Gilbert法の制約条件:非凸多面体への対応 Gilbert法は凸多面体間の最接近点を探索するアルゴリ
ズムである。このため、実用度を上げるために、非凸多
面体、非単連結多面体、自由曲面を持った物体への拡張
が必要である。Gilbert法により非凸多面体間の最接近
点探索を行う場合には、図75に示すように、各非凸多
面体K1,K2を複数の凸多面体A,B;a,b,cに
分割し、全ての凸多面体の組み合わせについて最接近点
探索アルゴリズムを適用し、得られた最接近距離のうち
最も短いものを選択する。しかし、かかる方法では組み
合わせの数が多くなり、計算負荷が大きくなる問題があ
る。以上から本発明の目的は、物体間の連続探索問題を
少ない計算負荷で高速に実行できる最接近点探索装置を
提供することである。 2) Constraints of Gilbert's Method: Correspondence to Nonconvex Polyhedron Gilbert's method is an algorithm for searching for the closest point between convex polyhedrons. For this reason, in order to increase the practicality, it is necessary to extend the object to a non-convex polyhedron, a non-single connected polyhedron, and an object having a free-form surface. When the closest point search between non-convex polyhedrons is performed by the Gilbert method, as shown in FIG. 75, each non-convex polyhedron K1, K2 is divided into a plurality of convex polyhedrons A, B; a, b, c, The closest point search algorithm is applied to all combinations of convex polyhedrons, and the shortest one among the obtained closest distances is selected. However, this method has a problem that the number of combinations increases and the calculation load increases. In view of the above, an object of the present invention is to provide an apparatus for searching for a closest approach point which can execute a continuous search problem between objects at high speed with a small calculation load.
To provide.
【0036】[0036]
【課題を解決するための手段】図1は本発明の原理説明
図である。図1において、12は対象となる2つの凸多
面体を特定する凸多面体データを記憶する記憶部、13
は凸多面体データを用いて有向グラフで凸多面体を定義
する有向グラフデータ作成部、14は有向グラフ型構造
データを記憶する記憶部、15はGilbert法に基づいて
2物体間の最接近点探索処理を行なう最接近点探索処理
部である。FIG. 1 is a diagram illustrating the principle of the present invention. In FIG. 1 , reference numeral 12 denotes a storage unit that stores convex polyhedron data for specifying two target convex polyhedrons;
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 type structure data, and 15 is a unit that performs a closest point search process between two objects based on the Gilbert method. It is an approaching 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の最接近点を求
める。In the first method of searching for the closest point, when searching for the closest point of the two convex polyhedrons 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 ,
To create a directed graph structure data to represent the K 2. The directed graph type structure data includes, under each surface polygon (polygon) of the convex polyhedron, grid points which are elements of the polygon,
Sides are arranged, and grid points and polygons forming the sides are arranged below the sides. Next, the closest approach point search processing unit (processor) 15 executes the closest approach point search process. That is, a point of closest approach to a shape formed by a subset of p points on the difference convex polyhedron, which is a difference set (K 1 −K 2 ) of two convex polyhedrons K 1 and K 2 , is obtained. The inner product 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 closest point is determined as the difference convex polyhedron (K 1 − K 2)
It is determined whether or not they match the closest approach point. If they do not match, the subset is changed. Finally, the closest approach point from the origin to the difference convex polyhedron is obtained, and the closest approach of each convex polyhedron K 1 , K 2 is performed. Find points.
【0038】かかる内積評価において、最接近点探索処
理部15は部分集合で形成される形状の最接近点に対応
する各凸多面体の最接近点が格子点上に存在するか、辺
上に存在するか、ポリゴン上に存在するか判断する。各
凸多面体の最接近点が、1)格子点上に存在する場合には
有向グラフ型構造データより該格子点を構成するポリゴ
ンを求め、該ポリゴンの格子点を前記内積評価に用い、
2) 辺上に存在する場合には有向グラフ型構造データよ
り該辺を構成するポリゴンを求め、該ポリゴンの格子点
を前記内積評価に用い、3)ポリゴン上に存在する場合に
は該ポリゴンの格子点を前記内積評価に用いる。このよ
うすれば、内積評価に適用する格子点数を減少すること
ができ、内積評価を全格子点に適用する従来例に比べ計
算負荷を減少することができる。In the inner product evaluation, the closest point search processing unit 15 determines whether the closest point of each convex polyhedron corresponding to the closest point of the shape formed by the subset exists on the lattice point or on the side. Or exist on the polygon. The point of closest approach of each convex polyhedron is 1) When a grid point is present, a polygon constituting the grid point is obtained from the directed graph type structure data, and the grid point of the polygon is used for the inner product evaluation,
2) If it exists on an edge, a polygon constituting the edge is obtained from the directed graph type structure data, and the grid points of the polygon are used for the inner product evaluation. The 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 grid points.
【0039】第2の最接近点探索方法 凸多面体を構成する表面多角形(ポリゴン)を三角形に
分割し、三角形ポリゴンの下方に該三角形ポリゴンの要
素である格子点、辺を配列し、格子点、辺の下方にそれ
ぞれ格子点、辺を構成する三角形ポリゴンを配列してな
る有向グラフ型構造データを作成して各凸多面体を表現
する。最接近点探索処理部15は部分集合で形成される
形状の最接近点に対応する各凸多面体の最接近点が格子
点上に存在するか、辺上に存在するか、三角形ポリゴン
上に存在するか判断する。各凸多面体の最接近点が、1)
格子点上に存在する場合には有向グラフ型構造データ
より該格子点を構成する三角形ポリゴンを求め、該三角
形ポリゴンの格子点を内積評価に用い、2) 辺上に存在
する場合には有向グラフ型構造データより該辺を構成す
る三角形ポリゴンを求め、該三角形ポリゴンの格子点を
内積評価に用い、3)三角形ポリゴン上に存在する場合に
は該三角形ポリゴンの格子点を内積評価に用いる。この
ようにすれば、三角形を構成する格子点数は最小(3
個)であるため、内積評価に適用する格子点数を第1の
最接近点探索方法に比べて更に減少することができ、計
算負荷を減少することができる。 Second Method of Searching for the Nearest Approach Point A surface polygon (polygon) constituting the convex polyhedron is divided into triangles, and lattice points and sides, which are elements of the triangle polygon, are arranged below the triangle polygon. , And creates a directed graph type structure data in which grid points and triangular polygons constituting the side are arranged below the side, and expresses each convex polyhedron. The closest point search processing unit 15 determines whether the closest point of each convex polyhedron corresponding to the closest point of the shape formed by the subset exists on a lattice point, on a side, or on a triangular polygon. Judge whether to do. The point of closest approach of each convex polyhedron is 1)
If it exists on a grid point, a triangular polygon constituting the grid point is obtained from the directed graph type structure data, and the grid point of the triangular polygon is used for inner product evaluation. 2) If it exists on a side, a directed graph type structure A triangular polygon constituting the side is obtained from the data, and the grid points of the triangular polygon are used for inner product evaluation. 3) When the triangular polygon exists on the triangular polygon, the grid points of the triangular polygon are used for inner product evaluation. In this way, the number of grid points constituting the triangle is minimized (3
), The number of grid points applied to the inner product evaluation can be further reduced as compared with the first closest point search method, and the calculation load can be reduced.
【0040】第3の最接近点探索方法 非凸多面体間の最接近点を探索する場合には、非凸多面
体を包む最小の凸多面体(凸包:convex hullという)
を生成する。そして、該凸包の有向グラフ型構造データ
を作成し、該凸包の有向グラフ型構造データを用いて第
1又は第2の最接近点探索方法を適用して非凸多面体間
の最接近点探索を行う。又、凸包を構成する表面凸多角
形が元の非凸多面体の表面凸多角形と一致する場合には
バーチャリティ(virtuality)=0,一致しない場合には
バーチャリティ=1とし、バーチャリティ=1の表面凸
多角形が他の物体と干渉した場合には、凸包を解除し、
以後非凸多面体を構成する複数の凸多面体に対して第1
又は第2の最接近点探索処理を適用して非凸多面体間の
最接近点探索を行う。このようにすれば、非凸多面体間
同士の最接近点探索が可能になると共に、バーチャリテ
ィ=1の表面凸多角形が他の物体と干渉するまでは最接
近点探索処理に要する計算負荷を減少することができ
る。又、バーチャリティ=1の表面凸多角形が他の物体
と干渉して凸包を解除後、該表面凸多角形が他の物体と
干渉しなくなった時、凸包を復元して最接近点探索処理
を行うようにすれば、復元後の最接近点探索処理の計算
負荷を軽減できる。 Third Nearest Point Search Method When searching for the closest point between non-convex polyhedrons, the smallest convex polyhedron enclosing the non-convex polyhedron (convex hull).
Generate Then, a directed graph type structure data of the convex hull is created, and a first or second closest point search method is applied using the directed graph type structure data of the convex hull to search for a closest point between non-convex polyhedrons. Do. If the surface convex polygon constituting the convex hull coincides with the surface convex polygon of the original non-convex polyhedron, virtuality = 0, otherwise, virtuality = 1 and virtuality = If the surface convex polygon 1 interferes with another object, the convex hull is released,
Hereinafter, the first convex polyhedron constituting the non-convex polyhedron
Alternatively, the second closest point search process is applied to search for the closest point between the non-convex polyhedrons. In this way, it is possible to search for the point of closest approach between non-convex polyhedrons, and to reduce the computational load required for the point of closest approach search processing until the surface convex polygon with virtuality = 1 interferes with another object. Can be reduced. Also, after the surface convex polygon with virtuality = 1 interferes with another object and releases the convex hull, when the surface convex polygon no longer interferes with other objects, the convex hull is restored and the closest approach point is obtained. If the search processing is performed, the calculation load of the closest approach point search processing after restoration can be reduced.
【0041】[0041]
【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 of searching for the closest point between convex polyhedrons (a) Principle O (M1+ MTwo) The process that causes the computational load
Is the decision function g in step 3)K(ΝkH)K(-
νk) In the inner product calculation. That is, h K(-Ν
k) Is given by equation (8).K(-Νk) = HK1(-Νk) + HK2(-Νk) = − Min {xi・ Νk: I = 1,2, ... M1} + -Min {yi・ Νk: I = 1,2, ... MTwo} Since (14), hKIn the process of evaluating1, KTwoof
Calculate inner product over all grid points to determine minimum
O (M1+ MTwo) Calculation load occurs.
【0043】内積の計算回数を減らす有効な方策は、凸
多面体K1,K2を格子点数がより少ない凸多面体又は凸
多角形に分割し、現在の最接近点の近傍に位置する凸多
面体又は凸多角形についてのみ内積を評価する方法であ
る。最も簡単な分割法は、図2に示すように、凸多面体
を表面多角形の集合に分割する方法である。この時、凸
多面体における最接近点は、 1)格子点上に存在する場合、 2)辺上に存在する場合、 3)面上に存在する場合 の3通りがあり得る。An effective measure to reduce the number of calculations of the inner product is to divide the convex polyhedrons K 1 and K 2 into convex polyhedrons or polygons having a smaller number of grid points, and to construct a convex polyhedron or a convex polyhedron located near the current closest point This is a method of 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 approach point in the convex polyhedron can be one of the following three cases: 1) existing on a grid point, 2) existing on a side, and 3) existing on a plane.
【0044】そこで、それぞれに対して内積を評価する
表面多角形を以下のように制限すれば良い。すなわち、
最接近点が 1)格子点上に存在する場合には、その格子点を頂点に持つ表面多角形の全て、 2)辺上に存在する場合には、その辺を1辺として持つ表面多角形の全て、 3)面上に存在する場合には、現在最接近点が存在する表面多角形 ・・・(15) を、内積を評価する表面多角形とする。すなわち、最接
近点が存在する位置に応じて(15)の1)〜3)で示す表面多
角形を構成する格子点(頂点)についてのみ内積を評価
し(内積が最小となる格子点を求め)、判定関数g
K(νk)を演算すればよい。このようにすれば、内積評
価に必要となる格子点数が減り、計算負荷が減少する。Therefore, the surface polygon for which the inner product is evaluated for each of them may be limited as follows. That is,
If the closest point is on a grid point, 1) all surface polygons that have the grid point at the apex. 2) If they are on sides, the surface polygon has that side as one side. , 3) If it exists on the surface, the surface polygon on which the closest point is present ... (15) is the surface polygon for evaluating the inner product. That is, the inner product is evaluated only for the grid points (vertexes) constituting the surface polygon shown in 1) to 3) of (15) according to the position where the closest approach point exists (the grid point at which the inner product is minimized is determined). ), Judgment function g
K (ν k ) may be calculated. By doing so, the number of grid points required for inner product evaluation is reduced, and the calculation load is reduced.
【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 Searching for Nearest Point In order to continuously obtain surface polygons required for inner product evaluation according to the above 1) to 3), a data structure for defining a convex polyhedron It needs some ingenuity. FIG. 3 shows an example of a data structure in the case of the hexahedron shown in FIG. 2, and employs directed graph type structure data.
This directed graph type structural data can be expressed as follows when abstracted. 1) Number the surface polygons that make up the convex polyhedron, and assign a polygon node to each one. 2) Below each polygon node, a lattice point node (Vertex node) for arranging all the grid points and all sides that make up the polygon
And an edge node. The set of grid points and the set of edges that make up the polygon are the brother node (brother nod
e) exists as 3) Under the grid point node and the edge node, a polygon having those grid points or sides as constituent elements is allocated as a polygon node. If there are a plurality of polygons, they are assigned as brother nodes.
【0046】(c) 判定関数gK(νk)の内積評価法 以上のように、凸多面体のデータ構造を作成すると、(1
5)は以下のように表現できる。判定関数gK(νk)の計
算におけるhK(−νk)の評価は、 1)最接近点が格子点上に存在する場合には、該格子点に対応する格子点ノード の下に連なる全てのポリゴンノードに応じた表面多角形の格子点について内積評 価を行う、 2)最接近点が辺上に存在する場合には、該辺に対応するエッジノードの下に連 なる全てのポリゴンノードに応じた多角形の格子点について内積評価を行う、 3)最接近点が面上に存在する場合は、該面の格子点について内積評価を行う。 ・・・(15)′ 内積評価を(15)′のように制限した場合には、判定関数
gK(νk)の計算負荷は、凸多面体の表面凸多角形の格
子点数の最大値をLとすると、O(L)以下に抑えるこ
とができる。(C) Method for evaluating inner product of decision function g K (ν k ) As described above, when a data structure of a 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 exists on a grid point, Perform inner product evaluation on grid points of the surface polygon corresponding to all connected polygon nodes.2) If the closest point exists on the side, all the points connected below the edge node corresponding to the side are evaluated. The inner product is evaluated for the polygonal lattice points corresponding to the polygon nodes. 3) If the closest point exists on the surface, the inner product is evaluated for the lattice points on the surface. (15) 'When the inner product evaluation is restricted as in (15)', the calculation load of the decision function g K (ν k ) is determined by the maximum value of the number of lattice points of the convex polygon on the surface of the convex polyhedron. If 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) Algorithm for Finding the Nearest Point Using the Inner Product Evaluation Method of the Present Invention FIG. 4 is a flowchart of the algorithm for finding the closest point between two convex polyhedrons according to the present invention. First, data for specifying two target convex polyhedrons is input (initial input: environment model setting of convex polyhedron). In this case, data specifying each convex polyhedron is input in the following manner (see FIG. 5). That is, a polygon number P1i (i = 1, 2,... M) is assigned to a surface polygon constituting the first convex polyhedron PH1. Then, the i-th polygon number P1i is input, and thereafter, the coordinate values of the grid points constituting the polygon number P1i and the outward normal direction of the polygon number P1i are input, and all polygons P1i are input.
Polygon number for 1i (i = 1, 2,... M),
Enter the coordinate values of the grid points and the outward normal direction. Note that the coordinate values of the grid points forming the polygon are input clockwise toward the outward normal vector.
【0048】以後、同様に、第2の凸多面体PH2を構
成する表面多角形にポリゴン番号P2i(i=1,2,
・・・n)を付ける。ついで、第iポリゴン番号P2i
を入力し、しかる後、ポリゴン番号P2iを構成する格
子点の座標値及びポリゴン番号P2iの外向き法線方向
を入力し、全ポリゴンP2i(i=1,2,・・・n)
についてポリゴン番号、格子点座標値、外向き法線方向
を入力する(以上ステップ101)。各凸多面体を特定
するデータの入力が完了すると、入力データに基づいて
有向グラフ型構造データを作成する(ステップ10
2)。有向グラフ型構造データの作成が完了すると凸多
面体PH1,PH2に対してGilbert法を適用する。ま
ず、初期格子点集合Vk(k=0)を決定し(ステップ
103)、該初期格子点集合V0について最接近点ベク
トルνkを計算して出力する(ステップ104)。Thereafter, similarly, polygon numbers P2i (i = 1, 2, 2) are assigned to surface polygons constituting the second convex polyhedron PH2.
.. N). Then, the i-th polygon number P2i
, And then input the coordinate values of the lattice points constituting the polygon number P2i and the outward normal direction of the polygon number P2i, and enter all the polygons P2i (i = 1, 2,... N).
, A polygon number, grid point coordinate values, and outward normal directions are input (step 101). When the input of the data for specifying each convex polyhedron is completed, directed graph type structure data is created based on the input data (step 10).
2). When the creation of the directed graph type structure data is completed, the Gilbert method is applied to the convex polyhedra PH1, PH2. First, an initial lattice point set V k (k = 0) is determined (step 103), and a closest point vector v k is calculated and output for the initial lattice point set V 0 (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上の最接近点を求
めることができる。Next, it is checked whether the closest point on each of the convex polyhedrons PH1 and PH2 corresponding to the closest point exists on the lattice point, on the side, or on the 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). Note that the convex polyhedron P
Let the lattice points on H1 be x 1i and the lattice points on the convex polyhedron PH2 be x
Assuming 2i , equation (12) 'is given by ν (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 PH.
2 is the position vector of the point of closest approach on FIG. Therefore, in the process of calculating the closest approach point vector ν k , the first right side of the equation (12) ″
By calculating the term and the second term on the right side, the closest point on each convex polyhedron PH1, PH2 corresponding to the closest point vector can be obtained.
【0050】判定関数が求まれば、gK(νk)=0にな
ったか調べ(ステップ106)、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上の最接近点を求めるこ
とができる。When the judgment function is obtained, gK(Νk) = 0
Check (step 106), g K(Νk) = 0
If so, the search for the closest approach point ends. But gK(Νk) Is 0
Otherwise, k is incremented and the next set of grid points V1
Is output as the closest approach point vector (step 10).
7). Thereafter, by repeating the processing after step 105,
Finally gK(Νk) = 0, and the closest approach distance and the closest approach point
I get 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 equation (12) '.
Therefore, the distance from the origin O to the closest point is the closest distance.
Becomes At this time, the first and second terms on the right side of the equation (12) ″
Find the closest point on each convex polyhedron PH1, PH2
Can be.
【0051】(e) 本発明の内積評価法を採用した最接近
点探索装置の構成図 図6は2つの凸多面体間の最接近点探索装置の構成図で
ある。図中、11は対象となる2つの凸多面体を特定す
るデータ(図5参照)を入力する入力部、12は入力さ
れた凸多面体データを記憶する記憶部、13は凸多面体
毎に凸多面体データを用いて有向グラフ型構造データを
作成する有向グラフ型構造データ作成部、14は有向グ
ラフ型構造データを記憶する記憶部、15はGilbert法
に基づいて2物体間の最接近点探索処理を行なう最接近
点探索処理部、16は最接近点が存在する位置(格子
点、辺、面)に応じた内積評価用の格子点を有向グラフ
型構造データ記憶部14より読出して最接近点探索処理
部15に入力する内積評価用格子点読み出し部である。(E) Configuration diagram of the closest approach point search device employing the inner product evaluation method of the present invention FIG. 6 is a configuration diagram of the closest approach point search device between two convex polyhedrons. In the figure, 11 is an input unit for inputting data (see FIG. 5) for specifying two target polyhedrons, 12 is a storage unit for storing the input polyhedron data, and 13 is convex polyhedron data for each convex polyhedron A directed graph type structure data creating unit that creates directed graph type structure data by using, 14 is a storage unit that stores the directed graph type structure data, 15 is a closest approach point that performs a closest point search process between two objects based on the Gilbert method The search processing unit 16 reads the grid point for inner product evaluation corresponding to the position (grid point, side, surface) where the closest point exists from the directed graph type structure data storage unit 14 and inputs the grid point to the closest point search processing unit 15. This is an inner product evaluation grid point reading unit.
【0052】入力部11から凸多面体PH1,PH2を
特定するデータを入力して記憶部12に記憶する。有向
グラフ型構造データ作成部13は入力データに基づいて
有向グラフ型構造データを作成し、記憶部14に記憶す
る。有向グラフ型構造データの作成が完了すると最接近
点探索処理部15は凸多面体PH1,PH2に対してGi
lbert法を適用する。まず、初期格子点集合Vk(k=
0)を決定し、該初期格子点集合V0について最接近ベ
クトルνkを計算する。ついで、最接近ベクトルν kに応
じた各凸多面体上の最接近点を求め、それぞれの最接近
点が格子点上、辺上、面上のいずれに存在するか調べ、
存在位置(格子点、辺、面)を内積評価用格子点読み出
し部16に入力する。読み出し部16は最接近点位置に
基づいて定まる内積評価に使用する格子点を有向グラフ
型構造データ記憶部14より読出して最接近点探索処理
部15に入力する。最接近点探索処理部15は入力され
た格子点を用いて内積評価を行なって判定関数g
K(νk)を演算する。しかる後、判定関数が求まれば、
gK(νk)=0になったか調べ、gK(νk)=0であれ
ば最接近点探索は終了し、最接近距離、最接近点を出力
する。しかし、gK(νk)が0でなければ、kをインク
リメントし、次の格子点集合V1について最接近点ベク
トルを出力する。以後、同様な処理が行なわれ、最終的
にgK(νk)=0となり、最接近距離、最接近点が出力
される。尚、凸多面体PH1,PH2が移動すれば、所
定時間毎の移動データに基づいて移動後の各凸多面体の
格子点位置を求め、上記処理を行う。From the input unit 11, the convex polyhedrons PH1 and PH2 are
The data to be specified is input and stored in the storage unit 12. Directed
The graph type structure data creating unit 13 performs
Create directed graph type structure data and store it in the storage unit 14
You. Closest approach when creation of directed graph type structure data is completed
The point search processing unit 15 provides Gi for the convex polyhedrons PH1 and PH2.
Apply lbert method. First, the initial grid point set Vk(K =
0), and the initial lattice point set V0About the closest approach
Kutor νkIs calculated. Next, the closest approach vector ν kIn response
The closest point on each convex polyhedron
Check whether the point is on a grid point, on an edge, or on a surface,
Reads the existence position (lattice point, side, surface) for inner product evaluation grid point
Input to the input unit 16. The reading unit 16 is located at the position of the closest approach point.
Grid points used for inner product evaluation determined based on a directed graph
Nearest point search processing by reading from the type structure data storage unit 14
Input to the unit 15. The closest approach point search processing unit 15 is
Inner product evaluation using the grid points
K(Νk) Is calculated. Then, if the decision function is found,
gK(Νk) = 0 is checked, gK(Νk) = 0
If the closest point search is completed, the closest distance and the closest point are output.
I do. But gK(Νk) Is not 0, k is ink
The next grid point set V1About the closest point Bek
Output torque. Thereafter, similar processing is performed, and finally
To gK(Νk) = 0, the closest approach distance and the closest approach point are output
Is done. Note that if the convex polyhedrons PH1 and PH2 move,
Based on the movement data for each fixed time, each convex polyhedron
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 of Searching for the Nearest Point between Convex Polyhedra (a) Principle In the first method of searching for the closest point, the convex polyhedron, which is the target object, is divided into surface convex polygons each wrapping the convex polyhedron. The calculation load was on the order of the number of lattice points of the convex polygon. Further elaborating the concept of the first closest approach search method, it is clear that if the surface of the convex polygon is completely covered with the triangular polygon, the number of times of one inner product evaluation is minimized. Fig. 7 (a)
Is an explanatory view of a state in which the point of closest approach to the convex polyhedron K moves on the surface polygon in accordance with the movement of the origin O. Origin O
The closest approach point S changes from the convex polygon P1 to the convex polygon P according to the movement of
2 → Continuously changes 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 can be changed to the triangle T11 according to the movement of the origin O.
T12 → T21 → T22 → T23 → T24 → T25 → T
26 → T31 continuously changes.
【0054】そこで、凸多面体を構成する表面凸多角形
をすべて三角形に分割して、第1の最接近探索処理を施
しても何等問題はない。そして、三角形に分割すること
により1回の内積評価の回数を減少できる。例えば、図
7(a),(b)において最接近点S′が辺E11上に存在す
ると仮定すれば、図7(a)の場合には、内積評価に使用
する格子点はV1〜V6の6個存在するが、図7(b)の
場合には、V1,V3,V4,V6の4個で良く、1回
の内積評価の回数を減少できる。以上より、対象となる
凸多面体に前処理を施して表面凸多角形を全て三角形ポ
リゴンに分割したデータ構造とすれば、gK(νk)を連
続的に評価する場合の計算負荷は、対象となる凸多面体
の複雑度に関係なく一定値以下に押さえることができ
る。Therefore, there is no problem even if all the surface convex polygons constituting the convex polyhedron are divided into triangles and the first closest approach search processing is performed. Then, by dividing into triangles, the number of times of one inner product evaluation can be reduced. For example, assuming that the closest point S ′ exists on the side E11 in FIGS. 7A and 7B, in the case of FIG. 7A, the grid points used for inner product evaluation are V1 to V6. There are six, but in the case of FIG. 7 (b), only four of V1, V3, V4, and V6 are sufficient, and the number of times of one inner product evaluation can be reduced. As described above, if the target convex polyhedron is subjected to preprocessing to form a data structure in which all surface convex polygons are divided into triangular polygons, the calculation load for continuously evaluating g K (ν k ) is Irrespective of the complexity of the convex polyhedron to be obtained.
【0055】任意の凸多角形を三角形ポリゴンに分割す
る方法は、計算幾何学の分野で幾つかアルゴリズムが知
られている。最もよく知られている方法は、動的計画法
を使って弦の長さの和を最小にするような三角形分割法
である。図8にその例を示す。なお、弦とはL1〜L6
のように三角形に分割するための線分である。このアル
ゴリズムの計算負荷は、始めの多角形の格子点数をnと
するとO(n3)である。多角形を三角形にするアルゴ
リズムに関しては、浅野哲夫著「計算幾何学」(朝倉書
店)、Te. Asano, Ta. Asano and Y. Ohsuga:"Partitio
ning a Polygonal Region into a Minimum Number of T
riangles", Trans. IECE of Japan, vol.E67, pp.232〜
233、 1984を参照されたい。Several algorithms for dividing an arbitrary convex polygon into triangular polygons are known in the field of computational geometry. The best known method is triangulation, which uses dynamic programming to minimize the sum of chord lengths. FIG. 8 shows an example. The strings are L1 to L6
Is a line segment for dividing into triangles as shown in FIG. The calculation load of this algorithm is O (n 3 ), where n is the number of grid points of the first polygon. For an algorithm to convert polygons into triangles, see Tetsuo Asano, "Computational Geometry" (Asakura Shoten), Te. Asano, Ta. Asano and Y. Ohsuga: "Partitio
ning a Polygonal Region into a Minimum Number of T
riangles ", Trans. IECE of Japan, vol.E67, pp.232〜
See 233, 1984.
【0056】以上より、最接近点の連続探索問題への対
応法(第2の最接近点探索方法)は以下のようにまとめ
ることができる。 1)前処理1:対象凸多面体を包む各表面凸多角形に対
し、三角形分割を施す(Triangulation algorithm) 2)前処理2:三角形を用いて第1の最接近点探索方法に
おけると同様に有向グラフ型構造データを作成する。 3)内積評価:(15)′にしたがってgK(νk)をにおける
内積評価の範囲を限定する。As described above, the method for dealing with the continuous search for the closest approach point (second closest approach search method) can be summarized as follows. 1) Preprocessing 1: Triangulation of each surface convex polygon surrounding the target convex polyhedron (Triangulation algorithm) 2) Preprocessing 2: Directed graph as in the first closest point search method using triangles Create type structure data. 3) Inner product evaluation: The range of inner product evaluation in g K (ν k ) is limited according to (15) ′.
【0057】(b) 本発明の第2の最接近点探索アルゴ
リズム 図9は本発明の第2の最接近点探索方法による最接近点
探索アルゴリズムの流れ図である。まず対象となる2つ
の凸多面体を特定するデータを入力する(初期入力:凸
多面体の環境モデル設定)。各凸多面体を特定するデー
タは以下の方式で入力される(図5参照)。すなわち、
第1の凸多面体PH1を構成する表面多角形に番号P1
i(i=1,2,・・・m)を付ける。ついで、第iポ
リゴン番号P1iを入力し、しかる後、番号P1iのポ
リゴンを構成する格子点の座標値及びポリゴンの外向き
法線方向を入力し、同様に、全ポリゴンP1i(i=
1,2,・・・m)についてポリゴン番号、格子点座標
値、外向き法線方向を入力する。なお、ポリゴンを構成
する格子点の座標値は外向き法線ベクトルに向かって右
回りに入力する。同様に、第2の凸多面体PH2を構成
する表面多角形にポリゴン番号P2i(i=1,2,・
・・n)を付ける。ついで、第iポリゴン番号P2iを
入力し、しかる後、ポリゴン番号P2iを構成する格子
点の座標値及びポリゴン番号P2iの外向き法線方向を
入力し、全ポリゴンP2i(i=1,2,・・・n)に
ついてポリゴン番号、格子点座標値、外向き法線方向を
入力する(以上ステップ201)。(B) Second Nearest Point Search Algorithm of the Present Invention FIG. 9 is a flowchart of the closest point search algorithm according to the second closest point search method of the present invention. First, data for specifying two target convex polyhedrons is input (initial input: environment model setting of convex polyhedron). Data for specifying each convex polyhedron is input in the following manner (see FIG. 5). That is,
The number P1 is assigned to the surface polygon constituting the first convex polyhedron PH1.
i (i = 1, 2,... m) is attached. Then, the i-th polygon number P1i is input, and thereafter, the coordinate values of the lattice points constituting the polygon of the number P1i and the outward normal direction of the polygon are input, and similarly, all the polygons P1i (i =
For 1, 2,... M), a polygon number, grid point coordinate values, and outward normal directions are input. Note that the coordinate values of the grid points forming the polygon are input clockwise toward the outward normal vector. Similarly, the polygon numbers P2i (i = 1, 2,...) Are assigned to the surface polygons constituting the second convex polyhedron PH2.
・ ・ N) Then, the i-th polygon number P2i is input, and thereafter, the coordinate values of the grid points constituting the polygon number P2i and the outward normal direction of the polygon number P2i are input, and all polygons P2i (i = 1, 2,. .. N), a polygon number, grid point coordinate values, and outward normal directions are input (step 201).
【0058】各凸多面体を特定するデータの入力が完了
すると、入力データに基づいて凸多面体を構成する表面
凸多角形を三角形に分割し、各三角形にポリゴン番号T
ijを付加する(ステップ202)。ついで、得られた
三角形をポリゴンノードとして第1最接近点探索方法に
おけると同様に有向グラフ型構造データを作成する(ス
テップ203)。有向グラフ型構造のデータ作成が完了
すると凸多面体PH1,PH2に対してGilbert法を適
用する。まず、初期格子点集合Vk(k=0)を決定し
(ステップ204)、該初期格子点集合V0について最
接近点ベクトルνkを計算して出力する(ステップ20
5)。When the input of the data for specifying each convex polyhedron is completed, the surface convex polygon constituting the convex polyhedron is divided into triangles based on the input data, and each triangle has a polygon number T.
ij is added (step 202). Next, the obtained triangle is used as a polygon node to create directed graph type structure data in the same manner as in the first closest point search method (step 203). When the creation of the data of the directed graph structure is completed, the Gilbert method is applied to the convex polyhedrons PH1 and PH2. First, an initial lattice point set V k (k = 0) is determined (step 204), and the closest point vector v k is calculated and output for the initial lattice 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が移動すれば、所定時間毎
の移動データに基づいて移動後の各凸多面体の格子点位
置を求め、上記処理を行う。Next, the closest approach point vector νkAccording to each
Find the closest points on the convex polyhedron and find the closest points
Examine whether it exists on a child point, on an edge, or on a surface, and
(15) ′ based on the position
Determine and determine function gK(Νk) (Step 20)
6). If the judgment function is obtained, gK(Νk) = 0
Check (step 207), g K(Νk) = 0 if closest
The near point search ends. But gK(Νk) Must be 0
If k is incremented, the next set of grid points V1About
Then, the closest approach point vector is output (step 208). Less than
By repeating the processing from step 105 onward, g
K(Νk) = 0, and the closest approach distance and the closest approach point are obtained.
In addition, if the convex polyhedrons PH1 and PH2 move, every predetermined time
Grid points of each convex polyhedron after moving based on the moving data of
And the above processing is performed.
【0060】(c) 本発明の第2の最接近点探索装置の構
成図 図10は本発明の第2の最接近点探索方法を実現する装
置の構成図であり、図6と同一部分には同一符号を付し
ている。図6と異なる点は、 1)凸多面体を特定する凸多面体データに基づいて該凸多
面体を構成する表面凸多角形を三角形に分割する三角形
分割部17が設けられている点、 2)有向グラフ型構造データ作成部13は各三角形をポリ
ゴンノードとして有向グラフ型構造データを作成して記
憶部14に記憶する点、である。(C) Configuration of Second Nearest-Point Searching Apparatus of the Present Invention FIG. 10 is a block diagram of an apparatus for implementing the second closest-point searching method of the present invention. Have the same reference numerals. 6 is different from FIG. 6 in that: 1) a triangular division unit 17 for dividing a convex polygon constituting a convex polyhedron into triangles based on convex polyhedral data for specifying the convex polyhedron is provided; 2) a directed graph type The structure data creation unit 13 creates directed graph type structure data using each triangle as a polygon node and stores it in the storage unit 14.
【0061】(d) 第2の最接近点探索方法の効果 第2の最接近点探索方法によれば、以下の1)、2)の効果
が得られる。 1)高速性:最接近点を連続的に追い掛ける場合、初期化
に要する時間を除くと対象凸多面体の複雑度に係らず計
算負荷をほぼ一定にできる。一定値は、三角形ポリゴン
同士の最接近点探索時間にほぼ等しい。 2)自由曲面への応用:自由曲面を三角形ポリゴンを張り
合わせて表現する場合、表現の精度を上げるためにポリ
ゴン数を増やしても最接近点探索の時間は常に一定であ
る。(D) Effect of the second closest approach point search method According to the second closest approach point search method, the following effects 1) and 2) can be obtained. 1) High speed: When following the closest approach point continuously, the calculation load can be kept almost constant irrespective of the complexity of the target convex polyhedron except for the time required for initialization. The constant value is substantially equal to the time for searching for the closest point between the triangular polygons. 2) Application to free-form surfaces: When a free-form surface is expressed by laminating triangular polygons, the time for searching for the closest approach point is always constant even if the number of polygons is increased in order to increase the accuracy of the expression.
【0062】 (C) 非凸多面体間の最接近点探索の第1の方法 (a) 原理 Gilbert法を非凸多面体に拡張するための基本的な方針
は、非凸多面体を凸多面体の集合と捕らえた時に、干渉
チェックを行わなければならない凸多面体の組み合わせ
数をできるだけ減らすことである。凸多面体間の干渉チ
ェックには勿論Gilbert法を採用する。凸多面体数を減
らすために複数の凸多面体に対してマージング(mergin
g)という概念を導入する。物体Aと物体Bのマージング
とは、AとBを含む最小の凸物体(Copnvex hull:凸包)
を構成することである。図11は非凸多面体Kを2つの
凸多面体A,Bに分割し、マージング処理によりAとB
を含む最小の凸物体(凸包)Cを構成した例である。凸
包が生成されると、非凸多面体の干渉チェックは凸包同
士(凸多面体同士)の干渉チェックに帰着し、本発明の
第1の最接近点探索方法を適用できる。(C) First Method of Searching for the Nearest Point between Non-convex Polyhedrons (a) Principle The basic policy for extending the Gilbert method to a non-convex polyhedron is to set the non-convex polyhedron to a set of convex polyhedrons. An object of the present invention is to reduce the number of combinations of convex polyhedrons that must be checked for interference when captured. Of course, the Gilbert method is used to check for interference between convex polyhedrons. Merging (mergin) for multiple convex polyhedra to reduce the number of convex polyhedra
g) is introduced. The merging of the object A and the object B is the smallest convex object including A and B (Copnvex hull: convex hull)
It is to constitute. FIG. 11 shows that the non-convex polyhedron K is divided into two convex polyhedrons A and B, and A and B are merged.
This is an example in which a minimum convex object (convex hull) C including the following is configured. When the convex hull is generated, the interference check of the non-convex polyhedron results in the interference check of the convex hulls (convex polyhedrons), and the first closest point search method of the present invention can be applied.
【0063】凸包Cを構成するに当り、バーチャリティ
(Virtuality)という指標を導入する。バーチャリティ
は複数の凸多面体のマージングで生じる仮想的な多角形
を識別するためのフラグである。図11の例では、2つ
の実在する凸多面体(直方体)A,Bにまたがる多角形
(ポリゴン4,5,6)に対してバーチャリティは”
1”となり、その他の実際に存在する多角形に対しては
バーチャリティは”0”となる。マージングで凸包が作
成され、該凸包に第1の最接近点探索方法を適用するた
めには、凸包の有効グラフ型構造データを作成する。図
12は図11に示す凸包の有向グラフ型構造データであ
り、凸包の表面多角形ポリゴン1,2,・・・をポリゴ
ンノードとしてその下方に格子点ノード、エッジノード
を配列し、更に各格子点ノード、エッジノードの下方に
ポリゴンノードを配列している。又、ポリゴンにはバー
チャリティが付加されている。In forming the convex hull C, an index called virtuality is introduced. The virtuality is a flag for identifying a virtual polygon generated by merging a plurality of convex polyhedrons. In the example of FIG. 11, the virtuality is "for a polygon (polygons 4, 5, 6) extending over two existing convex polyhedrons (cuboids) A and B.
1 ”, and the virtuality is“ 0 ”for other actually existing polygons. Creates effective graph type structure data of a convex hull.FIG. 12 shows directed graph type structure data of a convex hull shown in FIG. A grid point node and an edge node are arranged below, and a polygon node is arranged below each grid point node and the edge node.
【0064】(b) マージング アルゴリズム 図13はマージングアルゴリズムの流れ図である。対象
となる非凸多面体を2以上の凸多面体に分割し、各凸多
面体を特定するデータを入力する(初期入力:凸多面体
の環境モデル設定)。すなわち、第1の凸多面体PH1
を構成する表面多角形にポリゴン番号P1i(i=1,
2,・・・m)を付ける。ついで、第iポリゴン番号P
1iを入力し、しかる後、ポリゴン番号P1iを構成す
る格子点の座標値及びポリゴン番号P1iの外向き法線
方向を入力し、全ポリゴンP1i(i=1,2,・・・
m)についてポリゴン番号、格子点座標値、外向き法線
方向を入力する。以後、同様に、他の凸多面体PH2を
構成する表面多角形にポリゴン番号P2i(i=1,
2,・・・n)を付け、全ポリゴンP2i(i=1,
2,・・・n)についてポリゴン番号、格子点座標値、
外向き法線方向を入力する(以上ステップ301)。(B) Merging Algorithm FIG. 13 is a flowchart of the merging algorithm. The target non-convex polyhedron is divided into two or more convex polyhedrons, and data for specifying each convex polyhedron is input (initial input: environment model setting of the convex polyhedron). That is, the first convex polyhedron PH1
Are assigned polygon numbers P1i (i = 1,
2,... M). Then, the i-th polygon number P
1i, and thereafter, the coordinate values of the grid points forming the polygon number P1i and the outward normal direction of the polygon number P1i are input, and all polygons P1i (i = 1, 2,...) Are input.
For m), a polygon number, grid point coordinate values, and outward normal directions are input. Hereinafter, similarly, the polygon numbers P2i (i = 1, 2) are assigned to the surface polygons constituting the other convex polyhedron PH2.
2,... N) and all polygons P2i (i = 1, 2)
2,... N), polygon numbers, grid point coordinate values,
An outward normal direction is input (step 301).
【0065】各凸多面体を特定するデータの入力が完了
すると、入力データに基づいて有向グラフ型構造のデー
タを作成する(ステップ302)。ついで、各凸多面体
PH1,PH2を包含する最小の凸包PH(1,2)を生成する
(ステップ303)。しかる後、凸包PH(1,2)を構成
する表面多角形にポリゴン番号PPH(1,2)i(i=1,2,・・・r)
を付け、第iポリゴン番号PPH(1,2)iを入力後、第iポ
リゴンを構成する格子点の座標値、ポリゴンのバーチャ
リティ及び外向き法線方向を求めて記憶する(図14参
照)。以後、同様にして全ポリゴンPPH(1,2 )i(i=1,2,
・・・r)についてポリゴン番号、格子点座標値、バーチャ
リティ外向き法線方向を求めれば、凸包の有向グラフ型
構造データが作成されてメモリに記憶されることにな
る。尚、ポリゴンPPH(1,2)iが凸多面体PH1,PH2の
両方の格子点を含む場合にはバーチャリティは”1”に
なり、片方の格子点しか含まない場合にはバーチャリテ
ィは”0”になる(以上、ステップ304、305)。When the input of the data for specifying each convex polyhedron is completed, data of a directed graph type structure is created based on the input data (step 302). Next, the smallest convex hull PH (1,2) including each convex polyhedron PH1, PH2 is generated (step 303). Thereafter, the polygon number P PH (1,2) i (i = 1,2,... R) is assigned to the surface polygon constituting the convex hull PH (1,2).
After inputting the i-th polygon number P PH (1,2) i , the coordinate values of the grid points constituting the i-th polygon, the virtuality of the polygon, and the outward normal direction are obtained and stored (see FIG. 14). ). Thereafter, similarly, all the polygons P PH (1,2 ) i (i = 1,2,
.. R), if the polygon number, the grid point coordinate value, and the outward normal direction of the virtuality are obtained, the directed graph type structure data of the convex hull is created and stored in the memory. When the polygon P PH (1,2) i includes both the lattice points of the convex polyhedrons PH1 and PH2, the virtuality is “1”. When the polygon P PH (1,2) i includes only one of the lattice points, the virtuality is “1”. 0 "(steps 304 and 305).
【0066】マージングアルゴリズムは複数の凸多面体
から凸包を作成し、有向グラフ型構造データを作成する
アルゴリズムである。凸包を作成するアルゴリズムは計
算幾何学で良く知られている。現在三次元の凸包に対し
ては、格子点の総数をMとするとき、計算負荷がO(M
・log M)のアルゴリズムが知られている。例えば、F.
P. Preparata and S.J. Hong, "Convex hulls of finit
e sets of points intwo and three dimensions", Com
m. ACM 2(20), pp.87〜93, 1977を参照。マージングア
ルゴリズムは相対的に静止している凸多面体同士に作用
させ、バーチャリティ”1”の多角形が他の物体と接触
・衝突した場合にはマージングを解除する。これによ
り、以後、下位の凸多面体の集合状態に対して最接近点
探索処理が施される。又、マージング解除後(凸包解除
後)、一定時間他の物体と干渉が生じない場合には、干
渉によって分解した凸包はリカバリアルゴリズム(後
述)により回復する。The merging algorithm is an algorithm for creating a convex hull from a plurality of convex polyhedrons and creating directed graph type structure data. Algorithms for creating convex hulls are well known in computational geometry. For the current three-dimensional convex hull, if the total number of grid points is M, the computational load is O (M
The algorithm of log M) is known. For example, F.
P. Preparata and SJ Hong, "Convex hulls of finit
e sets of points intwo and three dimensions ", Com
m. See ACM 2 (20), pp. 87-93, 1977. The merging algorithm operates on relatively stationary convex polyhedrons, and cancels merging when the polygon of virtuality "1" comes into contact with or collides with another object. As a result, the closest point search process is performed on the set state of the lower convex polyhedron. Further, after the merging is released (after the convex hull is released), if there is no interference with another object for a certain period of time, the convex hull decomposed by the interference is recovered by a recovery algorithm (described later).
【0067】(c) マージングアルゴリズムの起動 マージングアルゴリズムは、対象物体に対して初期設定
においてオフライン的に作用させておき、環境が動的に
変化しだしたならば、すなわち、環境中のある凸多面体
が動き出したならば、マージングプロセスは現状を維持
したまま一時的に停止して、干渉チェックを行う。そし
て、環境が停止した時、マージング処理を実行して環境
変化後の凸包の作成、凸包の有向グラフ型構造データの
作成を行う。図15は以上を考慮した時のプロセッサに
よるマージング処理の説明図である。全ての凸包に対し
て凸包の静動を監視するためのフラグms(i)を用意す
る。静動フラグms(i)=”1”の場合は動、ms(i)
=”0”の場合は静であり、iは凸包全てにわたる。(C) Activating the Merging Algorithm The merging algorithm is applied to the target object offline in the initial setting, and when the environment starts to change dynamically, that is, a certain convex polyhedron in the environment If has started, the merging process stops temporarily while maintaining the current state, and performs an interference check. Then, when the environment is stopped, a merging process is executed to create a convex hull after the environment is changed, and to create a directed graph type structure data of the convex hull. FIG. 15 is an explanatory diagram of merging processing by the processor in consideration of the above. A flag ms (i) for monitoring the static movement of the convex hull is prepared for all convex hulls. If the static motion flag ms (i) = "1", it is dynamic, ms (i)
== "0" is static and i spans all convex hulls.
【0068】プロセッサのタスクとして、常時全てのm
s(i)の値を監視して凸包の静動状態を監視する状態監
視タスクTask1と、いずれかのms(i)が”1”の
場合に前述の第1の最接近点探索方法により干渉チェッ
クをその他の処理を実行するTask2(干渉チェック
タスク)と、全てのms(i)=”0”の場合、すなわち
凸包全てが静止している場合にマージング処理を実行す
るTask3(マージングタスク)がある。凸包全ての
静動状態は図示しないロボット制御装置により監視さ
れ、メモリMEMにms(i)=”1”あるいはms(i)
=”0”として書き込まれる。状態監視タスクTask
1はms(i)の内容を監視し、全て”0”の場合にはマ
ージングタスクTask3が起動してマージング処理を
実行して凸包の作成、有向グラフ型構造データの作成を
行う。マージングタスクTask3は凸包を1つ構成す
ると停止し、次の起動指示を待つ。一方、いずれかのm
s(i)が”1”の場合には、換言すればいずれかの凸包
が動いている場合には、干渉チェックタスクTask2
は第1の最接近点探索方法により干渉チェックをその他
の処理を実行する。以後、上記動作が繰り返されて干渉
チェックが実行される。As a task of the processor, all m
A state monitoring task Task1 that monitors the value of s (i) to monitor the static motion state of the convex hull, and the first closest approach point search method described above when any of ms (i) is “1”. Task2 (an interference check task) for executing other processing for interference check, and Task3 (for a merging task) for executing merging processing when all ms (i) = "0", that is, when all convex hulls are stationary. ). The static state of all convex hulls is monitored by a robot controller (not shown), and ms (i) = "1" or ms (i) is stored in the memory MEM.
= "0" is written. Status monitoring task Task
1 monitors the contents of ms (i), and if all are "0", a merging task Task3 is activated to execute a merging process to create a convex hull and create directed graph type structure data. The merging task Task3 stops when one convex hull is formed, and waits for the next activation instruction. On the other hand, any m
If s (i) is "1", in other words, if any convex hull is moving, the interference check task Task2
Performs the interference check and other processing by the first closest approach point search method. Thereafter, the above operation is repeated to execute the interference check.
【0069】以上はタスク切り換えによりマージング処
理、干渉チェック処理等を実行する場合であるが、Wh
ile文を用いてシーケンシャルにマージング処理を行
うようにもできる。図16はWhile文を用いてマー
ジング処理を実行する場合の説明図である。While
文において全ての凸包のms(i)が”0”か監視し、全
て”0”の場合にはマージングプロセスを実行して1つ
の凸包を作成する(ステップ401)。しかる後、Wh
ile文を抜け出し、干渉チェックその他の処理を実行
し(ステップ402)、再びWhile文を実行する。
以後、常時マージング処理、干渉チェック処理を繰返し
連続的に実行する。The above is the case where merging processing, interference check processing, and the like are executed by task switching.
The merging process can be performed sequentially using an ile statement. FIG. 16 is an explanatory diagram of a case where a merging process is executed using a While sentence. While
In the sentence, it is monitored whether ms (i) of all convex hulls is "0", and if all are "0", a merging process is executed to create one convex hull (step 401). After a while, Wh
The ile sentence is escaped, interference check and other processes are executed (step 402), and the While sentence is executed again.
Thereafter, the merging process and the interference check process are repeatedly and continuously executed.
【0070】環境が動的に変化する場合、例えば図17
に示すようにロボットアームAMが非凸多面体であるア
ーチACを通り抜けて向う側の対象物OBを掴むような
場合、アームAMはアーチACで構成される凸包を突き
破って対象物OBに到達する。この場合、ロボットアー
ムAMが凸包のバーチャリティ”1”の凸多角形と接触
すると、マージングが解除される。以後、ロボットアー
ムAMとアーチACを構成する個々の凸多面体AC1〜
AC3との干渉チェックが行われ、ロボットアームはア
ーチACに接触しないように対象物OBに至り、該対象
物を掴んで目的の場所に運ぶ。マージングが解除された
凸包は、次に説明するリカバリアルゴリズムにより復元
する。図18(a)は作業台BSとアーチACに凸包CH
1を生成した例、図18(b)は、アーチAC、対象物O
Bそれぞれに凸包CH2,CH3を生成した場合の例で
あり、ロボットアームAMは図18(c)に示すように作
業台BSとアーチACで構成される凸包CH1、アーチ
で構成される凸包CH2を次々に突き破って対象物OB
に到達し、対象物を把持して目的の場所に運ぶ。When the environment changes dynamically, for example, FIG.
When the robot arm AM passes through the arch AC, which is a non-convex polyhedron, and grasps the object OB on the opposite side as shown in (1), the arm AM breaks through the convex hull constituted by the arch AC and reaches the object OB. In this case, merging is canceled when the robot arm AM comes into contact with the convex polygon of the virtual hull “1” of the convex hull. After that, the individual convex polyhedrons AC1 to AC1 constituting the robot arm AM and the arch AC will be described.
A check for interference with AC3 is performed, and the robot arm reaches the object OB so as not to contact the arch AC, and grabs the object and transports it to a target location. The convex hull from which merging has been canceled is restored by a recovery algorithm described below. FIG. 18A shows a convex hull CH on the worktable BS and the arch AC.
FIG. 18B shows an example in which an arch AC and an object O are generated.
This is an example in which convex hulls CH2 and CH3 are generated for each of B, and the robot arm AM has a convex hull CH1 composed of a worktable BS and an arch AC, and a convex hull composed of an arch, as shown in FIG. Object OB by piercing the parcel CH2 one after another
, And grasps and transports the object to a target location.
【0071】(d) リカバリアルゴリズム 干渉によって分解した凸包は、一定時間、他の物体と干
渉が生じない場合には回復する。リカバリ処理は、マー
ジング状態のデータ構造が残っている凸包に対してのみ
作用する。従って、相対位置関係が動いてしまい、元の
凸包のデータ構造が失われている凸多面体集合は、リカ
バリ処理では回復せず、マージングアルゴリズムの適用
により新しい凸包が構成される。(D) Recovery Algorithm The convex hull decomposed by the interference recovers when there is no interference with another object for a certain period of time. The recovery process operates only on the convex hull in which the data structure in the merging state remains. Therefore, a convex polyhedron set in which the relative positional relationship has moved and the original data structure of the convex hull has been lost is not recovered by the recovery processing, and a new convex hull is formed by applying the merging algorithm.
【0072】図19はプロセッサによるマージング処
理、リカバリ処理の説明図である。全ての凸包に対して
凸包の静動を監視するためのフラグms(i)を用意す
る。静動フラグms(i)=”1”の場合は動、ms(i)
=”0”の場合は静であり、iは凸包全てにわたる。プ
ロセッサのタスクとして、常時全てのms(i)の値を監
視して凸包の静動状態を監視する状態監視タスクTas
k1と、いずれかのms(i)が”1”の場合に第1の最
接近点探索方法による干渉チェック処理、リカバリ処
理、その他の処理を実行するTask2(干渉チェック
/リカバリタスク)と、全てのms(i)=”0”の場
合、すなわち凸包全てが静止している場合にマージング
処理を実行するTask3(マージングタスク)があ
る。FIG. 19 is an explanatory diagram of merging processing and recovery processing by the processor. A flag ms (i) for monitoring the static movement of the convex hull is prepared for all convex hulls. If the static motion flag ms (i) = "1", it is dynamic, ms (i)
== "0" is static and i spans all convex hulls. As a task of the processor, a state monitoring task Tas that constantly monitors all values of ms (i) to monitor the static state of the convex hull.
k1 and Task2 (interference check / recovery task) for executing interference check processing, recovery processing, and other processing by the first closest approach point search method when any of ms (i) is “1”; If ms (i) = "0", that is, if all convex hulls are stationary, there is a Task 3 (merging task) that executes 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 stationary state of all the convex hulls is monitored by a robot controller (not shown), and ms (i) = “
It is written as 1 "or ms (i) =" 0 ". The status monitoring task Task1 monitors the contents of ms (i), and if all are" 0 ", the merging task Task3 is activated. The processing is executed to create a convex hull and create directed graph type structure data.The merging task Task3 stops when one convex hull is formed, and waits for the next activation instruction.
If s (i) is "1", in other words, if any convex hull is moving, the interference check task Task2
Executes the interference check by the first closest approach point search method, and executes the recovery process and other processes. Thereafter, the above operation is repeated to execute the interference check.
【0074】リカバリ処理は、凸包のバーチャリティ”
1”の凸多角形が他の物体と接触してマージングが解除
された時、凸包が該物体と干渉しなくなったか監視し、
干渉しなくなってから連続して所定時間干渉しない場合
には凸包を復元する。図17の例では、ロボットアーム
AMが対象物OBを把持してアーチACを通り抜けると
凸包とアームの干渉がなくなるから、干渉しなくなって
から所定時間経過した時凸包を復元する。In the recovery process, a convex hull virtuality is used.
When the convex polygon of 1 "comes into contact with another object and the merging is released, it is monitored whether the convex hull no longer interferes with the object,
If no interference continues for a predetermined time after the interference stops, the convex hull is restored. In the example of FIG. 17, when the robot arm AM grasps the object OB and passes through the arch AC, interference between the convex hull and the arm disappears.
【0075】以上はタスク切り換えによりリカバリ処理
等を実行する場合であるが、While文を用いてシー
ケンシャルにリカバリ処理を行うようにもできる。図2
0はWhile文を用いてリカバリ処理を実行する場合
の説明図である。While文において全ての凸包のm
s(i)が”0”か監視し、全て”0”の場合にはマージ
ングプロセスを実行して1つの凸包を作成する(ステッ
プ501)。しかる後、While文を抜け出し、干渉
チェック処理、リカバリ処理、その他の処理を実行し
(ステップ502)、再びWhile文を実行する。以
後、常時マージング処理、干渉チェック処理、リカバリ
処理を繰返し連続的に実行する。The above is a case where the recovery processing is executed by switching tasks, but the recovery processing can be performed sequentially using a While statement. FIG.
0 is an explanatory diagram in the case where recovery processing is executed using a While statement. M of all convex hulls in a While sentence
It monitors whether s (i) is "0", and if all are "0", executes a merging process to create one convex hull (step 501). Thereafter, the While sentence is escaped, interference check processing, recovery processing, and other processing are executed (step 502), and the While sentence is executed again. Thereafter, the merging process, the interference check process, and the recovery process are repeatedly and continuously executed.
【0076】(e) 非凸多面体間の最接近点探索の全体の
処理 図21は非凸多面体間の最接近点探索の全体の処理フロ
ー図である。対象となる非凸多面体を特定するデータを
入力する(初期入力:環境モデル設定)。・・・ステッ
プ601 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiの有向グラフ型構造データを作成する。又、マージ
ング処理により凸包を生成すると共に、凸包の有向グラ
フ型構造データを作成する(ステップ602)。以上の
初期化処理が終了すると第1の最接近点探索処理(干渉
チェック)処理を実行する(ステップ603)。つい
で、干渉するかチェックし(ステップ604)、干渉す
ればバーチャリティ=”1”の部分が干渉したかチェッ
クし(ステップ605)、バーチャリティ=”0”であ
れば、ただちに移動を停止し(ステップ606)、バー
チャリティ=”1”であればマージングを解除し(ステ
ップ607)、ステップ603に戻る。以後、凸包が回
復するまで、非凸多面体を構成する個々の凸多面体に対
する最接近点探索処理を実行する。(E) Overall processing for searching for the closest point between non-convex polyhedrons FIG. 21 is an overall processing flowchart for searching for the closest point between non-convex polyhedrons. Input data specifying the target non-convex polyhedron (initial input: environment model setting). Step 601 Next, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P
Create Hi-directed graph type structure data. Further, a convex hull is generated by the merging process, and directed graph type structure data of the convex hull is generated (step 602). When the above initialization processing is completed, a first closest approach point search processing (interference check) processing is executed (step 603). Next, it is checked whether or not interference occurs (step 604). If there is interference, it is checked whether or not the portion of virtuality = “1” has interfered (step 605). In step 606), if the virtuality is "1", merging is canceled (step 607), and the process returns to step 603. Thereafter, until the convex hull is recovered, the closest point searching process is executed for each convex polyhedron constituting the non-convex polyhedron.
【0077】一方、ステップ604において、干渉して
いなければリカバリ処理を実行する(ステップ60
6)。リカバリ処理においては、マージングが解除され
た凸包が存在するか調べ、存在する場合には、他の物体
と干渉しているかチェックし、干渉してなければ非干渉
時間を計時する。そして、マージングが解除された凸包
の非干渉時間が設定値以上になっていれば、該凸包を復
元する。しかし、他の物体と干渉していたり、非干渉時
間が設定値以上でない場合には凸包を復元せず次のステ
ップを実行する。尚、凸包を構成する部分の相対位置関
係が動いて元の凸包データが失われている場合には凸包
の回復は行わない。ついで、凸包の全ての部分が静止し
ているかチェック(ステップ609)、静止していない
場合にはステップ603に戻り以降の処理を繰返し、静
止している場合にはマージング処理を実行して新たな凸
包を作成し(ステップ610)、以後ステップ603に
戻り以降の処理を繰り返す。On the other hand, in step 604, if there is no interference, a recovery process is executed (step 60).
6). In the recovery process, it is checked whether or not the convex hull whose merging has been canceled exists. If there is, it is checked whether or not it interferes with another object. Then, if the non-interference time of the convex hull whose merging has been canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or the non-interference time is not longer than the set value, the next step is executed without restoring the convex hull. If the original convex hull data is lost due to a change in the relative positional relationship between the parts constituting the convex hull, the convex hull is not restored. Next, it is checked whether all parts of the convex hull are stationary (step 609). If not stationary, the process returns to step 603 and the subsequent processing is repeated. A convex hull is created (step 610), and the process returns to step 603 to repeat the subsequent processes.
【0078】(f) 非凸多面体間の最接近点探索装置の構
成 図22は非凸多面体間の最接近点探索装置の構成図であ
る。21は対象となる非凸多面体を特定するデータを入
力する入力部、22は入力された非凸多面体データを記
憶する記憶部、23は非凸多面体を複数の凸多面体に分
割し、各凸多面体毎に有向グラフ型構造データを作成す
る凸多面体分割/有向グラフ作成部、24は非凸多面体
の凸包を作成し、該凸包の有向グラフ型構造データを作
成する凸包作成/有向グラフ作成部、25は各凸多面体
の有向グラフ型構造データCVD及び凸包の有向グラフ
型構造データCHDを記憶する記憶部、26は状態監
視、干渉チェック、マージング、リカバリ処理を行うプ
ロセッサ、27はロボット制御装置から送られてくる静
動フラグms(i)や各物体の位置データを記憶するメモ
リ、28は凸包のマージングが解除されているか否かを
凸包毎に記憶するメモリである。(F) Configuration of apparatus for searching for points of closest approach between non-convex polyhedrons FIG. 22 is a block diagram of an apparatus for searching for points of closest approach between non-convex polyhedrons. Reference numeral 21 denotes an input unit for inputting data for specifying a target non-convex polyhedron, reference numeral 22 denotes a storage unit for storing the input non-convex polyhedron data, and reference numeral 23 divides the non-convex polyhedron into a plurality of convex polyhedrons. A convex polyhedron division / directed graph creation unit for creating directed graph type structure data for each, a convex hull creation / directed graph creation unit for creating a convex hull of a non-convex polyhedron and creating directed graph type structure data of the convex hull, 25 A storage unit for storing the directional graph type structure data CVD of each convex polyhedron and the directional graph type structure data CHD of the convex hull, 26 is a processor for performing state monitoring, interference check, merging, and recovery processing, and 27 is sent from the robot controller. A memory 28 stores the static motion flag ms (i) and the position data of each object, and a memory 28 stores, for each convex hull, whether or not merging of the convex hull is canceled. That.
【0079】入力部21より対象となる非凸多面体を特
定するデータを入力してメモリ22に記憶する。凸多面
体分割/有向グラフ作成部23は非凸多面体を凸多面体
に分割し、各凸多面体の有向グラフ型構造データCVD
を作成してメモリ25に記憶する。又、凸包作成/有向
グラフ作成部24はマージング処理により凸包を生成す
ると共に、凸包の有向グラフ型構造データCHDを作成
してメモリ25に記憶する。Data for specifying the target non-convex polyhedron is input from the input unit 21 and stored in the memory 22. The convex polyhedron division / directed graph creation unit 23 divides a non-convex polyhedron into convex polyhedrons, and generates a directed graph type structure data CVD of each convex polyhedron.
Is created and stored in the memory 25. In addition, the convex hull creation / directed graph creation unit 24 creates a convex hull by merging processing, creates directed graph type structure data CHD of the convex hull, and stores it in the memory 25.
【0080】以上の初期化処理が終了するとプロセッサ
26は凸包の有向グラフ型構造データを用いて前述の第
1の最接近点探索処理(干渉チェック)処理を実行す
る。尚、移動物体についてはロボット制御装置より入力
されている移動データに基づいて格子点位置を算出し、
該格子点位置に基づいて最接近点探索処理を行う。最接
近点探索処理により、凸包(バーチャリティ=”1”)
との干渉が検出されると、該凸包のマージングを解除
し、解除フラグFR=”1”をメモリ28に記憶する。
以後、プロセッサ26は解除フラグFRを参照して凸包
が回復したか調べ、回復しなければ、非凸多面体を構成
する個々の凸多面体の有向フラグ構造データを用いて最
接近点探索処理を実行する。又、プロセッサ26は、凸
包(バーチャリティ=”1”)と干渉していなければリ
カバリ処理を実行する。When the above initialization processing is completed, the processor 26 executes the above-described first closest approach point search processing (interference check) processing using the directed graph type structural data of the convex hull. For a moving object, a grid point position is calculated based on movement data input from the robot control device,
A closest point search process is performed based on the grid point position. Convex hull (virtuality = "1") by closest point search processing
When the interference with the convex hull is detected, the merging of the convex hull is released, and the release flag FR = "1" is stored in the memory 28.
Thereafter, the processor 26 checks whether the convex hull has been recovered by referring to the release flag FR, and if not recovered, performs the closest approach point search process using the directed flag structure data of each convex polyhedron constituting the non-convex polyhedron. Execute. In addition, the processor 26 executes the recovery process if it does not interfere with the convex hull (virtuality = “1”).
【0081】リカバリ処理においては、解除フラグメモ
リ28を参照してマージングが解除された凸包が存在す
るか調べ、存在する場合には、他の物体と干渉している
かチェックし、干渉してなければ非干渉時間Tを計時す
る。そして、マージングが解除された凸包の非干渉時間
Tが設定値以上になっていれば、該凸包を復元する。す
なわち、解除フラグFRを0にする。しかし、他の物体
と干渉していたり、非干渉時間が設定値以上でない場合
には凸包を復元しない。ついで、ロボット制御装置から
入力されている静止フラグms(i)を参照して凸包の全
てが静止しているかチェック、静止していない場合には
上記干渉チェックを繰り返す。静止している場合、非凸
多面体を構成する凸多面体の相対的位置関係が変化して
いる場合にはマージング処理を実行して新たな凸包を作
成してメモリ25に記憶し、以後同様な処理を繰り返
す。In the recovery processing, the release flag memory 28 is referenced to check whether or not a convex hull whose merging has been released exists. If there is, it is checked whether or not it interferes with another object. For example, the non-interference time T is measured. Then, if the non-interference time T of the convex hull from which merging has been canceled is equal to or longer than the set value, the convex hull is restored. That is, the release flag FR is set to 0. However, the convex hull is not restored when it interferes with another object or when the non-interference time is not longer than the set value. Then, referring to the stationary flag ms (i) input from the robot controller, it is checked whether all of the convex hulls are stationary, and if not, the above interference check is repeated. When stationary, when the relative positional relationship of the convex polyhedrons constituting the non-convex polyhedron is changing, a merging process is executed to create a new convex hull, store it in the memory 25, and thereafter, Repeat the process.
【0082】以上より、本発明の非凸多面体間の最接近
点探索方法によれば、凸包を作成し、凸包の有向グラフ
型構造データを作成し、該凸包の有向グラフ型構造デー
タに基づいて最接近点探索処理を行うようにしたから、
凸多面体の組み合わせ数を大幅に減らすことができる。
又、環境が動的に変化することによって凸包が崩壊した
場合には、その後、一定時間、他の物体との干渉が生じ
なければ元の凸包を回復し、凸多面体の数を最小に保持
でき、計算負荷を現象できる。As described above, according to the method of searching for the closest point between non-convex polyhedrons according to the present invention, a convex hull is created, directed graph-type structure data of the convex hull is created, and based on the directed graph-type structure data of the convex hull. The closest approach point search process.
The number of combinations of convex polyhedrons can be greatly reduced.
Also, if the convex hull collapses due to the dynamic change of the environment, the original convex hull will be restored if there is no interference with other objects for a certain period of time, and the number of convex polyhedrons will be minimized. Can be maintained and the computational load can be reduced.
【0083】(D) 非凸多面体間の最接近点連続探索に
おける第1の方法 (a) 原理 複数の非凸多面体間の最接近点を連続的に追い掛ける
「最接近点の連続探索問題」において、各々の非凸多面
体に対してマージング処理を施し、形式上凸多面体間の
最接近点の連続問題にリダクションして解決する。この
とき、マージングにより求めた各凸多面体に対し、凸多
面体を構成する表面凸多角形に番号を付け、各々の凸多
角形の近傍に位置する格子点、辺、凸多角形を登録する
ための有向グラフ型構造データを作成し、最接近点探索
の計算負荷を表面多角形の格子点数の最大値のオーダO
(L)以下に抑える。マージングするに当たり、バーチ
ャリティという指標を導入する。バーチャリティとは、
マージングの過程で求まる凸多面体の表面多角形におい
て、元の非凸多面体の表面多角形と一致する場合にはバ
ーチャリティ=0,一致しない場合にはバーチャリティ
=1とする。(D) First Method in Continuous Search for Nearest Points between Nonconvex Polyhedrons (a) Principle In the “continuous search for closest points”, which continuously tracks the closest points between a plurality of nonconvex polyhedrons The merging process is performed on each of the non-convex polyhedrons to reduce and solve the continuity problem of the points of closest approach between the formal convex polyhedrons. At this time, for each convex polyhedron obtained by merging, numbers are assigned to surface convex polygons constituting the convex polyhedron, and lattice points, sides, and convex polygons located near each convex polygon are registered. Create a directed graph type structure data and calculate the calculation load of the closest point search by the order O of the maximum value of the number of grid points of the surface polygon.
(L) Keep below. In merging, an index called virtuality is introduced. What is virtuality?
In the surface polygon of the convex polyhedron obtained in the process of merging, if the surface polygon of the original non-convex polyhedron matches, the virtuality is set to 0, and if not, the virtuality is set to 1.
【0084】バーチャリティ=1の凸多角形との干渉が
発生した場合には、マージングを解除し、元の非凸多面
体を構成する凸多面体間の組み合わせに対して凸多面体
における本発明の第1の最接近点探索方法を適用する。
マージングの解除に伴う規則は以下の通りとする。 1)バーチャリティ=1の多角形(凸包Aの成分)とバー
チャリティ=0の多角形(凸包Bの成分)が干渉したな
らば、バーチャリティ=1の多角形を有する凸包Aを解
除する。 2)バーチャリティ=1の多角形(凸包Aの成分)とバー
チャリティ=1の多角形(凸包Bの成分)が干渉したな
らば、凸包を凸多面体に分解した時の構成凸多面体数の
少ない方の凸包を解除する。 3) バーチャリティ=0の多角形同士が干渉した場合に
は、どちらの凸包も解除しない。When interference with the convex polygon of virtuality = 1 occurs, merging is canceled and the first polyhedron of the present invention in the convex polyhedron is compared with the combination between the convex polyhedrons constituting the original non-convex polyhedron. The method of searching for the closest point is applied.
The rules for canceling merging are as follows. 1) If a polygon with virtuality = 1 (a component of convex hull A) and a polygon with virtuality = 0 (a component of convex hull B) interfere with each other, a convex hull A having a polygon with virtuality = 1 is generated. To release. 2) If the polygon with virtuality = 1 (the component of the convex hull A) and the polygon with the virtuality = 1 (the component of the convex hull B) interfere with each other, the constituent convex polyhedron when the convex hull is decomposed into a convex polyhedron Release the smaller number of convex hulls. 3) If the polygons with virtuality = 0 interfere with each other, neither convex hull is released.
【0085】図23に示すように、凸包Aと凸包Bが干
渉し((b)参照)、凸包Aが解除されて構成凸多面体の集
合DA(Decomposed A)が現われれば((c)参照)、以後、
集合DAと凸包B間で凸多面体における本発明の第1の
最接近点探索方法を適用する。この場合のアルゴリズム
は以下のようになる。 (b) 凸多面体集合と凸包間の最接近点探索アルゴリズム 1)凸包Aが解除された時の凸包Aの干渉面をPA(Virt
uality(PA)=1)とする。この時、干渉面PAの各辺は集
合DAの要素 Edge(DA,PA)とバーチャリティ=1の辺で
構成され、干渉面PAの格子点は集合DAの要素 Verte
x(DA,PA)で構成される。As shown in FIG. 23, if the convex hull A and the convex hull B interfere with each other (see (b)) and the convex hull A is released and a set DA (Decomposed A) of constituent convex polyhedrons appears ((( c)).
The first closest point search method of the present invention in the convex polyhedron between the set DA and the convex hull B is applied. The algorithm in this case is as follows. (b) Algorithm for searching for the point of closest approach between the convex polyhedron set and the convex hull 1) The interference surface of convex hull A when convex hull A is released is defined as PA (Virt
uality (PA) = 1). At this time, each side of the interference plane PA is composed of an element Edge (DA, PA) of the set DA and a side with virtuality = 1, and the lattice points of the interference plane PA are elements of the set DA
x (DA, PA).
【0086】2)構成凸多面体の集合DAと凸包B間の干
渉チェックは、 Edge(DA,PA)、 Vertex(DA,PA)と凸包B
間に凸多面体における本発明の第1の最接近点探索方法
を適用することにより行う。すなわち、 Edge(DA,PA)、
Vertex(DA,PA)を含むDAの表面凸多角形((c)の斜線
部参照)を、非凸多面体を構成する各凸多面体(A′、
A″)の有向グラフ型構造データより検索する。つい
で、それぞれより求めた表面多角形と凸包B間に並行し
て第1の最接近点探索方法を適用して干渉チェックを行
う((d)参照)。 3)バーチャリティ=1の凸多角形との干渉状態から抜け
出せば、リカバリ処理により解除した凸包を回復し、凸
包に対して最接近点探索処理を施す((e)参照)。2)の処
理により、最接近点探索の対象となる凸多面体A′、
A″の面数を少なくでき(凸多面体A′では1面、凸多
面体A″では2面)、最接近点探索処理の計算負荷を軽
減できる。2) The interference check between the set DA of the constituent convex polyhedron and the convex hull B is performed by Edge (DA, PA), Vertex (DA, PA) and convex hull B
This is performed by applying the first closest approach point search method of the present invention in a convex polyhedron. That is, Edge (DA, PA),
The surface convex polygon of DA including Vertex (DA, PA) (see the shaded portion of (c)) is converted to each convex polyhedron (A ′,
A ″) is searched from the directed graph type structure data.Then, the interference check is performed by applying the first closest approach point search method in parallel between the surface polygon and the convex hull B obtained respectively ((d)). 3) If the state escapes from the state of interference with the convex polygon of virtuality = 1, the convex hull released by the recovery processing is recovered, and the closest approach point search processing is performed on the convex hull (see (e)). By the processing of 2), the convex polyhedron A ′ to be searched for the closest approach point,
The number of planes of A ″ can be reduced (one plane for convex polyhedron A ′, two planes for convex polyhedron A ″), and the calculation load of the closest point search processing can be reduced.
【0087】(c) 最接近点連続探索処理のフロー 図24は非凸多面体間の最接近点連続探索処理の処理フ
ロー図である。対象となる非凸多面体を特定するデータ
を入力する(初期入力:環境モデル設定)。・・・ステ
ップ701 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiの有向グラフ型構造データを作成する。又、マージ
ング処理により凸包を生成すると共に、凸包の有向グラ
フ型構造データを作成する(ステップ702)。以上の
初期化処理が終了すると凸多面体における本発明の第1
の最接近点探索処理(干渉チェック)を実行する(ステ
ップ703)。ついで、干渉するかチェックし(ステッ
プ704)、干渉すればバーチャリティ=0の多角形同
士が干渉したかチェックし(ステップ705)、YES
であれば、どちらの凸包も解除せず処理を停止し、次の
指示を待つ。しかし、バーチャリティ=0の多角形同士
の干渉でなければ、バーチャリティ=1の多角形(凸包
Aの成分)とバーチャリティ=0の多角形(凸包Bの成
分)が干渉したかチェックする(ステップ706)。(C) Flow of the closest approach point continuous search process FIG. 24 is a process flowchart of the closest approach point continuous search process between non-convex polyhedrons. Input data specifying the target non-convex polyhedron (initial input: environment model setting). Step 701 Next, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P
Create Hi-directed graph type structure data. In addition, a convex hull is generated by merging, and directed graph type structure data of the convex hull is generated (step 702). When the above initialization process is completed, the first polyhedron of the present invention in the convex polyhedron is completed.
(Step 703). Next, it is checked whether or not they interfere (step 704). If they do, it is checked whether or not polygons having virtuality = 0 have interfered (step 705), and YES
If so, the processing is stopped without releasing either of the convex hulls, and the next instruction is awaited. However, if there is no interference between polygons of virtuality = 0, it is checked whether the polygon of virtuality = 1 (component of convex hull A) and the polygon of virtuality = 0 (component of convex hull B) have interfered. (Step 706).
【0088】YESであればバーチャリティ=1の多角
形を有する凸包Aを解除する(ステップ707)。NO
であれば、換言すれば、バーチャリティ=1の多角形
(凸包Aの成分)とバーチャリティ=1の多角形(凸包
Bの成分)が干渉したならば、凸包を凸多面体に分解し
た時の構成凸多面体数の少ない方の凸包を求め(ステッ
プ708)、該凸包を解除する(ステップ707)。つ
いで、干渉面PAの Edge(DA,PA)、 Vertex(DA,PA)を含
む集合DAの表面凸多角形を各凸多面体の有向グラフ型
構造データより検索してプロセッサに渡す(ステップ7
09)。以後、プロセッサは求めた表面多角形と凸包B
間に並行して第1の最接近点探索方法を適用して干渉チ
ェックを行う(ステップ703)。If YES, the convex hull A having the polygon of virtuality = 1 is released (step 707). NO
Then, in other words, if the polygon of virtuality = 1 (the component of convex hull A) and the polygon of virtuality = 1 (component of convex hull B) interfere, the convex hull is decomposed into a convex polyhedron. Then, the convex hull having the smaller number of constituent convex polyhedrons is obtained (step 708), and the convex hull is released (step 707). Then, a surface convex polygon of a set DA including Edge (DA, PA) and Vertex (DA, PA) of the interference plane PA is retrieved from the directed graph type structure data of each convex polyhedron and passed to the processor (step 7).
09). After that, the processor calculates the surface polygon and convex hull B
In parallel, an interference check is performed by applying the first closest approach point search method (step 703).
【0089】一方、ステップ704において、物体間が
干渉していなければリカバリ処理を実行する(ステップ
710)。リカバリ処理においては、マージングが解除
された凸包が存在するか調べ、存在する場合には、他の
物体と干渉しているかチェックし、干渉してなければ非
干渉時間を計時する。そして、マージングが解除された
凸包の非干渉時間が設定値以上になっていれば、該凸包
を復元する。しかし、他の物体と干渉していたり、非干
渉時間が設定値以上でない場合には凸包を復元せず次の
ステップを実行する。以後ステップ703に戻り以降の
処理を繰り返す。ついで、凸包の全ての部分が静止して
いるかチェック(ステップ711)、静止していない場
合にはステップ703に戻り以降の処理を繰返し、静止
している場合にはマージング処理を実行して新たな凸包
を作成し(ステップ712)、以後ステップ703に戻
り以降の処理を繰り返す。On the other hand, if there is no interference between the objects in step 704, a recovery process is executed (step 710). In the recovery process, it is checked whether or not the convex hull whose merging has been canceled exists. If there is, it is checked whether or not it interferes with another object. Then, if the non-interference time of the convex hull whose merging has been canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or the non-interference time is not longer than the set value, the next step is executed without restoring the convex hull. Thereafter, the process returns to step 703 and the subsequent processes are repeated. Next, it is checked whether all parts of the convex hull are stationary (step 711). If not stationary, the process returns to step 703 and the subsequent steps are repeated. Then, a convex hull is created (step 712), and the process returns to step 703 to repeat the subsequent processes.
【0090】(E) 非凸多面体間の最接近点連続探索に
おける第2の方法 (a) 原理 複数の非凸多面体間の最接近点を連続的に追い掛ける
「最接近点の連続探索問題」において、各々の非凸多面
体に対してマージング処理を施し、形式上凸多面体間の
最接近点の連続問題にリダクションして解決する。この
とき、本発明の第2の最接近点探索方法を適用する。す
なわち、マージングにより求めた各凸多面体に対し、凸
多面体を包む各表面凸多角形に三角形分割(Triangulat
ion)を施し、三角形分割した結果に対して有向グラフ型
のデータ構造を取り、最接近点探索の計算負荷を対象凸
多面体の複雑度に関係せずに一定に抑える。マージング
するに当たり、バーチャリティという指標を導入する。
バーチャリティとは、マージングの過程で求まる凸多面
体の表面多角形において、元の非凸多面体の表面多角形
と一致する場合にはバーチャリティ=0,一致しない場
合にはバーチャリティ=1とする。(E) Second Method in Continuous Search for Nearest Points between Non-convex Polyhedrons (a) Principle In the “continuous search for closest points” in which the closest points between a plurality of non-convex polyhedrons are continuously tracked. The merging process is performed on each of the non-convex polyhedrons to reduce and solve the continuity problem of the points of closest approach between the formal convex polyhedrons. At this time, the second closest approach point search method of the present invention is applied. That is, for each convex polyhedron obtained by merging, a triangulation (Triangulat
ion) and take a directed graph type data structure for the result of the triangulation, and keep the calculation load of the search for the closest approach point constant irrespective of the complexity of the target convex polyhedron. In merging, an index called virtuality is introduced.
In the surface polygon of the convex polyhedron obtained in the merging process, the virtuality is set to virtuality = 0 when the surface polygon matches the surface polygon of the original non-convex polyhedron, and virtuality = 1 when the surface polygon does not match.
【0091】バーチャリティ=1の三角形ポリゴンとの
干渉が発生した場合には、マージングを解除し(凸包の
解除)、元の非凸多面体を構成する凸多面体間の組み合
わせに対して本発明の第2の最接近点探索方法を適用す
る。マージングの解除に伴う規則は以下の通りとする。 1)バーチャリティ=1の三角形ポリゴン(凸包Aの成
分)とバーチャリティ=0の三角形ポリゴン(凸包Bの
成分)が干渉したならば、バーチャリティ=1の三角形
ポリゴンを有する凸包Aを解除する。 2)バーチャリティ=1の三角形ポリゴン(凸包Aの成
分)とバーチャリティ=1の三角形ポリゴン(凸包Bの
成分)が干渉したならば、凸包を凸多面体に分解した時
の構成凸多面体数の少ない方の凸包を解除する。 3)バーチャリティ=0の三角形ポリゴン同士が干渉した
場合には、どちらの凸包も解除しない。When interference with a triangular polygon with virtuality = 1 occurs, merging is canceled (release of the convex hull), and the present invention is applied to the combination between the convex polyhedrons constituting the original non-convex polyhedron. A second closest point search method is applied. The rules for canceling merging are as follows. 1) If a triangular polygon with virtuality = 1 (component of convex hull A) and a triangular polygon with virtuality = 0 (component of convex hull B) interfere, a convex hull A having a triangular polygon with virtuality = 1 is generated. To release. 2) If the triangular polygon with virtuality = 1 (component of convex hull A) and the triangular polygon with virtuality = 1 (component of convex hull B) interfere, the convex polyhedron when the convex hull is decomposed into a convex polyhedron Release the smaller number of convex hulls. 3) If the triangular polygons with virtuality = 0 interfere with each other, neither convex hull is released.
【0092】図25に示すように、凸包Aと凸包Bが干
渉し((b)参照)、凸包Aが解除されて構成凸多面体の集
合DA(Decomposed A)が現われれば((c)参照)、以後、
集合DAと凸包B間で凸多面体における本発明の第2の
最接近点探索方法を適用する。この場合のアルゴリズム
は以下のようになる。 1)凸包Aが解除された時の凸包Aの干渉三角形ポリゴン
をTA(Virtuality(TA)=1)とする。この時、干渉三角
形ポリゴンTAの各辺は集合DAの要素 Edge(DA,PA)と
バーチャリティ=1の辺で構成され、干渉三角形ポリゴ
ンTAの格子点は集合DAの要素 Vertex(DA,PA)で構成
される。As shown in FIG. 25, if the convex hull A and the convex hull B interfere with each other (see (b)) and the convex hull A is released and a set DA (Decomposed A) of constituent convex polyhedrons appears (( c)).
The second closest point search method of the present invention in the convex polyhedron between the set DA and the convex hull B is applied. The algorithm in this case is as follows. 1) The interference triangle polygon of the convex hull A when the convex hull A is released is set to TA (Virtuality (TA) = 1). At this time, each side of the interference triangular polygon TA is composed of the element Edge (DA, PA) of the set DA and the side of virtuality = 1, and the lattice point of the interference triangular polygon TA is the element Vertex (DA, PA) of the set DA. It consists of.
【0093】2)構成凸多面体の集合DAと凸包B間の干
渉チェックは、 Edge(DA,PA)、 Vertex(DA,PA)と凸包B
間に凸多面体における本発明の第2の最接近点探索方法
を適用することにより行う。すなわち、 Edge(DA,PA)、
Vertex(DA,PA)を含むDAの三角形ポリゴン((c)の斜
線部参照)を、非凸多面体を構成する各凸多面体
(A′、A″)の有向グラフ構造データより検索する。
ついで、それぞれより求めた三角形ポリゴンと凸包B間
に並行して第2の最接近点探索方法を適用して干渉チェ
ックを行う((d)参照)。 3)バーチャリティ=1の三角形ポリゴンとの干渉状態か
ら抜け出せば、リカバリ処理により解除した凸包を回復
し、凸包に対して最接近点探索処理を施す((e))。2)の
処理により、最接近点探索の対象となる凸多面体A′、
A″の三角形ポリゴン数を少なくでき(凸多面体A′、
A″でそれぞれ2個)、最接近点探索処理の計算負荷を
軽減できる。2) The interference check between the set DA of the constituent convex polyhedron and the convex hull B is performed by Edge (DA, PA), Vertex (DA, PA) and convex hull B
This is performed by applying the second closest point search method of the present invention in a convex polyhedron. That is, Edge (DA, PA),
A triangular polygon of DA including Vertex (DA, PA) (see the hatched portion in (c)) is searched from the directed graph structure data of each convex polyhedron (A ′, A ″) constituting the non-convex polyhedron.
Next, an interference check is performed by applying the second closest approach point search method in parallel between the triangular polygon and the convex hull B obtained respectively (see (d)). 3) If the state escapes from the interference state with the triangular polygon of virtuality = 1, the convex hull released by the recovery processing is recovered, and the closest hull search processing is performed on the convex hull ((e)). By the processing of 2), the convex polyhedron A ′ to be searched for the closest approach point,
A ″ can reduce the number of triangular polygons (convex polyhedron A ′,
A ″, two for each), the calculation load of the closest point search process can be reduced.
【0094】(b) 非凸多面体間の最接近点連続探索処理 図26は非凸多面体間の第2の最接近点連続探索処理の
フロー図である。対象となる非凸多面体を特定するデー
タを入力する(初期入力:環境モデル設定)。・・・ス
テップ801 ついで、非凸多面体を凸多面体に分割し、各凸多面体P
Hiに対して三角形分割を行い、しかる後、各凸多面体
の有向グラフ型構造データを作成する。又、マージング
処理により凸包を生成すると共に、凸包の有向グラフ型
構造データを作成する(ステップ802)。(B) Process for continuously searching for points of closest approach between non-convex polyhedrons FIG. 26 is a flowchart of a process for continuously searching for points of closest approach between non-convex polyhedrons. Input data specifying the target non-convex polyhedron (initial input: environment model setting). Step 801 Next, the non-convex polyhedron is divided into convex polyhedrons, and each convex polyhedron P
Triangulation is performed on Hi, and thereafter, directed graph type structural data of each convex polyhedron is created. Further, a convex hull is generated by the merging process, and directed graph type structure data of the convex hull is generated (step 802).
【0095】以上の初期化処理が終了すると非凸多面体
間の第2の最接近点探索処理(干渉チェック)を実行す
る(ステップ803)。干渉するかチェックし(ステッ
プ804)、干渉すればバーチャリティ=0の三角形ポ
リゴン同士が干渉したかチェックし(ステップ80
5)、YESであれば、どちらの凸包も解除せず処理を
停止し、次の指示を待つ。しかし、バーチャリティ=0
の三角形ポリゴン同士の干渉でなければ、バーチャリテ
ィ=1の三角形ポリゴン(凸包Aの成分)とバーチャリ
ティ=0の三角形ポリゴン(凸包Bの成分)が干渉した
かチェックする(ステップ806)。YESであればバ
ーチャリティ=1の三角形ポリゴンを有する凸包Aを解
除する(ステップ807)。NOであれば、換言すれ
ば、バーチャリティ=1の三角形ポリゴン(凸包Aの成
分)とバーチャリティ=1の三角形ポリゴン(凸包Bの
成分)が干渉したならば、凸包を凸多面体に分解した時
の構成凸多面体数の少ない方の凸包を求め(ステップ8
08)、該凸包を解除する(ステップ807)。When the above initialization processing is completed, a second closest point search processing (interference check) between the non-convex polyhedrons is executed (step 803). It is checked whether or not they interfere (step 804). If they do, it is checked whether or not the triangular polygons with virtuality = 0 have interfered (step 80).
5) If YES, stop processing without releasing either convex hull and wait for the next instruction. However, virtuality = 0
If the triangle polygons do not interfere with each other, it is checked whether or not the triangular polygon with the virtuality = 1 (the component of the convex hull A) and the triangular polygon with the virtuality = 0 (the component of the convex hull B) have interfered (step 806). If YES, the convex hull A having the triangular polygon with virtuality = 1 is released (step 807). If NO, in other words, if the triangular polygon with virtuality = 1 (component of convex hull A) and the triangular polygon with virtuality = 1 (component of convex hull B) interfere, the convex hull is converted into a convex polyhedron. Find the convex hull with the smaller number of constituent polyhedrons when decomposed (step 8)
08), the convex hull is released (step 807).
【0096】ついで、干渉三角形ポリゴンTAの Edge
(DA,PA)、 Vertex(DA,PA)を含む集合DAの三角形ポリ
ゴンを各凸多面体の有向グラフ構造データより検索して
プロセッサに渡す(ステップ809)。以後、プロセッ
サは求めた三角形ポリゴンと凸包B間に並行して第2の
最接近点探索方法を適用して干渉チェックを行う(ステ
ップ803)。一方、ステップ804において、物体間
が干渉していなければリカバリ処理を実行する(ステッ
プ810)。Next, the edge of the interference triangle polygon TA
Triangular polygons of a set DA including (DA, PA) and Vertex (DA, PA) are retrieved from the directed graph structure data of each convex polyhedron and passed to the processor (step 809). After that, the processor performs an interference check by applying the second closest approach point search method in parallel between the obtained triangular polygon and the convex hull B (step 803). On the other hand, if there is no interference between the objects in step 804, a recovery process is executed (step 810).
【0097】リカバリ処理においては、マージングが解
除された凸包が存在するか調べ、存在する場合には、他
の物体と干渉しているかチェックし、干渉してなければ
非干渉時間を計時する。そして、マージングが解除され
た凸包の非干渉時間が設定値以上になっていれば、該凸
包を復元する。しかし、他の物体と干渉していたり、非
干渉時間が設定値以上でない場合には凸包を復元せず次
のステップを実行する。 ついで、凸包の全ての部分が
静止しているかチェック(ステップ811)、静止して
いない場合にはステップ803に戻り以降の処理を繰返
し、静止している場合にはマージング処理を実行して新
たな凸包を作成し(ステップ812)、以後ステップ8
03に戻り以降の処理を繰り返す。In the recovery processing, it is checked whether or not the convex hull whose merging has been canceled exists. If there is, it is checked whether or not it interferes with another object. If not, the non-interference time is measured. Then, if the non-interference time of the convex hull whose merging has been canceled is equal to or longer than the set value, the convex hull is restored. However, if it interferes with another object or the non-interference time is not longer than the set value, the next step is executed without restoring the convex hull. Next, it is checked whether all parts of the convex hull are stationary (step 811). If not stationary, the process returns to step 803 and the subsequent processing is repeated. Create a convex hull (step 812),
03 and the subsequent processing is repeated.
【0098】(F)非凸多面体の凸多面体への第1の分
解処理(前処理) (a) システムの構成 非凸多面体間の最接近点探索を実行するためには非凸多
面体を凸多面体に分解する必要がある。図27はグラフ
ィックワークステーション上の形状モデルに最接近点探
索の前処理を施す場合におけるシステム構成図であり、
GWSはグラフィックワークステーション、CPUは最
接近点探索の前処理や最接近点探索処理、その他の処理
を実行するプロセッサ、MEMはメモリであり、図示し
ない三次元CADシステムで設計された形状データFD
Tや最接近点探索の前処理プログラムICP等を記憶す
るもの、DPLは表示部、OPSはキーボード、マウス
等の操作部、OPRはオペレータである。オペレータO
PRは、操作部OPSを使ってプロセッサCPUに対し
グラフィックワークステーションGWS上の形状モデル
に対して前処理を実行するように指令を入力する。前処
理指令が入力されると、プロセッサCPUはメモリME
Mに記憶されている最接近点探索の前処理プログラムI
CPに基づいて非凸多面体の形状データFDTを用いて
前処理(非凸多面体のポリゴン集合の分割処理)を実行
する。そして、分割結果をメモリMEMに記憶すると共
に、前処理結果を表示部DPLを通してオペレータに提
示する。(F) First Decomposition Process of Nonconvex Polyhedron into Convex Polyhedron (Preprocessing) (a) System Configuration To execute the search for the closest point between the nonconvex polyhedrons, the nonconvex polyhedron is converted into a convex polyhedron. Need to be disassembled. FIG. 27 is a system configuration diagram in a case where preprocessing for searching for the closest approach point is performed on the shape model on the graphic workstation.
GWS is a graphic workstation, CPU is a processor that executes pre-processing for searching for the closest approach point, processing for searching for the closest approach point, and other processing. MEM is a memory, and the shape data FD designed by a three-dimensional CAD system (not shown).
TPL, a preprocessing program ICP for searching for the closest approach point, and the like, DPL is a display unit, OPS is an operation unit such as a keyboard and a mouse, and OPR is an operator. Operator O
The PR uses the operation unit OPS to input a command to the processor CPU to execute preprocessing on the shape model on the graphic workstation GWS. When the preprocessing command is input, the processor CPU
Preprocessing program I for searching for the closest approach point stored in M
Based on the CP, preprocessing (division processing of a polygon set of the non-convex polyhedron) is performed using the non-convex polyhedron shape data FDT. Then, the division result is stored in the memory MEM, and the preprocessing result is presented to the operator through the display unit DPL.
【0099】(b) 最接近点探索の前処理の概略 図28は本発明の最接近点探索の前処理の概略的な処理
フローである。三次元CADシステムは形状モデル(非
凸多面体)を作成してグラフィックワークステップGW
Sに入力する(ステップ1001、1002)。CAD
システムは物体(非凸多面体)をポリゴンで覆った場合
における全ポリゴンデータを入力する。ポリゴンデータ
は、ポリゴンの各頂点の座標値とその点における光の反
射方向を示す情報を有している。最も一般的なポリゴン
データは、図28に示すように三角形ポリゴンの張り合
わせで表現されるものである。図28に示す三角形ポリ
ゴンのデータの場合、normal に続く3つの実数が光の
反射方向を示し、vertex に続く3つの実数が頂点座標
値を表している。三次元CADシステム内の形状モデル
からポリゴンデータを出力する手順は通常、三次元CA
Dシステム内に用意されている。ついで、分割統治法に
よる凸分解基本アルゴリズムに従って、上記ポリゴンデ
ータを凸要素毎に分割されたポリゴンデータの組(ポリ
ゴン部分集合)に分ける。すなわち、初期のポリゴンデ
ータ(非凸多面体のポリゴン集合)を凸要素毎の部分集
合の組に分割して出力する(ステップ1003,100
4)。しかる後、各部分集合毎に凸多面体を生成する。
尚、ポリゴンの各形状は一般的に任意であるが、各ポリ
ゴンは凸性を満たしているものとする。(B) Outline of Preprocessing for Searching for Nearest Point FIG. 28 is a schematic processing flow of preprocessing for searching for the closest point according to the present invention. The 3D CAD system creates a shape model (non-convex polyhedron) and creates a graphic work step GW
Input to S (steps 1001 and 1002). CAD
The system inputs all polygon data when the object (non-convex polyhedron) is covered with polygons. The polygon data has information indicating the coordinate value of each vertex of the polygon and the light reflection direction at that point. The most common polygon data is represented by a combination of triangular polygons as shown in FIG. In the case of the triangular polygon data shown in FIG. 28, three real numbers following normal indicate the light reflection direction, and three real numbers following vertex indicate the vertex coordinate values. The procedure for outputting polygon data from a shape model in a three-dimensional CAD system is usually a three-dimensional CA
It is provided in the D system. Next, the polygon data is divided into sets of polygon data (polygon subsets) divided for each convex element according to a basic algorithm for convex decomposition based on the division and conquer method. That is, initial polygon data (polygon set of non-convex polyhedron) is divided into sets of subsets for each convex element and output (steps 1003 and 100).
4). Thereafter, a convex polyhedron is generated for each subset.
Although each shape of the polygon is generally arbitrary, it is assumed that each polygon satisfies convexity.
【0100】(c) 分割統治法による凸分解基本アルゴリ
ズム 図29は分割統治法による凸分解基本アルゴリズムのフ
ロー図である。初期ポリゴン集合(非凸多面体のポリゴ
ン集合)Pを入力し(ステップ1101)、ついで、初
期ポリゴン集合Pに対して分割統治法による処理を施す
(ステップ1102)。すなわち、初期ポリゴン集合P
を第1、第2の2つのグループに分割し、各グループに
おいて隣接ポリゴンとの関係が凸であるポリゴン部分集
合を求める。ついで、共通の境界稜線を有する第1グル
ープのポリゴン部分集合と第2グループのポリゴン部分
集合とが凸関係にあるものを併合して凸要素毎の複数の
新たなポリゴン部分集合DP1,DP2,・・・を求め
る。しかる後、ポリゴン部分集合DP1,DP2,・・
・を出力する(ステップ1103)。(C) Basic Algorithm for Convex Decomposition by Divide and Conquer FIG. 29 is a flowchart of a basic algorithm for convex decomposition by divide and conquer. An initial polygon set (polygon set of a non-convex polyhedron) P is input (step 1101), and the initial polygon set P is subjected to processing by the divide and conquer method (step 1102). That is, the initial polygon set P
Is divided into first and second groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Next, a polygonal subset of the first group and a polygonal subset of the second group having a common boundary ridge are merged in a convex relationship to form a plurality of new polygon subsets DP1, DP2,.・ ・Then, the polygon subsets DP1, DP2,.
Is output (step 1103).
【0101】以下は、分割統治法の詳細のプログラム例
である。 定義 P={p1,p2,p3,・・・}:初期ポリゴン集合 DC(P)={DP1={1p1,1p2,1p3,・・・},DP2={2p1,2p2,2p3,・・・},・・・} :Pの分割ポリゴン集合 NoP:Pの要素数 Algorithm(分割統治法) if(入力ポリゴン数が1、i.e.,NoP=1)then DC(P)=P else DIVIDE: k=[Pの要素数/2] PL={p1,p2,p3,・・・,pk}:k以下のポリゴン集合 PH={pk+1,pk+2,pk+3,・・・,pNoP}:kより大きい ポリゴン集合 RECUR: Costruct DC(PL) and DC(PH) recursively. MERGE: Merge DC(PL) and DC(PH) DC(P)=Merge (DC(PL),DC(PH)) endif 上記アルゴリズムから判るとおり、分割統治法では、分
割と統治の過程が再起的に繰り返される。分割統治法に
おいて問題依存性が存在する最も重要な個所は、「併
合」過程、すなわち、関数Mergeの構成方法である。The following is a detailed program example of the divide and conquer method. Define 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: Number of elements of P Algorithm (divided and conquer method) 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 less than k PH = {P k + 1 , p k + 2 , p k + 3 ,..., P NoP }: 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 divide-and-conquer method, the process of divide and conquer is repeated recursively. The most important place where problem dependence exists in the divide-and-conquer method is the "merging" process, that is, the construction method of the function Merge.
【0102】(d) 分割統治法におけるMergeプロセス 図30は分割統治法におけるMergeプロセスの流れ図で
ある。 1) 凸要素集合DC(PL),DC(PH)を用意する
(ステップ1111a,1111b)。凸要素集合DC
(PL),DC(PH)の各要素は、図30のCLi,
CHjで示されるようにその要素を構成するポリゴンの
集合(polygons)とその要素の境界をなす境界稜線の集
合(boundary edges)で構成される。 2) Merge 可能性の判定 凸要素CLi,CHjが互いにMerge可能か否かを判定
する(ステップ1112)。判定条件は以下の通りであ
る。 条件1:凸要素CLi,CHjで共有している境界稜線
を全て取り出す。共有しているか否かは、境界稜線を構
成するポリゴン辺の中点を比較することにより判定でき
る。共有している境界稜線が1本もなければMerge不可
能と判定する。 条件2:共有している境界稜線に対し、その稜線を共有
するCLiのポリゴンとCHjのポリゴン間の凹凸関係
を調べる。1組でも凹の関係にあるポリゴンの組合せが
存在すれば、Merge不可能と判定する。 条件3:条件1、条件2をクリアした場合、すなわち、
境界稜線を共有するポリゴンの全組合せにおいてポリゴ
ン間が凸の関係にある時はMerege可能と判定する。(D) Merge process in the divide-and-conquer method FIG. 30 is a flowchart of the Merge process in the divide-and-conquer method. 1) Prepare convex element set DC (PL), DC (PH)
(Steps 1111a and 1111b). Convex element set DC
(PL) and DC (PH) are represented by CLi,
As shown by CHj, it is composed of a set of polygons (polygons) constituting the element and a set of boundary edges (boundary edges) forming the boundary of the element. 2) Judgment of Merge Possibility It is judged whether or not the convex elements CLi and CHj can be merged with each other (step 1112). The judgment conditions are as follows. Condition 1: All boundary edges shared by the convex elements CLi and CHj are extracted. Whether or not they are shared can be determined by comparing the midpoints of the polygon sides constituting the boundary ridge line. If there is no shared border ridge, it is determined that merging is not possible. Condition 2: With respect to the shared boundary ridge line, the unevenness relationship between the CLi polygon and the CHj polygon sharing the ridge line is examined. If there is at least one combination of polygons having a concave relationship, it is determined that merging is impossible. Condition 3: When conditions 1 and 2 are cleared, that is,
If the polygons have a convex relationship in all combinations of polygons sharing the boundary ridge line, it is determined that Merge is possible.
【0103】3) Mergeの順序 凸要素のMergeは以下の順序で行なう。 3-1) 凸要素CL1がCHj(j=1,2,・・・NPH)とMerge可能か
否かを判定する。もし、CL1がCHjとMerge可能であ
れば、それ以降は、CL1,DC(PH)を以下のように
する。 CL1∪CHj→CL1 DC(PH)={CH1,CH2,・・・CHj-1,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 CHj(j = 1,2, ... NPH) and Merge available
Determine whether or not. If CL1Is CHjAnd Merge is possible
Then, after that, CL1, DC (PH) as follows
I do. CL1∪CHj→ CL1 DC (PH) = $ CH1, CHTwo, ... CHj-1, CHj + 1・
・ ・} 3-2) Execute the same procedure for CLi (i = 2,3, ... NPL)
You. 4) Configuration of merged convex element set DC (P) By the process of 3) above, merged convex element set DC (P) = Merge (DC (PL), D
C (PH)) is executed, and DC (P) = {CL1, CLTwo, ... 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 Unevenness Relationship between Polygons FIG. 31 is an explanatory diagram of the unevenness relationship determination processing between polygons. As shown in FIG. 31A, two polygons A and B sharing one boundary ridge BEG are assumed. The relative positional relationship of the polygons is either apart from each other or in contact with each other via an edge as shown in FIG. etc)
Shall not exist. In FIG. 31 (a), vectors b,
c is a perpendicular vector dropped from the centroids p and q of the polygons B and A to the boundary ridge line x 1 −x 0 = a, respectively. Moreover, the vector a, b, respectively obtained by the unit of the c and e 0, e 1, e 2 . n A and n B represent outward normal vectors of the polygons A and B , respectively (average of light reflection directions at respective grid points defining the polygons). 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|Two・ Ha
Is the inner product of the vector = p-x0-e0・ (P-x0) e0 c = q-x0-e0・ (Q-x0) e0 e0= A / | a | e1= B / | b | eTwo= C / | c | to determine the unevenness relationship between polygon A and polygon B
As shown in 6 (b), the vector b is X0Coordinates to match axis
Perform the conversion. The transformation matrix at this time is
【数1】 で与えられる。(Equation 1) Given by
【0106】法線ベクトルnBの向きにより、次の2通
りの条件のどちらかを満たせば、ポリゴンA,ポリゴン
Bは凸の関係にあるといえる。すなわち、 1) (e0×e1)・nB>0の場合 [T・c]Z<0 であり、かつ、 (e1×e2)・nA>0を満たす時、 2) (e0×e1)・nB≦0の場合 [T・c]Z≧0 であり、かつ、 (e1×e2)・nA≦0を満たす時、 ポリゴンA,ポリゴンBは凸の関係にあるといえる。実
際のCADデータを扱う場合には、誤差を考慮して判定
条件は以下のようになる。If one of the following two conditions is satisfied according to 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) ( If 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 dealing with actual CAD data, determination conditions are as follows in consideration of errors.
【0107】1) (e0×e1)・nB>0の場合 [T・c]Z<ε であり、かつ、 (e1×e2)・nA>−εを満たす時、 2) (e0×e1)・nB≦0の場合 [T・c]Z≧−ε であり、かつ、 (e1×e2)・nA≦εを満たす時、 ポリゴンA,ポリゴンBは凸の関係にある。ここで、ε
は扱う対象によって決める微少量である。分割統治法で
得られるポリゴン部分集合の集合DC(P)の各要素
は、実は凸とは限らない。図31に示した凹凸判定条件
は、局所的条件である。しかしながら、図31に示した
条件のもとに初期のポリゴン集合を分割すると、多くの
場合において非常によい凸性を示す。1) When (e 0 × e 1 ) · n B > 0 When [T · c] Z <ε and (e 1 × e 2 ) · n A > −ε, 2 ) When (e 0 × e 1 ) · n B ≦ 0 [T · c] Z ≧ −ε and (e 1 × e 2 ) · n A ≦ ε, polygon A and polygon B Are in a convex relationship. Where ε
Is a very small amount determined by the object to be treated. Each element of the set DC (P) of the polygon subset obtained by the divide-and-conquer method is not necessarily 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 exhibited in many cases.
【0108】 (G)凸多面体への分解処理の第2実施例(前処理) 分割統治法による基本アルゴリズムによって凸分解を行
なう場合、分解したあとの凸要素数は最少とは限らな
い。第2実施例では、凸分解基本アルゴリズムを繰り返
して使用することにより、凸要素数を最適化する(でき
るだけ少なくする)ものである。第2実施例の最適化法
は厳密な意味で凸要素数を最小化する分けではなく、あ
くまでも限られた時間内で、できるだけ要素数を減らす
手法である。図32は第2実施例(最適化法)の処理の
流れ図である。三次元CADシステム等から初期ポリゴ
ン集合(非凸多面体のポリゴン集合)Pを入力し(ステ
ップ1201)、ついで、初期ポリゴン集合Pに対して
分割統治法による凸分解基本アルゴリズムを適用する
(ステップ1202)。すなわち、初期ポリゴン集合P
を第1、第2の2つのグループに分割し、各グループに
おいて隣接ポリゴンとの関係が凸であるポリゴン部分集
合を求める。ついで、共通の境界稜線を有する第1グル
ープのポリゴン部分集合と第2グループのポリゴン部分
集合とが凸関係にあるものを併合して凸要素毎の複数の
新たなポリゴン部分集合DP1,DP2,・・・を求め
る。(G) Second Example of Decomposition into Convex Polyhedron (Preprocessing) When performing convex decomposition by a basic algorithm based on the divide-and-conquer method, the number of convex elements after decomposition is not always the minimum. In the second embodiment, the number of convex elements is optimized (minimized as much as possible) by repeatedly using the basic algorithm of convex decomposition. The optimization method of the second embodiment is not a method of strictly minimizing the number of convex elements, but a method of reducing the number of elements as much as possible within a limited time. FIG. 32 is a flowchart of the process of the second embodiment (optimization method). An initial polygon set (polygon set of non-convex polyhedron) P is input from a three-dimensional CAD system or the like (step 1201), and then a basic algorithm for convex decomposition based on the divide and conquer method is applied to the initial polygon set P (step 1202). . That is, the initial polygon set P
Is divided into first and second groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Next, a polygonal subset of the first group and a polygonal subset of the second group having a common boundary ridge are merged in a convex relationship to form a plurality of new polygon subsets DP1, DP2,.・ ・
【0109】しかる後、ポリゴン部分集合DP1,DP
2,・・・を要素とする凸要素集合DC(P)を出力す
る(ステップ1203)。尚、凸要素数はNDC(P)
である。ついで、凸要素集合DC(P)に再度分割統治
法による凸分解基本アルゴリズムを適用する(ステップ
1204)。すなわち、凸要素集合DC(P)を構成す
る複数のポリゴン部分集合を第1、第2のグループに分
割し、各グループにおいて隣接ポリゴンとの関係が凸で
あるポリゴンの部分集合を求め、共通の境界稜線を有す
る第1グループのポリゴン部分集合と第2グループのポ
リゴン部分集合とが凸関係にあるものを併合して複数の
新たなポリゴン部分集合DDP1,DDP2,・・・を
求める。しかる後、ポリゴン部分集合DDP1,DDP
2,・・・を要素とする凸要素集合DC(DC(P))
を出力する(ステップ1205)。尚、凸要素数はND
DC(P)である。Thereafter, the polygon subsets DP1, DP
A convex element set DC (P) having 2,... As elements is output (step 1203). The number of convex elements is NDC (P)
It is. Next, the convex decomposition basic algorithm based on the divide-and-conquer method is applied to the convex element set DC (P) again (step 1204). That is, a plurality of polygon subsets constituting the convex element set DC (P) are divided into first and second groups, and a subset of polygons having a convex relationship with adjacent polygons in each group is obtained. A plurality of new polygon subsets DDP1, DDP2,... Are obtained by merging polygon subsets of the first group having boundary edges and polygon subsets of the second group in a convex relationship. Then, the polygon subsets DDP1, DDP
A convex element set DC (DC (P)) having 2,.
Is output (step 1205). The number of convex elements is ND
DC (P).
【0110】ついで、前回に求めたポリゴン部分集合の
数NDC(P)と今回求めたポリゴン部分集合の数ND
DC(P)を比較し(ステップ1206)、一致すれ
ば、凸要素集合DC(DC(P))を最終的に出力する
(ステップ1207)。そして、この凸要素集合DC
(DC(P))を構成するポリゴン部分集合を用いて凸
多面体を生成することになる一方、NDDC(P)とN
DC(P)が等しくない場合には(例えば、NDDC
(P)<NDC(P))、DC(DC(P))→DC
(P)とし(ステップ1208)、以後、ステップ12
04以降の処理を繰り返す。すなわち、新たに求めた複
数のポリゴン部分集合DC(DC(P))に対して分割
統治法による凸分解処理を繰返し施す。最適化法では、
凸要素数がこれ以上減らなくなるまで凸分解基本アルゴ
リズムを出力DC(P)に対して繰返し作用させる。Next, the number of polygon subsets NDC (P) obtained previously and the number ND of polygon subsets obtained this time are calculated.
DC (P) is compared (step 1206), and if they match, a convex element set DC (DC (P)) is finally output (step 1207). And this convex element set DC
A convex polyhedron is generated using a polygon subset constituting (DC (P)), while NDDC (P) and N
If DC (P) is not equal (eg, NDDC
(P) <NDC (P)), DC (DC (P)) → DC
(P) (step 1208).
The process after 04 is repeated. That is, a plurality of newly obtained polygon subsets DC (DC (P)) are repeatedly subjected to convex decomposition processing by the divide-and-conquer method. In the optimization method,
The convex decomposition basic algorithm is repeatedly applied to the output DC (P) until the number of convex elements no longer decreases.
【0111】 (H)凸多面体への分解処理の第3実施例(前処理) 分割統治法による基本アルゴリズムを用いる方法では、
穴等の認識において分割した凸要素数が予想以上に増え
る可能性がある。第3実施例では、凸要素数を減少する
ために、穴等の物体に対してブール代数を負とみなして
凸分解処理を行ない、その他の正物体に対して第1実施
例の凸分解処理を施すものである。ブール代数を負とみ
なすとは、端的に各ポリゴンの法線方向の符号を反転
(法線方向を逆転)することである。通常の分割統治法
による基本アルゴリズムと負物体認識法とを組み合わせ
ることにより、凸要素数の少ない凸分解が可能となる。
図33は穴等の形状(負物体)を含む物体のブール集合
演算による物体表現法の説明図である。HLは穴、H
L′は法線方向を逆転した穴部、BDYは穴のない物体
(穴なし物体)である。穴付き物体は穴なし物体BDY
から法線方向を逆転した穴部分を差し引くことにより表
現される。(H) Third Example of Decomposition into Convex Polyhedron (Preprocessing) In the method using the basic algorithm by the divide-and-conquer method,
There is a possibility that the number of divided convex elements in recognition of a hole or the like increases more than expected. In the third embodiment, in order to reduce the number of convex elements, convex decomposition processing is performed on an object such as a hole by regarding a Boolean algebra as negative, and the convex decomposition processing of the first embodiment is performed on other positive objects. Is applied. To regard a Boolean algebra as negative is to simply reverse the sign of the normal direction of each polygon (reverse the normal direction). Combining the basic algorithm based on the ordinary divide-and-conquer method with the negative object recognition method enables convex decomposition with a small number of convex elements.
FIG. 33 is an explanatory diagram of an object expression method by a Boolean set operation of an object including a shape such as a hole (negative object). HL is a hole, H
L 'is a hole portion whose normal direction is reversed, and BDY is an object without a hole (object without a hole). Objects with holes are BDY without holes
It is expressed by subtracting the hole portion whose normal direction is reversed from.
【0112】図34は第3実施例の凸分解処理の流れ
図、図35はその凸分解結果の説明図である。三次元C
ADシステム等から初期ポリゴン集合(非凸多面体のポ
リゴン集合)Pを入力し(ステップ1301)、つい
で、初期ポリゴン集合Pの法線方向を全て逆転したポリ
ゴン集合PBを作る(ステップ1302)。しかる後、
ポリゴン集合PBに対して凸分解基本アルゴリズムを適
用する(ステップ1303)。すなわち、ポリゴン集合
PBを第1、第2の2つのグループに分割し、各グルー
プにおいて隣接ポリゴンとの関係が凸であるポリゴン部
分集合を求める。ついで、共通の境界稜線を有する第1
グループのポリゴン部分集合と第2グループのポリゴン
部分集合とが凸関係にあるものを併合して凸要素毎の複
数の新たなポリゴン部分集合を求める。FIG. 34 is a flowchart of the convex decomposition processing of the third embodiment, and FIG. 35 is an explanatory diagram of the result of the convex decomposition. 3D C
Initial polygon set from AD system or the like enter the P (polygon set of non-convex polyhedron) (step 1301), then making the polygon set P B was reversed all the normal direction of the initial polygon set P (step 1302). After a while
Applying a convex decomposition basic algorithm for polygon set P B (step 1303). That is, the first polygon set P B, is divided into second two groups, obtaining the polygon subset relationship between adjacent polygons is convex in each group. Then the first with a common border ridge
The polygon subsets of the group and the polygon subsets of the second group that have a convex relationship are merged to determine a plurality of new polygon subsets for each convex element.
【0113】しかる後、該複数のポリゴン部分集合を要
素とする凸要素集合DC(PB)(図35参照)を出力
し、又、凸要素集合DC(PB)の各凸要素において、
ポリゴン数が2以上で構成される凸要素を取りだし、そ
れらの凸要素を構成する全てのポリゴン集合をP2(D
C(PB))とする。すなわち、穴等の負物体凸要素を
構成するポリゴンを集めてP2(DC(PB))とする
(ステップ1304)。ついで、初期ポリゴン集合Pと
P2(DC(PB))の差集合を取り、正物体を構成する
ポリゴン集合P-P2(DC(PB))を求める(ステップ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 for each convex element of the convex element set DC (P B ),
A convex element composed of two or more polygons is extracted, and all the polygon sets constituting the convex element are represented by P 2 (D
C (P B )). That is, polygons constituting a negative object convex element such as a hole 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 obtained, and a polygon set PP 2 (DC (P B )) constituting the positive object is obtained (step 130).
5). When the polygon set (difference set) constituting the regular object is obtained, the basic algorithm for convex decomposition by the divide and conquer 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
Each group is divided into groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Then, a plurality of new polygon subsets for each convex element are obtained by merging polygon subsets of the first group and polygon subsets of the second group having a common boundary ridge in a convex relationship. 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), and recognition of a regular object is performed. Finally, DC (PP 2 (DC (P B ))) is a convex element of a positive object, DC
(P B ) is output as a convex element of a negative object (Step 1)
308). Thereafter, a convex polyhedron is generated using the polygon subset of each convex element.
【0114】 (I)凸多面体への分解処理の第4実施例(前処理) 凸分解の第1実施例に最適化法を施すことにより凸要素
数を減少したのと同様に、第3実施例に最適化法を施し
て凸要素数を減少することができる。図36はかかる場
合の凸分解処理の流れ図であり、第3実施例と異なる点
は、ステップ1303′、1306′において凸分解基
本アルゴリズムの替わりに最適化法を適用した点であ
る。(I) Fourth Embodiment of Decomposition into Convex Polyhedron (Pre-Processing) The third embodiment is similar to the first embodiment of the convex decomposition in which the number of convex elements is reduced by performing an optimization method. An optimization method can be applied to the example to reduce the number of convex elements. FIG. 36 is a flowchart of the convex decomposition processing in such a case, which is different from the third embodiment in that an optimization method is applied instead of the basic convex decomposition algorithm in steps 1303 'and 1306'.
【0115】 (J)凸多面体への分解処理の第5実施例(前処理) (a) 考察 以上の実施例では、第1グループのポリゴン部分集合C
Liと第2グループのポリゴン部分集合CHjのMerge
可能性を以下のように判定している。すなわち、ポリゴ
ン部分集合CLiとポリゴン部分集合CHjが共通稜線
を有しているのか、いないのかに関係なく、CLiの境
界稜線を構成する全ポリゴン辺とCHjの境界稜線を構
成する全ポリゴン辺の中点が一致するか否かにより共通
の境界稜線を求めている。(J) Fifth Embodiment of Decomposition into Convex Polyhedron (Preprocessing) (a) Consideration In the above embodiment, the polygon subset C of the first group is used.
Merge of Li and polygon subset CHj of the second group
The possibility is determined as follows. That is, irrespective of whether the polygon subset CLi and the polygon subset CHj have a common edge, or not, all of the polygon edges forming the boundary edge of CLi and all the polygon edges forming the boundary edge of CHj A common boundary ridge is determined based on whether or not the points match.
【0116】しかし、かかるMerge可能性の判定処理で
は、あらゆるポリゴン部分集合の組合せにおいて、しか
も、境界稜線を構成するポリゴン辺の総当たり的な組合
せにおいて中点が一致するか否かを調べなくてはならな
いため、Merge可能性の判定処理に相当の時間を要し、
凸分解の高速化に限界を与えている。ところで、凸要素
CLiの境界稜線と凸要素CHjの境界稜線が共通の境
界稜線部分を有する場合には、凸要素CLiの境界稜線
で構成する凸物体と凸要素CHjの境界稜線で構成する
凸物体とが干渉する。そこで、凸要素CLi,CLjの
共通の境界稜線を求める処理を実行する前に、計算負荷
がO(N)の干渉チェック法により凸要素CLiの境界稜線
で構成する凸物体と凸要素CHjの境界稜線で構成する
凸物体とが干渉するかチェックする。そして、干渉しな
い場合には以降のmerge処理をスキップし、干渉する場
合のみ以降のMerge処理を継続するようにする。このよ
うにすれば、Merge処理に要する時間を大幅に短縮でき
凸分解処理を高速に行なうことができる。However, in the merging possibility determination processing, it is not necessary to check whether or not the midpoints match in all combinations of polygon subsets and in brute force combinations of polygon sides constituting the boundary ridge line. Therefore, it takes a considerable amount of time to determine the possibility of Merge,
This limits the speed of convex decomposition. By the way, when the boundary ridge line of the convex element CLi and the boundary ridge line of the convex element CHj have a common boundary ridge portion, the convex object formed by the boundary ridge line of the convex element CLi and the convex object formed by the boundary ridge line of the convex element CHj And interfere. Therefore, before executing a process for obtaining a common boundary ridge line of the convex elements CLi and CLj, the boundary between the convex object and the convex element CHj formed by the boundary ridge line of the convex element CLi is calculated by an O (N) interference check method. It is checked whether or not there is interference between the ridge and the convex object. Then, when no interference occurs, the subsequent merge processing is skipped, and only when interference occurs, the subsequent merge processing is continued. In this way, the time required for the Merge processing can be greatly reduced, and the convex decomposition processing can be performed at high speed.
【0117】(b) 干渉チェック前処理の概略 図37は第5実施例の干渉チェック前処理の別の概略的
処理フローであり、図3の第1実施例と同一部分には同
一符号を付している。第1実施例と異なる点は、ステッ
プ1003′において、分割統治法による凸分解基本ア
ルゴリズムに替えて干渉チェック組込型の分割統治法に
よる凸分解基本アルゴリズム(高速凸分解基本アルゴリ
ズム)を適用している点である。(B) Outline of interference check pre-processing FIG. 37 is another schematic processing flow of the interference check pre-processing of the fifth embodiment, and the same reference numerals are assigned to the same parts as those of the first embodiment of FIG. are doing. The difference from the first embodiment is that in step 1003 ', instead of the convex decomposition basic algorithm based on the divide-and-conquer method, the basic algorithm for convex decomposition based on the divide-and-conquer method incorporating the interference check is applied (the basic algorithm for high-speed convex decomposition). It is a point.
【0118】図38は高速凸分解基本アルゴリズムの処
理のフローである。初期ポリゴン集合(非凸多面体のポ
リゴン集合)Pを入力し(ステップ1101)、つい
で、初期ポリゴン集合Pに対して高速凸分解アルゴリズ
ムによる凸分解処理を施す(ステップ1102′)。す
なわち、初期ポリゴン集合Pを第1、第2の2つのグル
ープに分割し、各グループにおいて隣接ポリゴンとの関
係が凸であるポリゴン部分集合を求める。ついで、共通
の境界稜線を有する第1グループのポリゴン部分集合と
第2グループのポリゴン部分集合とが凸関係にあるもの
を併合(マージング)して凸要素毎の複数の新たなポリ
ゴン部分集合DP1,DP2,・・・を求める。しかる
後、ポリゴン部分集合DP1,DP2,・・・を出力す
る(ステップ1103)。尚、各ポリゴン部分集合DP
1,DP2,・・・に基づいて凸多面体が生成される。
分割統治法において問題依存性が存在する最も重要な個
所は、「併合」過程、すなわち、関数Mergeの構成方法
である。FIG. 38 is a flowchart of the processing of the basic algorithm for high-speed convex decomposition. An initial polygon set (polygon set of a non-convex polyhedron) P is input (step 1101), and then the initial polygon set P is subjected to convex decomposition processing by a high-speed convex decomposition algorithm (step 1102 '). That is, the initial polygon set P is divided into first and second groups, and a polygon subset having a convex relationship with adjacent polygons in each group is obtained. Next, a polygonal subset of the first group and a polygonal subset of the second group having a common boundary ridge line are merged (merged) to form a plurality of new polygon subsets DP1 for each convex element. DP2,... Thereafter, the polygon subsets DP1, DP2,... Are output (step 1103). Note that each polygon subset DP
A convex polyhedron is generated based on 1, DP2,.
The most important place where problem dependence exists in the divide-and-conquer method is the "merging" process, that is, the construction method of 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 the divide-and-conquer method In order for the convex elements CLi and CHj to be mergeable, C
Li and CHj have a common boundary edge. That is, it is a necessary condition that the convex elements CLi and CHj interfere with each other through the boundary ridge line. Therefore, the interference check algorithm is applied between the convex elements CLi and CHj, and if there is no interference, the subsequent merge processing can be skipped for CLi and CHj. FIG. 39 is a flowchart of the Merge process in the divide-and-conquer method. 1) Prepare convex element set DC (PL), DC (PH)
(Steps 1111a and 1111b). DC (PL) = {CL1, CL2, ··· CLi, ···} i = 1,2, ··· NDC (PL) CLi {polygons = {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 b NCHB1 }} convex element set DC (PL) , DC (PH) are composed of polygon subsets (polygons) and a set of boundary edges (boundary edges) forming the boundaries 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 Merge Possibility It is judged whether or not the convex elements CLi and CHj can be merged with each other (step 1112 '). The judgment conditions are as follows. Condition 1: boundary edges Bedge CLi , Be of convex elements CLi, CHj
Perform interference check between dge CHj . Merg without interference
e Judge as impossible. Condition 2: convex elements CLi, CH possibly interfering
For j, all boundary edges shared between CLi and CHj are extracted. Whether or not they are shared can be determined by comparing the midpoints of the polygon sides constituting the boundary ridge line. If there is no shared border ridge, it is determined that merging is not possible. Condition 3: With respect to the shared boundary ridge line, the unevenness relationship between the CLi polygon and the CHj polygon sharing the ridge line is examined. If there is at least one combination of polygons having a concave relationship, it is determined that merging is impossible. Condition 3: Me when Condition 1, Condition 2, and Condition 3 are cleared
Judge that rege is possible.
【0121】3) Mergeの順序 凸要素のMergeは以下の順序で行なう。 3-1) 凸要素CL1がCHj(j=1,2,・・・NPH)とMerge可能か
否かを判定する。もし、CL1がCHjとMerge可能であ
れば、それ以降は、CL1,DC(PH)を以下のように
する。 CL1∪CHj→CL1 DC(PH)={CH1,CH2,・・・CHj-1,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 CHj(j = 1,2, ... NPH) and Merge available
Determine whether or not. If CL1Is CHjAnd Merge is possible
Then, after that, CL1, DC (PH) as follows
I do. CL1∪CHj→ CL1 DC (PH) = $ CH1, CHTwo, ... CHj-1, CHj + 1・
・ ・} 3-2) Execute the same procedure for CLi (i = 2,3, ... NPL)
You. 4) Configuration of merged convex element set DC (P) By the process of 3) above, merged convex element set DC (P) = Merge (DC (PL), D
C (PH)) is executed, and DC (P) = {CL1, CLTwo, ... CLPNPL, C
Hj', CHjThe merged convex element set DC (P) given by "..." is output
(Step 1113 '). Where {CHj', CHj″ ・
・ ・} Is the 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 interference check methods for the existing computational load O (N). FIG. 40 is a schematic processing flow of the interference check algorithm. Convex element CLi,
An interference check algorithm is applied between convex objects constituted by the boundary edges Bedge CLi and Bedge CHj of CHj (step 1401). By applying the interference check algorithm, the distance between the closest points of the boundary edges Bedge CLi and Bedge CHj dist (Bed
ge CLi , Bedge CHj ) and output it (step 140).
2). Once the distance between the closest points is obtained, the distance dist (Bedge
CLi, and compares the Bedge CHj) and ε, dist (Bedge CLi, B
edge CHj ) ≦ ε, it is determined that interference occurs, and dist (Bedge
If CLi , Bedge CHj )> ε, it is determined that there is no interference.
Here, ε is a user-defined minute constant that determines the accuracy of the interference check determination.
【0123】(f) 干渉チェック方法(Gilbert法) 凸要素CLi,CHjの境界稜線BedgeCLi、BedgeCHjで
構成される凸物体間の最接近点間の探索及びその距離di
st(BedgeCLi、BedgeCHj)は前述のGilbert法により求め
る。尚、Gilbert法の初期格子点(初期値)V0は一般に
は任意であるが、各物体の重心差分方向の格子点から出
発するのが効率的である。Gilbert法により最接近点を
求める時、以下の不等式が成立する(図41参照)。 r
k=−hk(−νk)/|νk|≦ |ν(K)|≦|νk
| (16) 従って、あるkに対し、rk>0ならば2凸物体間の干渉
は無いといえる。(F) Interference Checking Method (Gilbert Method) Search between the closest points between the convex objects constituted by the boundary edges Bedge CLi and Bedge CHj of the convex elements CLi and CHj and the 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 of each object in the direction of the center of gravity difference. When finding the point of closest approach by the Gilbert method, the following inequality holds (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 the biconvex 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 Processing Based on Gibert Method FIG. 42 is a flowchart of Merge possibility judgment processing based on the Gilbert method. Boundary ridges Bedge CLi , Be of convex elements CLi, CHj
by applying the Gilbert method between each composed convex object with dge CHj, it computes the r k of (13) (step 141
1). Next, r k> 0 it is determined whether or not (step 141
2) If r k > 0, there is no interference, so it is determined that Merge is not possible (step 1413). However, if r k ≦ 0, it is determined that Merge interference exists because of interference, and Merge possibility / impossibility is determined from the above Merge possibility conditions 2 to 4 (step 1414).
【0125】(h) 簡略化したGibert法に基づくMerge可
能性判定処理 Gibert法に基づくMerge可能性判定処理を更に簡略化す
る。簡略化の要点はGilbert法の初期格子点V0として境
界稜線上の頂点集合BedgeCLi、BedgeCHjから任意の頂点
BedgeCLi0、BedgeCHji0を選んで、 V0=BedgeCLi0−BedgeCHji0 (17) を構成する。ついで、このV0を使って r=−hk(−V0)=−hk1(−V0)−hk2(V0) (18) を計算する。もし、r>0ならば、BedgeCLi、BedgeCHj
間は干渉が無く、凸要素CLi,CHjはMergeする可
能性が無いと判定する。(H) Merge Possibility Determination Processing Based on Simplified Gibert Method Merge possibility determination processing based on the Gibert method is further simplified. The point of simplification is to set an arbitrary vertex from the vertex set Bedge CLi and Bedge CHj on the boundary edge as the initial lattice point V 0 of the Gilbert method.
Select the Bedge CLi0, Bedge CHji0, constitute V 0 = Bedge CLi0 -Bedge CHji0 (17). 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
There is no interference between them, and it is determined that there is no possibility of merging the convex elements CLi and CHj.
【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 elements 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 determined whether r> 0 (step 1412 ′). If r> 0, there is no interference, so it is determined that Merge is impossible (step 141).
3 '). However, when r ≦ 0, interference occurs.
It is determined that there is Merge interference, and Merge is possible / impossible from the above Merge possibility conditions 2 to 4 (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) Modification of Convex Decomposition (a) Modification 1 The convex decomposition method of the fifth embodiment described above may be configured to perform optimization processing to reduce the number of convex elements. FIG. 44 shows a processing flow in this case. In FIG. 44, the difference from the processing of the second embodiment (see FIG. 32) is that
02 'and 1204', a high-speed convex decomposition algorithm incorporating an interference check is used instead of the basic convex decomposition algorithm. (b) Modification 2 The high-speed convex decomposition algorithm of the interference check built-in type can be applied to the convex decomposition processing in the presence of a negative object. FIG. 45 shows a processing flow in this case. In FIG. 45, the difference from the third embodiment is that step 1303 ′,
In 1306 ', a high-speed convex decomposition algorithm incorporating an interference check is used instead of the basic convex decomposition algorithm. (c) Modification 3 Modification 2 may be further optimized to reduce the number of convex elements.
【0128】(L)最接近点探索の前処理(近接点線形
リストの作成) 以上では、ポリゴンデータより有向グラフ型構造データ
を前処理により生成し、この有向グラフ型構造データを
用いて凸多面体間あるいは非凸多面体間の最接近点探索
処理を行なった場合である。有向グラフ構造データとは
別の構造データ、すなわち、近接点線形リストを前処理
により作成し、該リストを使用することにより最接近点
の連続探索を高速化することができる。近接点線形リス
トとは、形状モデル(CGモデル)を構成する各ポリゴ
ンの頂点を第1方向(next方向)にリンクし、各頂
点にポリゴン辺を介して繋がる頂点群を第2の方向(b
ranch方向)に該頂点にリンクしてなるデータ構造
を備えたリストである。リストの先頭から順次たどるこ
とにより、その頂点に繋がる全ての近接点を拾いだすこ
とができる。(L) Preprocessing for Searching for Nearest Point (Formation of Linear List of Proximity Points) In the above description, directed graph type structural data is generated from polygon data by preprocessing, and between the convex polyhedrons or using the directed graph type structural data. This is the case where the closest point search processing between non-convex polyhedrons is performed. Structural data different from the directed graph structure data, that is, a near-point linear list is created by preprocessing, and by using the list, the continuous search for the closest point can be speeded up. The near-point linear list is such that vertices of each polygon constituting a shape model (CG model) are linked in a first direction (next direction), and a vertex group connected to each vertex via a polygon side is defined in a second direction (b).
This is a list provided with a data structure linked to the vertex in the (rank direction). By sequentially tracing from the top of the list, it is possible to pick up all adjacent points connected to the vertex.
【0129】(a) 近接点線形リストの例 図46は、直方体の近接点線形リストの例を示してい
る。図示の通り、近接点線形リストは、頂点を順次繋い
だnext方向と、各頂点にポリゴン辺を介して連結する近
接点を配列するbranch方向の2方向を持つ。branch方向
の先頭には、その頂点自身が入る。 (b) 近接点線形リストの構成法 図47は近接点線形リストの作成処理のフローである。
尚、図48に示すように対象物体は三角形ポリゴンの集
合で構成されており、各三角形ポリゴンはvertexに続く
3つの頂点座標値とnormalに続く3つの各頂点における
光の反射方向データで表現される。(A) Example of Proximity Point Linear List FIG. 46 shows an example of a rectangular parallelepiped proximity point linear list. As shown in the figure, the proximity point linear list has two directions: a next direction in which vertices are sequentially connected, and a branch direction in which proximity points connected to each vertex via polygon sides are arranged. The top of the branch direction contains the vertex itself. (b) Method of Constructing Proximity Point Linear List FIG. 47 is a flowchart of a process of creating a proximity point linear list.
As shown in FIG. 48, the target object is composed of a set of triangular polygons, and each triangular polygon is represented by three vertex coordinate values following vertex and light reflection direction data at three vertices following normal. You.
【0130】三次元CADシステムは形状モデルを作成
してポリゴンデータファイルを出力する(ステップ20
01、2002)。ついで、干渉チェック組込型分割統
治法による凸分解基本アルゴリズムに従って、上記ポリ
ゴンデータを凸要素毎に分割されたポリゴンデータの組
(ポリゴン部分集合)に分ける。すなわち、初期のポリ
ゴンデータを凸要素毎の部分集合の組に分割して出力す
る(ステップ2003,2004)。しかる後、各部分
集合毎に、すなわち凸多面体毎に近接点線形リスト構成
アルゴリズムを用いて近接点線形リストをを生成してメ
モリに展開する(ステップ2005、2006)。つい
で、該近接点線形リストを用いて最接近点探索処理(干
渉チェック処理)を実行すると共に近接点線形リストを
外部記憶媒体に記憶する(ステップ2007)。以後、
該近接点線形リストが必要な場合には、新たに作成せ
ず、外部記録媒体から読み出してメモリに展開する(ス
テップ2008)。The three-dimensional CAD system creates a shape model and outputs a polygon data file (step 20).
01, 2002). Then, the polygon data is divided into sets of polygon data (polygon subsets) divided for each convex element according to a basic algorithm for convex decomposition based on an interference check built-in division and conquer method. That is, the initial polygon data is divided into sets of subsets for each convex element and output (steps 2003 and 2004). Thereafter, a near-point linear list is generated for each subset, that is, for each convex polyhedron using a near-point linear list construction algorithm, and is expanded in a memory (steps 2005 and 2006). Next, the closest point search processing (interference check processing) is executed using the close point linear list, and the close point linear list is stored in the external storage medium (step 2007). Since then
If the proximity point linear list is required, the list is read from an external recording medium and developed in a memory without newly creating the list (step 2008).
【0131】(c) 近接点線形リスト構成アルゴリズム 図49は対象物体の凸要素毎のポリゴンデータ説明図、
図50は近接点線形リスト構成アルゴリズムの説明図で
ある。対象物体が三角形ポリゴンの集合で構成されてい
るものとすると、近接点線形リストは以下のフローに従
って構成される。 1) 凸分解基本アルゴリズムにより、凸要素毎のポリゴ
ンデータを用意する(図49参照)。 2) 各々のポリゴンデータ(pi,qi,ri)に対し、各
頂点をリストLに繋げていく。next方向を頂点に対する
線形リスト方向、branch方向を各頂点の近接点方向とす
る。リストLの先頭要素は第1番目のポリゴンの第1頂
点であり、作成途中では図50(a)に示すデータ構造と
なっている。具体的には以下のようにリストを作成す
る。 2-1) リストLの先頭要素topを割り付ける。すなわち、
topとして最初のポリゴンの最初の頂点を割り付ける。(C) Proximity point linear list construction algorithm FIG. 49 is an explanatory diagram of polygon data for each convex element of a target object.
FIG. 50 is an explanatory diagram of a neighboring point linear list construction algorithm. Assuming that the target object is constituted by a set of triangular polygons, the near point linear list is constituted according to the following flow. 1) Polygon data for each convex element is prepared by the convex decomposition basic algorithm (see FIG. 49). 2) For each polygon data (pi, qi, ri), connect each vertex to the list L. The next direction is defined as a linear list direction with respect to the vertices, and the branch direction is defined as a direction of a point near each vertex. The head element of the list L is the first vertex of the first polygon, and has a data structure shown in FIG. Specifically, a list is created as follows. 2-1) Assign top element top of list L. That is,
Assign the first vertex of the first polygon as top.
【0132】2-2) ポリゴン(pi,qi,ri)に対し、
以下の割付けを繰り返す。 1) if(全てのjに対し、Lj≠pi)ならば、新しい要素
piをnext方向の端に割り付ける(図50(b)参照)。つい
で、頂点Lj+1のbranch方向に対し、自分自身pi及びq
i,riを割り付ける(図50(c)参照)。 2) if(あるjに対し、Lj=pi)ならば、Ljのbranch方
向に対し、qi,riを割り付ける。もし、branch方向に
既にqi,riと同一頂点があれば割り付けることはしな
い(図50(d)参照)。 3) 頂点qiに対して上記1)、2)の処理を実行する。ただ
し、頂点qiに対するqi以外のbranch候補はpi,riで
ある。 4) 頂点riに対して上記1)、2)の処理を実行する。ただ
し、頂点riに対するri以外のbranch候補はpi,qiで
ある。 2-3) 全てのポリゴン集合∪i(pi,qi,ri)に対し、
2-2)の処理を繰り返す。2-2) For the polygon (pi, qi, ri),
Repeat the following assignment. 1) If if (Lj ≠ pi for all j), assign a new element pi to the end in the next direction (see FIG. 50 (b)). Then, for the branch direction of the vertex Lj + 1, pi and q
i and ri are assigned (see FIG. 50 (c)). 2) If if (Lj = pi for a certain j), qi and ri are assigned to the branch direction of Lj. If there is already the same vertex as qi and ri in the branch direction, no assignment is made (see FIG. 50 (d)). 3) The above processes 1) and 2) are performed on the vertex qi. However, branch candidates other than qi for vertex qi are pi and ri. 4) The above processes 1) and 2) are executed for the vertex ri. However, branch candidates other than ri for the vertex ri are pi and qi. 2-3) For all polygon sets ∪i (pi, qi, ri),
Repeat the process of 2-2).
【0133】(d) 近接点線形リストの作成例 図51、図52は近接点線形リストの作成例説明図であ
る。凸分解基本アルゴリズムにより、凸要素毎のポリゴ
ンデータを用意する(ステップ2011)。以後、第1
ポリゴンをリストに組み込み(ステップ2012)、つ
いで、第2ポリゴンをリストLに組み込む(ステップ2
013)。すなわち、ステップ2012において、ま
ず、第1ポリゴンの第1頂点V1をtopとして割り付け
る。すなわち、 top=L1=V1 とする(2012a)。ついで、頂点V1に対する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 Creating Proximate Point Linear List FIGS. 51 and 52 are explanatory diagrams of an example of creating a proximal point linear list. Polygon data for each convex element is prepared by the basic convex decomposition algorithm (step 2011). Since then,
The polygon is incorporated into the list (step 2012), and the second polygon is incorporated into the list L (step 2).
013). That is, in step 2012, firstly allocates a first vertex V 1 of the first polygon as top. That is, top = L 1 = V 1 (2012a). Then, branc for the vertex V 1
All vertices V 1 , V 2 , V 3 of the first polygon are allocated in the h direction (step 2012b). Then, the second vertex V 2 is set to ne
Assignment in xt direction (Step 2012c)
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)である。[0134] In step 2013 allocates the first vertex V 1 of the second polygon. In this case, since the vertex V 1 in the next direction is already assigned, the vertex V 1 branch
Vertices V 1 , V 3 , V 4 are allocated in the directions. However, since the vertices V 1 and V 3 have already been allocated, only the vertex V 4 is allocated (step 2013a). Then the second
Assigned vertex V 3 in the next direction. In this case, since the vertex V 3 in the next direction it is already assigned, the vertex V 3 br
Vertices V 3 , V 4 and V 1 are allocated in the anch direction. But,
Since the vertices V 3 and V 1 have already been allocated, the vertex V 4
Only (step 2013b). After a while
The third vertex V 4 assigned to 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, the polygon has been described as a triangular polygon, but is not limited to a triangular polygon, and may be any polygonal polygon. The computational load for creating a near-point linear list from N vertices is O (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 for Searching for Nearest Point (Preparation of Proximity Point Multi-Tree List) The calculation load for preparing the linear list of proximity points is O (N 2 ) for N vertices, which is large. Therefore, a list (proximity point multi-tree list) of another data structure that can be used for continuous search for the closest point is created, and the continuous search for the closest point is speeded up by using the list. The proximity point multitree list is an array list of vertices as follows. That is, the reference vertex is determined, the first next direction (xright) larger than the X coordinate value of the reference vertex, and the second direction smaller than the X coordinate value.
Next direction (xleft), third next direction (yright) larger than Y coordinate value, fourth next direction smaller than Y coordinate value
(yleft), the fifth next direction (zrigh
t), a sixth next direction (zleft) smaller than the Z coordinate value is determined. Then, each axis coordinate value of the reference vertex is compared with each axis coordinate value of a vertex connected to the reference vertex by a polygon side (referred to as a target vertex), and a next direction for linking the target vertex is determined according to the magnitude. At the same time, the target vertices are linked in the next direction in the order closer to the reference vertex. When linking the target vertex in the next direction, if the coordinate value of the other vertex already linked in the next direction is equal to the coordinate value of the target vertex, the axis coordinates of the other vertex and the target vertex are changed. Compare. Then, a next direction corresponding to the magnitude is obtained, and the target vertex is linked to the other vertex in the next direction. Also, a branch direction is determined for each vertex, and all vertices connected to the vertex by polygon sides are arranged in the direction. The one created as described above is the proximity point multi-tree list.
【0136】(a) 近接点多分木リストの例 図53は、直方体の近接点多分木リストの例を示してい
る。図示の通り、近接点多分木リストにおいて、各頂点
はx,y,zの各軸方向の大小に相当する6つのリンク
方向xright、xleft、yright、yleft、zright、zleftを
備えると共に、1つのbranch方向を備えている。頂点の
branch方向には該頂点にポリゴン辺で繋がる全頂点が配
列され、その先頭には、該頂点自身が配置される。(A) Example of Proximity Point Multi-Tree List FIG. 53 shows an example of a rectangular parallel-tree multi-point tree list. As shown in the drawing, each vertex has six link directions xright, xleft, yright, yleft, zright, and zleft corresponding to the magnitudes of the x, y, and z axes, and one branch. Has directions. Vertex
In the branch direction, all vertices connected to the vertices by polygon sides are arranged, and the vertices themselves are arranged at the head thereof.
【0137】(b) 近接点多分木リストの構成法 図54は近接点多分木リストの作成処理のフローであ
る。三次元CADシステムは形状モデルを作成してポリ
ゴンデータファイルを出力する(ステップ2101、2
102)。ついで、干渉チェック組込型分割統治法によ
る凸分解基本アルゴリズムに従って、上記ポリゴンデー
タを凸要素毎に分割されたポリゴンデータの組(ポリゴ
ン部分集合)に分ける。すなわち、初期のポリゴンデー
タを凸要素毎の部分集合の組に分割して出力する(ステ
ップ2103,2104)。しかる後、各部分集合毎
に、すなわち凸多面体毎に近接点多分木リスト構成アル
ゴリズムを用いて近接点多分木リストを生成する(ステ
ップ2105)。ついで、近接点多分木変換アルゴリズ
ムにより、近接点多分木リストを近接点線形リストに変
換してしてメモリに展開する(ステップ2106、21
07)。しかる後、該近接点線形リストを用いて最接近
点探索処理(干渉チェック処理)を実行すると共に近接
点線形リストを外部記憶媒体に記憶する(ステップ21
08)。以後、該近接点線形リストが必要な場合には、
新たに作成せず、外部記録媒体から読み出してメモリに
展開する(ステップ2109)。(B) Method of Constructing Proximity Point Multi-Tree List FIG. 54 is a flowchart of a process of creating a proximity point multi-tree list. The three-dimensional CAD system creates a shape model and outputs a polygon data file (steps 2101, 2
102). Then, the polygon data is divided into sets of polygon data (polygon subsets) divided for each convex element according to a basic algorithm for convex decomposition based on an interference check built-in division and conquer method. That is, the initial polygon data is divided into sets of subsets for each convex element and output (steps 2103 and 2104). Thereafter, a near-point multitree list is generated for each subset, that is, for each convex polyhedron by using a near-point multitree list construction algorithm (step 2105). Next, the near-point multitree tree conversion algorithm is used to convert the near-point multitree tree list into a near-point linear list and expand it in the memory (steps 2106 and 21).
07). Thereafter, the closest point search processing (interference check processing) is executed using the close point linear list, and the close point linear list is stored in the external storage medium (step 21).
08). Thereafter, when the proximity point linear list is required,
Instead of creating a new one, it is read from the external recording medium and expanded in the memory (step 2109).
【0138】(c) 近接点多分木リスト構成アルゴリズム 対象物体が三角形ポリゴンの集合で構成されているもの
とすると、近接点多分木リストは以下のフローに従って
構成される。 1) 凸分解基本アルゴリズムにより、凸要素毎のポリゴ
ンデータを用意する(図49参照)。 2) 各々のポリゴンデータ(pi,qi,ri)に対し、各
頂点を多分木リストMLに繋げていく。多分木リストM
Lにおいて、xright、xleft、yright、yleft、zright、
zleftをそれぞれ着目している頂点から見たx,y,z
軸の大小方向とする。また、各頂点は近接点方向として
branch方向を持つ。具体的には以下の手続きに従って近
接点多分木リストMLを構成していく(図53参照)。(C) Proximity point multitree list construction algorithm Assuming that the target object is composed of a set of triangular polygons, the proximity point multitree list is constructed according to the following flow. 1) Polygon data for each convex element is prepared by the convex decomposition basic algorithm (see FIG. 49). 2) For each polygon data (pi, qi, ri), connect each vertex to the multi-tree list ML. Maybe tree list M
In L, xright, xleft, yright, yleft, zright,
x, y, z as viewed from the vertex where zleft is focused
It is the direction of the axis. Also, each vertex is defined as
Has a branch direction. Specifically, the proximity point multi-tree list ML is constructed according to the following procedure (see FIG. 53).
【0139】2-1) MLの先頭要素topを割り付ける。to
pとしては、最初のポリゴンの最初の頂点を割り付け
る。 2-2) ポリゴン(pi,qi,ri)に対し、以下の割付け
を繰り返す。 (1)頂点piに対し、MLの先頭要素topから見てx座標
値の大小、y座標値の大小、z座標値の大小の順に辞書
式に比較し、割付けを行なう。すなわち、まず、頂点p
iのx座標値がtopのx座標値より大きい時は、topから
見てxright方向の配置済みの他の要素のx座標値と頂点
piのx座標値の大小を比較し、xright方向に対して昇
順になるようにpiを配置する。頂点piのx座標値がto
pのx座標値より小さい時は、topから見てxleft方向に
対して同様の配置を行う。頂点piのx座標値と一致す
るx座標値を有する配置済みの頂点が存在する場合に
は、y座標値の比較を行い、その配置済み頂点から見て
y座標方向に昇順になるように配置する。y座標値が一
致する配置済み頂点が存在する場合には、z座標値に対
して同様の昇順配置を行う。もし、x,y,zの全ての
座標値の一致する頂点が存在すれば、頂点piをその点
と同一と見做す。 (2)新しく割り付けた頂点piに対し、該頂点piのbranc
h方向に自分自身pi及びqi,riを割り付ける。も
し、既に、頂点piがbranch要素を有している場合に
は、各branch要素との比較を行い、同一点の割付けを避
けるようにする。2-1) The top element top of the ML is allocated. to
As p, assign the first vertex of the first polygon. 2-2) The following assignment is repeated for polygons (pi, qi, ri). (1) The vertices pi are compared lexicographically in the order of the magnitude of the x coordinate value, the magnitude of the y coordinate value, and the magnitude of the z coordinate value as viewed from the top element top of the ML, and are assigned. That is, first, the vertex p
When the x-coordinate value of i is larger than the x-coordinate value of top, the x-coordinate value of another element arranged in the xright direction is compared with the x-coordinate value of the vertex pi when viewed from top. Are arranged in ascending order. The x coordinate value of vertex pi is to
When it is smaller than the x coordinate value of p, the same arrangement is performed in the xleft direction when viewed from the top. If there is a placed vertex having an x-coordinate value that matches the x-coordinate value of the vertex pi, the y-coordinate value is compared, and the vertices are arranged in ascending order in the y-coordinate direction when viewed from the placed vertex. I do. If there is an already-arranged vertex having the same y-coordinate value, similar ascending arrangement is performed on the z-coordinate value. If there is a vertex at which all the coordinate values of x, y and z match, the vertex pi is regarded as the same. (2) For the newly allocated vertex pi, the branc of this vertex pi
Assign pi and qi, ri in the h direction. If the vertex pi already has a branch element, it is compared with each branch element to avoid assigning the same point.
【0140】(3) 頂点qiに対して上記(1)、(2)の処理
を実行する。ただし、頂点qiに対するqi以外のbranch
候補はpi,riである。 (4) 頂点riに対して上記(1)、(2)の処理を実行する。
ただし、頂点riに対するri以外のbranch候補はpi,
qiである。 2-3) 全てのポリゴン集合∪i(pi,qi,ri)に対し、
2-2)の処理を繰り返す。 以上では、ポリゴンを三角形
ポリゴンとして説明したが、三角形ポリゴンに限定され
ず、任意の多角形ポリゴンでもよい。N個の頂点から近
接点多分木リストを作成する計算負荷はO(NlogN)
である。(3) The above processes (1) and (2) are performed on the vertex qi. However, a branch other than qi for vertex qi
Candidates are pi and ri. (4) The above processes (1) and (2) are performed on the vertex ri.
However, branch candidates other than ri for vertex ri are pi,
qi. 2-3) For all polygon sets ∪i (pi, qi, ri),
Repeat the process of 2-2). In the above, the polygon has been described as a triangular polygon, but is not limited to a triangular polygon, and may be any polygonal polygon. The computational load for creating a near-point multitree list from N vertices is O (NlogN)
It is.
【0141】(d) 近接点多分木リスト変換アルゴリズム 凸多面体同士の干渉チェック(最接近点探索処理)で
は、凸多面体を構成する各頂点とのベクトル内積を取
り、その最大値を検出する計算を繰返し行う。この時、
各頂点を近接点多分木リストの形式で持っていると、各
頂点を順次辿っていくときに煩雑な判定関数が多数絡む
ことになる。そこで、一端、近接点多分木リストの形式
で各頂点の近接点を構成した後は、多分木リストを線形
リストに変換しておくと以後の計算量が少なくてすむ。
多分木リストを線形リストに変換するには、例えば、以
下に示す再帰関数vertex * MultiToLinear( )を使用す
る。(D) Proximity point multi-tree list conversion algorithm In the interference check between convex polyhedrons (closest point search processing), a calculation is performed to obtain a vector inner product with each vertex of the convex polyhedron and detect the maximum value. Repeat. At this time,
If each vertex is in the form of a proximity point multitree list, a large number of complicated determination functions will be involved when sequentially following each vertex. Therefore, once the proximity point of each vertex is formed in the form of the proximity point multi-tree list, the calculation amount can be reduced by converting the multi-tree list into a linear list.
To convert a multi-tree list into a linear list, for example, use the following recursive function vertex * MultiToLinear ().
【0142】 vertex * MultiToLinear( ) { vertex *V; v = this; //thisは今いる頂点のポインタを表す if(next=0) { if(xleft !=0){ //xleftをnextに割り付ける next = xleft; v = xleft→MultiToLinear( ); //xleft方向に対し再帰的に 作用させる } if(xright !=0){ //xright, yleft, yright, zleft, zrightに対し以下同様 v→next = xright; v = xright→MultiToLinear( ); } if(yleft !=0){ v→next = yleft; v = yleft→MultiToLinear( ); } if(yright !=0){ v→next = yright; v = yright→MultiToLinear( ); } if(zleft !=0){ v→next = zleft; v = zleft→MultiToLinear( ); } if(zright !=0){ v→next = zright; v = zright→MultiToLinear( ); } } return V; } 上記関数を多分木リストMLの先頭要素topに作用させ
ると(top→MultiToLinear( ))、多分木リストMLは線
形リストLに変換される。近接点多分木リスト変換アル
ゴリズムの計算時間は、総頂点数をNとすればO(N)
である。従って、ポリゴンデータから近接点多分木リス
ト構成アルゴリズムを経て近接点線形リストLを生成す
るトータルの計算時間は、O(NlogN)である。Vertex * MultiToLinear () {vertex * V; v = this; // this 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 xleft direction} if (xright! = 0) {// same for xright, yleft, yright, zleft, zright v → next = xright; v = xright → MultiToLinear ();} if (yleft! = 0) {v → next = yleft; v = yleft → MultiToLinear ();} if (yright! = 0) {v → next = yright; v = yright → MultiToLinear ();} if (zleft! = 0) {v → next = zleft; v = zleft → MultiToLinear ();} if (zright! = 0) {v → next = zright; v = zright → MultiToLinear ();}} return V;} When the above function is applied to the top element top of the multi-tree list ML (top → MultiToLinear ()), the multi-tree list ML is converted into a linear list L. The calculation time of the neighboring point multitree list conversion algorithm is O (N), where N is the total number of vertices.
It is. Therefore, the total calculation time for generating the proximity point linear list L from the polygon data through the proximity point multi-tree list construction algorithm is O (NlogN).
【0143】(N)最接近点探索の前処理(近接点線形
リストのダンプ及びローデング)最接近点探索処理、す
なわち、干渉チェック処理で必要となる近接点線形リス
ト情報は、全てメモリ上に展開しておかなければならな
い。もし、ダンプファイル(dump file)からメモリ上へ
展開するのに、近接点多分木リストを構成するのと同じ
計算時間(総頂点数Nに対してO(NlogN))を要し
てしまうならば、ダンプファイルを作成する意味がなく
なってしまう。そこで、本発明ではダンプファイルから
のローデング時間がO(N)となるようにダンプファイ
ルのフォーマットを定めている。 (a) ダンプファイルのフォーマット ダンプファイルのフォーマットは、図55に示すような
形式とする。このファイルフォーマットにおいて、高速
ローデングの必須項目は以下の通りである。 1) 凸要素毎に区切られていること、 2) 凸要素を構成する総頂点数(count)の項目があるこ
と、 3) 各々の頂点に番号付けがされていること、 4) 各々の頂点に対し、その頂点の近接点個数(bcount)
を定義する項目があること、 5) 各々の頂点の座標を定義する項目があることであ
る。(N) Preprocessing for Searching for Nearest Point (Dumping and Loading of Near-Point Linear List) The closest-point linear list information required for the closest-point search processing, that is, the interference check processing, is all expanded on the memory. Must be kept. If it takes the same calculation time (O (NlogN) with respect to the total number of vertices N) as constructing the neighboring point multi-tree list, it is necessary to expand the dump file (dump file) on the memory. There is no point in creating a dump file. Therefore, in the present invention, the format of the dump file is determined so that the loading time from the dump file becomes O (N). (a) Format of Dump File The format of the dump file is as shown in FIG. In this file format, essential items for high-speed loading are as follows. 1) Each convex element is separated, 2) There is an item of the total number of vertices (count) constituting the convex element, 3) Each vertex is numbered, 4) Each vertex , The number of neighboring points of the vertex (bcount)
5) There 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) The total number of vertices (count) constituting the convex element is read, and a count-dimensional array for storing each vertex is created. 2) Each vertex of the convex element is stored in the array, and each vertex is connected in the next direction to form a linear list. For example, Ve
When the array containing rtex is V [Ni], V [0], V
.. Are sequentially connected in the next direction to form a linear list. 3) Apply the processing of 1) and 2) to each convex element.
【0145】4) 各凸要素の各頂点に対し、branchの近
接点番号(配列内の位置を指定)をたよりに、branch方向
に近接点のリストを張る。例えば、Vertexを収める配列
をV[Ni]とする時、Vertex V[0]のbranchの番号が
(0,9,1,7,8)ならば、VertexV[0]のbranch方向にV
[0],V[9],V[1],V[7],V[8]を線形リ
ストに繋ぐ。 5) 4)の処理を各凸要素に施す。上記ローデング法で
は、同じファイルに対して計2回(1),2),3)が1回目、
4),5)が2回目)の読み込みを行う。各頂点のbranch数は
ほとんどの場合において数10個以下で抑えられるため、
合計のローデング時間はO(N)である。図55のよう
に、凸要素毎に分割されたダンプファイルをLファイル
という。 (c) 凸包に対するダンプファイル 非凸多面体を包む最小の凸多面体(凸包)に対して、図
55と同様のダンプファイルが定義される。この場に
は、凸要素数は1つであり、vertexは非凸多面体を構成
する全ての頂点からなる。凸包に対する図55の形式の
ファイルをHLファイルという。4) For each vertex of each convex element, a list of adjacent points is set in the branch direction based on the adjacent point number of the branch (designating the position in the array). For example, when the array that stores the vertices is V [Ni], the number of the branch of the vertex V [0] is
If (0,9,1,7,8), V in the branch direction of VertexV [0]
[0], V [9], V [1], V [7], V [8] are linked to a linear list. 5) Apply the processing of 4) to each convex element. In the above-mentioned loading method, the same file is used twice (1), 2), 3) for the first time,
4) and 5) perform the second reading). In most cases, the number of branches at each vertex can be reduced to several tens or less.
The total loading time is O (N). As shown in FIG. 55, a dump file divided for each convex element is called an L file. (c) Dump file for convex hull A dump file similar to that in FIG. 55 is defined for the smallest convex polyhedron (convex hull) wrapping a non-convex polyhedron. In this case, the number of convex elements is one, and vertex consists of all vertices constituting the non-convex polyhedron. A file in the format shown in FIG. 55 for the convex hull is called an HL file.
【0146】(O)干渉チェックサブアルゴリズム(包
絡球による事前チェック) 任意の非凸多面体に対し、それを包絡する球を前処理に
おいて生成しておく。この時、非凸多面体間の干渉チェ
ックに入る前に、包絡球間で干渉チェックを行い、高速
化する。 (a) 包絡球の構成法 非凸多面体は三角形ポリゴンの集合で表現されており、
∪i(pi,qi,ri)と表現する。サフィックスiは各ポ
リゴンを識別する添字である。pi,qi,riの各座標
値をpi=(pix,piy,piz)、qi=(qix,qiy,
qiz)、ri=(rix,riy,riz)とする。この時、
凸包のmax点、min点を以下のようにして求める。 max=(MAXi(pix,qix,rix),MAXi(piy,qiy,riy),MAXi(pi
z,qiz,riz)) min=(MINi(pix,qix,rix),MINi(piy,qiy,riy),MINi(pi
z,qiz,riz)) 包絡球は、以下の計算式に基づいて定義される。 半径R=|max-min|/2 中心Pc=(max+min)/2(O) Interference Check Sub-Algorithm (Preliminary Check Using Envelope Sphere) For an arbitrary non-convex polyhedron, a sphere that envelopes it is generated in preprocessing. At this time, the interference check is performed between the envelope spheres before the interference check between the non-convex polyhedrons is started, and the speed is increased. (a) Construction method of envelope sphere A non-convex polyhedron is represented by a set of triangular polygons.
∪i (pi, qi, ri). The suffix i is a subscript for identifying each polygon. The coordinate values of pi, qi, ri are represented by pi = (pix, piy, piz), qi = (qix, qiy,
qiz), ri = (rix, riy, riz). At this time,
The max and min points of the convex hull are obtained as follows. max = (MAXi (pix, qix, rix), MAXi (piy, qiy, riy), MAXi (pi
z, qiz, riz)) min = (MINi (pix, qix, rix), MINi (piy, qiy, riy), MINi (pi
z, qiz, riz)) The envelope sphere is defined based on the following formula. Radius R = | max-min | / 2 center Pc = (max + min) / 2
【0147】(b) 凸要素に対する包絡球 各凸要素に対しても、それぞれの凸要素を包絡する球が
定義される。計算方法は、(a)と同様である。ただし、m
ax,minを定義する時のサフィックスiは各凸要素のポリ
ゴン集合を意味する。 (c) 包絡球による事前のチェックアルゴリズム 図56は包絡球による事前のチェックの処理フローであ
る。各非凸多面体A,Bの包絡球半径RA,RB、包絡球
中心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 that envelopes each convex element is defined. The calculation method is the same as in (a). Where m
The suffix i when defining ax, min means a polygon set of each convex element. (c) Preliminary Check Algorithm Using Envelope Sphere FIG. 56 is a processing flow of a prior check using an envelope sphere. Each non-convex polyhedron A, envelope spheres radius R A of B, R B, envelope spheres center P CA, the P CB calculated by the above-described method (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 then interference between non-convex polyhedrons is checked (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) Extract vertices that are closest to the closest approach point obtained from the nearest point linear list, and use the Gilbert's interference check method for these vertices. Is applied to search for the closest approach point after a predetermined time. By doing so, the time required for the interference check can be suppressed to a certain number or less that hardly depends on the number of polygons representing the convex polyhedron. (a) Gilbert method The distance ν (K) between the closest points between the convex polyhedrons 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) However, x 1 i: vertex constituting the K 1 x 2 i: given by vertices of the K 2.
【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.
FIG. 5 is an explanatory diagram that can be solved. Each process is simplified
The simple explanation is as follows. 1) Set the vector η Connect the geometric centroids of the 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 {-xTwo i・ Ν0: I = 1, ・ ・ ・ mTwo} (21), the vector ν0Closest to each other in the direction of
2 points p0, Q0(FIG. 57 (a)). 3) ν1Update 2 points p0, Q0Connect ν1(FIG. 57 (b)). 4) Dot product calculation ν1The same inner product calculation as in 2) is performed for1,
q1(FIG. 57 (b)). 5) Dot product calculation and ν1Repeat the update to make the final closest approach
Point vector νfinal(FIG. 57 (c)). As you can see from the above process, the main Gilbert method
The calculation load occurs in the process of calculating the inner product. Therefore, Gilber
The calculation time of the closest approach point search in the t method is O (m1+ m Two)
You.
【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 computation load in the Gilbert method is determined by the support functions h K1 and h K2.
Occurs in the process of calculating the inner product of. Therefore, in order to reduce the number of times of calculating the inner product, a method of efficiently finding a proximity point of the closest approach vector ν (K) will be considered. The closest points ν K1 and ν K2 of the convex polyhedrons K 1 and K 2 are given by the following equations from the equation (19). ν K1 = Σλ i x 1 i (i∈I K1Sk) (22) ν K2 = Σλ i x 2 i (i∈I K2Sk) (23) if continuously searching the closest point of approach, most of after a predetermined time The approaching point exists near ν K1 and ν K2 given by the equations (22) and (23). Therefore, the vertices when calculating the support functions h K1 and h K2 can be limited to the proximity points of the vertices x 1 i and x 2 i in the equations (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 flowchart 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 obtained, and the vector ν 0 = G K1 −G K2 is obtained (step 2301). Next, an interference check algorithm based on the Gilbert method is executed using ν 0 as an initial value, and ν K1 and ν K2 given by equations (22) and (23) are obtained (step 2302). Then, ν 0 = ν K1 −ν K2 and G
Execute interference check algorithm by 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 = number of a set of proximity points of x 1 i given by equation (22)} h K2 (−ν 1 ) = max {−x 2 i · ν 1 : p = number of a set of proximity points of x 1 i given by equation (22)} Then, the closest approach point is calculated by equations (22) and (23), and thereafter g K
The processing of step 2303 and thereafter is repeated until (ν K ) = 0. The number of points near the vertices x 1 i and x 2 i in FIG. 58 is equal to the number 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 in the CG model.
【0152】(Q)干渉チェックサブアルゴリズム(凸
包の動的構成/解除) 非凸多面体に対し、それを包絡する最小の凸多面体とし
て凸包を定義する。非凸多面体間の距離が十分離れてい
る場合には凸包間の干渉チェックを行い、凸包同士が干
渉し始めたら、非凸多面体を構成する凸要素間の干渉チ
ェックに自動的に移行する。非凸多面体間の距離が再び
大きくなった場合には、凸包が回復し、凸包間の干渉チ
ェックに戻す。 (a) 凸包の動的構成/解除の基本的な考え方 図59、図60はは凸包の構成/解除の基本的な考え方
を示す説明図である。図59において、A,Bは第1、
第2の非凸多面体、CA1,CA2は非凸多面体Aを構成す
る凸多面体、CB1,CB2は非凸多面体Bを構成する凸多
面体である。 1) 非凸多面体A,Bが十分離れている場合には凸包
A′、B′間の干渉チェックを行う(図60(a)参照)。(Q) Interference Check Sub-Algorithm (Dynamic Construction / Release of Convex Hull) For a non-convex polyhedron, a convex hull is defined as the smallest convex polyhedron that envelopes it. When the distance between the non-convex polyhedrons is sufficiently large, an interference check between the convex hulls is performed. When the convex hulls start to interfere with each other, the process automatically shifts to an interference check between the convex elements constituting the non-convex polyhedron. . When the distance between the non-convex polyhedrons becomes large again, the convex hull is recovered, and the process returns to the interference check between convex hulls. (a) Basic Concept of Dynamic Configuration / Release of Convex Hull FIGS. 59 and 60 are explanatory diagrams showing the basic concept of configuration / release of a convex hull. In FIG. 59, A and B are the first,
The second non-convex polyhedrons, C A1 and C A2, are convex polyhedrons forming the non-convex polyhedron A, and C B1 , C B2 are convex polyhedrons forming the non-convex polyhedron B. 1) If the non-convex polyhedrons A and B are sufficiently separated, an interference check between the convex hulls A 'and B' is performed (see FIG. 60 (a)).
【0153】2) 凸包A′、B′同士が干渉を始めると
(図60(b)参照)、一方の凸包A′を解除し、凸要素C
A1,CA2と凸包B′との干渉チェックを行い、干渉する
場合には凸要素CA1を取り出す(図60(c)参照)。 3) ついで、凸要素と凸包との立場を入れ替えて、もう
一方の凸包B′を解除し、解除した凸包の凸要素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' start to interfere with each other
(See FIG. 60 (b)), one convex hull A 'is released, and the convex element C
A check is made for interference between A1 and CA2 and the convex hull B ', and if they do interfere, the convex element CA1 is taken out (see FIG. 60 (c)). 3) Next, the positions of the convex element and the convex hull are exchanged, and the other convex hull B ′ is released, and the convex elements C B1 ,
The interference between C B2 and the convex hull A ′ is checked, and the interfering convex element C B1 is extracted (see FIG. 60 (d)). 4) Finally, all combinations of the extracted convex elements (Fig. 6
At 0, interference check is performed for 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 approach vector between them is determined, and two end points p and q giving the vector are defined as the closest approach points. As shown in FIG. 61 (b), when the positions between the convex elements C B1 and C B2 and the convex hull A ′ are switched, and when there is no interference between the convex hull and the convex element, the convex element C B1 , C B2
And the closest point between the convex hull A ′ and the two end points p ′ and q ′ that give the vector is defined as the point of closest approach.
【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 a dynamic construction / cancellation algorithm of a convex hull. Convex hull A 'of non-convex polyhedrons A and B,
Interference check processing (closest search processing) is performed between B '
The distance r (A ', B') between the closest points is obtained. Then
judge the magnitude of r (A ', B') and ε CH (step 2
401). ε CH is a user-defined minute constant. r
When (A ′, B ′)> ε CH , the convex hulls A ′ and B ′ do not interfere with each other, so the closest point between the convex hulls A ′ and B ′ is the closest point between the non-convex polyhedrons A and B. And output (step 240
2). Thereafter, the above processing is repeated while maintaining the convex hull.
On the other hand, when r (A ′, B ′) ≦ ε CH , one convex hull, for example, the convex hull A ′ is released because the convex hulls interfere with each other.
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
(C Ai, B ') is epsilon CC subset ∪ of H following convex elements i CC
Ai is obtained (step 2403). ε CCH is a user-defined minute constant. Thereafter, it is checked whether the number of convex elements constituting the subset ∪ i CC Ai is 0 (step 2).
404). ∪ When i CC Ai = 0, r (C Ai ,
B ′), a convex element C Ak that gives the minimum distance MIN i r (C Ai , B ′) is obtained, the closest point between the convex element C Ak and the convex hull B ′ is obtained, and the closest point is determined as It is output as the point of closest approach 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, '(convex hull A distance r C Bj, A) between each convex element C B j' seek a subset ∪ j CC Bj of the following convex elements epsilon CCH (step 2406).
Then, the number of convex elements constituting the subset 0 j CC Bj is 0
Is checked (step 2407). ∪ j CC
If Bj = 0, the minimum distance M of r (C Bj , A ')
A convex element C Bk that gives IN j r (C Bj , A ′) is obtained, a closest approach point between the convex element C Bk and the convex hull A ′ is obtained, and the closest approach point is determined between the non-convex polyhedrons A and B. Output as the closest approach point (step 2408). However, if ∪ j CC Bj > 0, the minimum distance MIN i, j R between subsets ∪ i CC Ai and ∪ j CC Bj
Convex elements CC Ap and CC Bq that give (CC Ai , CC Bj ) are obtained, the closest point between them is obtained, and output as the closest point between the non-convex polyhedrons A and B (step 2409). Thereafter, the process returns to the beginning and the subsequent processes are repeated.
【0156】(R)干渉チェックサブアルゴリズム (凸包の動的構成/解除及び凸多面体連続干渉チェッ
ク) 非凸多面体に対し、それを包絡する最小の凸多面体とし
て凸包を定義する。非凸多面体間の距離が十分離れてい
る場合には凸包間の連続干渉チェックを行い、凸包同士
が干渉し始めたら、非凸多面体を構成する凸要素間の干
渉チェックに自動的に移行する。非凸多面体間の距離が
再び大きくなった場合には、凸包が回復し、凸包間の連
続干渉チェックに戻す。図63は凸包の動的構成/解除
及び凸多面体連続干渉チェックのアルゴリズムの処理フ
ロー、図64〜図66はその説明図である。非凸多面体
A,Bの凸包A′、B′間に干渉チェック処理(最接近
探索処理)を施し、最接近点間の距離r(A′,B′)
を求める。ついで、r(A′,B′)とεCHの大小を判
断する。又、フラグcontflgA′=1とする(ステップ
2501)。r(A′,B′)>εCHの場合には凸包
A′、B′は干渉しないから、凸包A′、B′間の最接
近点を非凸多面体A,B間の最接近点とし、出力する
(ステップ2502)。以後、凸包を維持したまま上記
処理を繰り返す。(R) Interference Check Sub-Algorithm (Dynamic Construction / Cancellation of Convex Hull and Convex Polyhedron Continuous Interference Check) For a non-convex polyhedron, a convex hull is defined as the smallest convex polyhedron that envelopes it. If the distance between the non-convex polyhedrons is sufficiently large, a continuous interference check between the convex hulls is performed. If the convex hulls start to interfere with each other, the system automatically shifts to the interference check between the convex elements constituting the non-convex polyhedron I do. When the distance between the non-convex polyhedrons is increased again, the convex hull is recovered, and the process returns to the continuous interference check between convex hulls. FIG. 63 is a processing flow of an algorithm for dynamically constructing / releasing a convex hull and checking for a convex polyhedron continuous interference, and FIGS. 64 to 66 are explanatory diagrams thereof. An interference check process (closest search process) is performed between the convex hulls A 'and B' of the non-convex polyhedrons A and B, and a distance r (A ', B') between the closest points.
Ask for. Next, the magnitudes of r (A ', B') and ε CH are determined. Also, the flag contflg A ′ = 1 is set (step 2501). When r (A ', B')> ε CH , the convex hulls A 'and B' do not interfere with each other, so the point of closest approach between the convex hulls A 'and B' is the closest approach between the non-convex polyhedrons A and B. A point is output (step 2502). Thereafter, the above processing is repeated while maintaining the convex hull.
【0157】図64はステップ2501、2502のプ
ロセスを具体的に示すものである。図64に示すとお
り、凸包間の干渉チェックでは、初回のサポート関数h
の計算は、全点に対する内積計算に基づいて算出される
が、次回以降は連続型干渉チェックのアルゴリズムに基
づいて算出される。すなわち、内積計算は最接近点の近
接点に限られる。連続型干渉チェックでは、前回の最接
近点情報を保持しておくことが必要であるが、この情報
は、凸包A′、B′の片方の属性として保持される。ス
テップ2502の過程では、contflgA′=1のフラグ
が立ち、(A′,B′)間の干渉チェックが連続型とな
る。ステップ2501において、r(A′,B′)≦ε
CHの場合には、凸包同士が干渉するから一方の凸包、例
えば凸包A′を解除する。非凸多面体Aの凸要素C Aiの
和集合を∪iCAiと表現する。ついで、凸包B′と各凸
要素CAi間の距離r(CAi,B′)がεCCH以下の凸要
素の部分集合∪iCCAiを求める。又、フラグcontflg
CCA1=1とする(ステップ2503)。FIG. 64 is a flowchart showing steps 2501 and 2502.
The process is specifically shown. As shown in FIG.
In the interference check between convex hulls, the first support function h
Is calculated based on the inner product calculation for all points
However, the next time, based on the continuous interference check algorithm,
It is calculated based on That is, the inner product calculation is
Limited to contacts. In continuous interference check,
It is necessary to keep near point information.
Is held as one attribute of the convex hulls A ′ and B ′. S
In the process of Step 2502, contflgA'= 1 flag
And the interference check between (A ', B') becomes continuous.
You. In step 2501, r (A ′, B ′) ≦ ε
CHIn the case of, one convex hull, eg,
For example, the convex hull A 'is released. Convex element C of non-convex polyhedron A Aiof
UnioniCAiIs expressed as Next, the convex hull B 'and each convex
Element CAiDistance r (CAi, B ') is εCCHThe following key points
Subset of primes∪iCCAiAsk for. Also, the 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′)は連続型干渉チェックで求める。Thereafter, it is checked whether the number of convex elements constituting 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 obtained, and the closest point between the convex element C Ak and the convex hull B ′ is obtained. Then, the closest approach point is output as the closest approach point between the non-convex polyhedrons A and B (step 2505). r (C Ai ,
B ') is obtained by a 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. 65A shows steps 2503 to 250
FIG. 5 is a specific explanatory diagram of FIG. The previous closest point information in the continuous interference check is held as an attribute of the convex element C Ai of the non-convex polyhedron A. Cont in step 2503
The flag of flg CCA1 = 1 is set, and the interference check between (C Ai , B ′) in step 2505 becomes a continuous type. 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 whose distance r (C Bj , A ′) between the convex hull A ′ and each convex element C Bj is equal to or smaller than ε CCH is obtained. Also, the flag contflg
CCB1 = 1 is set (step 2506). Thereafter, it is checked whether the number of convex elements constituting the subset ∪ j CC Bj is 0 (step 2507). When ∪ j CC Bj = 0, the minimum distance MIN j r (C Bj , r) of 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 point of closest approach 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 to 250
FIG. 8 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 Bj of the non-convex polyhedron B. Cont in step 2506
The flag of flg CCBj = 1 is set, and the interference check between (C Ai , B ′) in step 2508 becomes a continuous type. In step 2507, if ∪ j CC Bj > 0,
The minimum distance MIN i, j R between the subsets ∪ i CC Ai and ∪ j CC Bj
Convex elements CC Ap and CC Bq that give (CC Ai , CC Bj ) are obtained, the closest approach point between them is obtained, and output as the closest approach point between the non-convex polyhedrons A and B. Also, all flags contfl
g A ', contflg B', the contflg CCA1, contflg CCBj 0
(Step 2509). Thereafter, the process returns to the beginning and the subsequent processes are repeated. FIG. 66 is an explanatory diagram showing the entire flow described above.
【0161】(S)干渉チェックサブアルゴリズム (凸包の動的構成/解除及び包絡球干渉チェック) 非凸多面体に対し、それを包絡する最小の凸多面体とし
て凸包を定義する。非凸多面体間の距離が十分離れてい
る場合には凸包を包絡する凸包包絡球同士の干渉チェッ
クを行い、凸包包絡球同士が干渉し始めたら凸包同士の
干渉チェックを行う。凸包同士が干渉し始めたら、非凸
多面体を構成する凸要素に対して、包絡球干渉チェック
と凸多面体干渉チェックを行う。非凸多面体間の距離に
応じて包絡球干渉チェックと凸包の構成/解除が動的に
切り替わる。図67は凸包の動的構成/解除及び包絡球
干渉チェックの処理フローである。各非凸多面体A,B
の包絡球半径RA,RB、包絡球中心PCA,PCBを求め
(ステップ2501、2502)、各包絡球の中心間距
離rを次式 r=|PCA−PCB| により求め、 r≦(RA+RB)かチェックする(ステップ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, an interference check is performed between the convex envelope spheres that envelope the convex hull, and when the convex envelope spheres start to interfere with each other, an interference check between the convex hulls is performed. When the convex hulls start to interfere with each other, an envelope sphere interference check and a convex polyhedron interference check are performed on the convex elements constituting the non-convex polyhedron. The envelope sphere interference check and the configuration / cancellation of the convex hull are dynamically switched according to the distance between the non-convex polyhedrons. FIG. 67 is a processing flow of dynamic configuration / cancellation of a convex hull and an envelope sphere interference check. Each non-convex polyhedron A, B
Of the envelope spheres R A , R B and the centers of the envelope spheres P CA , P CB are obtained (steps 2501 and 2502), and the distance r between the centers of the envelope spheres is obtained by the following equation: r = | 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 approach points (step 25).
04). If r ≦ (R A + R B ), the non-convex polyhedrons A and B
Is subjected to interference check processing (closest search processing) between the convex hulls A 'and B', and the distance r (A ', B') between the closest points is obtained. Next, the magnitude of r (A ', B') and ε CH is determined (step 2505). r (A ', B')> epsilon convex hull A in the case of CH ', B' are do not interfere, convex hulls A ', B'
The point of closest approach between is set as the point of closest approach between the non-convex polyhedrons A and B, and is output (step 2506). On the other hand, r (A ', B')
In the case of ≦ ε CH , one convex hull, for example, convex hull A ′ is released because the convex hulls interfere with each other. The union of the convex elements C Ai of the non-convex polyhedron A is expressed as ∪ i C Ai . Then, an interference check between the envelope sphere of each convex element C Ai and the envelope sphere of the non-convex polyhedron B is performed, and an interference check is performed between the interfering convex element C Ai and the convex hull B ′. Thereafter, a subset 凸i of convex elements whose distance r (C Ai , B ′) between the convex hull B ′ and each convex element C Ai is equal to or less than ε CCH.
SCC Ai is obtained (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)。Next, it is checked whether the number of convex elements constituting the subset ∪ i SCC Ai is 0 (step 250).
8). ∪ When i SCC Ai = 0, r (C Ai , B ′)
Of the convex element C Ak that gives the minimum distance MIN i r (C Ai , B ′), the closest point between the convex element C Ak and the convex hull B ′ is obtained, and the closest point is defined as the non-convex polyhedron A , B (step 2509). If ∪ i SCC Ai > 0, release the other convex hull B ′. The union of the convex elements C Bj of the non-convex polyhedron B is expressed as ∪ j C Bj . Next, 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 interfering convex element C Bj and convex hull A ′. 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 equal to or smaller than ε CCH is obtained (step 2510). Next, it is checked whether the number of convex elements constituting the subset ∪ j SCC Bj is 0 (step 2511). ∪ j SCC Bj
= 0, the minimum distance MIN of r (C Bj , A ′)
Find the convex element C Bk that gives i r (C Bj , A ′), find the closest point between the convex element C Bk and the convex hull A ′, and determine the closest point between the non-convex polyhedrons A and B. 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, the part
Subset∪iSCCAiAnd ∪jSCCBjMinimum distance between MINi, j
r (SCCAi, SCCBjThe convex element SCC that givesAp, S
CC Bq, The closest point between them is found, and the non-convex polyhedron
Output as the point of closest approach between A and B (step 251)
3). Thereafter, the process returns to the beginning and the subsequent processes are repeated. The figure
The algorithm for continuous interference of the convex polyhedron shown in FIG.
Interference check speed by incorporating
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 diagram showing the structure of the interference check system of the present invention. Reference numeral 21 denotes a three-dimensional CAD system for generating a shape model and outputting a polygon data file. 23 is a memory that stores convex element data obtained by pre-processing, a proximity point multi-tree list, a proximity point linear list, etc., 23 is a proximity point multi-tree list creation unit that creates a proximity point multi-tree list from a polygon data file, and 24 is A near-point linear list creation unit that generates a near-point linear list from a near-point multitree list, 25 is a convex decomposition unit that decomposes a non-convex polyhedron into a set of convex elements, 26 is an interference check unit, and 27 is a near-point linear list. A list input / output unit 28 that outputs the data to an external recording medium, reads the data as appropriate, and expands the data in the memory 22. Medium.
【0166】(U)本発明の応用分野 本発明は以下のような分野における応用が可能である。 (a) 機構設計用CADシステム 機構設計では、製品を組み立てる時に不用意な干渉が度
々発生する。このようなことを事前に防ぐためには、機
構設計用CADシステム上にて部品間の接合関係、マー
ジンを入念にチェックしておくことが重要になる。リア
ルタイム干渉チェックシステムを機構設計用CADシス
テムに組み込むことにより、実際の製品に近い形での事
前チェックが可能となる。 (b) 移動ロボットの経路計画 マニピュレータや自走車などの移動ロボットでは、他の
物体と衝突しないよう経路計画を事前に行った後に駆動
させる場合が多い。例えば、マニピュレータを使った部
品組立てにおいては、部品間の干渉、部品とマニピュレ
ータ間との干渉をチェックしながら経路計画をする必要
がある。また、掃除ロボット、警護ロボット、運搬ロボ
ットなどの自走ロボットでは、地点間の移動において壁
や柱又は机等の障害物との衝突を回避した経路計画が必
要である。かかる場合、マニピュレータあるいはロボッ
ト制御部に高速の干渉チェックシステムを組込み、事前
にチェックする方法が有効である。(U) Field of Application of the Present Invention The present invention can be applied in the following fields. (a) CAD system for mechanical design In mechanical design, inadvertent interference often occurs when assembling products. In order to prevent such a situation in advance, it is important to carefully check the bonding relationship between components and the margin on the CAD system for mechanical design. By incorporating the real-time interference check system into the CAD system for mechanical design, it is possible to perform a preliminary check in a form close to an actual product. (b) Path planning for mobile robots Mobile robots such as manipulators and self-propelled vehicles are often driven after performing path planning in advance so as not to collide with other objects. For example, in assembling parts using a manipulator, it is necessary to plan a path while checking interference between parts and interference between the part and the manipulator. In addition, a self-propelled robot such as a cleaning robot, a guard robot, or a transport robot needs a path plan that avoids collision with an obstacle such as a wall, a pillar, or a desk when moving between points. In such a case, it is effective to incorporate a high-speed interference check system into the manipulator or the robot control unit and perform a check in advance.
【0167】(c) マルチメディアにおけるアニメーショ
ン作成 アニメーションの分野では、グラフィックコンピュータ
を用いたリアリティの高いアニメーションの作成が望ま
れている。例えば、アンドロイドモデルを歩かせる場合
には、アンドロイドモデルと地上との接触問題を解かな
ければならず、又、自動車の衝突をシミュレーションす
る場合には、まさしく自動車間の干渉問題を解く必要が
ある。 (d) ゲームソフト 従来のゲームソフトはもっぱら二次元的なものが多かっ
たが、今後は、グラフコンピュータを使い、三次元的に
表示するものが主流になると予想される。ゲームソフト
では、例えば、シュ−ティングゲームにおけるミサイル
と戦闘機の衝突、レーシングゲームにおける車同士の衝
突など物体間の干渉問題が多い。本発明のリアルタイム
干渉チェックシステムは、上記応用分野において強力な
手段を提供するものである。以上、本発明を実施例によ
り説明したが、本発明は請求の範囲に記載した本発明の
主旨に従い種々の変形が可能であり、本発明はこれらを
排除するものではない。(C) Creation of Animation in Multimedia In the field of animation, creation of highly realistic animation using a graphic computer is desired. For example, to make an android model walk, it is necessary to solve a contact problem between the android model and the ground, and to simulate an automobile collision, it is necessary to solve an interference problem between automobiles. (d) Game software Conventional game software was mostly two-dimensional, but in the future it is expected that those that use graph computers and display three-dimensionally will become mainstream. In game software, for example, there are many interference problems between objects such as a collision between a missile and a fighter in a shooting game and a collision between cars in a racing game. The real-time interference check system of the present invention provides a powerful means in the above application field. As described above, the present invention has been described with reference to the embodiments. However, the present invention can be variously modified in accordance with the gist of the present invention described in the claims, and the present invention does not exclude these.
【0168】[0168]
【発明の効果】以上本発明によれば、各凸多面体の最接
近点が格子点上に存在するか、辺上に存在するか、ポリ
ゴン上に存在するか判断し、(1)格子点上に存在する場
合には有向グラフ型構造データより該格子点を構成する
ポリゴンを求め、該ポリゴンの格子点をGIlbert法によ
る最接近点探索処理における内積評価に用い、(2)辺上
に存在する場合には該辺を構成するポリゴンを求め、該
ポリゴンの格子点を前記内積評価に用い、(3)ポリゴン
上に存在する場合には該ポリゴンの格子点を前記内積評
価に用いるように構成したから、内積評価に適用する格
子点数を減少することができ、計算負荷を減少すること
ができる。As described above, according to the present invention, it is determined whether the closest point of each convex polyhedron exists on a grid point, on a side, or on a polygon. If it exists on the side, (2) When the polygon that constitutes the grid point is obtained from the directed graph type structural data, and the grid point of the polygon is used for inner product evaluation in the closest approach point search process by the GIbert method, The polygons constituting the side are obtained, and the grid points of the polygons are used for the inner product evaluation. (3) When the polygon points are present on the polygon, the grid points of the polygon are used for the inner product evaluation. , 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)三角形ポリゴン
上に存在する場合には該三角形ポリゴンの格子点を内積
評価に用いるようにしたから、内積評価に適用する格子
点数を更に減少することができ、計算負荷を減少するこ
とができる。According to the present invention, the surface polygon (polygon) constituting the convex polyhedron is divided into triangles, and whether the point of closest approach of each convex polyhedron exists on a lattice point or on a side is determined. It is determined whether or not it exists on a triangular polygon. (1) If it exists on a grid point, a triangular polygon constituting the grid point is obtained from the directed graph type structure data, and the grid point of the triangular polygon is used for inner product evaluation. (2) If it exists on a side, a triangular polygon constituting the side is obtained, and grid points of the triangular polygon are used for inner product evaluation. (3) If the triangular polygon exists on a 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, a minimum convex polyhedron (convex hull) enclosing a non-convex polyhedron is generated, directed graph type structure data of the convex hull is created, and the directed graph type structure data of the convex hull is used. The closest point between non-convex polyhedrons is searched for, 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 constituting the polyhedron, the closest point search between non-convex polyhedrons can be performed, and a surface convex polygon with virtuality = 1 can be used. It is possible to reduce the calculation load required for the closest approach point search processing until it interferes with another object. Further, according to the present invention, after the surface convex polygon of virtuality = 1 interferes with another object and releases the convex hull, when the surface convex polygon no longer interferes with another object, the convex hull is removed. Since the closest approach point search processing is performed after restoration, the calculation load of the closest approach point search processing after restoration can be reduced.
【0171】[0171]
【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.
【図2】凸多面体の表面多角形への分解説明図(6面体
の場合)である。FIG. 2 is an exploded explanatory view of a convex polyhedron into surface polygons (in the case of a hexahedron).
【図3】最接近点探索のための凸多面体データ構造説明
図(6面体の場合)である。FIG. 3 is an explanatory view of a convex polyhedron data structure for searching for a point of closest approach (in the case of a hexahedron).
【図4】本発明の第1の最接近点探索方法の処理フロー
図である。FIG. 4 is a processing flowchart of a first closest approach point search method of the present invention.
【図5】凸多面体データ入力の説明図である。FIG. 5 is an explanatory diagram of convex polyhedral data input.
【図6】第1の最接近点探索装置の構成図である。FIG. 6 is a configuration diagram of a first closest approach point searching device.
【図7】凸多面体の三角形分割説明図である。FIG. 7 is an explanatory diagram of triangulation of a convex polyhedron.
【図8】多角形の三角形分割説明図である。FIG. 8 is an explanatory diagram of triangulation of a polygon.
【図9】第2の最接近点探索方法の処理フロー図であ
る。FIG. 9 is a processing flowchart of a second closest approach point search method.
【図10】第2の最接近点探索装置の構成図である。FIG. 10 is a configuration diagram of a second closest point searching device.
【図11】マージング処理説明図である。FIG. 11 is an explanatory diagram of a merging process.
【図12】マージングデータ構造の説明図である。FIG. 12 is an explanatory diagram of a merging data structure.
【図13】マージングアルゴリズムの流れ図である。FIG. 13 is a flowchart of a merging algorithm.
【図14】凸包データ説明図である。FIG. 14 is an explanatory diagram of convex hull data.
【図15】タスクによるマージング処理の説明図であ
る。FIG. 15 is an explanatory diagram of merging processing by a task.
【図16】While文を用いたマージング処理の説明図で
ある。FIG. 16 is an explanatory diagram of a merging process using a While sentence.
【図17】環境が動的に変化する場合の本発明の説明図
(その1)である。FIG. 17 is an explanatory diagram of the present invention when the environment changes dynamically.
(Part 1).
【図18】環境が動的に変化する場合の本発明の説明図
(その2)である。FIG. 18 is an explanatory diagram of the present invention when the environment changes dynamically.
(Part 2).
【図19】マージング及びリカバリ処理説明図である。FIG. 19 is an explanatory diagram of merging and recovery processing.
【図20】While文を用いたリカバリ処理の説明図であ
る。FIG. 20 is an explanatory diagram of a recovery process using a While statement.
【図21】非凸多面体間の最接近点探索の全体の処理フ
ロー図である。FIG. 21 is an overall processing flowchart of searching for a point of closest approach between non-convex polyhedrons.
【図22】本発明の非凸多面体間の最接近点探索装置の
構成図である。FIG. 22 is a configuration diagram of a device for searching for a point of closest approach between non-convex polyhedrons according to the present invention.
【図23】非凸多面体間の最接近点連続探索の第1の方
法説明図である。FIG. 23 is an explanatory diagram of a first method of continuous search for the closest point between non-convex polyhedrons.
【図24】非凸多面体間の第1の最接近点連続探索処理
のフロー図である。FIG. 24 is a flowchart of a first closest point continuous search process between non-convex polyhedrons.
【図25】非凸多面体間の最接近点連続探索の第2の方
法説明図である。FIG. 25 is an explanatory diagram of a second method of continuous search for the closest point between non-convex polyhedrons.
【図26】非凸多面体間の第2の最接近点連続探索処理
のフロー図である。FIG. 26 is a flowchart of a second closest point continuous search process between non-convex polyhedrons.
【図27】システム構成図である。FIG. 27 is a system configuration diagram.
【図28】干渉チェック前処理の概略的処理フローであ
る。FIG. 28 is a schematic processing flow of an interference check pre-processing;
【図29】凸分解基本アルゴリズムの処理フローであ
る。FIG. 29 is a processing flow of a convex decomposition basic algorithm.
【図30】Mergeプロセスの流れ図である。FIG. 30 is a flowchart of the Merge process.
【図31】ポリゴン間の凹凸関係判定説明図である。FIG. 31 is an explanatory diagram of determining the unevenness relationship between polygons.
【図32】凸分解前処理の第2実施例処理フローであ
る。FIG. 32 is a process flow of a second embodiment of the pre-decomposition processing.
【図33】ブール集合演算による物体表現説明図であ
る。FIG. 33 is an explanatory diagram of object representation by a Boolean set operation.
【図34】凸分解前処理の第3実施例処理フローであ
る。FIG. 34 is a processing flow of a third embodiment of the pre-decomposition processing.
【図35】負物体がある場合の凸分割の結果説明図であ
る。FIG. 35 is an explanatory diagram of a result of convex division when there is a negative object.
【図36】凸分解前処理の第4実施例処理フローであ
る。FIG. 36 is a processing flow of the fourth embodiment of the pre-decomposition processing.
【図37】本発明の干渉チェック前処理の別の概略的処
理フローである。FIG. 37 is another schematic processing flow of the interference check pre-processing of the present invention.
【図38】高速凸分解基本アルゴリズムのフロー図であ
る。FIG. 38 is a flowchart of a fast convex decomposition basic algorithm.
【図39】Mergeプロセスの流れ図である。FIG. 39 is a flow chart of a Merge process.
【図40】干渉チェックアルゴリズムの概略処理フロー
である。FIG. 40 is a schematic processing flow of an interference check algorithm.
【図41】Gilbert法による干渉チェック原理説明図で
ある。FIG. 41 is an explanatory diagram of the principle of interference check by the Gilbert method.
【図42】Gilbert法に基づくMerge可能性判定のフロー
である。FIG. 42 is a flowchart of Merge possibility determination based on the Gilbert method.
【図43】簡略化したGilbert法に基づくMerge可能性判
定のフローである。FIG. 43 is a flowchart of Merge possibility determination based on the simplified Gilbert method.
【図44】凸分解の第1変形例の処理フローである。FIG. 44 is a processing flow of a first modified example of convex decomposition.
【図45】凸分解の第2変形例の処理フローである。FIG. 45 is a processing flow of a second modified example of the convex decomposition.
【図46】近接点リストの例である。FIG. 46 is an example of a proximity point list.
【図47】近接点線形リスト作成の前処理フローであ
る。FIG. 47 is a pre-processing flow for creating a proximity point linear list.
【図48】三角形ポリゴンに分割した直方体及びポリゴ
ンデータの説明図である。FIG. 48 is an explanatory diagram of a rectangular parallelepiped divided into triangular polygons and polygon data.
【図49】凸要素毎のポリゴンデータ説明図である。FIG. 49 is an explanatory diagram of polygon data for each convex element.
【図50】近接点線形リストを生成するアルゴリズムの
説明図である。FIG. 50 is an explanatory diagram of an algorithm for generating a proximity point linear list.
【図51】近接点線形リストを生成するアルゴリズムの
別の説明図である。FIG. 51 is another explanatory diagram of the algorithm for generating the proximity point linear list.
【図52】近接点線形リストの作成説明図である。FIG. 52 is an explanatory diagram of creation of a proximity point linear list.
【図53】近接点多分木リストの例である。FIG. 53 is an example of a proximity point multi-tree list.
【図54】近接点多分木リスト作成の前処理フローであ
る。FIG. 54 is a preprocessing flow for creating a proximity point multi-tree list.
【図55】近接点線形リストのダンプファイルフォーマ
ット説明図である。FIG. 55 is an explanatory diagram of a dump file format of a proximity point linear list.
【図56】包絡球による事前チェックアルゴリズムのフ
ローである。FIG. 56 is a flowchart of a pre-check algorithm using an envelope sphere.
【図57】Gilbert法の基本的な考え方の説明図であ
る。FIG. 57 is an explanatory diagram of a basic concept of the Gilbert method.
【図58】凸多面体における連続的干渉チェックアルゴ
リズムのフローである。FIG. 58 is a flowchart of a continuous interference check algorithm for a convex polyhedron.
【図59】非凸多面体の説明図である。FIG. 59 is an explanatory diagram of a non-convex polyhedron.
【図60】凸包の動的構成/解除の基本的な考え方の説
明図である。FIG. 60 is an explanatory diagram of a basic concept of dynamic configuration / cancellation of a convex hull.
【図61】凸包、凸要素間の干渉チェック説明図であ
る。FIG. 61 is an explanatory diagram of interference check between a convex hull and a convex element.
【図62】凸包の動的構成/解除アルゴリズムののフロ
ーである。FIG. 62 is a flowchart of a dynamic hull dynamic configuration / cancellation algorithm.
【図63】凸包の動的構成/解除及び凸多面体連続干渉
チェックのフローである。FIG. 63 is a flowchart of dynamic configuration / release of a convex hull and a continuous polyhedron continuous interference check.
【図64】凸包間の連続型干渉チェックの説明図であ
る。FIG. 64 is an explanatory diagram of a continuous interference check between convex hulls.
【図65】凸要素、凸包間の連続型干渉チェックの説明
図である。FIG. 65 is an explanatory diagram of a continuous interference check between a convex element and a convex hull.
【図66】凸要素間の干渉チェック説明図である。FIG. 66 is an explanatory diagram of interference check between convex elements.
【図67】凸包の動的構成/解除及び包絡球干渉チェッ
クアルゴリズムのフローである。FIG. 67 is a flowchart of a dynamic configuration / release of a convex hull and an algorithm for checking an envelope sphere interference.
【図68】干渉チェックシステムの構成図である。FIG. 68 is a configuration diagram of an interference check system.
【図69】最接近点アルゴリズムの解決すべき点の説明
図(その1)である。FIG. 69 is an explanatory diagram (part 1) of points to be solved by the closest approach algorithm.
【図70】最接近点アルゴリズムの解決すべき点の説明
図(その2)である。FIG. 70 is an explanatory diagram (part 2) of points to be solved by the closest approach point algorithm;
【図71】サポート関数の説明図である。FIG. 71 is an explanatory diagram of a support function.
【図72】Gilbert法による最接近点探索の説明図であ
る。FIG. 72 is an explanatory diagram of the search for the closest approach point by the Gilbert method.
【図73】Gilbert法の説明図である。FIG. 73 is an explanatory diagram of the Gilbert method.
【図74】Gilbert法の数値試験結果説明図である。FIG. 74 is an explanatory diagram of a numerical test result of the Gilbert method.
【図75】Gilbert法による非凸多面体間の最接近点探
索の説明図である。FIG. 75 is an explanatory diagram of searching for a point of closest approach between non-convex polyhedrons using the Gilbert method.
22a・・ポリゴンデータ記憶部 22b・・近接点線形リスト記憶部 24・・近接点線形リスト作成部 26・・最接近点探索処理部 22a: Polygon data storage unit 22b: Proximity point linear list storage unit 24: Proximity point linear list creation unit 26: Closest point search processing unit
───────────────────────────────────────────────────── フロントページの続き (72)発明者 丸山 次人 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (58)調査した分野(Int.Cl.7,DB名) G06F 17/50 628 ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Tsutomu Maruyama Fujitsu Limited (1015) Kamikodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Prefecture (58) Field surveyed (Int.Cl. 7 , DB name) G06F 17/50 628
Claims (8)
体上のp個のポイントを要素とする部分集合で形成され
る形状迄の原点からの最接近点を求め、該最接近点の位
置ベクトルと各凸多面体の格子点の位置ベクトルとの内
積を評価し、評価結果に基づいて該最接近点が、原点か
ら差凸多面体までの最接近点と一致するか判定し、一致
しない場合には部分集合を変更し、最終的に原点から差
凸多面体までの最接近点を求めて各凸多面体の最接近点
を求める最接近点探索装置において、 凸多面体の各表面多角形(ポリゴン)の下方に該ポリゴ
ンの要素である格子点、辺を配列し、格子点、辺の下方
にそれぞれ格子点、辺を構成するポリゴンを配列するこ
とにより各凸多面体を表現する有向グラフ型構造データ
を作成する有向グラフ型構造データ作成部 、 該有向グラフ型構造データを記憶する記憶部 、 前記部分集合で形成される形状の原点からの最接近点に
対応する各凸多面体上の最接近点を求める手段、 各凸多面体上の最接近点 が格子点上に存在するか、辺上
に存在するか、ポリゴン上に存在するか判断し、 格子
点上に存在する場合には有向グラフ型構造データより該
格子点を構成するポリゴンを求め、該ポリゴンの格子点
を前記内積評価に用いるものとし、辺上に存在する場
合には有向グラフ型構造データより該辺を構成するポリ
ゴンを求め、該ポリゴンの格子点を前記内積評価に用い
るものとし、ポリゴン上に存在する場合には該ポリゴ
ンの格子点を前記内積評価に用いるものとして 、 内積評
価用の格子点を求める手段 、 前記内積関評価用の格子点を用いて内積評価を行って 原
点から差凸多面体までの最接近点を求めて各凸多面体上
の最接近点を求める最接近点探索手段 、 を有する最接近点探索装置。 1. A difference convex polyhedron which is a set of two convex polyhedrons.
Formed by a subset of p elements on the body
Up to the shapeFrom the originFind the closest point, and find the position of the closest point.
Between the position vector and the position vector of the lattice point of each convex polyhedron
Evaluate the product and determine whether the closest point is the origin based on the evaluation result.
From the point of closest approach to the convex polyhedron from the
If not, change the subset and finally
Find the closest point to the convex polyhedron and find the closest point for each convex polyhedron
Finding the closest approach pointapparatusThe polygons below each surface polygon (polygon) of the convex polyhedron
The grid points and sides that are the elements of the
Array the polygons that make up the grid points and sidesDo
And directed graph type structural data expressing each convex polyhedron by
Graph-structured data generator that creates a graph , Storage unit for storing the directed graph type structure data , Of the shape formed by the subsetFrom the originTo the closest point
Closest point on each corresponding convex polyhedronMeans to seek, Closest point on each convex polyhedron Exists on a grid point or on an edge
Or on a polygon, lattice
If it exists on a point, the
Find the polygons that make up the grid points and calculate the grid points
To the inner product evaluationShall be used,A place that exists on the side
In this case, the direction
Gon is calculated, and the grid points of the polygon areUse
Shall beIf it exists on a polygon, the polygon
Grid points for the inner product evaluationTo use , Internal commentary
Means for finding grid points for value , Perform inner product evaluation using the grid points for the inner product evaluation original
Find the point of closest approach from the point to the difference convex polyhedron and calculate each convex polyhedronUp
The closest point to find the closest pointmeans , Closest point searching device having
には、非凸多面体をを包む最小の凸多面体(凸包)を生
成する凸包生成部、 該凸包の有向グラフ型構造データを作成して前記記憶部
に格納する手段 、 を備え 、 前記最接近点探索手段は、 該凸包の有向グラフ
型構造データを用いて非凸多面体間の最接近点探索を行
う請求項1記載の最接近点探索装置。2. Searching for the closest point between non-convex polyhedrons
Produces the smallest convex polyhedron (convex hull) that wraps the nonconvex polyhedron
MakeConvex hull generator, Create a directed graph type structure data of the convex hullThe storage unit
Means to store in , Equipped , The closest point searching means, Directed graph of the convex hull
Search for the closest point between non-convex polyhedrons using type structure data
Search for the closest approach point according to claim 1.apparatus.
る表面凸多角形が元の非凸多面体の表面凸多角形と一致
する場合にはバーチャリティ=0,一致しない場合には
バーチャリティ=1とし、バーチャリティ=1の表面凸
多角形が他の物体と干渉した場合には、凸包を解除し、
以後非凸多面体を構成する複数の凸多面体に対して最接
近点探索処理を施す請求項2記載の最接近点探索装置。3. The closest approach point searching means, wherein the surface convex polygon constituting the convex hull coincides with the surface convex polygon of the original non-convex polyhedron; If charity = 1 and the surface convex polygon with virtuality = 1 interferes with another object, the convex hull is released,
3. The closest point searching device according to claim 2, wherein a closest point searching process is performed on a plurality of convex polyhedrons constituting the non-convex polyhedron.
後、バーチャリティ=1の表面凸多角形が他の物体と干
渉しなくなった時、凸包を復元して最接近点探索処理を
行う請求項3記載の最接近点探索装置。 4. The closest approach point searching means, wherein the convex hull is restored and the convex hull is restored when the surface convex polygon of virtuality = 1 does not interfere with another object after the convex hull is released. 4. The closest point searching device according to claim 3, wherein:
には、非凸多面体をを包む最小の凸多面体(凸包)を生
成する手段、 該凸包を構成するポリゴンを三角形に分割し、ポリゴン
の最小単位を三角形ポリゴンとして有向グラフ型構造デ
ータを作成して前記記憶部に格納する手段 、 を備え 、 前記最接近点探索手段は、 該凸包の有向グラフ
型構造データを用いて非凸多面体間の最接近点探索を行
う請求項1記載の最接近点探索装置。5. A means for generating a minimum convex polyhedron (convex hull) enclosing the non-convex polyhedron when searching for a point of closest approach between the non-convex polyhedrons, dividing a polygon constituting the convex hull into triangles. and, by creating a directed graph type structure data the smallest unit of a polygon as a triangle polygon comprising means for storing in the storage unit, the closest approach point search means, non-convex using the directed graph type structure data of the convex hull The apparatus for searching for a point of closest approach between polyhedrons according to claim 1.
る三角形ポリゴンが元の非凸多面体の三角形ポリゴンと
一致する場合にはバーチャリティ=0,一致しない場合
にはバーチャリティ=1とし、バーチャリティ=1の三
角形ポリゴンが他の物体と干渉した場合には、凸包を解
除し、以後非凸多面体を構成する複数の凸多面体に対し
て最接近点探索処理を施す請求項5記載の最接近点探索
装置。 6. The closest approach point searching means sets virtuality = 0 when a triangular polygon constituting the convex hull matches the triangular polygon of the original non-convex polyhedron, and sets virtuality = 1 when the triangular polygon does not match. 6. The method according to claim 5, wherein when the triangular polygon with virtuality = 1 interferes with another object, the convex hull is released, and thereafter, a closest point search process is performed on a plurality of convex polyhedrons constituting the non-convex polyhedron. Search for the closest approach point
Equipment .
後、バーチャリティ=1の三角形ポリゴンが他の物体と
干渉しなくなった時、凸包を復元して最接近点探索処理
を行う請求項6記載の最接近点探索装置。7. The closest approach point searching means performs a closest approach point search process by restoring the convex hull when the triangular polygon with virtuality = 1 does not interfere with another object after releasing the convex hull. An apparatus for searching for a point of closest approach according to claim 6.
体上のp個のポイントを要素とする部分集合で形成され
る形状迄の原点からの最接近点を求め、該最接近点の位
置ベクトルと各凸多面体の格子点の位置ベクトルとの内
積を評価し、評価結果に基づいて該最接近点が、原点か
ら差凸多面体までの最接近点と一致するか判定し、一致
しない場合には部分集合を変更し、最終的に原点から差
凸多面体までの最接近点を求めて各凸多面体の最接近点
を求める最接近点探索装置において、 凸多面体の各表面多角形(ポリゴン)を三角形に分割
し、各三角形ポリゴンの下方に該三角形ポリゴンの要素
である格子点、辺を配列し、格子点、辺の下方にそれぞ
れ格子点、辺を構成する三角形ポリゴンを配列すること
により各凸多面体を表現する有向グラフ型構造データを
作成する有向グラフ型構造データ作成部 、 該有向グラフ
型構造データを記憶する記憶部 、 前記部分集合で形成される形状の原点からの最接近点に
対応する各凸多面体上の最接近点を求める手段、 各凸多面体上の最接近点 が格子点上に存在するか、辺上
に存在するか、三角形ポリゴン上に存在するか判断し、
格子点上に存在する場合には有向グラフ型構造データ
より該格子点を構成する三角形ポリゴンを求め、該三角
形ポリゴンの格子点を前記内積評価に用いるものとし、
辺上に存在する場合には有向グラフ型構造データより
該辺を構成する三角形ポリゴンを求め、該三角形ポリゴ
ンの格子点を前記内積評価に用いるものとし、三角形
ポリゴン上に存在する場合には該三角形ポリゴンの格子
点を前記内積評価に用いるものとして 、 内積評価用の格
子点を求める手段 、 前記内積関評価用の格子点を用いて内積評価を行って 原
点から差凸多面体までの最接近点を求めて各凸多面体上
の最接近点を求める最接近点探索手段 、 を有する最接近点探索装置。 8. A difference convex polyhedron, which is a difference set of two convex polyhedrons
Formed by a subset of p elements on the body
Up to the shapeFrom the originFind the closest point, and find the position of the closest point.
Between the position vector and the position vector of the lattice point of each convex polyhedron
Evaluate the product and determine whether the closest point is the origin based on the evaluation result.
From the point of closest approach to the convex polyhedron from the
If not, change the subset and finally
Find the closest point to the convex polyhedron and find the closest point for each convex polyhedron
Finding the closest approach pointapparatusIn, each surface polygon (polygon) of the convex polyhedron is divided into triangles
And below each triangle polygon,
Arrange the grid points and sides that are
Array of triangular polygons that make up grid points and sidesTo do
Gives a directed graph type structure data that represents each convex polyhedron
Directed graph type structure data creation unit to create , The directed graph
Storage unit for storing type structure data , Of the shape formed by the subsetFrom the originTo the closest point
Closest point on each corresponding convex polyhedronMeans to seek, Closest point on each convex polyhedron Exists on a grid point or on an edge
Or on a triangular polygon,
Directed graph type structure data if it exists on a grid point
Then, a triangular polygon constituting the grid point is obtained,
The grid points of the polygon are evaluated for the inner productShall be used,
If it exists on the edge, use the directed graph type data
A triangular polygon constituting the side is obtained, and the triangular polygon is
Grid points for the inner product evaluationShall be used,triangle
The grid of the triangular polygon if it is on a polygon
Points to the inner product evaluationTo use , Case for inner product evaluation
Means for finding child points , Perform inner product evaluation using the grid points for the inner product evaluation original
Find the closest point from the point to the difference convex polyhedron, and on each convex polyhedron
The closest point to find the closest pointmeans , Closest point searching device having
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 |
|---|---|---|---|
| JP5-228794 | 1993-09-14 | ||
| JP22879493 | 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 JPH07134735A (en) | 1995-05-23 |
| JP3316092B2 true 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) |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2915826B2 (en) * | 1995-07-11 | 1999-07-05 | 富士通株式会社 | Interference check device |
| JP3378726B2 (en) * | 1996-05-24 | 2003-02-17 | 富士通株式会社 | Machine design / manufacturing process support device |
| JP3689226B2 (en) * | 1997-03-13 | 2005-08-31 | 富士通株式会社 | Decomposition path generator |
| JP3383563B2 (en) * | 1997-12-18 | 2003-03-04 | 富士通株式会社 | Object movement simulation device |
| JPH11272721A (en) | 1998-03-19 | 1999-10-08 | Fujitsu Ltd | Interference check result display method, interference check result display device, and computer-readable recording medium storing interference check result display program |
| JP3975341B2 (en) * | 2002-05-15 | 2007-09-12 | 株式会社安川電機 | Robot interference check method |
| KR101247761B1 (en) * | 2011-07-15 | 2013-04-01 | 삼성중공업 주식회사 | Method for finding the movement area of a mobile robot on hull surface, a mobile robot, and recording medium |
| CN104801044B (en) * | 2015-05-12 | 2017-12-12 | 深圳市腾讯计算机系统有限公司 | The method and apparatus for generating trajectory vertex sequence |
| DE102015210015A1 (en) * | 2015-06-01 | 2016-12-01 | Robert Bosch Gmbh | Method and device for determining the position of a vehicle |
| CN115268471B (en) * | 2022-09-27 | 2023-01-03 | 深圳市智绘科技有限公司 | Route generation method and device of sweeping robot and storage medium |
| CN120997433B (en) * | 2025-10-24 | 2026-02-03 | 星际空间(天津)科技发展有限公司 | Hierarchical extraction method, system and equipment for three-dimensional model of marine disaster prevention body |
-
1994
- 1994-09-02 JP JP20900894A patent/JP3316092B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH07134735A (en) | 1995-05-23 |
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 | |
| EP1241628B1 (en) | Interference checking method | |
| JP3316092B2 (en) | Closest point search device | |
| Alvarez et al. | 3D robot formations path planning with fast marching square | |
| US20080034023A1 (en) | Contact geometry calculation device, contact geometry calculation method, and computer program product | |
| JPH11328233A (en) | Interference checking apparatus and method | |
| JP5269737B2 (en) | Interference check method, interference check device, and interference check program | |
| Kivelä et al. | Redundant robotic manipulator path planning for real-time obstacle and self-collision avoidance | |
| Mirolo et al. | A solid modelling system for robot action planning | |
| 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 | |
| Panov et al. | Psychologically inspired planning method for smart relocation task | |
| Kondo et al. | Collision avoidance using a free space enumeration method based on grid expansion | |
| Edelkamp et al. | Surface inspection via hitting sets and multi-goal motion planning | |
| Coulombe et al. | High precision real time collision detection | |
| KR102903474B1 (en) | Robot Path Creating Method, Computing Device for Performing the Method | |
| Cetin et al. | GPGPU accelerated real-time potential field based formation control for Unmanned Aerial Vehicles | |
| Kasmynin et al. | Vectorized visibility graph planning with neural polygon extraction | |
| Ghadai et al. | GPU-ACCELERATED COLLISION FREE NAVIGATION OF VEHICLES IN ENCLOSED SPACES | |
| Fang et al. | Collision detection methodologies for rigid body assembly in a virtual environment | |
| Ramadhan et al. | Two Dimensional Path Planning with Static Polygon Obstacles Avoidance | |
| Chembuly et al. | An Optimization-Based Approach for Redundancy Resolution of Spatial Robots in Realistic Working Environments |
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 |