JP4589369B2 - How to get the shortest distance between objects - Google Patents

How to get the shortest distance between objects Download PDF

Info

Publication number
JP4589369B2
JP4589369B2 JP2007240899A JP2007240899A JP4589369B2 JP 4589369 B2 JP4589369 B2 JP 4589369B2 JP 2007240899 A JP2007240899 A JP 2007240899A JP 2007240899 A JP2007240899 A JP 2007240899A JP 4589369 B2 JP4589369 B2 JP 4589369B2
Authority
JP
Japan
Prior art keywords
distance
shortest distance
elements
target element
dmin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007240899A
Other languages
Japanese (ja)
Other versions
JP2008021329A (en
Inventor
重信 堤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2007240899A priority Critical patent/JP4589369B2/en
Publication of JP2008021329A publication Critical patent/JP2008021329A/en
Application granted granted Critical
Publication of JP4589369B2 publication Critical patent/JP4589369B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Analysis (AREA)

Description

本発明は、CAD/CAMやCGなどのコンピュータ技術計算に関するものであり、特に、複数の要素で構成されるオブジェクトと所定点との最短距離を取得するためのオブジェクト間の最短距離取得方法に関する。   The present invention relates to computer technology calculations such as CAD / CAM and CG, and more particularly to a method for obtaining the shortest distance between objects for obtaining the shortest distance between an object composed of a plurality of elements and a predetermined point.

CAD/CAMやコンピュータグラフィックスでは、独立した複数のオブジェクトより構成されており、各オブジェクトの衝突や接触などの相互作用を決定して表現する必要がある。特に、CAD/CAMにより製品のデザインを設計する場合、各部品同士または製造工具との干渉状態を認識するために、オブジェクト間の最短距離を算出する必要がある。
各オブジェクトのフェースが所定の数式で表現されているような場合には、この数式を解析してオブジェクト間の最短距離を算出するように構成することができる。
CAD / CAM and computer graphics are composed of a plurality of independent objects, and it is necessary to determine and represent interactions such as collision and contact of each object. In particular, when designing a product design by CAD / CAM, it is necessary to calculate the shortest distance between objects in order to recognize the interference state between parts or manufacturing tools.
When the face of each object is expressed by a predetermined mathematical expression, the shortest distance between the objects can be calculated by analyzing the mathematical expression.

また、各オブジェクトを多面体(polyhedron)と想定し、この多面体を構成する簡易形状要素に分解し、各要素の位置情報に基づいて最短距離を求めるように構成することができる。   Further, each object can be assumed to be a polyhedron, and can be decomposed into simple shape elements constituting the polyhedron, and the shortest distance can be obtained based on position information of each element.

各オブジェクトのフェースを表現している数式を解析して最短距離を求める場合には、収束演算などを用いる必要があるために、演算に多大な時間を要するという問題を内包している。
各オブジェクトを簡易形状要素に分解する場合には、多面体を構成する三角形ポリゴンの位置情報に基づいて、各オブジェクトを構成するポリゴンの最短距離を逐次的に求めることが行われる。
When calculating the shortest distance by analyzing a mathematical expression expressing the face of each object, it is necessary to use a convergence calculation or the like.
When each object is decomposed into simple shape elements, the shortest distance between the polygons constituting each object is sequentially obtained based on the position information of the triangular polygons constituting the polyhedron.

三角形ポリゴンは、要素の境界を示すエッジ(edge)、エッジの端部対を構成する頂点(vertex)、要素の面を表すフェース(face)で構成されている。この三角形ポリゴンは、幾何学的に連続性がある状態で分割され、その要素データはその連続性に基づく順で整列されていることが一般的である。
通常、このようなポリゴンデータをその整列順で読み出して最短距離の算出を行っているため、その処理に多大な時間を要する。
The triangular polygon is composed of an edge indicating the boundary of the element, a vertex constituting the edge pair of the edge, and a face representing the face of the element. In general, the triangular polygons are divided in a geometrically continuous state, and the element data is generally arranged in an order based on the continuity.
Usually, since such polygon data is read in the order of arrangement and the shortest distance is calculated, the processing takes a lot of time.

本発明では、複数の要素で構成されるオブジェクト間の最短距離を取得するための処理時間を短縮することを目的とする。   An object of the present invention is to shorten the processing time for acquiring the shortest distance between objects composed of a plurality of elements.

本発明に係るオブジェクト間の最短距離取得方法は、コンピュータグラフィックス処理において、複数の要素で構成されるオブジェクトと所定点との最短距離を取得するためのオブジェクト間の最短距離取得方法であって、A)最短距離Dminを初期値に設定する段階と、B)オブジェクトを構成する複数の要素の幾何学的連続性を有する配列順の配列に対して、幾何学的連続性を有さない読出順に基づいて対象要素を決定し、対象要素の位置情報を読み出す段階と、C)対象要素の位置情報に基づいて、対象要素と所定点との距離を簡易判定して、簡易判定距離Drghに設定する段階と、D)簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはB段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、対象要素の位置情報に基づいて対象要素と所定点との距離を詳細判定し要素距離Dobjに設定する段階と、E)要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはB段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、F)オブジェクトを構成する複数の要素のうち対象要素になっていないものがある場合にはB段階に移行し、全ての要素が対象要素になったと判断される場合には処理を終了する段階とを含む。   The shortest distance acquisition method between objects according to the present invention is a shortest distance acquisition method between objects for acquiring the shortest distance between an object composed of a plurality of elements and a predetermined point in computer graphics processing, A) a step of setting the shortest distance Dmin to an initial value; and B) an order of arrangement having geometric continuity of a plurality of elements constituting the object in an order of reading without geometric continuity. A step of determining a target element based on the target element and reading out the position information of the target element; and C) based on the position information of the target element, simple determination of the distance between the target element and the predetermined point is set to the simple determination distance Drgh Step D) The simple determination distance Drgh is compared with the shortest distance Dmin. If the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to the B stage, and the simple determination distance Drgh is the shortest distance Dm. If it is less than or equal to in, the step of determining in detail the distance between the target element and the predetermined point based on the position information of the target element and setting it to the element distance Dobj, and E) comparing the element distance Dobj with the shortest distance Dmin When the element distance Dobj exceeds the shortest distance Dmin, the process proceeds to step B, and when the element distance Dobj is equal to or less than the shortest distance Dmin, the step of substituting the element distance Dobj into the shortest distance Dmin; F) Including the step of moving to stage B when there are elements that are not the target elements among the plurality of elements constituting the object, and ending the process when it is determined that all the elements are the target elements .

