JPH05120430A - Crossing judgment and intersection calculation system for polygon and straight line - Google Patents

Crossing judgment and intersection calculation system for polygon and straight line

Info

Publication number
JPH05120430A
JPH05120430A JP28344891A JP28344891A JPH05120430A JP H05120430 A JPH05120430 A JP H05120430A JP 28344891 A JP28344891 A JP 28344891A JP 28344891 A JP28344891 A JP 28344891A JP H05120430 A JPH05120430 A JP H05120430A
Authority
JP
Japan
Prior art keywords
intersection
polygon
virtual
straight line
lattice
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.)
Pending
Application number
JP28344891A
Other languages
Japanese (ja)
Inventor
Junko Nakagawa
淳子 中川
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP28344891A priority Critical patent/JPH05120430A/en
Publication of JPH05120430A publication Critical patent/JPH05120430A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To provide a crossing decision and intersection calculation system of a polygon with a straight line by which a processing time can be shortened. CONSTITUTION:Polygon data are received by a polygon data storage part 1, a coordinate area to which a crossing decision and an intersection calculation are operated is divided plural virtual grids, and a grid number is applied to each virtual grid. Then, a virtual grid and vertex number corresponding chart which stores the vertex number of the polygon positioned within the virtual grid at each grid number is prepared by a virtual grid and vertex number corresponding chart preparing part 2. Next, the virtual grid and vertex number corresponding chart is stored in a virtual grid and vertex number corresponding chart storage part 3, straight line data specifying a straight line to which the crossing decision and the intersection calculation with the polygon are operated are inputted, and the grid number of the virtual grid through which the straight line passes is retrieved by a virtual grid retrieving part 4. Then, the crossing decision and the intersection calculation of the side of the polygon in which at least the vertexes of the polygon positioned within the virtual grid of the grid number retrieved by the virtual grid retrieving part 4 are used as one edge, with the straight line are operated by a crossing decision and intersection calculating part 5, and the presence or absence of the crossing and the coordinate value of the intersection are outputted.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は多角形と直線との交差判
定・交点算出方式に関し、特に複雑な形状で辺の数の多
い多角形あるいは多数の多角形の集合により辺の数の合
計が多くなる形状の図形を含む多角形と直線との交差判
定・交点算出方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for determining intersections and intersections between polygons and straight lines, and particularly for a polygon having a complicated shape with a large number of sides or a set of a large number of polygons, the total number of sides is The present invention relates to a method for determining intersections and calculating intersections between polygons including many shapes and straight lines.

【0002】[0002]

【従来の技術】従来の多角形と直線との交差判定・交点
算出方式は、地図等に使われている等高線データから、
断面図を作成する場合などに適用されており、図2のブ
ロック図に示すように、交差判定および交点を算出する
すべての多角形の多角形番号とこの多角形を構成する各
辺の辺番号と各辺の辺の両端の頂点の番号および頂点の
座標値からなる多角形データを格納する多角形データ記
憶部11と、多角形との交差判定および交点算出を行う
直線を規定するデータと多角形データ記憶部11から入
力するデータとを受け交差判定および交点算出を行う交
差判定・交点算出部12とからなる。動作としては交差
判定・交点算出部12に、まず、多角形との交差判定お
よび交点算出を行う直線を規定するデータとして、直線
上の任意の2点の座標値を入力する。次に、多角形を構
成するすべての辺について、多角形データ記憶部11か
ら辺の両端の頂点の座標値を入力し、続いてすべての辺
について既に入力済みの直線との交差判定および交点算
出のための演算をおこない交差の有無および交点の座標
値を出力するようになっている。
2. Description of the Related Art The conventional method of determining intersections and intersections between polygons and straight lines is based on contour line data used for maps and the like.
This is applied when creating a cross-sectional view, and as shown in the block diagram of Fig. 2, the polygon numbers of all polygons that calculate intersection determination and intersections, and the side numbers of each side that makes up this polygon. And a polygon data storage unit 11 for storing polygon data composed of vertex numbers at both ends of each side and coordinate values of the vertices, and data defining a straight line for performing intersection determination with the polygon and calculation of an intersection. An intersection determination / intersection calculation unit 12 that receives data input from the rectangular data storage unit 11 and performs intersection determination and intersection calculation. As an operation, first, coordinate values of arbitrary two points on the straight line are input to the intersection determination / intersection calculation unit 12 as data defining a straight line for performing intersection determination with a polygon and intersection calculation. Next, for all sides forming the polygon, the coordinate values of the vertices at both ends of the side are input from the polygon data storage unit 11, and subsequently, the intersection determination and the intersection calculation with the already input straight line are calculated for all the sides. Is calculated and the presence or absence of the intersection and the coordinate value of the intersection are output.

