JPH05250455A - Graphic containment deciding system in graphic display device - Google Patents

Graphic containment deciding system in graphic display device

Info

Publication number
JPH05250455A
JPH05250455A JP5004492A JP5004492A JPH05250455A JP H05250455 A JPH05250455 A JP H05250455A JP 5004492 A JP5004492 A JP 5004492A JP 5004492 A JP5004492 A JP 5004492A JP H05250455 A JPH05250455 A JP H05250455A
Authority
JP
Japan
Prior art keywords
point
graphic
triangle
rectangular area
display device
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
JP5004492A
Other languages
Japanese (ja)
Inventor
Taro Miyazawa
太郎 宮沢
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.)
Japan Radio Co Ltd
Original Assignee
Japan Radio 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 Japan Radio Co Ltd filed Critical Japan Radio Co Ltd
Priority to JP5004492A priority Critical patent/JPH05250455A/en
Publication of JPH05250455A publication Critical patent/JPH05250455A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Digital Computer Display Output (AREA)

Abstract

PURPOSE:To decide whether a point is contained in the inside of a graphic or not, in the graphic display device which does not have a triangle generator, and in which an FB(frame buffer) does not have a work layer. CONSTITUTION:A rectangular area in which a triangle ABC is inscribed is set, and whether a designated point P belongs to the inside of this triangle ABC or not is decided, based on a total value of angles made by segments AP, BP and CP. In the case the total value is '0' degree, the point P exists in the outside of the triangle ABC, and in the case the value is 360 degrees, the point exists in the inside. Accordingly, even in the case the device does not have a triangle generator, and a frame buffer does not have a work layer, whether a designated arbitrary point P belongs to the inside of a graphic of the triangle ABC, etc., or not can be decided, and a pick processing can be executed.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、グラフィックディスプ
レイ装置における図形包含判定方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic inclusion determination system in a graphic display device.

【0002】[0002]

【従来の技術】従来から、コンピュータグラフィックス
端末としてグラフィックディスプレイ装置が用いられて
いる。グラフィックディスプレイ装置は、通常、CRT
表示器の画面に対応した座標系で図形情報を記憶するフ
レームバッファを備えている。図3には、このような装
置の一例構成が示されている。
2. Description of the Related Art Conventionally, a graphic display device has been used as a computer graphics terminal. Graphic display devices are usually CRTs
A frame buffer for storing graphic information in a coordinate system corresponding to the screen of the display is provided. FIG. 3 shows an example of the configuration of such a device.

【0003】この図に示される装置は、セグメントバッ
ファ(SB)10、グラフィックプロセッサ(GPU)
12、フレームバッファ(FB)14、ビデオジェネレ
ータ(VDG)16及びCRT18から構成されてい
る。SB10は、例えば、ユーザによって作成された図
形に係る図形情報(セグメントデータ)を各種属性値と
共に記憶するバッファであり、再描画の際には、GPU
12はこのSB10から図形情報を読み出してFB14
上にビット展開する。SB10上においては、図形情報
はワールド座標系と呼ばれる論理座標系によって記憶さ
れており、FB14の座標系はCRT18の画面に対応
した物理座標系である。GPU12は、論理座標系から
物理座標系への座標変換を行い、これによりCRT18
の画面上に図形を表示させる。VDG16は、FB14
上のデータに基づきビデオ信号を発生させ、CRT18
に供給する。
The device shown in this figure includes a segment buffer (SB) 10 and a graphic processor (GPU).
12, a frame buffer (FB) 14, a video generator (VDG) 16 and a CRT 18. The SB 10 is, for example, a buffer that stores graphic information (segment data) related to a graphic created by a user together with various attribute values.
12 reads the graphic information from this SB 10 and returns to FB 14
Bit expand on. On the SB 10, the graphic information is stored in a logical coordinate system called the world coordinate system, and the coordinate system of the FB 14 is a physical coordinate system corresponding to the screen of the CRT 18. The GPU 12 performs coordinate conversion from the logical coordinate system to the physical coordinate system, and thereby the CRT 18
Display a figure on the screen. VDG16 is FB14
Generate a video signal based on the above data, CRT18
Supply to.