ここで、B段階は、オブジェクトを構成する要素数Nの要素の幾何学的な連続性を考慮した所定配列順(1〜N)に対して、所定数aおきに対象要素となるような読出順を処理順テーブルとして記憶し、処理順テーブルを参照することにより対象要素を決定して対象要素の位置情報を読み出すように構成できる。
また、本発明の他の観点に係るオブジェクト間の最短距離取得方法は、コンピュータのグラフィックス処理において、複数の要素で構成される第1オブジェクトおよび第2オブジェクトの最短距離を取得するためのオブジェクト間の最短距離取得方法であって、A)最短距離Dminを初期値に設定する段階と、B)第1オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第1処理順テーブルとして記憶し、第1処理順テーブルを参照することにより第1対象要素を決定して第1対象要素の位置情報を読み出す段階と、C)第2オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第2処理テーブルとして記憶し、第2処理順テーブルを参照することにより第2対象要素を決定して第2対象要素の位置情報を読み出す段階と、D)第1対象要素および第2対象要素の位置情報に基づいて、第1対象要素と第2対象要素の距離を簡易判定して、簡易判定距離Drghに設定する段階と、E)簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはC段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、第1対象要素と第2対象要素の位置情報に基づいて第1対象要素と第2対象要素の距離を詳細判定し要素距離Dobjに設定する段階と、F)要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはC段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、G)第2オブジェクトを構成する複数の要素のうち第2対象要素になっていないものがある場合にはC段階に移行し、全ての要素が第2対象要素になったと判断される場合にはH段階に移行する段階と、H)第1オブジェクトを構成する複数の要素のうち第1対象要素になっていないものがある場合にはB段階に移行し、全ての要素が第1対象要素になったと判断される場合には処理を終了する段階とを含む。
Here, in the B stage, the reading is performed so that the target element becomes the target element every predetermined number a with respect to the predetermined arrangement order (1 to N) in consideration of the geometric continuity of the element having N elements constituting the object. The order can be stored as a processing order table, the target element can be determined by referring to the processing order table, and the position information of the target element can be read.
In addition, a method for obtaining the shortest distance between objects according to another aspect of the present invention provides a method for obtaining the shortest distance between a first object and a second object composed of a plurality of elements in a computer graphics process. And A) a step of setting the shortest distance Dmin to an initial value, and B) a predetermined arrangement order considering geometric continuity of elements of a predetermined number of elements constituting the first object. Then, the reading order that becomes the target element every predetermined number is stored as the first processing order table, the first target element is determined by referring to the first processing order table, and the position information of the first target element is obtained. In the reading step, and C) a predetermined arrangement order that takes into account the geometric continuity of the elements of the predetermined number of elements constituting the second object so that the elements become target elements every predetermined number. Storing a reading order as a second processing table, referring to the second processing order table, determining a second target element and reading position information of the second target element; and D) a first target element and a second A step of simply determining the distance between the first target element and the second target element based on the position information of the target element and setting the distance to the simple determination distance Drgh, and E) comparing the simple determination distance Drgh and the shortest distance Dmin When the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to the C stage. When the simple determination distance Drgh is equal to or less than the shortest distance Dmin, the position information of the first target element and the second target element is displayed. A step of determining the distance between the first target element and the second target element in detail and setting the distance to the element distance Dobj, and F) comparing the element distance Dobj with the shortest distance Dmin, so that the element distance Dobj exceeds the shortest distance Dmin If so, move to stage C When the distance Dobj is less than or equal to the shortest distance Dmin, a step of substituting the element distance Dobj into the shortest distance Dmin, and G) some of the plurality of elements constituting the second object are not the second target element. In the case, the process proceeds to the C stage, and when it is determined that all the elements have become the second target elements, the process proceeds to the H stage, and H) the first target among the plurality of elements constituting the first object When there is an element that is not an element, the process proceeds to stage B. When it is determined that all the elements have become the first target element, the process is terminated.

また、本発明に係るプログラムは、複数の要素で構成されるオブジェクトと所定点との最短距離を取得するためのオブジェクト間の最短距離取得方法をコンピュータに行わせるプログラムであって、A)最短距離Dminを初期値に設定する段階と、B)オブジェクトを構成する複数の要素の幾何学的連続性を有する配列順の配列に対して、幾何学的連続性を有さない読出順に基づいて対象要素を決定し、対象要素の位置情報を読み出す段階と、C)対象要素の位置情報に基づいて、対象要素と所定点との距離を簡易判定して、簡易判定距離Drghに設定する段階と、D)簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはB段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、対象要素の位置情報に基づいて対象要素と所定点との距離を詳細判定し要素距離Dobjに設定する段階と、E)要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはB段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、F)オブジェクトを構成する複数の要素のうち対象要素になっていないものがある場合にはB段階に移行し、全ての要素が対象要素になったと判断される場合には処理を終了する段階とを含むオブジェクト間の最短距離取得方法をコンピュータに実行させるためのプログラムである。   A program according to the present invention is a program for causing a computer to perform a method for obtaining a shortest distance between objects for obtaining a shortest distance between an object composed of a plurality of elements and a predetermined point. A step of setting Dmin to an initial value; and B) a target element based on a reading order having no geometric continuity with respect to an array having an array order having a geometric continuity of a plurality of elements constituting the object. A step of reading the position information of the target element, C) a step of simply determining the distance between the target element and the predetermined point based on the position information of the target element, and setting the simple determination distance Drgh; ) The simple judgment distance Drgh is compared with the shortest distance Dmin. If the simple judgment distance Drgh exceeds the shortest distance Dmin, the process proceeds to stage B. If the simple judgment distance Drgh is less than the shortest distance Dmin, A step of determining in detail the distance between the target element and the predetermined point based on the position information of the elephant element and setting it as the element distance Dobj; E) comparing the element distance Dobj with the shortest distance Dmin, If the element distance Dobj is less than or equal to the shortest distance Dmin, the element distance Dobj is substituted for the shortest distance Dmin; and F) a plurality of elements constituting the object. A method for obtaining the shortest distance between objects includes a step B when there is an element that is not a target element, and a step of ending the process when it is determined that all elements are a target element. A program for causing a computer to execute.

さらに、本発明の他の観点によるプログラムは、複数の要素で構成される第1オブジェクトおよび第2オブジェクトの最短距離を取得するためのオブジェクト間の最短距離取得方法をコンピュータに行わせるプログラムであって、A)最短距離Dminを初期値に設定する段階と、B)第1オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第1処理順テーブルとして記憶し、第1処理順テーブルを参照することにより第1対象要素を決定して第1対象要素の位置情報を読み出す段階と、C)第2オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第2処理テーブルとして記憶し、第2処理順テーブルを参照することにより第2対象要素を決定して第2対象要素の位置情報を読み出す段階と、D)第1対象要素および第2対象要素の位置情報に基づいて、第1対象要素と第2対象要素の距離を簡易判定して、簡易判定距離Drghに設定する段階と、E)簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはC段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、第1対象要素と第2対象要素の位置情報に基づいて第1対象要素と第2対象要素の距離を詳細判定し要素距離Dobjに設定する段階と、F)要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはC段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、G)第2オブジェクトを構成する複数の要素のうち第2対象要素になっていないものがある場合にはC段階に移行し、全ての要素が第2対象要素になったと判断される場合にはH段階に移行する段階と、H)第1オブジェクトを構成する複数の要素のうち第1対象要素になっていないものがある場合にはB段階に移行し、全ての要素が第1対象要素になったと判断される場合には処理を終了する段階とを含むオブジェクト間の最短距離取得方法をコンピュータに実行させるためのプログラムである。   Furthermore, a program according to another aspect of the present invention is a program for causing a computer to perform a method for obtaining the shortest distance between objects for obtaining the shortest distance between a first object and a second object composed of a plurality of elements. A) a step of setting the shortest distance Dmin to an initial value; and B) target elements every predetermined number with respect to a predetermined arrangement order considering geometric continuity of elements of a predetermined number of elements constituting the first object. And a step of reading the position information of the first target element by determining the first target element by referring to the first processing order table, and C) second With respect to the predetermined arrangement order in consideration of the geometric continuity of the elements of the predetermined number of elements constituting the object, the reading order that becomes the target elements every predetermined number is the second processing table. A step of determining the second target element by referring to the second processing order table and reading the position information of the second target element, and D) based on the position information of the first target element and the second target element The step of simply determining the distance between the first target element and the second target element and setting the distance to the simple determination distance Drgh, E) comparing the simple determination distance Drgh with the shortest distance Dmin, and the simple determination distance Drgh is the shortest If the distance Dmin is exceeded, the process proceeds to stage C. If the simple determination distance Drgh is equal to or shorter than the shortest distance Dmin, the first target element and the second target element are determined based on the position information of the first target element and the second target element. The step of determining the distance of the second target element in detail and setting it to the element distance Dobj, and F) comparing the element distance Dobj with the shortest distance Dmin, and if the element distance Dobj exceeds the shortest distance Dmin, The element distance Dobj is less than the shortest distance Dmin In some cases, the step of substituting the element distance Dobj for the shortest distance Dmin, and G) if there is a plurality of elements constituting the second object that are not the second target element, the process proceeds to the C stage. When it is determined that all the elements have become the second target element, there are stages that shift to the H stage, and H) there are elements that are not the first target element among the plurality of elements that constitute the first object. The program for causing the computer to execute the method for obtaining the shortest distance between objects including the stage B in the case where all elements have become the first target element and the process is terminated when it is determined that all elements have become the first target elements. is there.

本発明によれば、オブジェクト間の最短距離を取得する際に、詳細な距離測定の処理回数を減少することができ、最短距離の取得処理を高速に行うことを可能とする。   According to the present invention, when the shortest distance between objects is acquired, the number of detailed distance measurement processes can be reduced, and the shortest distance acquisition process can be performed at high speed.

本発明に係るオブジェクト間の最短距離取得方法は、CAD/CAMやCGなどのグラフィックス処理を行うコンピュータのアプリケーションの一部として搭載されるものであり、その1実施形態を以下に説明する。
図1に示すように、第1オブジェクト10と第2オブジェクト20の最短距離を取得する場合について考える。
The method for obtaining the shortest distance between objects according to the present invention is installed as a part of a computer application that performs graphics processing such as CAD / CAM and CG, and one embodiment thereof will be described below.
Consider a case where the shortest distance between the first object 10 and the second object 20 is acquired as shown in FIG.