【0003】[0003]

【発明が解決しようとする課題】上述した従来の多角形
と直線との交差判定・交点算出方式は、多角形を構成す
るすべての辺について直線との交差判定および交点算出
をおこなっているため、複雑な形状で辺の数の多い多角
形あるいは多数の多角形の集合により辺の数の合計が多
くなるものを対象にする場合、非常に多くの辺について
直線との交差判定および交点算出を行うことになり、処
理に時間がかかってしまうという問題点がある。
In the above-described conventional method for determining intersection and intersection between a polygon and a straight line, the intersection is determined and the intersection is calculated with respect to the straight line for all sides forming the polygon. When a polygon with a complicated shape and a large number of sides or a large number of sides due to a set of polygons is used as a target, the intersection judgment with a straight line and the calculation of intersection points are performed for a large number of sides. Therefore, there is a problem that the processing takes time.

【0004】本発明の目的は、処理時間を短くすること
が可能な多角形と直線との交差判定・交点算出方式を提
供することにある。
An object of the present invention is to provide a method of determining intersections and intersections between polygons and straight lines, which can shorten the processing time.

【0005】[0005]

【課題を解決するための手段】本発明の多角形と直線と
の交差判定・交点算出方式は、交差判定および交点を算
出するすべての多角形の多角形番号と前記多角形を構成
する各辺の辺番号と前記各辺の辺の両端の頂点の番号お
よび頂点の座標値からなる多角形データを格納する多角
形データ記憶部と、直線を規定する直線データを入力し
て前記多角形との交差判定および交点算出をおこない交
差の有無および交点の座標値を出力する交差判定・交点
算出部とを含む多角形と直線との交差判定・交点算出方
式において、前記多角形データ記憶部から前記多角形デ
ータを受け前記多角形上の交差判定および交点算出を行
う座標領域を複数個に分割する仮想格子を設定しこの仮
想格子にそれぞれ格子番号を与えこの格子番号ごとに該
当の仮想格子内に位置する前記多角形の頂点の番号を格
納した仮想格子・頂点番号対応表を作成する仮想格子・
頂点番号対応表作成部と、前記仮想格子・頂点番号対応
表作成部の作成した仮想格子・頂点番号対応表を記憶す
る仮想格子・頂点番号対応表記憶部と、前記多角形との
交差判定および交点算出を行う直線を規定する直線デー
タを入力して前記直線が通過する前記仮想格子の格子番
号を検索する仮想格子検索部と、この仮想格子検索部の
検索した格子番号の仮想格子内に位置する多角形の頂点
を少なくとも一端とする多角形の辺について前記直線と
の交差判定および交点算出をおこない交差の有無および
交点の座標値を出力する前記交差判定・交点算出部とを
含む構成である。
According to the intersection determination / intersection calculation method of a polygon and a straight line of the present invention, polygon numbers of all polygons for which intersection determination and intersection are calculated and each side forming the polygon. A polygon data storage unit for storing polygon data consisting of the side number of each side and the numbers of the vertices at both ends of each side and the coordinate values of the vertices; In the intersection determination / intersection calculation method between a polygon and a straight line, which includes the intersection determination / intersection calculation unit that performs intersection determination and intersection calculation and outputs the intersection presence / absence and coordinate values of the intersection, A virtual grid is set which divides the coordinate area for receiving intersection data and performing intersection determination and intersection calculation on the polygon into a plurality of polygons, and assigns a grid number to each virtual grid. Virtual grid to create a virtual lattice-vertex number correspondence table that stores the number of vertices of the polygon location,
A vertex number correspondence table creation unit, a virtual grid / vertex number correspondence table storage unit that stores the virtual grid / vertex number correspondence table created by the virtual grid / vertex number correspondence table creation unit, and an intersection determination between the polygon and A virtual grid search unit for inputting straight line data defining a straight line for calculating an intersection and searching for a grid number of the virtual grid through which the straight line passes, and a position within the virtual grid of the grid number searched by this virtual grid search unit. The intersection determination / intersection calculation unit is configured to perform intersection determination and intersection calculation with the above-described straight line on at least one side of the polygon having at least one apex of the polygon, and output the intersection presence / absence and the coordinate value of the intersection. ..

