JPH04291685A - Clip tester circuit and clip testing method - Google Patents
Clip tester circuit and clip testing methodInfo
- Publication number
- JPH04291685A JPH04291685A JP3056725A JP5672591A JPH04291685A JP H04291685 A JPH04291685 A JP H04291685A JP 3056725 A JP3056725 A JP 3056725A JP 5672591 A JP5672591 A JP 5672591A JP H04291685 A JPH04291685 A JP H04291685A
- Authority
- JP
- Japan
- Prior art keywords
- clip
- straight line
- register
- frame
- display area
- 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
Links
Landscapes
- Image Generation (AREA)
Abstract
Description
【0001】0001
【産業上の利用分野】この発明は画面上に直線などを表
示するグラフィック表示装置において、画面上でクリッ
プ枠によって境界を示される表示領域内に直線が含まれ
る(以後、クリップインと称す)か、または含まれない
(以後、クリップアウトと称す)か、または直線の一部
が含まれる(以後、実クリップと称す)かを調べ、実ク
リップ時においては、直線と交差するクリップ枠を判別
するクリップテストを実行するクリップ・テスタ回路及
びクリップ・テスト方法に関するものである。[Industrial Field of Application] This invention relates to a graphic display device that displays straight lines, etc. on a screen. , or not included (hereinafter referred to as clip-out), or whether a part of the straight line is included (hereinafter referred to as actual clip), and in the case of actual clipping, determines the clip frame that intersects with the straight line. The present invention relates to a clip tester circuit for performing a clip test and a clip test method.
【0002】0002
【従来の技術】従来、グラフィック表示装置において指
定された表示領域に含まれる図形を表示する際に、図形
が表示領域に含まれるかどうかを判定する方法には、C
ohen−Sutherlandによる領域のコード化
を用いる方法がとられた。文献「対話型コンピュータグ
ラフィックス」マグロヒル出版のPP.74−77には
、そのアルゴリズムについての詳細が説明されている。2. Description of the Related Art Conventionally, when displaying a figure included in a designated display area in a graphic display device, a method for determining whether the figure is included in the display area has been used.
An approach was taken using Ohen-Sutherland's domain coding. Literature “Interactive Computer Graphics” McGraw-Hill Publishing PP. 74-77 describe the algorithm in detail.
【0003】図4はCohen−Sutherland
のクリップコードを示す図である。表示領域は4つのク
リップ枠 X=Xmax X=Xmin Y=Yma
x Y=Ymin によって囲まれる長方形領域である
。4つのクリップ枠で分割された9個の領域にクリップ
コードが割り当てられ、クリップテストを行う際には、
直線の始点と終点が属するクリップコードを用いる。FIG. 4 shows the Cohen-Sutherland
It is a figure which shows the clip code of. The display area is four clip frames X=Xmax X=Xmin Y=Yma
It is a rectangular area surrounded by x Y=Ymin. Clip codes are assigned to nine areas divided by four clip frames, and when performing a clip test,
Use the clip code to which the start and end points of the straight line belong.
【0004】次に、クリップコードについて説明する。
クリップコードは4ビットで構成されており、右から第
0ビット、第1ビット、第2ビット、第3ビットと称す
る。第0ビットはクリップ枠 X=Xmin 、第1ビ
ットはクリップ枠 X=Xmax 、第2ビットはクリ
ップ枠 Y=Ymin 、第3ビットはクリップ枠 Y
=Ymax と点との関係を示すものである。Next, the clip code will be explained. The clip code is composed of 4 bits, which are called 0th bit, 1st bit, 2nd bit, and 3rd bit from the right. The 0th bit is the clip frame X=Xmin, the 1st bit is the clip frame X=Xmax, the 2nd bit is the clip frame Y=Ymin, the 3rd bit is the clip frame Y
This shows the relationship between =Ymax and a point.
【0005】図5はクリップコード生成のフローチャー
トである。図5を用いてクリップコードのビットの生成
手順を説明する。クリップコードの第0ビットは点のX
座標とクリップ枠 X=Xmin を比較して、X座標
< Xmin の場合 ■1”、X座標≧ Xmi
n の場合 ■0■、クリップコードの第1ビットは点
のX座標とクリップ枠X=Xmax を比較して、X座
標 > Xmax の場合”1”、X座標 ≦ X
max の場合”0”、クリップコードの第2ビットは
点のY座標とクリップ枠Y=Ymin を比較して、Y
座標 < Ymin の場合”1”、Y座標 ≧
Ymin の場合”0”、クリップコードの第3ビット
は点のY座標とクリップ枠 Y=Ymax を比較して
、Y座標> Ymax の場合”1”、Y座標 ≦
Ymax の場合”0”となる。このようにして、点の
X座標、Y座標とクリップ枠の比較によってクリップコ
ードは生成される。FIG. 5 is a flowchart of clip code generation. The procedure for generating clip code bits will be explained using FIG. 5. The 0th bit of the clip code is the point X
Compare the coordinates and the clipping frame X=Xmin, and if X coordinate < Xmin ■1", X coordinate ≥
If n, the first bit of the clip code compares the X coordinate of the point with the clip frame X = Xmax, and if the X coordinate > Xmax, it is "1", and the
max is “0”, the second bit of the clip code compares the Y coordinate of the point and the clip frame Y=Ymin, and calculates Y
“1” if coordinate < Ymin, Y coordinate ≧
If Ymin, the third bit of the clip code compares the Y coordinate of the point with the clip frame Y=Ymax, and if Y coordinate > Ymax, it is "1", and if Y coordinate ≦
In the case of Ymax, it becomes "0". In this way, a clip code is generated by comparing the X and Y coordinates of a point with the clip frame.
【0006】図6はクリップコードを用いたクリップテ
スト方法のフローチャートである。図6を用いてクリッ
プコードを用いたクリップテスト方法を説明する。上記
の方法で求めた始点のクリップコード(以下、Scod
e という)と終点のクリップコード(以下、Ecod
e という)間で、次に述べる論理演算により直線と表
示領域との関係を判別する。FIG. 6 is a flowchart of a clip test method using a clip code. A clip test method using a clip code will be explained with reference to FIG. The clip code (hereinafter referred to as Scod) of the starting point obtained using the above method
e) and the end point clip code (hereinafter referred to as Eco
e), the relationship between the straight line and the display area is determined by the following logical operation.
【0007】直線の始点と終点のクリップコードの論理
和(Scode OREcode)を求め、その値が”
0000”であれば表示領域内に直線が存在するクリッ
プインである。クリップインでないもので上記の始点と
終点のクリップコードの論理積(Scode AND
Ecode )を求め、その値が”0000”でなけれ
ば表示領域外に直線が存在するクリップアウトである。
クリップインおよびクリップアウトでないものは表示領
域と直線が交差する実クリップである。[0007] Find the logical sum (Scode OREcode) of the clip codes at the starting point and ending point of the straight line, and find out that the value is "
0000", it is a clip-in in which a straight line exists in the display area. If it is not a clip-in, the logical product (Scode AND) of the above clip codes of the start point and end point is
If the value is not "0000", there is a straight line outside the display area, indicating clip-out. Clips that are not clip-in or clip-out are real clips where a straight line intersects the display area.
【0008】また、直線の始点と終点のクリップコード
の排他的論理和(Scode XOR Ecode)を
とることにより直線とクリップ枠の関係を示すデータが
得られる。この直線とクリップ枠の関係を示すデータの
第0ビットは X=Xmin 、第1ビットは X=X
max 、第2ビットは Y=Ymin 、第3ビット
は Y=Ymax のクリップ枠と直線の関係を示し、
ビットが”0”の場合はクリップ枠と交わらず、ビット
が”1”の場合にはクリップ枠と交わることを示す。以
上のように直線の始点と終点のクリップコードの論理演
算によって、直線とクリップ枠の関係を調べるクリップ
テストが行える。[0008] Furthermore, data indicating the relationship between the straight line and the clip frame can be obtained by calculating the exclusive OR (Scode The 0th bit of the data indicating the relationship between this straight line and the clipping frame is X=Xmin, and the 1st bit is X=X
max, the second bit indicates Y=Ymin, and the third bit indicates the relationship between the clip frame and the straight line of Y=Ymax,
When the bit is "0", it does not intersect with the clip frame, and when the bit is "1", it indicates that it intersects with the clip frame. As described above, a clip test can be performed to examine the relationship between a straight line and a clip frame by logically calculating the clip codes at the start and end points of the straight line.
【0009】従来はこのようなクリップコード生成及び
クリップテストをソフトウェアで処理していた。Conventionally, such clip code generation and clip testing have been processed by software.
【0010】0010
【発明が解決しようとする課題】上記のクリップコード
を用いたクリップ・テストをソフトウェアで行うには、
クリップコード生成のために直線の始点、終点のX座標
、Y座標と4つの各クリップ枠との比較を行う比較演算
、直線と表示領域の関係を求めるための直線の始点、終
点のクリップコードの論理積、論理和演算、直線とクリ
ップ枠の関係を求めるための直線の始点、終点のクリッ
プコードの排他的論理和演算を行わねばならず、処理時
間が大きいという問題点があった。[Problem to be Solved by the Invention] To perform the clip test using the above clip code using software,
A comparison operation that compares the X and Y coordinates of the starting point and ending point of a straight line with each of the four clip frames to generate a clip code, and a comparison operation that compares the starting point and ending point of the straight line to find the relationship between the straight line and the display area. There is a problem in that a logical product, a logical sum operation, and an exclusive logical sum operation of the clip codes of the starting point and the ending point of the straight line must be performed to find the relationship between the straight line and the clipping frame, and the processing time is large.
【0011】この発明は、上記のような問題点を解消す
るためになされたもので、直線の始点、終点のクリップ
コード、直線と表示領域の関係、直線とクリップ枠との
関係を高速に得ることをができるクリップテスタ回路及
びクリップテスト方法を得ることを目的とする。The present invention was made to solve the above-mentioned problems, and it is possible to quickly obtain the clip codes of the starting point and end point of a straight line, the relationship between the straight line and the display area, and the relationship between the straight line and the clip frame. The object of the present invention is to obtain a clip tester circuit and a clip test method that can perform the following steps.
【0012】0012
【課題を解決するための手段】この発明に係わるクリッ
プ・テスタ回路は、直線の始点座標を保持する始点レジ
スタと、直線の終点座標を保持する終点レジスタと、表
示領域の境界を示すクリップ枠を保持するクリップ枠レ
ジスタと、上記の始点レジスタの始点座標データ、終点
レジスタの終点座標データとクリップ枠レジスタのクリ
ップ枠データとを比較する複数の比較器と、上記比較器
から出力される直線の始点、終点と表示領域の関係のデ
ータから、直線と表示領域の関係と直線とクリップ枠の
関係を示すデータを生成する論理合成回路とを備えたも
のである。[Means for Solving the Problems] A clip tester circuit according to the present invention includes a start point register that holds the starting point coordinates of a straight line, an end point register that holds the end point coordinates of the straight line, and a clip frame that indicates the boundary of a display area. A plurality of comparators that compare the held clip frame register, the start point coordinate data of the above start point register, the end point coordinate data of the end point register, and the clip frame data of the clip frame register, and the start point of the straight line output from the above comparator. , a logic synthesis circuit that generates data indicating the relationship between the straight line and the display area and the relationship between the straight line and the clipping frame from data on the relationship between the end point and the display area.
【0013】この発明に係わるクリップ・テスト方法は
、直線の始点座標と、直線の終点座標と、画面上で表示
領域の境界を示すクリップ枠の座標を複数の比較器で同
時に比較する比較工程と、上記の比較工程から出力され
る始点、終点の座標と表示領域の位置関係を示すデータ
から、直線が表示領域内部にあることを示すデータを生
成する処理と、直線が表示領域外にあることを示すデー
タを生成する処理と、直線が表示領域と交差するときに
直線と交差するクリップ枠の種類を示すデータを生成す
る処理とを同時に実行する論理合成工程を備えたもので
ある。The clip test method according to the present invention includes a comparison step of simultaneously comparing the starting point coordinates of a straight line, the ending point coordinates of a straight line, and the coordinates of a clipping frame indicating the boundary of a display area on the screen using a plurality of comparators. , A process of generating data indicating that the straight line is inside the display area from data indicating the positional relationship between the coordinates of the start point and the end point and the display area output from the above comparison process, and that the straight line is outside the display area. The present invention includes a logical synthesis process that simultaneously performs processing for generating data indicating the line and data indicating the type of clip frame that intersects the straight line when the line intersects the display area.
【0014】[0014]
【作用】この発明におけるクリップ・テスタ回路は、入
力された直線の始点座標を始点レジスタが保持し、直線
の終点座標を終点レジスタが保持し、表示領域の境界を
示すクリップ枠座標をクリップ枠レジスタが保持する。
始点レジスタのデータとクリップ枠レジスタのデータを
比較器で比較して始点のクリップコードを生成し、終点
レジスタのデータとクリップ枠レジスタのデータを比較
器で比較して終点のクリップコードを生成する。直線の
始点、終点と表示領域の関係を示すクリップコードは論
理合成回路に入力され、直線と表示領域の関係を示すデ
ータと直線とクリップ枠の関係を示すデータが生成され
る。[Operation] In the clip tester circuit according to the present invention, the starting point register holds the starting point coordinates of the input straight line, the ending point register holds the ending point coordinates of the straight line, and the clipping frame coordinates indicating the boundary of the display area are held in the clipping frame register. holds. A comparator compares data in the start point register and data in the clip frame register to generate a clip code for the start point, and a comparator compares data in the end point register and data in the clip frame register to generate a clip code for the end point. A clip code indicating the relationship between the starting point and end point of the straight line and the display area is input to a logic synthesis circuit, and data indicating the relationship between the straight line and the display area and data indicating the relationship between the straight line and the clip frame are generated.
【0015】この発明におけるクリップ・テスト方法は
、比較工程が、直線の始点座標と、直線の終点座標と、
画面上で表示領域の境界を示すクリップ枠の座標を複数
の比較器で同時に比較するので、クリップコード生成の
ために直線の始点、終点のX座標、Y座標と4つの各ク
リップ枠との比較を行う比較演算が同時に高速に実行さ
れる。そして、論理合成工程が、上記の比較工程から出
力される始点、終点の座標と表示領域の位置関係を示す
データから、直線が表示領域内部にあることを示すデー
タを生成する処理と、直線が表示領域外にあることを示
すデータを生成する処理と、直線が表示領域と交差する
ときに直線と交差するクリップ枠の種類を示すデータを
生成する処理とを同時に実行するので、直線と表示領域
の関係を求めるための直線の始点、終点のクリップコー
ドの論理積演算と論理和演算、及び、直線とクリップ枠
の関係を求めるための直線の始点、終点のクリップコー
ドの排他的論理和演算が同時に高速に実行される。[0015] In the clip test method according to the present invention, the comparison step includes the coordinates of the starting point of the straight line, the coordinates of the ending point of the straight line,
Since the coordinates of the clip frames that indicate the boundaries of the display area on the screen are compared simultaneously using multiple comparators, the X and Y coordinates of the starting point and end point of the straight line are compared with each of the four clip frames to generate a clip code. Comparison operations that perform the following are executed simultaneously and at high speed. Then, the logic synthesis process generates data indicating that the straight line is inside the display area from the data indicating the coordinates of the start point and end point output from the comparison process and the positional relationship of the display area, and the process of generating data indicating that the straight line is inside the display area. The process of generating data indicating that the line is outside the display area and the process of generating data indicating the type of clipping frame that intersects the line when the line intersects the display area are executed at the same time. The AND operation and OR operation of the clip codes at the start point and end point of a straight line to find the relationship between the straight line and the exclusive OR operation of the clip codes at the start point and end point of the straight line to find the relationship between the straight line and the clip frame are performed. executed at high speed at the same time.
【0016】[0016]
【実施例】実施例1.以下、この発明の一実施例を図に
ついて説明する。図1はこの発明に係わるクリップ・テ
スタ回路の構成を示す図である。11は直線の始点座標
を保持する始点レジスタ、12は直線の終点座標を保持
する終点レジスタ、13は表示領域の境界を示すクリッ
プ枠座標を保持するクリップ枠レジスタ、14は複数の
比較器を備え、始点レジスタ11のデータとクリップ枠
レジスタ13のデータの比較、および、終点レジスタ1
2のデータとクリップ枠レジスタ13のデータを比較す
る比較回路、15は比較回路14の出力データである直
線の始点、終点と表示領域との関係を示すクリップコー
ドを直線とクリップ枠の関係を示すデータに変換する論
理合成回路である。141、142、143、144、
145、146、147、148は比較回路14を構成
する比較器である。161、162、163、164は
それぞれ比較器141、142、143、144の出力
線である。165、166、167、168はそれぞれ
比較器145、146、147、148の出力線である
。[Example] Example 1. An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing the configuration of a clip tester circuit according to the present invention. 11 is a start point register that holds the starting point coordinates of a straight line; 12 is an end point register that holds the end point coordinates of the straight line; 13 is a clip frame register that holds clip frame coordinates that indicate the boundary of the display area; and 14 is provided with a plurality of comparators. , Comparison of data in start point register 11 and data in clip frame register 13, and comparison of data in start point register 11 and end point register 1
15 is a comparison circuit that compares the data of 2 and the data of the clip frame register 13; 15 is the output data of the comparison circuit 14, which is a clip code that indicates the relationship between the start point and end point of the straight line and the display area; and 15, the clip code that indicates the relationship between the straight line and the clip frame. This is a logic synthesis circuit that converts data into data. 141, 142, 143, 144,
Comparators 145, 146, 147, and 148 constitute the comparison circuit 14. 161, 162, 163, and 164 are output lines of comparators 141, 142, 143, and 144, respectively. 165, 166, 167, and 168 are output lines of comparators 145, 146, 147, and 148, respectively.
【0017】図2はこの発明に係わる論理合成回路の一
例を示す図である。21は直線の始点と終点のクリップ
コードから直線がクリップインであるかを判別するクリ
ップイン判別回路、22は直線の始点と終点のクリップ
コードから直線がクリップアウトであるかを判別するク
リップアウト判別回路、23は直線の始点と終点のクリ
ップコードから直線が横切っているクリップ枠を示すデ
ータを生成する実クリップ枠判別回路である。FIG. 2 is a diagram showing an example of a logic synthesis circuit according to the present invention. 21 is a clip-in determination circuit that determines whether a straight line is clip-in based on the clip codes at the start and end points of the straight line, and 22 is a clip-out determination circuit that determines whether the straight line is clip-out from the clip codes at the start and end points of the straight line. A circuit 23 is an actual clip frame discrimination circuit that generates data indicating the clip frame crossed by the straight line from the clip codes at the start and end points of the straight line.
【0018】上記のように構成された本実施例について
その動作を説明する。まず最初に、クリップ枠である
X=Xmin,X=Xmax,Y=Ymin,Y=Ym
ax の値がクリップ枠レジスタ13に設定され、直
線の始点のX座標データとY座標データが始点レジスタ
11に設定され、直線の終点のX座標データとY座標デ
ータが終点レジスタ12に設定される。The operation of this embodiment configured as described above will be explained. First of all, the clip frame
X=Xmin, X=Xmax, Y=Ymin, Y=Ym
The value of ax is set in the clip frame register 13, the X coordinate data and Y coordinate data of the starting point of the straight line are set in the starting point register 11, and the X coordinate data and Y coordinate data of the ending point of the straight line are set in the ending point register 12. .
【0019】比較器141には始点レジスタ11のX座
標データ(Sx)とクリップ枠レジスタ13のクリップ
枠 X=Xmin データが入力され、上記2つのデー
タを比較する。比較結果が Sx ≧ Xmin の場
合、比較器141は出力線161に”0”を出力し、S
x < Xminの場合、比較器141は出力線16
1に”1”を出力する。比較器142には始点レジスタ
11のX座標データ(Sx)とクリップ枠レジスタ13
のクリップ枠 X=Xmax データが入力され、上記
2つのデータを比較する。比較結果が Sx ≦ Xm
ax の場合、比較器142は出力線162に”0”を
出力し、Sx > Xmax の場合、比較器142
は出力線162に”1”を出力する。比較器143には
始点レジスタ11のY座標データ(Sy)とクリップ枠
レジスタ13のクリップ枠 Y=Ymin データが入
力され、上記2つのデータを比較する。比較結果が S
y ≧Ymin の場合、比較器143は出力線163
に”0”を出力し、Sy < Ymin の場合、比
較器143は出力線163に”1”を出力する。比較器
144には始点レジスタ11のY座標データ(Sy)と
クリップ枠レジスタ13のクリップ枠 Y=Ymax
データが入力され、上記2つのデータを比較する。
比較結果が Sy ≦ Xmax の場合、比較器14
4は出力線164に”0”を出力し、Sy > Ym
ax の場合、比較器144は出力線164に”1”を
出力する。The comparator 141 receives the X coordinate data (Sx) of the starting point register 11 and the clip frame X=Xmin data of the clip frame register 13, and compares the two data. If the comparison result is Sx ≧ Xmin, the comparator 141 outputs "0" to the output line 161, and S
If x < Xmin, comparator 141 connects output line 16
Output “1” to 1. The comparator 142 contains the X coordinate data (Sx) of the start point register 11 and the clip frame register 13.
Clip frame X=Xmax data is input, and the above two data are compared. The comparison result is Sx ≦ Xm
ax, the comparator 142 outputs “0” to the output line 162, and when Sx > Xmax, the comparator 142 outputs “0” to the output line 162.
outputs “1” to the output line 162. The Y coordinate data (Sy) of the start point register 11 and the clip frame Y=Ymin data of the clip frame register 13 are input to the comparator 143, and the two data are compared. The comparison result is S
If y≧Ymin, the comparator 143 outputs the output line 163
If Sy < Ymin, the comparator 143 outputs “1” to the output line 163. The comparator 144 contains the Y coordinate data (Sy) of the start point register 11 and the clip frame of the clip frame register 13. Y=Ymax
Data is input and the two data are compared. If the comparison result is Sy ≦ Xmax, the comparator 14
4 outputs "0" to the output line 164, and Sy > Ym
In the case of ax, the comparator 144 outputs "1" on the output line 164.
【0020】比較器145は終点レジスタ12のX座標
データ(Ex)とクリップ枠レジスタ13のクリップ枠
X=Xmin データが入力され、上記2つのデータ
を比較する。比較結果が Ex ≧ Xmin の場合
、比較器145は出力線165に”0”を出力し、Ex
< Xmin の場合、比較器145は出力線16
5に”1”を出力する。比較器146は終点レジスタ1
2のX座標データ(Ex)とクリップ枠レジスタ13の
クリップ枠 X=Xmax データが入力され、上記2
つのデータを比較する。比較結果が Ex ≦ Xma
x の場合、比較器146は出力線166に”0”を出
力し、Ex > Xmax の場合、比較器146は
出力線166に”1”を出力する。比較器147は終点
レジスタ12のY座標データ(Ey)とクリップ枠レジ
スタ13のクリップ枠 Y=Ymin データが入力さ
れ、上記2つのデータを比較する。比較結果が Ey
≧ Ymin の場合、比較器147は出力線167に
”0”を出力し、Ey < Ymin の場合、比較
器147は出力線167に”1”を出力する。比較器1
48は終点レジスタ12のY座標データ(Ey)とクリ
ップ枠レジスタ13のクリップ枠 Y=Ymax デー
タが入力され、上記2つのデータを比較する。比較結果
が Ey ≦ Ymax の場合、比較器148は出力
線168に”0”を出力し、Ey > Ymax の
場合、比較器148は出力線168に”0”を出力する
。The comparator 145 receives the X coordinate data (Ex) of the end point register 12 and the clip frame X=Xmin data of the clip frame register 13, and compares the two data. If the comparison result is Ex ≧ Xmin, the comparator 145 outputs "0" to the output line 165, and Ex
<Xmin, comparator 145 connects output line 16
Output “1” to 5. Comparator 146 is end point register 1
The X coordinate data (Ex) of 2 and the clip frame X=Xmax data of the clip frame register 13 are input, and the
Compare two data. The comparison result is Ex ≦ Xma
If Ex > Xmax, the comparator 146 outputs a “0” on the output line 166, and if Ex > Xmax, the comparator 146 outputs a “1” on the output line 166. The comparator 147 receives the Y coordinate data (Ey) of the end point register 12 and the clip frame Y=Ymin data of the clip frame register 13, and compares the two data. The comparison result is Ey
When ≧Ymin, the comparator 147 outputs “0” to the output line 167, and when Ey<Ymin, the comparator 147 outputs “1” to the output line 167. Comparator 1
Reference numeral 48 inputs the Y coordinate data (Ey) of the end point register 12 and the clip frame Y=Ymax data of the clip frame register 13, and compares the above two data. If the comparison result is Ey≦Ymax, the comparator 148 outputs “0” to the output line 168, and if Ey>Ymax, the comparator 148 outputs “0” to the output line 168.
【0021】4本の出力線161、162、163、1
64は直線の始点のクリップコード(Scode )を
示し、161はScode の第0ビット、162は第
1ビット、163は第2ビット、164は第3ビットに
それぞれ対応する。また、4本の出力線165、166
、167、168は直線の終点のクリップコード(Ec
ode )を示し、165はEcode の第0ビット
、166は第1ビット、167は第2ビット、168は
第3ビットにそれぞれ対応する。Four output lines 161, 162, 163, 1
64 indicates a clip code (Scode) at the starting point of the straight line, 161 corresponds to the 0th bit, 162 corresponds to the first bit, 163 corresponds to the second bit, and 164 corresponds to the third bit, respectively. In addition, four output lines 165, 166
, 167, 168 are the clip codes (Ec
ode ), 165 corresponds to the 0th bit, 166 corresponds to the first bit, 167 corresponds to the second bit, and 168 corresponds to the third bit, respectively.
【0022】次に、論理合成回路15についてその動作
を説明する。比較回路14の出力線161、162、1
63、164で示される直線の始点のクリップコード(
Scode )と比較回路14の出力線165、166
、167、168で示される直線の終点のクリップコー
ド(Ecode )より直線とクリップ枠との関係を示
すデータを生成する。Next, the operation of the logic synthesis circuit 15 will be explained. Output lines 161, 162, 1 of comparison circuit 14
The clip code of the starting point of the straight line indicated by 63 and 164 (
Code ) and the output lines 165 and 166 of the comparison circuit 14
, 167, and 168, data indicating the relationship between the straight line and the clipping frame is generated from the clip codes (Ecode) at the end points of the straight line.
【0023】クリップイン判別回路21は1つのNOR
ゲートで構成されており、Scode とEcode
が入力される。
クリップイン判別回路21はScode とEcode
がともに”0000”である時、つまりクリップイン
の場合に”1”を出力し、Scode とEcode少
なくとも一方が”0000”でないとき、つまりクリッ
プインでない場合に”0”を出力する。The clip-in determination circuit 21 has one NOR
It consists of gates, Scode and Ecode.
is input. The clip-in discrimination circuit 21 has Scode and Ecocode.
When both are "0000", that is, in the case of clip-in, "1" is output, and when at least one of Scode and Ecode is not "0000", that is, when it is not clip-in, "0" is output.
【0024】クリップアウト判別回路22は4つのAN
D ゲートと1つのORゲートで構成されており、Sc
ode とEcode が入力され、Scode とE
code の論理積が”0000”かどうかを判別する
。論理積が”0000”でないとき、つまりクリップア
ウトの場合クリップアウト判別回路22は”1”を出力
し、”0000”であるとき、つまりクリップアウトで
ない場合は”0”を出力する。
クリップインでもなく、クリップアウトでもないときは
実クリップ枠判別回路23が有効になる。The clip-out determination circuit 22 has four ANs.
It consists of a D gate and one OR gate, and Sc
ode and Ecode are input, and Scode and E
Determine whether the logical product of code is "0000". When the logical product is not "0000", that is, in the case of clip-out, the clip-out determination circuit 22 outputs "1", and when it is "0000", that is, in the case that it is not clip-out, it outputs "0". When neither clip-in nor clip-out occurs, the actual clip frame determination circuit 23 is enabled.
【0025】実クリップ枠判定回路23は4つのXOR
ゲートで構成され、Scode とEcode が入
力され、直線とクリップ枠が交わる場合にはそのクリッ
プ枠に対応するビットが”1”、交わらない場合は”0
”となる Scode XOR Ecodeの演算結果
が出力される。The actual clip frame determination circuit 23 has four XOR
It consists of a gate, and Code and Ecode are input, and if the straight line and the clip frame intersect, the bit corresponding to that clip frame is “1”, and if it does not intersect, the bit is “0”.
” The calculation result of Code XOR Ecode is output.
【0026】次に、図3を用いて具体例を説明する。ま
ず、直線31、直線32、直線33のScode とE
code を生成する。それぞれの直線の始点座標と終
点座標が始点レジスタ11と終点レジスタ12にセット
され、クリップ枠の座標がクリップ枠レジスタ13にセ
ットされる。
比較器141、142、143、144で始点レジスタ
11のデータとクリップ枠レジスタ13のデータが比較
されてScode が生成される。比較器145、14
6、147、148で終点レジスタ12のデータとクリ
ップ枠レジスタ13のデータが比較されて、Ecode
が生成される。直線31のScode は”0000
”、Ecode は”0000”、直線32のScod
e は”0100”、Ecode は”0110”、直
線33のScode は”0001”、Ecode は
”1000”である。Next, a specific example will be explained using FIG. First, the Scode and E of straight line 31, straight line 32, and straight line 33
Generate code. The starting point coordinates and ending point coordinates of each straight line are set in the starting point register 11 and ending point register 12, and the coordinates of the clipping frame are set in the clipping frame register 13. Comparators 141, 142, 143, and 144 compare the data in the starting point register 11 and the data in the clipping frame register 13 to generate a Code. Comparators 145, 14
At steps 6, 147, and 148, the data in the end point register 12 and the data in the clip frame register 13 are compared, and the Eco
is generated. The code of straight line 31 is “0000”
”, Ecode is “0000”, Scod of straight line 32
e is "0100", Ecode is "0110", Scode of the straight line 33 is "0001", and Ecode is "1000".
【0027】これらのクリップコードは論理合成回路1
5に入力され、直線とクリップ枠の関係を示すデータに
変換される。クリップイン判別回路21ではScode
OR Ecodeの演算が実行される。演算結果は直
線31では”0000”、直線32では”0110”、
直線33では”1001”である。クリップイン判別回
路21は、クリップイン条件(演算結果が”0000”
である)を満たす直線31場合は”1”を、クリップイ
ンでない条件(演算結果が”0000”でない)を満た
す直線32、直線33の場合は”0”を出力する。These clip codes are used by the logic synthesis circuit 1
5, and is converted into data indicating the relationship between the straight line and the clipping frame. In the clip-in discrimination circuit 21, the code
The OR Ecocode operation is executed. The calculation result is "0000" for straight line 31, "0110" for straight line 32,
In the straight line 33, it is "1001". The clip-in determination circuit 21 determines whether the clip-in condition (the calculation result is "0000")
If the straight line 31 satisfies the above condition, "1" is output, and if the straight line 32 or 33 satisfies the non-clip-in condition (the calculation result is not "0000"), "0" is output.
【0028】クリップアウト判別回路22では、Sco
de AND Ecode の演算が実行される。演算
結果は直線31では”0000”、直線32では”01
00”、直線33では”0000”である。クリップア
ウト判別回路22は、クリップアウト条件(演算結果が
”0000”でない)を満たす直線32の場合は”1”
を、クリップアウトでない条件(演算結果が”0000
”である)を満たす直線31、直線33の場合は”0”
を出力する。In the clip-out determination circuit 22, the Sco
The operation de AND Ecode is executed. The calculation result is "0000" for straight line 31 and "01" for straight line 32.
00", and "0000" for the straight line 33. The clip-out determination circuit 22 outputs "1" for the straight line 32 that satisfies the clip-out condition (the calculation result is not "0000").
, if the condition is not clip out (the calculation result is "0000")
"0" for straight line 31 and straight line 33 that satisfy
Output.
【0029】以上のようにして、論理合成回路15によ
り直線31はクリップイン、直線32はクリップアウト
であることが示される。直線33はクリップインでもク
リップアウトでもないので実クリップとみなされ、実ク
リップ枠判別回路23が有効となる。As described above, the logic synthesis circuit 15 indicates that the straight line 31 is clip-in and the straight line 32 is clip-out. Since the straight line 33 is neither clip-in nor clip-out, it is regarded as a real clip, and the real clip frame determination circuit 23 becomes effective.
【0030】実クリップ枠判別回路23では Scod
e XOR Ecode の演算が実行される。演算
結果は直線31では”0000”、直線32は”001
0”、直線33は”1001”である。直線32はクリ
ップ枠 Xmax と交わるので第1ビットが”1”、
直線33はクリップ枠 Xminと Ymax と交わ
るので第0ビット、第3ビットが”1”である演算結果
が得られる。実クリップ枠判別回路23はこの演算結果
データを出力する。In the real clip frame discrimination circuit 23, Scod
The operation e XOR Ecode is performed. The calculation result is "0000" for straight line 31 and "001" for straight line 32.
0", the straight line 33 is "1001". Since the straight line 32 intersects the clip frame Xmax, the first bit is "1",
Since the straight line 33 intersects the clip frames Xmin and Ymax, an arithmetic result in which the 0th bit and the 3rd bit are "1" is obtained. The actual clip frame determination circuit 23 outputs this calculation result data.
【0031】以上のように、この実施例では、画面上に
直線などを表示するグラフィック表示装置において、直
線の始点座標を保持する始点レジスタと、直線の終点座
標を保持する終点レジスタと、画面上で表示領域の境界
を示すクリップ枠の座標値を保持するクリップ枠レジス
タと、上記始点レジスタ、終点レジスタのデータと上記
クリップ枠レジスタのデータを比較する複数の比較器と
、上記の複数の比較器から出力される始点、終点の座標
と表示領域の位置関係を示すデータから直線とクリップ
枠との関係を表すデータを生成する論理合成回路を備え
ることを特徴とするクリップ・テスタ回路を説明した。As described above, in this embodiment, in a graphic display device that displays a straight line or the like on the screen, a start point register that holds the starting point coordinates of the straight line, an end point register that holds the end point coordinates of the straight line, and a clip frame register that holds the coordinate values of the clip frame that indicates the boundary of the display area; a plurality of comparators that compare data in the start point register and end point register with data in the clip frame register; and a plurality of comparators described above. The clip tester circuit is characterized in that it is equipped with a logic synthesis circuit that generates data representing the relationship between a straight line and a clip frame from data representing the coordinates of the start point and end point and the positional relationship of the display area output from the clip tester circuit.
【0032】また、この実施例では、論理合成回路が、
入力されるデータから直線が表示領域内部にあることを
示すデータを生成する論理回路と、直線が表示領域外に
あることを示すデータを生成する論理回路と、直線が表
示領域と交差するときに直線と交差するクリップ枠の種
類を示すデータを生成する論理回路とから構成されたこ
とを特徴とするクリップ・テスタ回路を説明した。Furthermore, in this embodiment, the logic synthesis circuit is
A logic circuit generates data indicating that the straight line is inside the display area from input data, a logic circuit generates data indicating that the straight line is outside the display area, and a logic circuit generates data indicating that the straight line is outside the display area. The clip tester circuit is characterized in that it is comprised of a logic circuit that generates data indicating the type of clip frame that intersects with a straight line.
【0033】実施例2.なお、上記実施例では、直線の
始点座標を保持する始点レジスタと、直線の終点座標を
保持する終点レジスタと、画面上で表示領域の境界を示
すクリップ枠の座標値を保持するクリップ枠レジスタは
、個々に分かれて存在している場合を示したが、これら
のレジスタは同一のレジスタ内にそれぞれ存在する場合
でも構わない。Example 2. In the above embodiment, a start point register that holds the starting point coordinates of a straight line, an end point register that holds the end point coordinates of the straight line, and a clip frame register that holds the coordinate values of the clip frame that indicates the boundary of the display area on the screen are Although the case where these registers exist separately is shown, these registers may exist in the same register.
【0034】[0034]
【発明の効果】この発明は、以上説明したように構成さ
れているので、以下に示されるような効果を奏する。[Effects of the Invention] Since the present invention is constructed as described above, it produces the following effects.
【0035】クリップ枠のデータと直線の始点座標デー
タ、終点座標データの比較を複数の比較器から構成され
た比較回路(あるいは比較工程)によって行われるので
、高速にクリップコード生成が行える。Since the data of the clipping frame and the starting point coordinate data and the ending point coordinate data of the straight line are compared by a comparison circuit (or a comparison process) composed of a plurality of comparators, clip codes can be generated at high speed.
【0036】比較回路(あるいは比較工程)の出力であ
る直線の始点、終点と表示領域の関係を示すクリップコ
ードから、論理合成回路(あるいは論理合成工程)によ
り直線と表示領域の関係を示すデータ、直線とクリップ
枠の関係を示すデータを生成することができ、クリップ
イン、クリップアウト、実クリップ時のクリップされる
枠が高速に、容易に判別可能になる。Data indicating the relationship between the straight line and the display area is generated by the logic synthesis circuit (or logic synthesis process) from the clip code indicating the relationship between the start and end points of the straight line output from the comparison circuit (or comparison process) and the display area; Data indicating the relationship between straight lines and clip frames can be generated, and frames to be clipped during clip-in, clip-out, and actual clipping can be quickly and easily determined.
【図1】この発明の実施例1を示すクリップテスタ回路
の構成図である。FIG. 1 is a configuration diagram of a clip tester circuit showing a first embodiment of the present invention.
【図2】この発明の実施例1を示す論理合成回路の構成
図である。FIG. 2 is a configuration diagram of a logic synthesis circuit showing a first embodiment of the present invention.
【図3】この発明の実施例の具体例を示す図である。FIG. 3 is a diagram showing a specific example of the embodiment of the invention.
【図4】クリップ枠によって決定されるクリップコード
を示す図である。FIG. 4 is a diagram showing clip codes determined by clip frames.
【図5】クリップコード生成のフローチャート図である
。FIG. 5 is a flowchart diagram of clip code generation.
【図6】クリップテストのフローチャート図である。FIG. 6 is a flowchart diagram of a clip test.
11 始点レジスタ
12 終点レジスタ
13 クリップ枠レジスタ
14 比較回路(比較工程)
141〜148 比較器
15 論理合成回路(論理合成工程)161〜168
出力線
21 クリップイン判別回路
22 クリップアウト判別回路
23 実クリップ枠判別回路11 Start point register 12 End point register 13 Clip frame register 14 Comparison circuit (comparison process) 141-148 Comparator 15 Logic synthesis circuit (logic synthesis process) 161-168
Output line 21 Clip-in discrimination circuit 22 Clip-out discrimination circuit 23 Actual clip frame discrimination circuit
Claims (2)
回路(a)直線の始点座標を保持する始点レジスタと、
(b)直線の終点座標を保持する終点レジスタと、(c
)表示領域の境界を示すクリップ枠の座標を保持するク
リップ枠レジスタと、 (d)上記始点レジスタ、終点レジスタのデータと上記
クリップ枠レジスタのデータを比較し、始点、終点の座
標と表示領域の位置関係を示すデータを出力する比較回
路と、 (e)上記の比較回路から出力される始点、終点の座標
と表示領域の位置関係を示すデータから直線とクリップ
枠との関係を表すデータを生成する論理合成回路。Claim 1: A clip tester circuit having the following elements: (a) a starting point register that holds starting point coordinates of a straight line;
(b) An end point register that holds the end point coordinates of the straight line, and (c
) A clip frame register that holds the coordinates of the clip frame that indicates the boundary of the display area; (d) Compare the data in the start point register and end point register with the data in the clip frame register, and calculate the coordinates of the start point and end point and the coordinates of the display area. a comparison circuit that outputs data indicating the positional relationship; (e) generating data representing the relationship between the straight line and the clip frame from the data indicating the positional relationship between the coordinates of the start point and the end point and the display area output from the comparison circuit; Logic synthesis circuit.
方法 (a)直線の始点座標と、直線の終点座標と、画面上で
表示領域の境界を示すクリップ枠の座標を複数の比較器
で同時に比較する比較工程と、(b)上記の比較工程か
ら出力される始点、終点の座標と表示領域の位置関係を
示すデータから、直線が表示領域内部にあることを示す
データを生成する処理と、直線が表示領域外にあること
を示すデータを生成する処理と、直線が表示領域と交差
するときに直線と交差するクリップ枠の種類を示すデー
タを生成する処理とを同時に実行する論理合成工程。2. A clip test method comprising the following steps: (a) simultaneously comparing the coordinates of the starting point of the straight line, the coordinates of the ending point of the straight line, and the coordinates of a clipping frame indicating the boundary of the display area on the screen using a plurality of comparators; (b) a process of generating data indicating that the straight line is within the display area from data indicating the positional relationship between the coordinates of the start point and the end point and the display area output from the above comparison process; A logical synthesis process that simultaneously performs processing for generating data indicating that the line is outside the display area, and processing for generating data indicating the type of clipping frame that intersects the straight line when the line intersects the display area.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3056725A JPH04291685A (en) | 1991-03-20 | 1991-03-20 | Clip tester circuit and clip testing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3056725A JPH04291685A (en) | 1991-03-20 | 1991-03-20 | Clip tester circuit and clip testing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04291685A true JPH04291685A (en) | 1992-10-15 |
Family
ID=13035473
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3056725A Pending JPH04291685A (en) | 1991-03-20 | 1991-03-20 | Clip tester circuit and clip testing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04291685A (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004251903A (en) * | 2003-02-18 | 2004-09-09 | Tektronix Japan Ltd | Automatic setting of gain and offset |
| EP1571181A2 (en) | 2004-02-24 | 2005-09-07 | Fuji Photo Film Co., Ltd. | Inorganic fine particle dispersion and manufacturing method thereof as well as image-recording material |
| EP1612054A1 (en) | 2004-07-02 | 2006-01-04 | Fuji Photo Film Co., Ltd. | Inkjet recording medium |
| EP2020304A1 (en) | 2007-08-03 | 2009-02-04 | FUJIFILM Corporation | Ink jet recording medium |
| EP2055496A2 (en) | 2007-11-01 | 2009-05-06 | Fujifilm Corporation | Inkjet recording material |
| WO2010013529A1 (en) | 2008-07-30 | 2010-02-04 | 富士フイルム株式会社 | Ink-jet recording method |
| WO2010013582A1 (en) | 2008-07-30 | 2010-02-04 | 富士フイルム株式会社 | Ink-jet recording method |
| CN102029216A (en) * | 2009-09-25 | 2011-04-27 | 株式会社理光 | Method for producing powder and fluidized bed pulverizing apparatus |
| EP2436740A1 (en) | 2003-09-29 | 2012-04-04 | Fujifilm Corporation | Ink for inkjet printing, ink set for inkjet printing, inkjet recording material and producing method for inkjet recording material, and inkjet recording method |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61131174A (en) * | 1984-11-30 | 1986-06-18 | Toshiba Corp | Intersection deciding circuit |
-
1991
- 1991-03-20 JP JP3056725A patent/JPH04291685A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61131174A (en) * | 1984-11-30 | 1986-06-18 | Toshiba Corp | Intersection deciding circuit |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004251903A (en) * | 2003-02-18 | 2004-09-09 | Tektronix Japan Ltd | Automatic setting of gain and offset |
| EP2436740A1 (en) | 2003-09-29 | 2012-04-04 | Fujifilm Corporation | Ink for inkjet printing, ink set for inkjet printing, inkjet recording material and producing method for inkjet recording material, and inkjet recording method |
| EP1571181A2 (en) | 2004-02-24 | 2005-09-07 | Fuji Photo Film Co., Ltd. | Inorganic fine particle dispersion and manufacturing method thereof as well as image-recording material |
| EP2130876A1 (en) | 2004-02-24 | 2009-12-09 | FUJIFILM Corporation | Inorganic fine particle dispersion and manufacturing method thereof as well as image-recording material |
| EP1612054A1 (en) | 2004-07-02 | 2006-01-04 | Fuji Photo Film Co., Ltd. | Inkjet recording medium |
| EP2020304A1 (en) | 2007-08-03 | 2009-02-04 | FUJIFILM Corporation | Ink jet recording medium |
| EP2055496A2 (en) | 2007-11-01 | 2009-05-06 | Fujifilm Corporation | Inkjet recording material |
| WO2010013529A1 (en) | 2008-07-30 | 2010-02-04 | 富士フイルム株式会社 | Ink-jet recording method |
| WO2010013582A1 (en) | 2008-07-30 | 2010-02-04 | 富士フイルム株式会社 | Ink-jet recording method |
| CN102029216A (en) * | 2009-09-25 | 2011-04-27 | 株式会社理光 | Method for producing powder and fluidized bed pulverizing apparatus |
| CN102029216B (en) | 2009-09-25 | 2013-03-20 | 株式会社理光 | Method for producing powder and fluidized bed pulverizing apparatus |
| US8540174B2 (en) | 2009-09-25 | 2013-09-24 | Ricoh Company, Ltd. | Method for producing powder and fluidized bed pulverizing apparatus |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR19980079671A (en) | Method of performing graphical data calculation and data processor | |
| US5003497A (en) | Method for three-dimensional clip checking for computer graphics | |
| JPH03242768A (en) | Method and device for detecting selection of object | |
| US5369741A (en) | Method for pre-clipping a line lying within a clipping rectangular region which is a subset of a region of a display screen | |
| JPS63198174A (en) | Graphic processor | |
| JPH04291685A (en) | Clip tester circuit and clip testing method | |
| US5020002A (en) | Method and apparatus for decomposing a quadrilateral figure for display and manipulation by a computer system | |
| US6646648B1 (en) | Method and system for evaluating derivatives in screen space using perspective corrected barycentric coordinates | |
| US4945497A (en) | Method and apparatus for translating rectilinear information into scan line information for display by a computer system | |
| JPH0271384A (en) | Broken line approximating device for cubic bezier curve | |
| JP3059739B2 (en) | Information processing apparatus with curve drawing function and processing method | |
| JP2780496B2 (en) | Clipping method for drawing equipment | |
| JP2973819B2 (en) | Image processing device | |
| JP4811177B2 (en) | Graph display device and graph display processing program | |
| JP2684609B2 (en) | Graphic display method in graphic data processing device | |
| JPH10334250A (en) | Anti-alias processor and image processing unit | |
| JPH03176776A (en) | Circle picking processing system | |
| JP2904994B2 (en) | Coordinate connection display method | |
| JPH01271876A (en) | Comparison arithmetic processor | |
| JP2001209813A (en) | Method and device for generating two-dimensional pattern | |
| JP2940294B2 (en) | Drafting equipment | |
| JPS62271187A (en) | Vector drawing system | |
| JPH01166179A (en) | Method for drawing clipped straight line | |
| JPH04342084A (en) | Method and device for plotting curve | |
| JPS62205480A (en) | Specific graphic generating circuit of crt display device |