図示した第1オブジェクト10および第2オブジェクト20は、それぞれポリゴン平面が連続した多面体で構成されている。第1オブジェクト10は、三角形ポリゴンでなる第1要素101、第2要素102、第3要素103・・・を備えており、同様にして、第2オブジェクト20も三角形ポリゴンである第1要素201、第2要素202、第3要素203・・・で構成されているものとする。   The illustrated first object 10 and second object 20 are each composed of a polyhedron having a continuous polygon plane. The first object 10 includes a first element 101 that is a triangular polygon, a second element 102, a third element 103, and so on. Similarly, the second object 20 is also a first element 201 that is a triangular polygon, It is assumed that the second element 202, the third element 203,...

第1オブジェクト10の第1要素101、第2要素102、第3要素103・・・の位置情報は、幾何学的な連続性を考慮して所定の配列順で整列されており、たとえば、図1の最も左下に位置する第1要素101から隣接する要素が順次整列するようにデータ配列が構成される。また、同様に第2オブジェクト20の第1要素201、第2要素202、第3要素203・・・の位置情報も幾何学的な連続性を考慮して所定の配列順で整列されており、たとえば、図1の最も右上に位置する第1要素201から隣接する要素が順次整列するようにデータ配列が構成される。   Position information of the first element 101, the second element 102, the third element 103,... Of the first object 10 is arranged in a predetermined arrangement order in consideration of geometric continuity. The data array is configured such that adjacent elements are sequentially aligned from the first element 101 located at the lower left of 1. Similarly, the position information of the first element 201, the second element 202, the third element 203,... Of the second object 20 is also arranged in a predetermined arrangement order in consideration of geometric continuity. For example, the data array is configured such that adjacent elements are sequentially aligned from the first element 201 located at the upper right in FIG.

このような第1オブジェクト10と第2オブジェクト20の最短距離を取得するためには、たとえば、第2オブジェクト20の第1要素201から第1オブジェクト10までの距離を第1オブジェクト10の各要素の配列順に算出していき、最短となるものをオブジェクト間の暫定的な最短距離とする。さらに、第2オブジェクト20の次の要素である第2要素202から第2オブジェクト10までの距離を第1オブジェクト10の各要素の配列順に算出していき、暫定的な最短距離よりも小さい値のものがあれば逐次データの更新を行う。   In order to obtain the shortest distance between the first object 10 and the second object 20 as described above, for example, the distance from the first element 201 of the second object 20 to the first object 10 is set to each element of the first object 10. The calculation is performed in the order of arrangement, and the shortest is the provisional shortest distance between objects. Furthermore, the distance from the second element 202, which is the next element of the second object 20, to the second object 10 is calculated in the order of arrangement of the elements of the first object 10, and the value is smaller than the provisional shortest distance. If there is something, update the data sequentially.

このようにして第2オブジェクト20の最終要素まで処理を実行し、得られた最短距離を第1オブジェクト10と第2オブジェクト20との最短距離とする。
ここで、説明を簡略化するために、所定点とオブジェクトとの最短距離を求める場合について考察する。
図2に示すように、第1オブジェクト10は、図1と同様に、第1要素101、第2要素102、第3要素103・・・で構成されており、第2オブジェクト上の所定点21から第1オブジェクト10までの最短距離を取得する場合を考える。
In this way, the process is executed up to the final element of the second object 20, and the obtained shortest distance is set as the shortest distance between the first object 10 and the second object 20.
Here, in order to simplify the description, a case where the shortest distance between a predetermined point and an object is obtained will be considered.
As shown in FIG. 2, the first object 10 is composed of a first element 101, a second element 102, a third element 103... As in FIG. 1, and a predetermined point 21 on the second object. Consider a case in which the shortest distance from the first object 10 is acquired.

このような所定点21から第1オブジェクト10までの最短距離取得方法の従来例を図3のフローチャートに示す。
ステップS11では、最短距離Dminを所定の最大値に設定する。ここでは、計算に用いる変数の桁数に対応した最大値を既定値として設定することができ、たとえば、1.0E+38とすることができる。
A conventional example of a method for obtaining the shortest distance from the predetermined point 21 to the first object 10 is shown in the flowchart of FIG.
In step S11, the shortest distance Dmin is set to a predetermined maximum value. Here, the maximum value corresponding to the number of digits of the variable used for the calculation can be set as the default value, for example, 1.0E + 38.

ステップS12では、所定点21から現在対象となっている第i番目の要素100(i)までの簡易判定距離Drghを取得する。
第1オブジェクト10の第i要素100(i)が、図4に示すように、3つの頂点V1(x1,y2,z3),V2(x2,y2,z2),V3(x3,y3,z3)を備える場合、最大領域座標Vmax(xmax,ymax,zmax)および最小領域座標Vmin(xmin,ymin,zmin)と所定点21との距離を算出し、いずれか小さいものを簡易判定距離Drghとする。
In step S12, the simple determination distance Drgh from the predetermined point 21 to the i-th element 100 (i) that is the current target is acquired.
As shown in FIG. 4, the i-th element 100 (i) of the first object 10 has three vertices V1 (x1, y2, z3), V2 (x2, y2, z2), and V3 (x3, y3, z3). , The distance between the maximum area coordinate Vmax (xmax, ymax, zmax) and the minimum area coordinate Vmin (xmin, ymin, zmin) and the predetermined point 21 is calculated, and the smaller one is set as the simple determination distance Drgh.

ステップS13では、簡易判定距離Drghが最短距離Dminを超えているか否かを判別する。簡易判定距離Drghが最短距離Dminを超えていると判断した場合にはステップS12に移行し、簡易判定距離Drghが最短距離Dmin以下であると判断した場合にはステップS14に移行する。
ステップS14では、所定点21と第i要素100(i)との詳細な距離を算出して、所定点21と第i要素100(i)との要素距離Dobjを取得する。ここで、所定点21と第i要素100(i)との距離を取得する方法は、種々提案されている方法を用いて処理するものであり、ここではその詳細については言及しない。
In step S13, it is determined whether or not the simple determination distance Drgh exceeds the shortest distance Dmin. If it is determined that the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to step S12. If it is determined that the simple determination distance Drgh is equal to or less than the shortest distance Dmin, the process proceeds to step S14.
In step S14, a detailed distance between the predetermined point 21 and the i-th element 100 (i) is calculated, and an element distance Dobj between the predetermined point 21 and the i-th element 100 (i) is acquired. Here, the method of acquiring the distance between the predetermined point 21 and the i-th element 100 (i) is performed using various proposed methods, and details thereof are not mentioned here.

ステップS15では、要素距離Dobjが最短距離Dminより小さいか否かを判別する。要素距離Dobjが最短距離Dminより小さいと判断した場合にはステップS16に移行し、要素距離Dobjが最短距離Dobj以上であると判断した場合にはステップS12に移行する。
ステップS16では、要素距離Dobjの値を最短距離Dminに代入して、最短距離Dminのデータを更新する。
In step S15, it is determined whether or not the element distance Dobj is smaller than the shortest distance Dmin. If it is determined that the element distance Dobj is smaller than the shortest distance Dmin, the process proceeds to step S16. If it is determined that the element distance Dobj is greater than or equal to the shortest distance Dobj, the process proceeds to step S12.
In step S16, the value of the element distance Dobj is substituted into the shortest distance Dmin, and the data of the shortest distance Dmin is updated.

ステップS17では、第1オブジェクト10の全ての要素について処理を実行したか否かを判断する。第1オブジェクト10の要素のうち処理が実行されていない要素があると判断した場合には、変数iをインクリメントして次の要素について同様の処理を実行する。
このように、第1オブジェクト10の各要素の配列順に処理を実行した場合には、全ての要素について詳細な距離算出の処理を実行しなければならない場合が生じる。
In step S <b> 17, it is determined whether or not processing has been executed for all elements of the first object 10. When it is determined that there is an element that has not been processed among the elements of the first object 10, the variable i is incremented and the same process is performed for the next element.
As described above, when the processing is executed in the order of arrangement of each element of the first object 10, there is a case where detailed distance calculation processing must be executed for all the elements.