【0004】また、このような装置においては、図形の
ピック機能も知られている。図形のピックとは、CRT
18の画面に表示された図形のうち任意のものをマウス
等のピックデバイスにより指定する処理である。GPU
12は、ピックに係る図形情報を例えばホストコンピュ
ータに転送し、あるいは指令に応じて必要な処理を施
す。
In such an apparatus, a graphic picking function is also known. A figure pick is a CRT
This is a process of designating any one of the figures displayed on the screen of 18 with a pick device such as a mouse. GPU
Reference numeral 12 transfers the graphic information related to the pick to, for example, the host computer, or performs necessary processing according to the command.

【0005】ピック処理を実行するためには、デバイス
によりカーソル指定された点が当該図形の内部にあるか
否かを判定する必要がある。すなわち、CRT18の画
面上には通常複数個の図形が同時に表示されており、ユ
ーザは、ピックデバイスによってピックしたい図形の内
部の点を指定する。グラフィックディスプレイ装置は、
指定された点がCRT18の画面上に表示されている図
形のいずれの内部に属するかを判定し、ピック対象を決
定する。
In order to execute the pick processing, it is necessary to judge whether or not the point designated by the device by the cursor is inside the figure. That is, a plurality of figures are usually displayed simultaneously on the screen of the CRT 18, and the user designates a point inside the figure to be picked by the pick device. Graphic display device
It is determined which of the figures displayed on the screen of the CRT 18 the designated point belongs to, and the pick target is determined.

【0006】[0006]

【発明が解決しようとする課題】このように、ピック処
理を行うためには点が図形(例えば三角形)の内部に存
在するか否かを判定する必要がある。このような判定を
実行する場合、例えば図4に示されるように、FB14
としてワーク層を有するものを用いる。すなわち、FB
14の層として、各色に係るR,G,B層に加え、ワー
ク層を設け、ワーク層上に三角形発生器により三角形を
描画し、ワーク層に書き込まれた値により点が三角形等
の内部にあるか否かを判定する(特願平4−44697
号参照)。しかし、このような方式は、FB14がワー
ク層を有していない場合や、装置が三角形発生器を有し
ていない場合等に採用することはできない。
As described above, in order to perform the pick process, it is necessary to determine whether or not the point exists inside the figure (for example, a triangle). When performing such a determination, for example, as shown in FIG.
The one having a work layer is used as. That is, FB
As 14 layers, in addition to the R, G, and B layers for each color, a work layer is provided, a triangle is drawn on the work layer by a triangle generator, and the values written in the work layer make the points inside the triangle or the like. It is determined whether there is any (Japanese Patent Application No. 4-44697)
No.). However, such a method cannot be adopted when the FB 14 does not have a work layer or when the apparatus does not have a triangle generator.

【0007】本発明は、このような問題点を解決するこ
とを課題としてなされたものであり、FBがワーク層を
有しておらずかつ装置が三角形発生器を有していない場
合であっても、点が三角形等の図形内部に存在するか否
かを判定可能にすることを目的とする。
The present invention has been made to solve the above problems, and it is a case where the FB does not have a work layer and the apparatus does not have a triangle generator. Also aims at making it possible to determine whether or not a point exists inside a figure such as a triangle.

【0008】[0008]

【課題を解決するための手段】このような目的を達成す
るために、本発明の図形包含判定方式は、表示する図形
の頂点のX及びY座標の最大値及び最小値を求め、これ
らの値により当該図形が内接する矩形領域を設定し、指
定される点がこの矩形領域に属するか否かを判定し、属
すると判定された場合に当該点と当該図形の各頂点とを
結ぶ線分を設定し、これらの線分の交わる角度を合計
し、合計値に基づき当該点が当該図形の内部領域に属す
るか否かを判定することを特徴とする。
In order to achieve such an object, the figure inclusion judging method of the present invention finds the maximum and minimum values of the X and Y coordinates of the vertices of the figure to be displayed, and obtains these values. Set a rectangular area in which the figure is inscribed, and determine whether the specified point belongs to this rectangular area. If it is determined that the specified point belongs, a line segment connecting the point and each vertex of the figure is determined. It is characterized in that it is set, the angles at which these line segments intersect are summed, and whether or not the point belongs to the internal area of the figure is determined based on the total value.