【0006】[0006]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0007】図1は本発明の一実施例のブロック図であ
る。
FIG. 1 is a block diagram of an embodiment of the present invention.

【0008】多角形データ記憶部1は、交差判定および
交点算出を行うすべての多角形の多角形番号とその多角
形を構成する辺番号とその両端の頂点番号および頂点の
座標値を格納しており、仮想格子・頂点番号対応表作成
部2は、多角形データ記憶部1から多角形データを受
け、多角形上の交差判定および交点算出を行う座標領域
を複数個に分割する仮想格子を設定しこの仮想格子にそ
れぞれ格子番号を与えこの格子番号ごとに該当の仮想格
子内に位置する多角形の頂点の番号を格納した仮想格子
・頂点番号対応表を作成し、この仮想格子・頂点番号対
応表を仮想格子・頂点番号対応表記憶部3に記憶してお
く。仮想格子検索部4は、仮想格子・頂点番号対応表記
憶部3から仮想格子のデータを受け、多角形との交差判
定および交点算出を行う直線を規定する直線データを入
力して直線が通過する仮想格子の格子番号を検索する。
交差判定・交点算出部5は、仮想格子検索部の検索した
格子番号と、仮想格子・頂点番号対応表記憶部3に記憶
してある仮想格子・頂点番号対応表とから、仮想格子内
に位置する多角形の頂点を少なくとも一端とする多角形
の辺について直線との交差判定および交点算出をおこな
い交差の有無および交点の座標値を出力する。
The polygon data storage unit 1 stores the polygon numbers of all polygons for which intersection determination and intersection calculation are performed, the side numbers constituting the polygons, the vertex numbers at both ends thereof, and the coordinate values of the vertices. The virtual grid / vertex number correspondence table creation unit 2 receives the polygon data from the polygon data storage unit 1 and sets a virtual grid that divides the coordinate area for intersection determination and intersection calculation on the polygon into a plurality of areas. Then, a grid number is given to each of the virtual grids, and a virtual grid-vertex number correspondence table that stores the numbers of the vertices of polygons located in the corresponding virtual grid for each grid number is created. The table is stored in the virtual lattice / vertex number correspondence table storage unit 3. The virtual lattice search unit 4 receives the data of the virtual lattice from the virtual lattice / vertex number correspondence table storage unit 3, inputs straight line data defining a straight line for performing intersection determination with a polygon and calculation of an intersection point, and the straight line passes through. Search the grid number of the virtual grid.
The intersection determination / intersection calculation unit 5 determines the position within the virtual lattice from the lattice number searched by the virtual lattice search unit and the virtual lattice / vertex number correspondence table stored in the virtual lattice / vertex number correspondence table storage unit 3. The intersection of the sides of the polygon having at least one of the vertices of the polygon to be intersected with the straight line is determined and the intersection is calculated, and the presence or absence of the intersection and the coordinate value of the intersection are output.

【0009】図3は仮想格子・頂点番号対応表記憶部の
メモリパターンの一例を示す説明図である。
FIG. 3 is an explanatory diagram showing an example of a memory pattern of the virtual lattice / vertex number correspondence table storage unit.

【0010】仮想格子の格子番号21ごとに該当の仮想
格子内に位置する多角形番号と多角形の頂点番号とから
なる仮想多角形データ22 を格納してある。
For each grid number 21 of the virtual grid, virtual polygon data 22 consisting of the polygon number located in the corresponding virtual grid and the vertex number of the polygon is stored.

【0011】図4は仮想格子の原理を説明するための説
明図である。
FIG. 4 is an explanatory diagram for explaining the principle of the virtual lattice.

【0012】仮想格子とは、多角形上の交差判定および
交点算出を行う座標領域31上に適当な間隔で格子線3
2を設定し、格子線32で囲まれた最小の領域ごとに格
子番号IJを設定したものであり、多角形上の交差判定
および交点算出を行う座標領域を格子番号ごとの小領域
に分割するための仮想的なものである。
The virtual grid means the grid lines 3 at appropriate intervals on the coordinate area 31 for judging intersections and calculating intersections on a polygon.
2 is set, and the grid number IJ is set for each minimum area surrounded by the grid lines 32, and the coordinate area in which intersection determination and intersection calculation on the polygon are performed is divided into small areas for each grid number. Is a virtual one for.