たとえば、図5に示すように、第1オブジェクト10の各要素のうち筆頭に配列されている第1要素101までの距離が最短であるような場合には、詳細な距離測定は、最初の第1要素101についてのみ処理することだけでよい。
しかしながら、図6に示すように、第1オブジェクト10の各要素のうち筆頭に配列されている第1要素101までの距離が最大であり、各要素の距離が配列順に順次短くなるような場合には、全ての要素について詳細な距離測定を行う必要がある。
For example, as shown in FIG. 5, when the distance to the first element 101 arranged at the top of each element of the first object 10 is the shortest, the detailed distance measurement is performed at the first step. It is only necessary to process only one element 101.
However, as shown in FIG. 6, when the distance to the first element 101 arranged at the top of each element of the first object 10 is the maximum, and the distance of each element is sequentially shortened in the arrangement order. Requires detailed distance measurements for all elements.

また、図7に示すように、第5要素105までの距離が最短となる場合と、図8に示すように、第10要素110までの距離が最短となる場合とでは、詳細な距離測定の処理回数が異なってくる。
このような従来の逐次距離取得により図5〜図8の各モデルについて最短距離の取得を行った場合の処理回数を表1に示す。
Further, as shown in FIG. 7, detailed distance measurement is performed when the distance to the fifth element 105 is the shortest and when the distance to the tenth element 110 is the shortest as shown in FIG. The number of processing is different.
Table 1 shows the number of times of processing when the shortest distance is acquired for each of the models shown in FIGS.

Figure 0004589369
Figure 0004589369

このような逐次距離取得の方法における詳細な距離測定の処理回数の平均値は、第1オブジェクト10の要素数をNとした場合、(N/2)*K1で表すことができる。ここで、K1は、第1オブジェクト10の形状のタイプや形状の複雑さに応じて決定される係数である。
本発明に係るオブジェクト間の最短距離取得方法のフローチャートを図9に示す。
ステップS21では、最短距離Dminを既定の最大値に設定する。前述と同様にして、計算に用いる変数の桁数に対応した最大値を既定値として設定することができ、たとえば、1.0E+38とすることができる。
The average value of the number of detailed distance measurement processes in such a sequential distance acquisition method can be expressed as (N / 2) * K1, where N is the number of elements of the first object 10. Here, K1 is a coefficient determined according to the shape type and shape complexity of the first object 10.
A flowchart of the method for obtaining the shortest distance between objects according to the present invention is shown in FIG.
In step S21, the shortest distance Dmin is set to a predetermined maximum value. Similarly to the above, the maximum value corresponding to the number of digits of the variable used for the calculation can be set as the default value, for example, 1.0E + 38.

ステップS22では、第1オブジェクト10のうちの各要素について、処理順を決定するための処理順テーブルNoTblを作成する。処理順テーブルNoTblの作成は、たとえば、第1オブジェクト10の各要素の配列順に対して2以上の所定数おきに処理を行うように処理順テーブルNoTblを設定することが可能であり、また、第1オブジェクト10の各要素(1〜N)の配列順に対して第1要素、第N要素、第N/2要素、第N/4要素、第3N/4要素・・・のように2分割位置を順次処理するように処理順テーブルNoTblを設定することができる。   In step S22, a processing order table NoTbl for determining the processing order is created for each element of the first object 10. The processing order table NoTbl can be created, for example, by setting the processing order table NoTbl so that processing is performed every two or more predetermined numbers with respect to the arrangement order of the elements of the first object 10. 2 division positions like 1st element, Nth element, N / 2th element, N / 4th element, 3rd N / 4 element, etc. with respect to the arrangement order of each element (1 to N) of one object 10 The processing order table NoTbl can be set so as to process sequentially.

ステップS23では、処理順テーブルNoTblを参照して処理を実行する要素番号no=NoTbl(i)を取得する。
ステップS24では、所定点21と現在対象となっている第no要素の簡易判定距離Drghを取得する。前述と同様にして、図4の最大領域座標Vmax(xmax,ymax,zmax)および最小領域座標Vmin(xmin,ymin,zmin)と所定点21との距離を算出し、いずれか小さいものを簡易判定距離Drghとすることができる。
In step S23, the element number no = NoTbl (i) for executing the processing is acquired with reference to the processing order table NoTbl.
In step S24, the simple determination distance Drgh between the predetermined point 21 and the current target no-element is acquired. In the same manner as described above, the distance between the maximum area coordinate Vmax (xmax, ymax, zmax) and the minimum area coordinate Vmin (xmin, ymin, zmin) in FIG. 4 and the predetermined point 21 is calculated, and the smaller one is simply determined. The distance Drgh can be set.

ステップS25では、簡易判定距離Drghが最短距離Dminを超えているか否かを判別する。簡易判定距離Drghが最短距離Dminを超えていると判断した場合にはステップS23に移行し、簡易判定距離Drghが最短距離Dmin以下であると判断した場合にはステップS26に移行する。
ステップS26では、所定点21と第no要素100(no)との詳細な距離を算出して、所定点21と第no要素100(no)との要素距離Dobjを取得する。
In step S25, it is determined whether or not the simple determination distance Drgh exceeds the shortest distance Dmin. When it is determined that the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to step S23, and when it is determined that the simple determination distance Drgh is equal to or less than the shortest distance Dmin, the process proceeds to step S26.
In step S26, a detailed distance between the predetermined point 21 and the no-th element 100 (no) is calculated, and an element distance Dobj between the predetermined point 21 and the no-th element 100 (no) is obtained.

ステップS27では、要素距離Dobjが最短距離Dminより小さいか否かを判別する。要素距離Dobjが最短距離Dminより小さいと判断した場合にはステップS28に移行し、要素距離Dobjが最短距離Dobj以上であると判断した場合にはステップS23に移行する。
ステップS28では、要素距離Dobjの値を最短距離Dminに代入して、最短距離Dminのデータを更新する。
In step S27, it is determined whether or not the element distance Dobj is smaller than the shortest distance Dmin. If it is determined that the element distance Dobj is smaller than the shortest distance Dmin, the process proceeds to step S28. If it is determined that the element distance Dobj is equal to or greater than the shortest distance Dobj, the process proceeds to step S23.
In step S28, the value of the element distance Dobj is substituted into the shortest distance Dmin, and the data of the shortest distance Dmin is updated.

ステップS29では、第1オブジェクト10の全ての要素について処理を実行したか否かを判断する。第1オブジェクト10の要素のうち処理が実行されていない要素があると判断した場合には、変数iをインクリメントして次の要素について同様の処理を実行する。
処理順テーブルNoTblは、第1オブジェクト10の各要素の配列順に対して所定数おきに処理を実行するように設定することができる。たとえば、図5〜図8に示すような第1要素101〜第15要素115が配列される第1オブジェクト10に対して5つおきに処理を実行する場合、図10に示すような処理順テーブルNoTblを設定することができる。この場合、第1要素101から初めて5つおきに要素を並べていき、次に5つ先の要素が最終要素を超えるような場合には第2要素102に戻ってそこから5つおきに要素を配列している。
In step S29, it is determined whether or not processing has been executed for all elements of the first object 10. When it is determined that there is an element that has not been processed among the elements of the first object 10, the variable i is incremented and the same process is performed for the next element.
The processing order table NoTbl can be set to execute processing every predetermined number with respect to the arrangement order of the elements of the first object 10. For example, when processing is performed on every fifth object 10 in which the first element 101 to the fifteenth element 115 as shown in FIGS. 5 to 8 are arranged, a processing order table as shown in FIG. NoTbl can be set. In this case, elements are arranged every 5th element for the first time from the first element 101, and then when the 5th element exceeds the final element, the process returns to the 2nd element 102 and every 5th element from there. Arranged.

5つおきに処理順テーブルNoTblを設定した場合に、図5〜図8のモデルを実行した場合のそれぞれの処理回数を表2に示す。   Table 2 shows the number of times of processing when the models shown in FIGS. 5 to 8 are executed when the processing order table NoTbl is set every five.

Figure 0004589369
Figure 0004589369

