JPH05282387A - Graphic overlapping recognizing method - Google Patents

Graphic overlapping recognizing method

Info

Publication number
JPH05282387A
JPH05282387A JP4076461A JP7646192A JPH05282387A JP H05282387 A JPH05282387 A JP H05282387A JP 4076461 A JP4076461 A JP 4076461A JP 7646192 A JP7646192 A JP 7646192A JP H05282387 A JPH05282387 A JP H05282387A
Authority
JP
Japan
Prior art keywords
graphic
overlapping
figures
graphics
overlap
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
JP4076461A
Other languages
Japanese (ja)
Inventor
Sachi Matsuda
佐知 松田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4076461A priority Critical patent/JPH05282387A/en
Publication of JPH05282387A publication Critical patent/JPH05282387A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To recognize the overlapping of graphics at a high speed by performing a simple coordinate calculation without using any graphic logical operation. CONSTITUTION:It is decided whether two input horizontal and vertical polygoanl graphics A and B are partly overlapping with each other or not, whether the graphic A is included on the graphic B or not, and whether both graphics A and B are not overlapping at all with each other or not. Under such conditions, an apex P1 (X1, Y1) of the graphic A is noted and the intersecting points (P2-P5) are obtained between a straight line l (Y=Y1:Y1 showing the Y coordinate value of P1 and the graphic B. These intersecting points are arranged in the order of smaller X coordinate values, that is P2, P1, P3, P4 and P5. It is decided that P1 is included in the graphic B is P1 has an even order number. This processing is carried out to each apex of the graphic A. Then the graphic A is included in the graphic B as long as all apexes of the graphic A are included in the graphic B. If no apex of the graphic A is included in the graphic B, both graphics A and B are not overlapping with each other. Otherwise both graphics are partly overlapping with each other.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はCADシステムにおいて
図形の重なり認識を行う方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for recognizing overlapping figures in a CAD system.

【0002】[0002]

【従来の技術】従来は図形の重なり認識手段として図形
論理演算が用いられた。図5は従来の図形重なり認識方
法の構成図である。1では図3または図4に示すような
2つのポリゴン図形A,Bを入力する。2では2図形の
AND(2図形A,Bの重なり部分の図形)を求める。
3では2で求めた重なり図形と入力図形A,Bとの関係
により重なりを判定する。
2. Description of the Related Art Conventionally, graphic logic operation has been used as a means for recognizing the overlap of graphics. FIG. 5 is a block diagram of a conventional figure overlap recognition method. In step 1, two polygon figures A and B as shown in FIG. 3 or 4 are input. In 2, the AND of the two figures (the figure of the overlapping portion of the two figures A and B) is obtained.
In 3, the overlapping is determined based on the relationship between the overlapping figure obtained in 2 and the input figures A and B.

【0003】AND図形がなければ2図形は全く重なっ
ていない(図4)。AND図形が一方の図形と等しけれ
ば、その図形は他方の図形中に含まれている。AND図
形が2図形のどちらとも等しくない場合は一部重なって
いる(図3)。
Without the AND figure, the two figures do not overlap at all (FIG. 4). If the AND graphic is equal to one graphic, the graphic is included in the other graphic. If the AND figures are not equal to either of the two figures, they partially overlap (Fig. 3).

【0004】2の図形論理演算法には、例えばスリット
法がある。この場合、図6に示すようにXまたはY軸に
直交する細長い区間に分割する。次に各スリット間でそ
のスリットを通過するエッジで演算を行って、全スリッ
ト分を繰り返し処理することにより求める結果を得よう
とする。各スリットでの図形の重なり状態はスリット下
端での各エッジの順序関係で判断できる。この手法によ
りAND図形(2図形の重なり部分の図形)を求める。
(詳細は、西出他″LSIアートワークデータの論理演
算処理の一手法″信学研資CTS78−126,吉田
他″図形の論理演算処理の一手法″S54情報処理学会
P587)
The slit logic method is an example of the graphic logic operation method 2. In this case, as shown in FIG. 6, it is divided into elongated sections orthogonal to the X or Y axis. Next, an operation is performed between the slits at the edges that pass through the slits, and all slits are repeatedly processed to obtain the desired result. The overlapping state of the figures in each slit can be judged by the order relation of each edge at the lower end of the slit. An AND figure (a figure in the overlapping portion of two figures) is obtained by this method.
(For details, see Nishide et al. "One method of logical operation processing of LSI artwork data", Shin-Gakken CTS78-126, Yoshida et al. "One method of logical operation processing of figures" S54 Information Processing Society of Japan P587)

【0005】[0005]

【発明が解決しようとする課題】しかしながら、前記の
ような構成では、図形論理演算を行っていたため、アル
ゴリズムが複雑で演算に非常に多くの時間が必要である
という問題点を有していた。
However, in the above-mentioned configuration, since the graphic logic operation is performed, there is a problem that the algorithm is complicated and a very long time is required for the operation.

【0006】本発明は、上記従来の問題点を解決するも
ので、高速に図形重なり認識を行う手段およびその装置
を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned conventional problems, and an object of the present invention is to provide means and apparatus for recognizing graphic overlap at high speed.

【0007】[0007]

【課題を解決するための手段】本発明は、前記の目的を
達成するために、水平垂直ポリゴン図形の重なり認識を
図1,図2に示すような方法で行う。すなわち、まず、
図形Bの各頂点でスリットを切り図形Aとの交点を求め
る。そして、それらの交点と頂点との位置関係により重
なりを判断するようにするのである。
In order to achieve the above-mentioned object, the present invention performs overlapping recognition of horizontal and vertical polygon figures by a method as shown in FIGS. That is, first,
A slit is cut at each apex of the figure B to find an intersection with the figure A. Then, the overlap is determined based on the positional relationship between the intersections and the vertices.

【0008】[0008]

【作用】本発明は、前記した構成により、水平垂直ポリ
ゴン図形について簡単な座標計算による図形の重なり判
定を行う。この判定手段は、図形論理演算より簡単なア
ルゴリズムで実現されるので、スリット法よりも処理す
る点が少なくて、高速に図形の重なりを判定することが
可能となる。
According to the present invention, with the above-mentioned configuration, the overlapping of the horizontal and vertical polygon figures is determined by simple coordinate calculation. Since this judging means is realized by an algorithm simpler than the graphic logic operation, it has a smaller number of processing points than the slit method, and it is possible to judge the overlap of the graphics at high speed.

【0009】[0009]

【実施例】以下、本発明の一実施例について、図を参照
しながら説明する。
An embodiment of the present invention will be described below with reference to the drawings.

【0010】図1は本発明の図形重なり認識方法の構成
を示すフロー図である。1で図3または図4に示すよう
な2つの水平垂直ポリゴン図形A,Bを入力する。2は
入力された2つの図形A,Bが一部重なっているのか、
図形Aが図形Bに含まれているのか、図形Aと図形Bは
全く重なっていないのかを判定する手段である。その動
作を図2を用いて説明する。まず、Aの頂点P1(x1
1)に 注目し、直線1(y=y1:y1はP1のY座標
値)とBとの交点( P2〜P5)を求める。P1〜P5
x座標値の小さなものから順にならべる。図2では、P
2,P1,P3,P 4,P5となる 。P1が偶数番目にあれ
ばP1は図形B内にある。
FIG. 1 is a block diagram of the method for recognizing overlapping shapes of the present invention.
FIG. 1 as shown in FIG. 3 or FIG.
Two horizontal and vertical polygon figures A and B are input. 2 is
Whether the two input figures A and B partially overlap,
Is graphic A included in graphic B?
It is a means to determine whether they do not overlap at all. The movement
The work will be described with reference to FIG. First, the vertex P of A1(X1
y1) And pay attention to the straight line 1 (y = y1: Y1Is P1Y coordinate of
Value) and B intersection (P2~ PFive). P1~ PFiveTo
Order from the smallest x-coordinate value. In FIG. 2, P
2, P1, P3, P Four, PFiveBecomes P1Is an even number
If P1Is in graphic B.

【0011】以上の処理をAの各頂点について行い、す
べての頂点が図形B内にあれば図形Aは図形Bに含ま
れ、どの頂点も図形B内にない場合は図形Aは図形Bと
重なっていない。その他の場合は2図形の一部が重なっ
ている。図2の場合、図形Aのすべての頂点が図形B内
にあるのでAはBに含まれる。図3の場合、P1はB内
にあるがその他の頂点はB内にないのでA,Bは一 部
重なっている。図4の場合、すべての頂点がB内にない
のでA,Bは全く重なっていない。
The above processing is performed for each vertex of A. If all the vertices are in the figure B, the figure A is included in the figure B. If no vertex is in the figure B, the figure A overlaps the figure B. Not not. In other cases, a part of the two figures overlap. In the case of FIG. 2, since all the vertices of the figure A are in the figure B, A is included in B. In the case of FIG. 3, since P 1 is in B but the other vertices are not in B, A and B are partially overlapped. In the case of FIG. 4, since all the vertices are not in B, A and B do not overlap at all.

【0012】以上のような判定手段により、複雑なアル
ゴリズムの必要な図形論理演算を使わずに図形の重なり
判定を高速に行うことが可能となる。
With the above-mentioned judging means, it is possible to judge overlapping of figures at high speed without using the figure logical operation which requires a complicated algorithm.

【0013】[0013]

【発明の効果】以上のように、本発明は、図形論理演算
を使わずに簡単な座標計算を行うことにより高速に図形
の重なりを認識することができるのである。
As described above, according to the present invention, overlapping of figures can be recognized at high speed by performing simple coordinate calculation without using figure logical operation.

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

【図1】本発明の実施例における図形重なり認識方法の
フロー図
FIG. 1 is a flowchart of a method of recognizing overlapping shapes in an embodiment of the present invention.

【図2】同実施例における重なり判定方法の動作説明の
ための図
FIG. 2 is a diagram for explaining the operation of the overlap determination method in the embodiment.

【図3】同実施例における重なり判定図形を示す図FIG. 3 is a diagram showing an overlap determination figure in the same embodiment.

【図4】同実施例における重なり判定図形を示す図FIG. 4 is a diagram showing an overlap determination figure in the same embodiment.

【図5】従来の図形重なり認識方法のフロー図FIG. 5 is a flowchart of a conventional figure overlap recognition method.

【図6】従来の重なり判定方法の動作説明のための図FIG. 6 is a diagram for explaining the operation of a conventional overlap determination method.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 水平垂直ポリゴン図形の重なりを座標計
算により判定する図形の重なり認識方法。
1. A method of recognizing the overlap of horizontal and vertical polygon figures, wherein the figure overlap is determined by coordinate calculation.
【請求項2】 ひとつの図形の各頂点でスリットを切っ
て他の図形との交点を求め、得られた交点の座標と前記
各頂点の座標とを比較して、各頂点へ個々が前記他の図
形の内に含まれるか否かに基づき図形の重なりを判定す
る請求項1記載の図形の重なり認識方法。
2. A slit is cut at each vertex of one figure to obtain an intersection with another figure, and the coordinates of the obtained intersection are compared with the coordinates of each vertex, and each vertex has the other points. 2. The method for recognizing overlapping of figures according to claim 1, wherein the overlapping of figures is determined based on whether or not the figures are included in the figure.
JP4076461A 1992-03-31 1992-03-31 Graphic overlapping recognizing method Pending JPH05282387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4076461A JPH05282387A (en) 1992-03-31 1992-03-31 Graphic overlapping recognizing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4076461A JPH05282387A (en) 1992-03-31 1992-03-31 Graphic overlapping recognizing method

Publications (1)

Publication Number Publication Date
JPH05282387A true JPH05282387A (en) 1993-10-29

Family

ID=13605807

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4076461A Pending JPH05282387A (en) 1992-03-31 1992-03-31 Graphic overlapping recognizing method

Country Status (1)

Country Link
JP (1) JPH05282387A (en)

Similar Documents

Publication Publication Date Title
US5369734A (en) Method for processing and displaying hidden-line graphic images
JPH04346182A (en) Method, program product and system for identifying polygon
Seiler A hardware assisted design rule check architecture
US5179645A (en) Method of recognizing overlapped graphics in each degree of overlapping thereof
CN103310409A (en) Quick triangle partitioning method of Tile-based rendering architecture central processing unit (CPU)
JPH0962850A (en) Axial symmetry graphic shaping device and method for generating axial symmetry graphic for entirety of arbitrary number of symmetry axes
US5640499A (en) Method of editing a drawing displayed on a display unit of a computer by simultaneously moving plural elements included in an editing area
JPH05282387A (en) Graphic overlapping recognizing method
JP2002183741A (en) Figure processing method
JPH0778254A (en) Graphic closed area extraction method
JP3433763B2 (en) Region inside / outside determination method and computer game machine using the same
JPH10198811A (en) Line segment approximating method for tertiary bezier curve
JP2782904B2 (en) Polygon fill method
JP2787510B2 (en) Graphic display device and display method thereof
JP2004030135A (en) Method and program for drawing part of circle in cad system
JPS60201473A (en) Trihedral drawing input device
JPH0253823B2 (en)
JPH06333037A (en) Contour forming method
JPH08287286A (en) Plane image mapping method
JPH08180209A (en) Method and device for extracting points on inside and outside of three-dimensional area and method and device for judging arranging order of points on the same curve
JPH0916787A (en) Start point/end point plotting method for frame line for graphic painting-out
JPS61267096A (en) Smear drawing display unit for polygonal graphic
JPH04253318A (en) Graphic dividing method for exposure with electron beam
JPH0322183A (en) Linear drawing control method
JPH0561987A (en) Polygon painting-out method