【0009】また、本発明の図形ピック方式は、カーソ
ル指定を伴うピック指令に応じて本発明の図形包含判定
方式を実行し、表示されている図形のうちカーソル指定
された点を包含する図形をピックすることを特徴とす
る。
Further, in the figure picking method of the present invention, the figure inclusion determining method of the present invention is executed in response to a pick command accompanied by cursor designation, and a figure which includes a point designated by the cursor among the displayed figures is selected. Characterized by picking.

【0010】[0010]

【作用】本発明の図形包含判定方式においては、まず、
表示する図形(例えば三角形)の頂点のx及びy座標の
最大値及び最小値が求められる。このような座標値を求
めると、当該図形が内接する矩形領域を設定することが
可能になる。このような矩形領域を設定した上で、例え
ばピック指令等により指定される点がこの矩形領域に属
するか否かを判定する。次に、属すると判定された場合
に当該点と当該図形の各頂点とを結ぶ線分を設定する。
すると、これらの線分の交わる角度を合計した場合に、
合計値により点が当該図形の内部領域に属するか否かを
判定することが可能になる。例えば、図形が三角形であ
れば、当該指定された点が当該図形の内部に存在してい
れば三本の線分のなす角度の合計値は360度となり、
内部に属していなければ0度となる。従って、FBがワ
ーク層を有しておらずまた装置が三角形発生器を有して
いない場合でも、指定された点が図形の内部領域に属す
るか否かを判定することが可能になる。
In the figure inclusion determination method of the present invention, first,
The maximum and minimum values of the x and y coordinates of the vertices of the displayed graphic (eg, triangle) are obtained. Obtaining such coordinate values makes it possible to set a rectangular area inscribed by the figure. After setting such a rectangular area, it is determined whether or not the point designated by the pick command or the like belongs to this rectangular area. Next, when it is determined to belong, a line segment connecting the point and each vertex of the figure is set.
Then, when the angles that intersect these line segments are summed,
The total value makes it possible to determine whether or not the point belongs to the internal area of the figure. For example, if the figure is a triangle, and if the specified point exists inside the figure, the total value of the angles formed by the three line segments is 360 degrees,
If it does not belong to the inside, it will be 0 degrees. Therefore, even if the FB does not have a work layer and the device does not have a triangle generator, it is possible to determine whether the specified point belongs to the internal region of the graphic.

【0011】また、本発明の図形ピック方式において
は、この図形包含判定方式を用いて図形のピックが実行
される。すなわち、カーソル指定などピック指令におい
て本発明の図形包含判定方式を実行することにより、カ
ーソル指定された点を包含する図形を表示されている一
般に複数の中からピックすることが可能となる。
Further, in the figure picking method of the present invention, the figure picking is executed by using this figure inclusion determining method. That is, by executing the figure inclusion determination method of the present invention in a pick command such as a cursor specification, it is possible to generally select a figure including a point specified by the cursor from a plurality of displayed pictures.

【0012】[0012]

【実施例】以下、本発明の好適な実施例について図面に
基づき説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will be described below with reference to the drawings.

【0013】図1及び図2には、本発明の一実施例に係
る図形包含判定方式の原理が示されている。本発明は、
装置構成としては、例えば図3に示されるような構成と
同様の構成で実行することができる。また、装置として
三角形発生器を用いる必要がなく、また、図4に示され
るワーク層を有する必要がない。以下の動作は、例えば
GPU12により実行される。
FIG. 1 and FIG. 2 show the principle of the figure inclusion determination method according to an embodiment of the present invention. The present invention is
As the device configuration, for example, the same configuration as that shown in FIG. 3 can be executed. Also, it is not necessary to use a triangle generator as the device and to have the work layer shown in FIG. The following operation is executed by the GPU 12, for example.

【0014】本実施例においては、まず、画面に表示さ
れている図形(三角形)の頂点のx及びy座標の最大値
及び最小値が求められる。次に、このようにして求めた
座標値により、三角形が内接する矩形領域を設定する。
この矩形領域は、求めた座標値のうちx座標の最小及び
y座標の最小値により特定される点を左下点とし、x座
標の最大値及びy座標の最大値により特定される点を右
上点とする領域である。画面上に三角形が複数表示され
ている場合には、これらの三角形についてそれぞれ図1
に示されるような矩形領域の設定を行う。
In the present embodiment, first, the maximum and minimum values of the x and y coordinates of the vertices of the figure (triangle) displayed on the screen are obtained. Next, the rectangular area inscribed by the triangle is set based on the coordinate values thus obtained.
In this rectangular area, the point specified by the minimum x-coordinate and the minimum y-coordinate of the obtained coordinate values is the lower left point, and the point specified by the maximum x coordinate and the maximum y coordinate is the upper right point. It is the area to be. If multiple triangles are displayed on the screen, each of these triangles is displayed as shown in FIG.
The rectangular area is set as shown in.