このような所定数おきに処理順テーブルNoTblを設定した場合における詳細な距離測定の処理回数は、第1オブジェクト10の要素数をNとし所定数をMとした場合、その最大値が(N/M+M)*K2で表すことができる。ここで、K2は、第1オブジェクト10の形状のタイプや形状の複雑さに応じて決定される係数である。
このように、所定数おきに処理順テーブルNoTblを設定し、この処理順テーブルNoTblに沿って処理を実行することにより、詳細な距離測定の処理回数を減らすことが可能となり、処理の高速化を図ることができる。
When the processing order table NoTbl is set for every predetermined number, the number of detailed distance measurement processes is N (the number of elements of the first object 10 and M is the predetermined number). M + M) * K2. Here, K2 is a coefficient determined according to the shape type and shape complexity of the first object 10.
In this way, by setting the processing order table NoTbl every predetermined number and executing processing along this processing order table NoTbl, it is possible to reduce the number of detailed distance measurement processing, and speed up the processing. Can be planned.

処理順テーブルNoTblは、第1オブジェクト10の各要素の配列順に対して、第1要素、第N要素、第(1+N)/2要素・・・の順で、2分割毎に設定することが可能である。
たとえば、図5〜図8に示すような第1要素101〜第15要素115が配列される第1オブジェクト10に対して、第1要素101、第15要素115(N)を処理した後、第8要素108((1+N)/2)の処理を実行し、さらに、第4要素104((1+N)/4)、第12要素(3(1+N)/4)の処理を実行し、その後の処理は元々の配列順に処理を行うように設定することができる。
The processing order table NoTbl is set every two divisions in the order of the first element, the Nth element, the (1 + N) / 2 element, etc. with respect to the arrangement order of the elements of the first object 10. Is possible.
For example, after processing the first element 101 and the fifteenth element 115 (N) on the first object 10 in which the first element 101 to the fifteenth element 115 are arranged as shown in FIGS. The process of 8 elements 108 ((1 + N) / 2) is executed, and further, the process of 4th element 104 ((1 + N) / 4) and 12th element (3 (1 + N) / 4) The subsequent processing can be set to be performed in the original arrangement order.

このような2分割順と逐次処理を組み合わせた処理順テーブルNoTblを設定した場合に、図5〜図8のモデルを実行した場合のそれぞれの処理回数を表3に示す。   Table 3 shows the number of times of processing when the model shown in FIGS. 5 to 8 is executed when the processing order table NoTbl that combines the two-part dividing order and the sequential processing is set.

Figure 0004589369
Figure 0004589369

2分割順を含む処理順テーブルNoTblの作成方法について、図12〜図15に基づいて説明する。
処理順テーブルNoTblに含まれる各要素のデータは、リンクリスト構造を使用して記述される。処理順テーブルNoTblを構成する各データ格納部300(1)〜300(N)は、それぞれID格納部301とNEXTポインタ302とを備えている。ID格納部301には、第1オブジェクト10の要素番号が格納され、NEXTポインタ302には次に処理を実行する要素のデータアドレスが格納される。最終のデータ格納部300(N)のNEXTポインタ302(N)には"END"が格納される。
A method of creating the processing order table NoTbl including the two division order will be described with reference to FIGS.
Data of each element included in the processing order table NoTbl is described using a link list structure. Each of the data storage units 300 (1) to 300 (N) constituting the processing order table NoTbl includes an ID storage unit 301 and a NEXT pointer 302, respectively. The ID storage unit 301 stores the element number of the first object 10, and the NEXT pointer 302 stores the data address of the element to be processed next. “END” is stored in the NEXT pointer 302 (N) of the final data storage unit 300 (N).

第1オブジェクト10の要素数Nが17の場合について考察する。まず、図13に示すように、第1オブジェクト10の第1要素(最初)と第17要素(最終)のデータを設定し、第1要素のNEXTポインタ302に第17要素のデータアドレスを格納し、第17要素のNEXTポインタに"END"を格納する。このことにより、処理順テーブルNoTblに、第1要素、第17要素の処理順がセットされる。   Consider a case where the number N of elements of the first object 10 is 17. First, as shown in FIG. 13, the data of the first element (first) and the seventeenth element (final) of the first object 10 are set, and the data address of the seventeenth element is stored in the NEXT pointer 302 of the first element. , “END” is stored in the NEXT pointer of the 17th element. As a result, the processing order of the first element and the seventeenth element is set in the processing order table NoTbl.

次に、第1要素および第17要素の中間に位置する第9要素のデータを挿入する。ここでは、第1要素のNEXTポインタ302を第9要素のデータアドレスに更新し、第9要素のNEXTポインタ302には第17要素のデータアドレスを格納する。このことにより、図14に示すように、処理順テーブルNoTblに、第1要素、第9要素、第17要素の処理順がセットされる。   Next, the data of the ninth element located between the first element and the seventeenth element is inserted. Here, the NEXT pointer 302 of the first element is updated to the data address of the ninth element, and the data address of the seventeenth element is stored in the NEXT pointer 302 of the ninth element. As a result, as shown in FIG. 14, the processing order of the first element, the ninth element, and the seventeenth element is set in the processing order table NoTbl.

さらに、各要素間の中間に位置する要素のデータを挿入する。ここでは、第1要素と第9要素の間に第5要素を挿入し、第9要素と第17要素との間に第13要素を挿入する。各要素のNEXTポインタ302を更新することにより、図15に示すような各要素の処理順が処理順テーブルNoTblにセットされる。
このようにして、隣り合う要素の要素番号の差が1になるまで、データの挿入を繰り返すことで、処理順テーブルNoTblを設定することができる。このときの各要素の決定順を表4に示す。
Furthermore, the data of the element located in the middle between each element is inserted. Here, the fifth element is inserted between the first element and the ninth element, and the thirteenth element is inserted between the ninth element and the seventeenth element. By updating the NEXT pointer 302 of each element, the processing order of each element as shown in FIG. 15 is set in the processing order table NoTbl.
In this way, the processing order table NoTbl can be set by repeating data insertion until the difference between the element numbers of adjacent elements becomes 1. Table 4 shows the determination order of each element at this time.

Figure 0004589369
Figure 0004589369

このようにして決定された処理順テーブルNoTblを用いて最短距離の取得処理を実行した場合の詳細な距離測定の処理回数を表5に示す。   Table 5 shows the detailed distance measurement processing count when the shortest distance acquisition processing is executed using the processing order table NoTbl determined as described above.

Figure 0004589369
Figure 0004589369

ここでは、処理順テーブルNoTblの処理順を横軸に示し、所定点21(検査点)から最も近い要素が第2要素、第4要素、第6要素、第8要素、第10要素、第12要素、第14要素、第16要素のそれぞれについて詳細な距離測定の回数を算出している。ただし、所定点21に最も近い要素が第2要素、第4要素であるものについて次に近い要素が第3要素である場合、所定点21に最も近い要素が第6要素、第8要素であるものについて次に近い要素が第7要素である場合、所定点21に最も近い要素が第10要素、第12要素であるものについて次に近い要素が第11要素である場合、所定点21に最も近い要素が第14要素、第16要素であるものについて次に近い要素が第15要素である場合について考察している。   Here, the processing order of the processing order table NoTbl is shown on the horizontal axis, and the elements closest to the predetermined point 21 (inspection point) are the second element, the fourth element, the sixth element, the eighth element, the tenth element, and the twelfth element. The number of detailed distance measurements is calculated for each of the element, the 14th element, and the 16th element. However, when the element closest to the predetermined point 21 is the second element and the fourth element, when the next closest element is the third element, the elements closest to the predetermined point 21 are the sixth element and the eighth element. When the next closest element is the seventh element, the element closest to the predetermined point 21 is the tenth element, and when the next closest element is the eleventh element, the element closest to the predetermined point 21 The case where the next closest element is the fifteenth element is considered with respect to the element whose closest element is the fourteenth element and the sixteenth element.

このように、処理順テーブルNoTblが2分割順のみで構成され逐次順を含まない場合の距離計算回数の最大値は、(log2N+2〜3)*K3で表すことができる。ここで、K3は、第1オブジェクト10の形状のタイプや形状の複雑さに応じて決定される係数である
以上のようにして、所定点21と第1オブジェクト10との最短距離を算出することにより、従来の逐次詳細な距離測定の処理を実行する場合に比して、処理時間を大幅に短縮することが可能となる。
Thus, the maximum value of the number of distance calculations in the case where the processing order table NoTbl is composed of only two division orders and does not include the sequential order can be represented by (log 2 N + 2-3) * K3. Here, K3 is a coefficient determined according to the shape type and the complexity of the shape of the first object 10. As described above, the shortest distance between the predetermined point 21 and the first object 10 is calculated. As a result, the processing time can be significantly reduced as compared with the case of executing the conventional sequential detailed distance measurement process.