【0013】この座標領域31上に線分ABを重ねた場
合、交差判定を行う必要のある領域は、図中の斜線で記
した領域のみでよく、さらに交差判定を行う相手である
等高線等を重ねて、交差判定を行う必要のある領域を求
めれば、真に交差判定および交点算出を必要とする領域
が定まる。
When the line segment AB is superposed on the coordinate area 31, the area for which intersection determination is required is only the area shaded in the drawing, and the contour line or the like which is the other party for the intersection determination is also required. If the area where the intersection determination needs to be performed is obtained again, the area that truly needs the intersection determination and the intersection calculation is determined.

【0014】次に各部の機能についてさらに詳細に説明
する。
Next, the function of each unit will be described in more detail.

【0015】仮想格子・頂点番号対応表作成部2は、ま
ず、多角形上の交差判定および交点算出を行う座標領域
上に仮想格子を作成し格子番号を設定する。つぎに、仮
想格子・頂点番号対応表記憶部3に仮想格子・頂点番号
対応表を作成する。仮想格子・頂点番号対応表として、
仮想格子・頂点番号対応表記憶部3に仮想格子の格子番
号ごとに記憶領域を確保する。多角形Pの頂点番号Nの
頂点の座標値(XN,YN)が格子番号IJの仮想格子
内に位置するならば、仮想格子・頂点番号対応表の格子
番号IJの領域に多角形番号Pと頂点番号Nを格納す
る。多角形データ記憶部1に格納されている全多角形の
全頂点につき、仮想格子・頂点番号対応表記憶部3に仮
想格子・頂点番号対応表を設定する。
The virtual grid / vertex number correspondence table creation unit 2 first creates a virtual grid on the coordinate area for polygon intersection determination and intersection calculation and sets the grid number. Next, a virtual lattice / vertex number correspondence table is created in the virtual lattice / vertex number correspondence table storage unit 3. As a virtual lattice / vertex number correspondence table,
A storage area is secured in the virtual lattice / vertex number correspondence table storage unit 3 for each lattice number of the virtual lattice. If the coordinate value (XN, YN) of the vertex of the vertex number N of the polygon P is located in the virtual lattice of the lattice number IJ, the polygon number P is set in the area of the lattice number IJ of the virtual lattice / vertex number correspondence table. The vertex number N is stored. A virtual lattice / vertex number correspondence table is set in the virtual lattice / vertex number correspondence table storage unit 3 for all vertices of all polygons stored in the polygon data storage unit 1.

【0016】仮想格子検索部4は、多角形と交差判定お
よび交点算出を行う直線Lを規定するデータとして、た
とえば直線L上の任意の2点の座標値を入力し、仮想格
子・頂点番号対応表作成部2で作成した仮想格子のうち
直線Lが通過あるいは接触する仮想格子の格子番号を検
索し、交差判定・交点算出部5に出力する。
The virtual grid search unit 4 inputs, for example, the coordinate values of two arbitrary points on the straight line L as data defining the straight line L for performing intersection determination and intersection calculation with a polygon, and the virtual grid / vertex number correspondence The virtual grid created by the table creation unit 2 is searched for the grid number of the virtual grid through which the straight line L passes or contacts and is output to the intersection determination / intersection calculation unit 5.

【0017】交差判定・交点算出部5は、多角形データ
記憶部1、仮想格子・頂点番号対応表記憶部3、多角形
との交差判定および交点算出を行う直線Lを規定するデ
ータとしてたとえば直線L上の任意の2点の座標値、お
よび仮想格子検索部4で検索された仮想格子の格子番号
を入力し、検索された全仮想格子について、その仮想格
子内に位置する全頂点を少なくとも一端とする多角形の
すべての辺と、直線Lとの交差判定および交点算出を行
う。
The intersection determination / intersection calculation unit 5 is, for example, a straight line as data defining a polygon data storage unit 1, a virtual lattice / vertex number correspondence table storage unit 3, and a straight line L for performing intersection determination with a polygon and intersection calculation. The coordinate values of arbitrary two points on L and the lattice number of the virtual lattice searched by the virtual lattice search unit 4 are input, and at least one end of all the vertices located in the virtual lattice is searched for all the searched virtual lattices. The intersection of all the sides of the polygon and the straight line L is determined and the intersection is calculated.