【0015】さらに、ピック指令等により指定された点
がこれらの矩形領域に属するか否かの判定を、各矩形領
域毎に実行する。このような判定を行った結果、指定さ
れた点Pがある三角形に係る矩形領域に属すると判定さ
れた場合には、図2に示されるように角度に係る判定を
実行する。すなわち、指定された点Pが三角形ABCの
外部に存在する場合には、線分AP、BP、CPの成す
角度の合計は0度となり(図2(a))、内部に存在す
る場合には360度となる(図2(b))。従って、こ
の合計値に基づく判定を実行することにより、点Pが三
角形ABCの内部に存在するか否かを判定することがで
きる。
Further, it is determined for each rectangular area whether or not the point designated by the pick command or the like belongs to these rectangular areas. As a result of performing such a determination, when it is determined that the designated point P belongs to the rectangular area related to the triangle, the determination related to the angle is executed as shown in FIG. That is, when the designated point P exists outside the triangle ABC, the sum of the angles formed by the line segments AP, BP, and CP is 0 degrees (FIG. 2A), and when it exists inside the triangle. It becomes 360 degrees (FIG. 2B). Therefore, it is possible to determine whether or not the point P exists inside the triangle ABC by executing the determination based on this total value.

【0016】このように、本実施例によれば、ワーク層
を有していないFB14を用いておりかつ装置が三角形
発生器を有していない場合でも、指定された点が三角形
の内部に存在するか否かを判定することができる。従っ
て、画面上に表示されている複数の三角形の中から任意
の1個をカーソル指定によりピックする処理について本
実施例の処理が特に有効である。
As described above, according to this embodiment, even when the FB 14 having no work layer is used and the apparatus does not have the triangle generator, the designated point exists inside the triangle. It can be determined whether or not to do. Therefore, the process of this embodiment is particularly effective for the process of picking an arbitrary one of the plurality of triangles displayed on the screen by designating the cursor.

【0017】また、多角形は三角形に分割することがで
きるため、本発明は多角形一般の認識に適用できる。
Since the polygon can be divided into triangles, the present invention can be applied to the recognition of polygons in general.

【0018】[0018]

【発明の効果】以上説明したように、本発明によれば、
指定された点と図形の各頂点とを結ぶ線分を設定し、こ
れらの線分の交わる角度の合計値に基づき点が図形の内
部領域に属するか否かを判定するようにしたため、装置
が三角形発生器を有しておらずフレームバッファがワー
ク層を有していない場合であっても、点が図形の内部に
存在するか否かを容易に判定可能となり、特にピック処
理を迅速に実行することが可能となる。
As described above, according to the present invention,
Since the line segment that connects the specified point and each vertex of the figure is set, and whether the point belongs to the internal area of the figure is determined based on the total value of the angles at which these line segments intersect, the device Even when the frame generator does not have a triangle generator and the work layer does not have a work layer, it is possible to easily determine whether or not a point exists inside the figure, and especially pick processing can be executed quickly. It becomes possible to do.

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

【図1】本発明の一実施例に係る図形包含判定方式にお
ける矩形領域の設定を示す図である。
FIG. 1 is a diagram showing setting of a rectangular area in a figure inclusion determination method according to an embodiment of the present invention.

【図2】この実施例における三角形内部か否かの判定を
示す図であり、図2(a)は点が外部にある場合、図2
(b)は点が内部にある場合をそれぞれ示す図である。
FIG. 2 is a diagram showing a judgment as to whether or not a triangle is inside the present embodiment, and FIG. 2A shows a case where a point is outside.
(B) is a figure which respectively shows the case where a point exists inside.

【図3】グラフィックディスプレイ装置の一般的な構成
を示す図である。
FIG. 3 is a diagram showing a general configuration of a graphic display device.