第2オブジェクト20を構成する複数の要素201,202,203・・・のそれぞれについて、同様の方法を用いて第1オブジェクト10までの最短距離を求めることにより、第1オブジェクト10と第2オブジェクト20との間の最短距離を取得することが可能であり、この場合にも処理時間を大幅に短縮することが可能となる。
このような第1オブジェクト10と第2オブジェクト20との最短距離を取得する方法について、図16のフローチャートに基づいて説明する。
The first object 10 and the second object 20 are obtained by obtaining the shortest distance to the first object 10 using a similar method for each of the plurality of elements 201, 202, 203. It is possible to acquire the shortest distance between the two, and also in this case, the processing time can be greatly shortened.
A method for obtaining the shortest distance between the first object 10 and the second object 20 will be described with reference to the flowchart of FIG.

ステップS31では、最短距離Dminを既定の最大値に設定する。前述と同様にして、計算に用いる変数の桁数に対応した最大値を既定値として設定することができ、たとえば、1.0E+38とすることができる。
ステップS32では、第1オブジェクト10のうちの各要素について処理順を決定するための処理順テーブルNoTbl1および第2オブジェクトのうちの各要素について処理順を決定するための処理順テーブルNoTbl2を作成する。処理順テーブルNoTbl1,NoTbl2の作成は、前述の処理順テーブルNoTblと同様に設定することができる。
In step S31, the shortest distance Dmin is set to a predetermined maximum value. Similarly to the above, the maximum value corresponding to the number of digits of the variable used for the calculation can be set as the default value, for example, 1.0E + 38.
In step S32, a processing order table NoTbl1 for determining the processing order for each element of the first object 10 and a processing order table NoTbl2 for determining the processing order for each element of the second object are created. The processing order tables NoTbl1 and NoTbl2 can be created in the same manner as the processing order table NoTbl described above.

ステップS33では、処理順テーブルNoTbl1,NoTbl2を参照して処理を実行する要素番号no1=NoTbl1(i1),no2=NoTbl2(i2)を取得する。
ステップS34では、第1オブジェクト10および第2オブジェクト20のそれぞれ現在対象となっている要素番号no1および要素番号no2の簡易判定距離Drghを取得する。前述と同様にして、各要素の最大領域座標Vmax(xmax,ymax,zmax)および最小領域座標Vmin(xmin,ymin,zmin)に基づいて簡易判定距離Drghを算出する。
In step S33, element numbers no1 = NoTbl1 (i1) and no2 = NoTbl2 (i2) to be processed are acquired with reference to the processing order tables NoTbl1 and NoTbl2.
In step S34, the simple determination distance Drgh of the element number no1 and the element number no2 which are the current targets of the first object 10 and the second object 20, respectively, is acquired. In the same manner as described above, the simple determination distance Drgh is calculated based on the maximum area coordinate Vmax (xmax, ymax, zmax) and the minimum area coordinate Vmin (xmin, ymin, zmin) of each element.

ステップS35では、簡易判定距離Drghが最短距離Dminを超えているか否かを判別する。簡易判定距離Drghが最短距離Dminを超えていると判断した場合にはステップS33に移行し、簡易判定距離Drghが最短距離Dmin以下であると判断した場合にはステップS36に移行する。
ステップS36では、第1オブジェクト10の第no1要素100(no1)と第2オブジェクト20の第no2要素200(no2)の詳細な距離を算出して、第no1要素100(no1)と第no2要素200(no2)との要素距離Dobjを取得する。
In step S35, it is determined whether or not the simple determination distance Drgh exceeds the shortest distance Dmin. When it is determined that the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to step S33, and when it is determined that the simple determination distance Drgh is equal to or less than the shortest distance Dmin, the process proceeds to step S36.
In step S36, a detailed distance between the first no1 element 100 (no1) of the first object 10 and the second no2 element 200 (no2) of the second object 20 is calculated, and the first no1 element 100 (no1) and the second no2 element 200 are calculated. The element distance Dobj with (no2) is acquired.

ステップS37では、要素距離Dobjが最短距離Dminより小さいか否かを判別する。要素距離Dobjが最短距離Dminより小さいと判断した場合にはステップS38に移行し、要素距離Dobjが最短距離Dobj以上であると判断した場合にはステップS33に移行する。
ステップS38では、要素距離Dobjの値を最短距離Dminに代入して、最短距離Dminのデータを更新する。
In step S37, it is determined whether or not the element distance Dobj is smaller than the shortest distance Dmin. If it is determined that the element distance Dobj is smaller than the shortest distance Dmin, the process proceeds to step S38. If it is determined that the element distance Dobj is greater than or equal to the shortest distance Dobj, the process proceeds to step S33.
In step S38, the value of the element distance Dobj is substituted into the shortest distance Dmin, and the data of the shortest distance Dmin is updated.

ステップS39では、第2オブジェクト20の全ての要素について処理を実行したか否かを判断する。第2オブジェクト20の要素のうち処理が実行されていない要素があると判断した場合には、変数i2をインクリメントして次の要素について同様の処理を実行する。また、第2オブジェクト20の要素の全てについて処理を実行したと判断した場合にはステップS40に移行する。   In step S39, it is determined whether or not processing has been executed for all elements of the second object 20. If it is determined that there is an element that has not been processed among the elements of the second object 20, the variable i2 is incremented and the same process is performed for the next element. On the other hand, when it is determined that the process has been executed for all the elements of the second object 20, the process proceeds to step S40.

ステップS40では、第1オブジェクト10の全ての要素について処理を実行した否かを判断する。第1オブジェクト10の要素のうち処理が実行されていない要素があると判断した場合には、変数i1をインクリメントするとともに変数i2を初期値に設定し、次の要素について同様の処理を実行する。第1オブジェクト10の全ての要素について処理が完了したと判断した場合には、この処理ルーチンを終了し、現在の最短距離Dminの値を第1オブジェクト10と第2オブジェクト20の最短距離として出力する。   In step S40, it is determined whether or not processing has been executed for all elements of the first object 10. If it is determined that there is an element that has not been processed among the elements of the first object 10, the variable i1 is incremented and the variable i2 is set to an initial value, and the same process is performed for the next element. If it is determined that the processing has been completed for all the elements of the first object 10, this processing routine is ended, and the value of the current shortest distance Dmin is output as the shortest distance between the first object 10 and the second object 20. .

本発明によれば、オブジェクト間の最短距離を取得する際に、詳細な距離測定の処理回数を減少することができ、最短距離の取得処理を高速に行うことを可能とし、特に、コンピュータグラフィックス処理において、複数の要素で構成されるオブジェクトと所定点との最短距離または複数のオブジェクト間の最短距離を取得するために利用することができる。   According to the present invention, when acquiring the shortest distance between objects, the number of detailed distance measurement processes can be reduced, and the shortest distance acquisition process can be performed at high speed. In the processing, it can be used to obtain the shortest distance between an object composed of a plurality of elements and a predetermined point or the shortest distance between a plurality of objects.

本発明に係るオブジェクト間の最短距離取得方法が採用されるモデルの例を示す説明図。Explanatory drawing which shows the example of the model by which the shortest distance acquisition method between the objects which concern on this invention is employ | adopted. 本発明に係るオブジェクト間の最短距離取得方法が採用されるモデルの例を示す説明図。Explanatory drawing which shows the example of the model by which the shortest distance acquisition method between the objects which concern on this invention is employ | adopted. 従来手法のフローチャート。The flowchart of a conventional method. 簡易判定処理の説明図。Explanatory drawing of a simple determination process. 本発明に係るオブジェクト間の最短距離取得方法が採用されるモデルの例を示す説明図。Explanatory drawing which shows the example of the model by which the shortest distance acquisition method between the objects which concern on this invention is employ | adopted. 本発明に係るオブジェクト間の最短距離取得方法が採用されるモデルの例を示す説明図。Explanatory drawing which shows the example of the model by which the shortest distance acquisition method between the objects which concern on this invention is employ | adopted. 本発明に係るオブジェクト間の最短距離取得方法が採用されるモデルの例を示す説明図。Explanatory drawing which shows the example of the model by which the shortest distance acquisition method between the objects which concern on this invention is employ | adopted. 本発明に係るオブジェクト間の最短距離取得方法が採用されるモデルの例を示す説明図。Explanatory drawing which shows the example of the model by which the shortest distance acquisition method between the objects which concern on this invention is employ | adopted. 本発明の1実施形態によるフローチャート。3 is a flowchart according to an embodiment of the present invention. 処理順テーブルの一例を示す説明図。Explanatory drawing which shows an example of a process order table. 処理順テーブルの一例を示す説明図。Explanatory drawing which shows an example of a process order table. リンクリスト構造の説明図。Explanatory drawing of a link list structure. 2分割順による処理順テーブルの作成過程を示す説明図。Explanatory drawing which shows the preparation process of the process order table by 2 division order. 2分割順による処理順テーブルの作成過程を示す説明図。Explanatory drawing which shows the preparation process of the process order table by 2 division order. 2分割順による処理順テーブルの作成過程を示す説明図。Explanatory drawing which shows the preparation process of the process order table by 2 division order. ポリゴン間の最短距離を取得する方法のフローチャート。The flowchart of the method of acquiring the shortest distance between polygons.