【0018】仮想格子検索部4で最初に格子番号IJの
仮想格子が検索されていたならば、仮想格子・頂点番号
対応表記憶部3から格子番号IJの領域を入力する。格
子番号IJの領域の最初に多角形番号Pと頂点番号Nと
が格納されていたならば、多角形データ記憶部1から、
多角形番号Pで頂点番号Nの頂点の座標値、およびその
頂点と組になって多角形Pを構成する辺となる頂点番号
M1,M2,………,MMのM点の頂点の座標値を入力
する。そして、入力した2点の座標値で規定される直線
Lと、2点(N,M1)および(N,M2)および……
…(N,MM)で定まる多角形PのM本の辺との交差判
定および交点算出を行う。
If the virtual lattice with the lattice number IJ is first searched by the virtual lattice retrieval unit 4, the region with the lattice number IJ is input from the virtual lattice / vertex number correspondence table storage unit 3. If the polygon number P and the vertex number N are stored at the beginning of the area of the lattice number IJ, from the polygon data storage unit 1,
The coordinate value of the vertex with the polygon number P and the vertex number N, and the coordinate value of the vertex of the M point of the vertex numbers M1, M2, ... Enter. Then, a straight line L defined by the coordinate values of the two input points and two points (N, M1) and (N, M2) and ...
.. (N, MM) The intersection determination with the M sides of the polygon P determined by (N, MM) and the intersection calculation are performed.

【0019】仮想格子・頂点番号対応表記憶部3の格子
番号IJの領域に格納されている全頂点につき、多角形
番号Pの頂点番号Nの頂点と同様に処理する。さらに、
仮想格子検索部4で検索された全仮想格子につき、格子
番号IJの仮想格子と同様に処理する。最後に、交差判
定・交点算出部5での処理結果として、多角形番号ごと
の直線Lとの交差の有無および交点の座標値を出力す
る。
All the vertices stored in the area of the lattice number IJ of the virtual lattice / vertex number correspondence table storage section 3 are processed in the same manner as the vertex of the polygon number P and the vertex number N. further,
All virtual lattices searched by the virtual lattice search unit 4 are processed in the same manner as the virtual lattice with the lattice number IJ. Finally, as a processing result in the intersection determination / intersection calculation unit 5, the presence / absence of intersection with the straight line L for each polygon number and the coordinate value of the intersection are output.

【0020】次に、ある多角形データと直線Lとの交差
判定および交点算出をおこなった後に、同一の多角形デ
ータについて直線Lとは異なる直線L1との交差判定お
よび交点算出を行う場合について説明する。
Next, a case will be described in which after performing intersection determination and intersection calculation between a certain polygon data and the straight line L, intersection determination and intersection calculation between the same polygon data and a straight line L1 different from the straight line L are performed. To do.

【0021】直線L1との交差判定および交点算出を行
う場合、多角形データ記憶部1および仮想格子・頂点番
号対応表作成部2における処理は、直線Lとの交差判定
および交点算出を行う場合と同一であり、再度処理を行
う必要はなく、仮想格子・頂点番号対応表記憶部3に格
納される内容は同一でよい。
When the intersection is determined with the straight line L1 and the intersection is calculated, the processing in the polygon data storage unit 1 and the virtual lattice / vertex number correspondence table preparation unit 2 is the same as when the intersection is determined with the straight line L and the intersection is calculated. They are the same and do not need to be processed again, and the contents stored in the virtual lattice / vertex number correspondence table storage unit 3 may be the same.

【0022】仮想格子検索部4および交差判定・交点算
出部5における処理は、直線Lを規定するデータの代わ
りに直線L1を規定するデータを使用して、直線Lとの
交差判定および交点算出を行う場合と同様に行う。最後
に、交差判定・交点算出部5での処理結果として、多角
形番号毎の直線L1との交差の有無および交点の座標値
を出力することとなる。
The processes in the virtual grid search unit 4 and the intersection determination / intersection calculation unit 5 use the data defining the straight line L1 instead of the data defining the straight line L to determine the intersection with the straight line L and calculate the intersection. Do the same as you would. Finally, as the processing result in the intersection determination / intersection calculation unit 5, the presence / absence of intersection with the straight line L1 for each polygon number and the coordinate value of the intersection are output.

【0023】[0023]