【図4】ワーク層を有するフレームバッファ(FB)の
構成を示す図である。
FIG. 4 is a diagram showing a configuration of a frame buffer (FB) having a work layer.

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

14 フレームバッファ(FB) ABC 三角形 P 点 14 frame buffer (FB) ABC triangle P point

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 フレームバッファに図形情報を展開する
ことにより画面上に三角形等の図形を表示させるグラフ
ィックディスプレイ装置において、 表示する図形の頂点のX及びY座標の最大値及び最小値
を求め、これらの値により当該図形が内接する矩形領域
を設定し、 指定される点がこの矩形領域に属するか否かを判定し、 属すると判定された場合に当該点と当該図形の各頂点と
を結ぶ線分を設定し、これらの線分の交わる角度を合計
し、合計値に基づき当該点が当該図形の内部領域に属す
るか否かを判定することを特徴とする図形包含判定方
式。
1. In a graphic display device for displaying a figure such as a triangle on a screen by expanding the figure information in a frame buffer, the maximum and minimum values of the X and Y coordinates of the vertices of the figure to be displayed are obtained, and The rectangular area inscribed by the figure is set by the value of, and it is determined whether the specified point belongs to this rectangular area. If it is determined that the point belongs, the line connecting the point and each vertex of the figure. A figure inclusion determination method characterized by setting minutes, summing the angles at which these line segments intersect, and determining whether or not the point belongs to the internal area of the figure based on the total value.
【請求項2】 カーソル指定を伴うピック指令に応じて
請求項1記載の図形包含判定方式を実行し、表示されて
いる図形のうちカーソル指定された点を包含する図形を
ピックすることを特徴とする図形ピック方式。
2. The figure inclusion determination method according to claim 1 is executed in response to a pick instruction accompanied by cursor designation, and a figure including a point designated by the cursor is picked out of the displayed figures. The figure pick method to do.
JP5004492A 1992-03-06 1992-03-06 Graphic containment deciding system in graphic display device Pending JPH05250455A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5004492A JPH05250455A (en) 1992-03-06 1992-03-06 Graphic containment deciding system in graphic display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5004492A JPH05250455A (en) 1992-03-06 1992-03-06 Graphic containment deciding system in graphic display device

Publications (1)

Publication Number Publication Date
JPH05250455A true JPH05250455A (en) 1993-09-28

Family

ID=12847999

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5004492A Pending JPH05250455A (en) 1992-03-06 1992-03-06 Graphic containment deciding system in graphic display device

Country Status (1)

Country Link
JP (1) JPH05250455A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9015770B2 (en) 2012-04-18 2015-04-21 Mitsubishi Electric Corporation Digital broadcasting reception apparatus and digital broadcasting reception method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9015770B2 (en) 2012-04-18 2015-04-21 Mitsubishi Electric Corporation Digital broadcasting reception apparatus and digital broadcasting reception method

Similar Documents

Publication Publication Date Title
JPH02230470A (en) Computer graphics display system
US5546524A (en) Method and apparatus for interlocking graphical objects
JPH08249502A (en) Method and apparatus for improved graphics picking using auxiliary buffer information
JP2003030682A (en) Graphic processing method using depth parameter help and computer readable recording medium having program of the graphic processing method recorded thereon
JPH05250455A (en) Graphic containment deciding system in graphic display device
JP2660707B2 (en) How to pick 3D figures
WO2000072269A1 (en) Method and apparatus for generating outlines
US5185596A (en) Electronic image modification
JP3433763B2 (en) Region inside / outside determination method and computer game machine using the same
JPH05174118A (en) Graphic display device
JPH10105334A (en) Two-point selected figure moving method by touch panel
JP2575636B2 (en) Graphic display device
JP3268667B2 (en) Interactive polygon selection device
JPH0350686A (en) Graphic processing system
JPH08185531A (en) Image painting-out device
JPS6283790A (en) Image processor
JPH0214373A (en) Three-dimensional point designating system
JP2000163601A (en) Image processor, image processing method and recording medium
JP2667454B2 (en) Plotting device
JP2536948B2 (en) Three-point specified circular arc detection method and device
JPS63141182A (en) Deciding system for graphic passing through specified area
JPS6385978A (en) Graphic editing device
JPH022468A (en) Graphic display device
JPS63118882A (en) Image editing device
JPH0749762A (en) Clip control method for multiwindow system and display device using this method