Claims (5)

コンピュータグラフィックス処理において、複数の要素で構成されるオブジェクトと所定点との最短距離を取得するためのオブジェクト間の最短距離取得方法であって、
A)最短距離Dminを初期値に設定する段階と、
B)前記オブジェクトを構成する複数の要素の幾何学的連続性を有する配列順の配列に対して、所定数おきに対象要素を決定し、前記対象要素の位置情報を読み出す段階と、
C)前記対象要素の位置情報に基づいて、対象要素と所定点との距離を簡易判定して、簡易判定距離Drghに設定する段階と、
D)前記簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはB段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、対象要素の位置情報に基づいて対象要素と所定点との距離を詳細判定し要素距離Dobjに設定する段階と、
E)前記要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはB段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、
F)前記オブジェクトを構成する複数の要素のうち対象要素になっていないものがある場合にはB段階に移行し、全ての要素が対象要素になったと判断される場合には処理を終了する段階と、
を含むオブジェクト間の最短距離取得方法。
In computer graphics processing, a method for obtaining the shortest distance between objects for obtaining the shortest distance between an object composed of a plurality of elements and a predetermined point,
A) setting the shortest distance Dmin to an initial value;
B) determining a target element every predetermined number with respect to an array in an array order having geometric continuity of a plurality of elements constituting the object, and reading position information of the target element;
C) Simple determination of the distance between the target element and the predetermined point based on the position information of the target element, and setting the simple determination distance Drgh;
D) The simple judgment distance Drgh is compared with the shortest distance Dmin. If the simple judgment distance Drgh exceeds the shortest distance Dmin, the process proceeds to stage B, and the simple judgment distance Drgh is equal to or less than the shortest distance Dmin. Is a step of determining in detail the distance between the target element and the predetermined point based on the position information of the target element and setting the distance to the element distance Dobj;
E) The element distance Dobj is compared with the shortest distance Dmin. If the element distance Dobj exceeds the shortest distance Dmin, the process proceeds to stage B. If the element distance Dobj is less than the shortest distance Dmin, Substituting the distance Dobj into the shortest distance Dmin;
F) When there is a plurality of elements constituting the object that are not the target elements, the process proceeds to the B stage, and when it is determined that all the elements are the target elements, the process is terminated. When,
To get the shortest distance between objects including
前記B段階は、
前記オブジェクトを構成する要素数Nの要素の幾何学的な連続性を考慮した所定配列順(1〜N)に対して、前記要素を間引くことなく全要素の順序を入れ替えたものである処理順テーブルとして記憶し、前記処理順テーブルを参照することにより対象要素を決定して前記対象要素の位置情報を読み出すことを特徴とする、請求項1に記載のオブジェクト間の最短距離取得方法。
Step B is
A processing order in which the order of all elements is replaced without thinning out the elements with respect to a predetermined arrangement order (1 to N) in consideration of the geometric continuity of N elements constituting the object. The method for obtaining the shortest distance between objects according to claim 1, wherein the method is stored as a table, the target element is determined by referring to the processing order table, and the position information of the target element is read out.
コンピュータのグラフィックス処理において、複数の要素で構成される第1オブジェクトおよび第2オブジェクトの最短距離を取得するためのオブジェクト間の最短距離取得方法であって、
A)最短距離Dminを初期値に設定する段階と、
B)前記第1オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第1処理順テーブルとして記憶し、前記第1処理順テーブルを参照することにより第1対象要素を決定して前記第1対象要素の位置情報を読み出す段階と、
C)前記第2オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第2処理テーブルとして記憶し、前記第2処理順テーブルを参照することにより第2対象要素を決定して前記第2対象要素の位置情報を読み出す段階と、
D)前記第1対象要素および第2対象要素の位置情報に基づいて、第1対象要素と第2対象要素の距離を簡易判定して、簡易判定距離Drghに設定する段階と、
E)前記簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはC段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、前記第1対象要素と第2対象要素の位置情報に基づいて第1対象要素と第2対象要素の距離を詳細判定し要素距離Dobjに設定する段階と、
F)前記要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはC段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、
G)前記第2オブジェクトを構成する複数の要素のうち第2対象要素になっていないものがある場合にはC段階に移行し、全ての要素が第2対象要素になったと判断される場合にはH段階に移行する段階と、
H)前記第1オブジェクトを構成する複数の要素のうち第1対象要素になっていないものがある場合にはB段階に移行し、全ての要素が第1対象要素になったと判断される場合には処理を終了する段階と、
を含むオブジェクト間の最短距離取得方法。
In a computer graphics process, a method for obtaining a shortest distance between objects for obtaining a shortest distance between a first object and a second object composed of a plurality of elements,
A) setting the shortest distance Dmin to an initial value;
B) A first processing order table stores a reading order that becomes a target element at every predetermined number of the predetermined arrangement order in consideration of geometric continuity of elements of a predetermined number of elements constituting the first object. Determining the first target element by referring to the first processing order table and reading the position information of the first target element;
C) A reading order that becomes a target element at every predetermined number is stored as a second processing table with respect to a predetermined arrangement order that takes into account the geometric continuity of elements of a predetermined number of elements that constitute the second object. Determining a second target element by referring to the second processing order table and reading position information of the second target element;
D) A step of simply determining the distance between the first target element and the second target element based on the position information of the first target element and the second target element and setting the distance to the simple determination distance Drgh;
E) The simple determination distance Drgh is compared with the shortest distance Dmin. If the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to the C stage, and the simple determination distance Drgh is equal to or less than the shortest distance Dmin. Determining in detail the distance between the first target element and the second target element based on the positional information of the first target element and the second target element and setting the distance to the element distance Dobj;
F) The element distance Dobj is compared with the shortest distance Dmin. If the element distance Dobj exceeds the shortest distance Dmin, the process proceeds to stage C. If the element distance Dobj is less than the shortest distance Dmin, Substituting the distance Dobj into the shortest distance Dmin;
G) When there is a plurality of elements constituting the second object that are not the second target elements, the process proceeds to the C stage, and it is determined that all the elements are the second target elements. Is the stage to move to the H stage,
H) When there is a plurality of elements constituting the first object that are not the first target element, the process proceeds to stage B, and it is determined that all the elements have become the first target element. Ends the process,
To get the shortest distance between objects including
複数の要素で構成されるオブジェクトと所定点との最短距離を取得するためのオブジェクト間の最短距離取得方法をコンピュータに行わせるプログラムであって、
A)最短距離Dminを初期値に設定する段階と、
B)前記オブジェクトを構成する複数の要素の幾何学的連続性を有する配列順の配列に対して、所定数おきに対象要素を決定し、前記対象要素の位置情報を読み出す段階と、
C)前記対象要素の位置情報に基づいて、対象要素と所定点との距離を簡易判定して、簡易判定距離Drghに設定する段階と、
D)前記簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはB段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、対象要素の位置情報に基づいて対象要素と所定点との距離を詳細判定し要素距離Dobjに設定する段階と、
E)前記要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはB段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、
F)前記オブジェクトを構成する複数の要素のうち対象要素になっていないものがある場合にはB段階に移行し、全ての要素が対象要素になったと判断される場合には処理を終了する段階と、
を含むオブジェクト間の最短距離取得方法をコンピュータに実行させるためのプログラム。
A program for causing a computer to perform a method for obtaining a shortest distance between objects for obtaining a shortest distance between an object composed of a plurality of elements and a predetermined point,
A) setting the shortest distance Dmin to an initial value;
B) determining a target element every predetermined number with respect to an array in an array order having geometric continuity of a plurality of elements constituting the object, and reading position information of the target element;
C) Simple determination of the distance between the target element and the predetermined point based on the position information of the target element, and setting the simple determination distance Drgh;
D) The simple judgment distance Drgh is compared with the shortest distance Dmin. If the simple judgment distance Drgh exceeds the shortest distance Dmin, the process proceeds to stage B, and the simple judgment distance Drgh is equal to or less than the shortest distance Dmin. Is a step of determining in detail the distance between the target element and the predetermined point based on the position information of the target element and setting the distance to the element distance Dobj;
E) The element distance Dobj is compared with the shortest distance Dmin. If the element distance Dobj exceeds the shortest distance Dmin, the process proceeds to stage B. If the element distance Dobj is less than the shortest distance Dmin, Substituting the distance Dobj into the shortest distance Dmin;
F) When there is a plurality of elements constituting the object that are not the target elements, the process proceeds to the B stage, and when it is determined that all the elements are the target elements, the process is terminated. When,
A program for causing a computer to execute a method for obtaining the shortest distance between objects including a computer.
複数の要素で構成される第1オブジェクトおよび第2オブジェクトの最短距離を取得するためのオブジェクト間の最短距離取得方法をコンピュータに行わせるプログラムであって、
A)最短距離Dminを初期値に設定する段階と、
B)前記第1オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第1処理順テーブルとして記憶し、前記第1処理順テーブルを参照することにより第1対象要素を決定して前記第1対象要素の位置情報を読み出す段階と、
C)前記第2オブジェクトを構成する所定要素数の要素の幾何学的な連続性を考慮した所定配列順に対して、所定数おきに対象要素となるような読出順を第2処理テーブルとして記憶し、前記第2処理順テーブルを参照することにより第2対象要素を決定して前記第2対象要素の位置情報を読み出す段階と、
D)前記第1対象要素および第2対象要素の位置情報に基づいて、第1対象要素と第2対象要素の距離を簡易判定して、簡易判定距離Drghに設定する段階と、
E)前記簡易判定距離Drghと最短距離Dminとを比較し、簡易判定距離Drghが最短距離Dminを超えている場合にはC段階に移行し、簡易判定距離Drghが最短距離Dmin以下である場合には、前記第1対象要素と第2対象要素の位置情報に基づいて第1対象要素と第2対象要素の距離を詳細判定し要素距離Dobjに設定する段階と、
F)前記要素距離Dobjと最短距離Dminとを比較し、要素距離Dobjが最短距離Dminを超えている場合にはC段階に移行し、要素距離Dobjが最短距離Dmin以下である場合には、要素距離Dobjを最短距離Dminに代入する段階と、
G)前記第2オブジェクトを構成する複数の要素のうち第2対象要素になっていないものがある場合にはC段階に移行し、全ての要素が第2対象要素になったと判断される場合にはH段階に移行する段階と、
H)前記第1オブジェクトを構成する複数の要素のうち第1対象要素になっていないものがある場合にはB段階に移行し、全ての要素が第1対象要素になったと判断される場合には処理を終了する段階と、
を含むオブジェクト間の最短距離取得方法をコンピュータに実行させるためのプログラム。
A program for causing a computer to perform a shortest distance acquisition method between objects for acquiring a shortest distance between a first object and a second object composed of a plurality of elements,
A) setting the shortest distance Dmin to an initial value;
B) A first processing order table stores a reading order that becomes a target element at every predetermined number of the predetermined arrangement order in consideration of geometric continuity of elements of a predetermined number of elements constituting the first object. Determining the first target element by referring to the first processing order table and reading the position information of the first target element;
C) A reading order that becomes a target element at every predetermined number is stored as a second processing table with respect to a predetermined arrangement order that takes into account the geometric continuity of elements of a predetermined number of elements that constitute the second object. Determining a second target element by referring to the second processing order table and reading position information of the second target element;
D) A step of simply determining the distance between the first target element and the second target element based on the position information of the first target element and the second target element and setting the distance to the simple determination distance Drgh;
E) The simple determination distance Drgh is compared with the shortest distance Dmin. If the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to the C stage, and the simple determination distance Drgh is equal to or less than the shortest distance Dmin. Determining in detail the distance between the first target element and the second target element based on the positional information of the first target element and the second target element and setting the distance to the element distance Dobj;
F) The element distance Dobj is compared with the shortest distance Dmin. If the element distance Dobj exceeds the shortest distance Dmin, the process proceeds to stage C. If the element distance Dobj is less than the shortest distance Dmin, Substituting the distance Dobj into the shortest distance Dmin;
G) When there is a plurality of elements constituting the second object that are not the second target elements, the process proceeds to the C stage, and it is determined that all the elements are the second target elements. Is the stage to move to the H stage,
H) When there is a plurality of elements constituting the first object that are not the first target element, the process proceeds to stage B, and it is determined that all the elements have become the first target element. Ends the process,
A program for causing a computer to execute a method for obtaining the shortest distance between objects including a computer.
JP2007240899A 2007-09-18 2007-09-18 How to get the shortest distance between objects Expired - Fee Related JP4589369B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007240899A JP4589369B2 (en) 2007-09-18 2007-09-18 How to get the shortest distance between objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007240899A JP4589369B2 (en) 2007-09-18 2007-09-18 How to get the shortest distance between objects

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2002091511A Division JP4031942B2 (en) 2002-03-28 2002-03-28 How to get the shortest distance between objects