【発明の効果】以上説明したように、本発明は、多角形
データ記憶部から多角形データを受け多角形上の交差判
定および交点算出を行う座標領域を複数個に分割する仮
想格子を設定し この仮想格子にそれぞれ格子番号を与
え、この格子番号ごとに該当の仮想格子内に位置する多
角形の頂点の番号を格納した仮想格子・頂点番号対応表
を仮想格子・頂点番号対応表作成部が作成し、この仮想
格子・頂点番号対応表を仮想格子・頂点番号対応表記憶
部が記憶し、多角形との交差判定および交点算出を行う
直線を規定する直線データを入力して直線が通過する仮
想格子の格子番号を仮想格子検索部が検索し、交差判定
・交点算出部がこの仮想格子検索部の検索した格子番号
の仮想格子内に位置する多角形の頂点を少なくとも一端
とする多角形の辺について直線との交差判定および交点
算出をおこない交差の有無および交点の座標値を出力す
ることにより、交差判定および交点算のための処理時間
を短くすることが可能となるという効果が有る。
As described above, according to the present invention, a virtual grid is set that divides a coordinate area that receives polygon data from the polygon data storage unit and performs intersection determination and intersection calculation on the polygon into a plurality of coordinate areas. The virtual lattice / vertex number correspondence table storing unit assigns a lattice number to each of the virtual lattices, and stores a virtual lattice / vertex number correspondence table storing the numbers of the vertices of polygons located in the virtual lattice for each lattice number. The virtual lattice / vertex number correspondence table is created and stored in the virtual lattice / vertex number correspondence table storage unit, and straight line data defining a straight line for performing intersection determination with a polygon and calculation of an intersection is input and the straight line passes. The lattice number of the virtual lattice is searched by the virtual lattice search unit, and the intersection determination / intersection calculation unit calculates a polygon with at least one apex of the polygon located in the virtual lattice of the lattice number searched by the virtual lattice search unit. On the side Therefore, by performing the intersection determination with the straight line and the intersection calculation, and outputting the presence / absence of the intersection and the coordinate value of the intersection, it is possible to shorten the processing time for the intersection determination and the intersection calculation.

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

【図1】本発明の一実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】従来の多角形と直線との交差判定・交点算出方
式を示すブロック図である。
FIG. 2 is a block diagram showing a conventional intersection determination / intersection point calculation method between a polygon and a straight line.

【図3】仮想格子・頂点番号対応表記憶部のメモリパタ
ーンの一例を示す説明図である。
FIG. 3 is an explanatory diagram showing an example of a memory pattern of a virtual lattice / vertex number correspondence table storage unit.

【図4】仮想格子の原理を説明するための説明図であ
る。
FIG. 4 is an explanatory diagram for explaining the principle of a virtual lattice.

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

1 多角形データ記憶部 2 仮想格子・頂点番号対応表作成部 3 仮想格子・頂点番号対応表記憶部 4 仮想格子検索部 5 交差判定・交点算出部 21 格子番号 22 仮想多角形データ 31 座標領域 32 格子線 1 polygon data storage unit 2 virtual lattice / vertex number correspondence table creation unit 3 virtual lattice / vertex number correspondence table storage unit 4 virtual lattice search unit 5 intersection determination / intersection calculation unit 21 lattice number 22 virtual polygon data 31 coordinate area 32 Grid line

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 交差判定および交点を算出するすべての
多角形の多角形番号と前記多角形を構成する各辺の辺番
号と前記各辺の辺の両端の頂点の番号および頂点の座標
値からなる多角形データを格納する多角形データ記憶部
と、直線を規定する直線データを入力して前記多角形と
の交差判定および交点算出をおこない交差の有無および
交点の座標値を出力する交差判定・交点算出部とを含む
多角形と直線との交差判定・交点算出方式において、前
記多角形データ記憶部から前記多角形データを受け前記
多角形上の交差判定および交点算出を行う座標領域を複
数個に分割する仮想格子を設定しこの仮想格子にそれぞ
れ格子番号を与えこの格子番号ごとに該当の仮想格子内
に位置する前記多角形の頂点の番号を格納した仮想格子
・頂点番号対応表を作成する仮想格子・頂点番号対応表
作成部と、前記仮想格子・頂点番号対応表作成部の作成
した仮想格子・頂点番号対応表を記憶する仮想格子・頂
点番号対応表記憶部と、前記多角形との交差判定および
交点算出を行う直線を規定する直線データを入力して前
記直線が通過する前記仮想格子の格子番号を検索する仮
想格子検索部と、この仮想格子検索部の検索した格子番
号の仮想格子内に位置する多角形の頂点を少なくとも一
端とする多角形の辺について前記直線との交差判定およ
び交点算出をおこない交差の有無および交点の座標値を
出力する前記交差判定・交点算出部とを含むことを特徴
とする多角形と直線との交差判定・交点算出方式。
1. From the polygon numbers of all polygons for which intersection determination and intersections are calculated, the side numbers of each side forming the polygon, the vertex numbers at both ends of each side, and the vertex coordinate values. And a polygon data storage unit that stores polygon data, and input straight line data that defines a straight line to determine the intersection with the polygon and calculate the intersection, and determine whether there is an intersection and output the coordinate value of the intersection. In an intersection determination / intersection calculation method of a polygon and a straight line including an intersection calculation unit, a plurality of coordinate areas for receiving the polygon data from the polygon data storage unit and performing intersection determination and intersection calculation on the polygon A virtual lattice to be divided into is set, a lattice number is given to each virtual lattice, and a virtual lattice-vertex number correspondence table storing the numbers of the vertices of the polygons located in the corresponding virtual lattice for each lattice number is created. A virtual grid / vertex number correspondence table creation unit to create, a virtual grid / vertex number correspondence table storage unit to store the virtual grid / vertex number correspondence table created by the virtual grid / vertex number correspondence table creation unit, and the polygon A virtual lattice search unit for inputting straight line data defining a straight line for performing intersection determination and calculation of an intersection and searching for a lattice number of the virtual lattice through which the straight line passes, and a lattice number searched by the virtual lattice search unit. An intersection determination / intersection calculation unit that outputs an intersection determination and intersection calculation with the straight line with respect to a side of the polygon having at least one apex of the polygon located in the virtual lattice, and outputs the coordinate value of the intersection; An intersection determination / intersection calculation method between a polygon and a straight line, which includes
JP28344891A 1991-10-30 1991-10-30 Crossing judgment and intersection calculation system for polygon and straight line Pending JPH05120430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28344891A JPH05120430A (en) 1991-10-30 1991-10-30 Crossing judgment and intersection calculation system for polygon and straight line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28344891A JPH05120430A (en) 1991-10-30 1991-10-30 Crossing judgment and intersection calculation system for polygon and straight line

Publications (1)

Publication Number Publication Date
JPH05120430A true JPH05120430A (en) 1993-05-18

Family

ID=17665680

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28344891A Pending JPH05120430A (en) 1991-10-30 1991-10-30 Crossing judgment and intersection calculation system for polygon and straight line

Country Status (1)

Country Link
JP (1) JPH05120430A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1134406A (en) * 1997-02-28 1999-02-09 Adobe Syst Inc Vector map flattening and trapping

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1134406A (en) * 1997-02-28 1999-02-09 Adobe Syst Inc Vector map flattening and trapping

Similar Documents

Publication Publication Date Title
CA2110143A1 (en) Method and system for producing mesh representations of objects
CN112837328A (en) A rectangular window clipping and drawing method for two-dimensional polygon primitives
EP3761191A1 (en) A method of processing geospatial data
JPH05120430A (en) Crossing judgment and intersection calculation system for polygon and straight line
JP3337608B2 (en) Analysis simulation device
JPH0778254A (en) Figure closed area extraction method
US5519821A (en) System and method for producing contour lines from a number of sample points by comparing contour height with mean height of surrounding sample points
Sandgren et al. Part layout optimization using a quadtree representation
WO1993001535A1 (en) Method for specifying position where fillet curved surface is located
JP3626896B2 (en) Data conversion method and recording medium recording data conversion program
CN119203291B (en) A wall crack mesh model construction method based on optimized constrained Delaunay meshing
JPH06259507A (en) Figure dividing device
JPS6125190B2 (en)
JPH08329236A (en) Method for simplifying outlike data
JPH03209499A (en) Forming method for outline font and drawing device for the same
JP3324589B2 (en) Contour line drawing method, drawing system using this method, and recording medium recording the drawing method
JP3302768B2 (en) Finite element splitting device
JPS63249269A (en) Picking method for polygonal area in graphic processing
JPS63178372A (en) Polyhedral shape forming device
JPH05108694A (en) Finite element automatic generation method
JP4066103B2 (en) Graphic clipping device and graphic clipping method
JP2003067746A (en) Shape feature mining method and apparatus
JPH036785A (en) Clipping circuit
JPH03290771A (en) Clipping system
JPS58155474A (en) Drawing method of parallel curve