Publications (2)

Publication Number Publication Date
JP2008021329A JP2008021329A (en) 2008-01-31
JP4589369B2 true JP4589369B2 (en) 2010-12-01

Family

ID=39077173

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007240899A Expired - Fee Related JP4589369B2 (en) 2007-09-18 2007-09-18 How to get the shortest distance between objects

Country Status (1)

Country Link
JP (1) JP4589369B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09134446A (en) * 1995-11-08 1997-05-20 Fujitsu Ltd Method for displaying three-dimensional picture and three-dimensional picture display device used for the method
JPH11265405A (en) * 1998-03-17 1999-09-28 Sumitomo Metal Ind Ltd Method and device for calculating distance, and recording medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09134446A (en) * 1995-11-08 1997-05-20 Fujitsu Ltd Method for displaying three-dimensional picture and three-dimensional picture display device used for the method
JPH11265405A (en) * 1998-03-17 1999-09-28 Sumitomo Metal Ind Ltd Method and device for calculating distance, and recording medium

Also Published As

Publication number Publication date
JP2008021329A (en) 2008-01-31

Similar Documents

Publication Publication Date Title
US10832475B2 (en) Method for constructing three-dimensional solid model with geometric error and computer-readable storage medium
JP4934789B2 (en) Interpolation processing method and interpolation processing apparatus
KR101741402B1 (en) Design of a part modeled by parallel geodesic curves
US20100277476A1 (en) Bounded simplification of geometrical computer data
CN112233249A (en) B spline surface fitting method and device based on dense point cloud
KR20060047436A (en) Method, computer program product and data structure for representing two- or three-dimensional object
US20100194766A1 (en) Apparatus, method, and program for structuring visualization object data; and apparatus, method, and program for visualizing visualization object data
CN103649856A (en) Method for simulating machining of objects by motion of tool and system and computer program product therefor
JP5091570B2 (en) Image interpolation method and apparatus
US7348976B2 (en) Three-dimensional shape display program, three-dimensional shape display method, and three-dimensional shape display apparatus
CN101203888A (en) Image processing device, image processing method, and information storage medium
JP4589369B2 (en) How to get the shortest distance between objects
JP4031942B2 (en) How to get the shortest distance between objects
Krishnamurthy et al. Accurate GPU-accelerated surface integrals for moment computation
CN110009742B (en) System and method for finite element mesh repair
CN109598672A (en) A kind of map road rendering method and device
JP4628160B2 (en) 3D model processing method
EP1585039A2 (en) Analysis model producing/assisting apparatus
US20060271217A1 (en) Manufacturing study support device
Lin et al. Affine arithmetic-based B-Spline surface intersection with gpu acceleration
JP2006114007A5 (en)
JP5606632B2 (en) Geomorphing device
CN112402973B (en) Model detail judging method, terminal device and computer readable storage medium
Kansal et al. A systematic approach for cad model generation of hole features from point cloud data
JP2006114007A (en) Data structure, program, and recording medium for recording data on two- and three-dimensional graphs in computer memory

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20080929

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100419

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100907

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100909

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130917

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees