JPH04184688A - Boundary point generator for plane polygon - Google Patents

Boundary point generator for plane polygon

Info

Publication number
JPH04184688A
JPH04184688A JP2317136A JP31713690A JPH04184688A JP H04184688 A JPH04184688 A JP H04184688A JP 2317136 A JP2317136 A JP 2317136A JP 31713690 A JP31713690 A JP 31713690A JP H04184688 A JPH04184688 A JP H04184688A
Authority
JP
Japan
Prior art keywords
value
holding means
constant value
register
value holding
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
JP2317136A
Other languages
Japanese (ja)
Inventor
Kenji Nagashima
長島 健二
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.)
Daikin Industries Ltd
Original Assignee
Daikin Industries 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 Daikin Industries Ltd filed Critical Daikin Industries Ltd
Priority to JP2317136A priority Critical patent/JPH04184688A/en
Publication of JPH04184688A publication Critical patent/JPH04184688A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To prevent a back triangle from being plotted by selecting and painting out an integer lattice point on or nearest to the ridge line of a plane triangle by an adder means. CONSTITUTION:A ridge line interpolation result is supplied to an accumulative addition value register 1 via a multiplexer 6, and a gradient value in a direction of paint-out is supplied to a gradient value register 2, and initialization is completed. Thence, a constant value after the round-up of decimeal in a first constant value register 4 is selected, and is sent to an adder 3 together with the ridge line interpolation result, and a result is fed back to the register 1 via the multiplexer 6. A value corresponding to the integer lattice point inside the plane triangle on or nearest to the ridge line can be held with the register 1 by performing such processing. After that, the gradient value of the register 2 is selected by a multiplexer 7, and paint-out is performed sequentially. The value of a completion point of paint-out is selected from a second constant value register 5 which holds a numetric value rounded up and subtracted by one, therefore, no picture element is shared on the boundary of the triangle.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 この発明は平面ポリゴンの境界発生装置に関し、さらに
詳細にいえば、平面ポリゴンのぬりつぶし描画を行なう
場合にぬりつぶし方向の始点、終点となる境界を発生す
るための装置に関する。
[Detailed Description of the Invention] <Industrial Application Field> The present invention relates to a plane polygon boundary generation device, and more specifically, the present invention relates to a plane polygon boundary generation device. Relating to a device for generating.

〈従来の技術〉 従来から、図形描画を行なうに当って、任意の形状の図
形を複数の三角形ポリゴンに分割し、得られた各三角形
ポリゴンについてぬりつぶし処理を施すようにした図形
描画装置が提供されている。
<Prior Art> Conventionally, when drawing a figure, a figure drawing device has been provided which divides a figure of an arbitrary shape into a plurality of triangular polygons and performs a filling process on each of the obtained triangular polygons. ing.

この図形描画装置においては、ぬりつぶし対象図形が全
て三角形ポリゴンであり、三角形ポリゴンは必ず平面で
あるから、図形描画装置による描画処理を行なう前に、
ぬりつぶし方向の勾配および稜線方向の勾配を得ておき
、予め得られている三角形ポリゴンの頂点データおよび
勾配データに基づいて稜線補間演算およびぬりつぶし補
間演算をこの順にパイプライン処理する構成が採用され
る。
In this figure drawing device, all figures to be filled in are triangular polygons, and triangular polygons are always flat, so before the drawing process is performed by the figure drawing device,
A configuration is adopted in which the gradient in the filling direction and the gradient in the edge direction are obtained, and the edge interpolation calculation and the filling interpolation calculation are pipelined in this order based on the vertex data and gradient data of the triangular polygon obtained in advance.

具体的には、頂点データまたは累積加算データを保持す
る累積加算値用レジスタ(71)および勾配を保持する
勾配レジスタ(72)の内容を加算器(73)に供給し
、加算結果を累積加算値用レジスタ(71)にフィード
バックするとともに、累積加算値用レジスタ(71)の
内容を稜線累積加算結果として出力する。そして、初期
値としての稜線累積加算結果または累積加算データを保
持する累積加算値用レジスタ(74)および勾配を保持
する勾配レジスタ(75)の内容を加算器(76)に供
給し、加算結果を累積加算値用レジスタ(74)にフィ
ードバックするとともに、累積加算値用レジスタ(74
)の内容をぬりつぶし累積加算結果として出力する。尚
、8カされるぬりつぶし累積加算結果は表示のための整
数格子に適合させるべく整数値として出力される。
Specifically, the contents of the cumulative addition value register (71) that holds vertex data or cumulative addition data and the gradient register (72) that holds the gradient are supplied to the adder (73), and the addition result is used as the cumulative addition value. At the same time, the content of the cumulative addition value register (71) is output as the edge cumulative addition result. Then, the contents of the cumulative addition value register (74) that holds the edge line cumulative addition result or cumulative addition data as an initial value and the slope register (75) that holds the gradient are supplied to the adder (76), and the addition result is It feeds back to the cumulative addition value register (74), and also feeds back to the cumulative addition value register (74).
) is output as the coloring cumulative addition result. It should be noted that the result of the cumulative addition of 8 colors is output as an integer value in order to fit into an integer lattice for display.

〈発明が解決しようとする課題〉 上記従来の図形描画装置は隣合う平面ポリゴンの描画を
行なう場合において境界部における描画ピクセルが同じ
になってしまうので、表面ポリゴンと裏面ポリゴンとの
突き合せ部において、描画順序によっては裏面ポリゴン
が最終的に描画されてしまい、図形全体としての描画品
質を低下させてしまうという不都合がある。
<Problems to be Solved by the Invention> In the conventional graphic drawing device described above, when drawing adjacent planar polygons, the drawing pixels at the boundary become the same. However, depending on the drawing order, the back polygons may end up being drawn, resulting in a disadvantage in that the drawing quality of the figure as a whole deteriorates.

また、ラスター・オペレーションのようなピクセル単位
の演算を行なう場合には、同一ピクセルについて複数回
ピクセル単位の演算を行なうことになり、所期の演算結
果が得られるという保証がなくなってしまうという不都
合がある。
Additionally, when performing pixel-by-pixel operations such as raster operations, the pixel-by-pixel operation is performed multiple times on the same pixel, and there is no guarantee that the desired result will be obtained. be.

〈発明の目的〉 この発明は上記の問題点に鑑みてなされたものであり、
隣合う平面ポリゴンの境界部においてそれぞれ該当する
平面ポリゴンの内部に含まれる点を境界として発生する
ことができる平面ポリゴンの境界発生装置を提供するこ
とを目的としている。
<Object of the invention> This invention was made in view of the above problems,
It is an object of the present invention to provide a planar polygon boundary generation device that can generate boundaries between adjacent planar polygons using points included inside the respective planar polygons as boundaries.

く課題を解決するための手段〉 上記の目的を達成するための、第1の発明の境界発生装
置は、平面ポリゴンの稜線補間データまたはぬりつぶし
累積加算値を保持する累積加算値保持手段と、ぬりつぶ
し方向の勾配値を保持する勾配値保持手段と、小数部切
り上げ用の定数値を保持する第1定数値保持手段と、小
数部を切り上げて1だけ減算するための定数値を保持す
る第2定数値保持手段と、勾配値保持手段、第1定数値
保持手段および第2定数値保持手段の内容を選択する選
択手段と、累積加算値保持手段の内容と選択手段により
選択された内容とを加算して再び累積加算値保持手段に
供給する加算手段とを含んでいる。
Means for Solving the Problems> To achieve the above object, a boundary generation device according to a first aspect of the present invention includes a cumulative addition value holding means for storing edge interpolation data of a plane polygon or a filling cumulative addition value; a gradient value holding means for holding a gradient value in the direction; a first constant value holding means for holding a constant value for rounding up the decimal part; and a second constant value holding means for holding a constant value for rounding up the decimal part and subtracting by 1. A numerical value holding means, a selection means for selecting the contents of the slope value holding means, the first constant value holding means and the second constant value holding means, and adding the contents of the cumulative addition value holding means and the contents selected by the selection means. and an addition means for supplying the cumulative addition value again to the cumulative addition value holding means.

但し、勾配値保持手段、第1定数値保持手段および第2
定数値保持手段がマルチポート・レジスタ・ファイルま
たはマルチポート・メモリであることが好ましい。
However, the gradient value holding means, the first constant value holding means and the second
Preferably, the constant value holding means is a multiport register file or a multiport memory.

第3の発明の境界発生装置は、平面ポリゴンの稜線補間
データまたはぬりつぶし累積加算値を保持する累積加算
値保持手段と、ぬりつぶし方向の勾配値を保持する勾配
値保持手段と、小数部切り上げ用の定数値を保持する第
1定数値保持手段と、小数部を切り上げて1だけ減算す
るための定数値を保持する第2定数値保持手段と、累積
加算値保持手段、第1定数値保持手段および第2定数値
保持手段の内容を選択する選択手段と、勾配値保持手段
の内容と選択手段により選択された内容とを加算して再
び累積加算値保持手段に供給する加算手段とを含んでい
る。
The boundary generation device of the third aspect of the invention includes cumulative addition value holding means for holding edge line interpolation data of plane polygons or filling cumulative addition values, gradient value holding means for holding gradient values in the filling direction, and gradient value holding means for holding gradient values in the filling direction; a first constant value holding means for holding a constant value, a second constant value holding means for holding a constant value for rounding up the decimal part and subtracting by 1, a cumulative addition value holding means, a first constant value holding means, and It includes a selection means for selecting the contents of the second constant value holding means, and an addition means for adding the contents of the gradient value holding means and the contents selected by the selection means and supplying the sum again to the cumulative added value holding means. .

く作用〉 第1の5発明の境界発生装置であれば、稜線補間により
得られた2点間の補間演算を行なって整数格子上のぬり
つぶし画素を得る場合において、最も左側のぬりつぶし
画素については、選択手段により第1定数値保持手段の
内容を選択して加算手段により加算して稜線上または稜
線よりも右側、即ち描画対象である平面ポリゴンの内部
のぬりつぶし画素を得ることができる。その後は、選択
手段により勾配値保持手段の内容を選択して累積加算を
行なうことにより順次ぬりつぶし画素を得ることができ
る。そして、最も右側のぬりつぶし画素については、選
択手段により第2定数値保持手段の内容を選択して加算
手段による加算を行なわせることにより、稜線上または
稜線よりも左側、即ち描画対象である平面ポリゴンの内
部のぬりつぶし画素を得ることができる。
Effects> With the boundary generator of the first five aspects of the invention, when obtaining a filled pixel on an integer grid by performing an interpolation operation between two points obtained by edge interpolation, for the leftmost filled pixel, The contents of the first constant value holding means are selected by the selection means and added by the addition means to obtain filled pixels on the edge line or on the right side of the edge line, that is, inside the plane polygon to be drawn. Thereafter, by selecting the contents of the gradient value holding means using the selection means and performing cumulative addition, pixels to be filled in can be sequentially obtained. For the rightmost filled pixel, the selection means selects the contents of the second constant value holding means and the addition means performs the addition, so that the pixel on the edge line or to the left of the edge line, that is, the plane polygon to be drawn, is You can get the filled pixels inside.

以上の説明から明らかなように、隣合う平面ポリゴンの
全てについて該当する平面ポリゴン内部のぬりつぶし画
素のみを発生できるので、境界を共有するという不都合
を解消できる。即ち、従来の境界発生方法では、稜線を
共有している関係上、隣合う平面ポリゴンについて共通
する稜線上のぬりつぶし画素は、一方の平面ポリゴンに
関して平面ポリゴンの内部になれば、他方の平面ポリゴ
ンに関して必ず平面ポリゴンの外部になっていたので、
表面ポリゴンと裏面ポリゴンとの突き合せ部において描
画順序によっては裏面ポリゴンが表示されてしまうとい
う不都合かあり、また、ぬりつぶし画素単位の演算を行
なうピクセル・オペレーション等においては、同一のぬ
りつぶし画素について複数回の演算を行なうことによっ
て所期の演算結果が得られなくなる可能性があるという
不都合があったが、この発明においては、このような不
都合を確実に解消できる。
As is clear from the above description, since only the filled pixels inside the corresponding plane polygon can be generated for all adjacent plane polygons, the inconvenience of sharing a boundary can be solved. In other words, in the conventional boundary generation method, since the edges are shared, if a filled pixel on the edge line that is common to adjacent plane polygons is inside the plane polygon for one plane polygon, it will be inside the plane polygon for the other plane polygon. Since it was always outside the plane polygon,
Depending on the drawing order, the back polygon may be displayed at the matching part between the front polygon and the back polygon, which may be an inconvenience.Also, in pixel operations, etc., where calculations are performed on a pixel-by-pixel basis, the same filled pixel may be displayed multiple times. However, in the present invention, such a problem can be reliably solved.

第2の発明の境界発生装置であれば、マルチポート・レ
ジスタ・ファイルまたはマルチポート・メモリから該当
する内容を選択して読み出すだけでよいから構成を簡素
化でき、しかも第1の発明と同様の作用を達成できる。
With the boundary generator of the second invention, it is only necessary to select and read out the relevant contents from the multiport register file or multiport memory, which simplifies the configuration. effect can be achieved.

第3の発明の境界発生装置であれば、平面ポリゴンの稜
線補間データを加算手段を通して初期値として累積加算
値保持手段に供給するに当って選択手段により第1定数
値保持手段の内容を選択して加算手段による加算を行な
うのであるから、ぬりつぶし描画開始側の境界発生を高
速に達成でき、全体としての描画速度を高速化できる。
In the boundary generation device of the third aspect of the invention, the content of the first constant value holding means is selected by the selection means when supplying the edge line interpolation data of the plane polygon to the cumulative added value holding means as an initial value through the adding means. Since the addition is performed by the adding means, the boundary on the fill drawing start side can be generated at high speed, and the overall drawing speed can be increased.

〈実施例〉 以下、実施例を示す添付図面によって詳細に説明する。<Example> Hereinafter, embodiments will be described in detail with reference to the accompanying drawings showing examples.

第1図はこの発明の境界発生装置を組み込んだ図形描画
装置の一実施例を示すブロック図であり、稜線補間結果
を初期値として保持する累積加算値レジスタ(1)と、
平面ポリゴンのぬりつぶし方向の勾配値を保持する勾配
値レジスタ(2)と、累積加算値レジスタ(1)の内容
に勾配値を累積加算して加算結果を累積加算値レジスタ
(1)にフィートノ(・ツクする加算器(3)と、小数
部切り上げ用の定数値“0000、FFFF (HEX
)’を保持する第1定数値レジスタ(4)と、小数部を
切り上げて1だけ減算するための定数値“FFFF、F
FFF (HEX)”を保持する第2定数値レジスタ(
5)と、稜線補間結果または加算結果を選択して累積加
算値レジスタ(1)に供給するマルチプレクサ(6)と
、勾配値レジスタ(2)の内容、第1定数値レジスタ(
4)の内容、または第2定数値レジスタ(5)の内容を
選択して加算器(3)に供給するマルチプレクサ(7)
とを有している。
FIG. 1 is a block diagram showing an embodiment of a graphic drawing device incorporating the boundary generation device of the present invention, which includes a cumulative addition value register (1) that holds the edge interpolation result as an initial value;
The gradient value is cumulatively added to the contents of the gradient value register (2) that holds the gradient value in the filling direction of the plane polygon, and the cumulative addition value register (1), and the addition result is stored in the cumulative addition value register (1). Adder (3) to add and constant value “0000, FFFF (HEX
)' and a constant value "FFFF, F" for rounding up the decimal part and subtracting by 1.
FFF (HEX)” is stored in the second constant value register (
5), a multiplexer (6) that selects the edge interpolation result or addition result and supplies it to the cumulative addition value register (1), the contents of the slope value register (2), and the first constant value register (
4) or the contents of the second constant value register (5) and supplies it to the adder (3).
It has

上記構成のぬりつぶし補間装置の動作は次のとおりであ
る。尚、以下の説明においては、平面ポリゴンの左稜線
から右稜線に向かってぬりつぶし補間演算を行なうよう
にしている。
The operation of the fill-in interpolation device having the above configuration is as follows. In the following description, filling interpolation calculations are performed from the left edge of the plane polygon toward the right edge.

先ず、マルチプレクサ(6)を介して累積加算値レジス
タ(1)に稜線補間結果が供給されるとともに、勾配値
レジスタ(2)にぬりつぶし方向の勾配値が供給される
ことにより初期設定が完了する。
First, the edge line interpolation result is supplied to the cumulative addition value register (1) via the multiplexer (6), and the gradient value in the filling direction is supplied to the gradient value register (2), thereby completing the initial setting.

次いで、マルチプレクサ(7)により第1定数値しジス
タ(4)の内容が選択され、稜線補間結果と共に加算器
(3)に供給されるので、稜線補間結果が整数格子上の
値である場合を除いて小数部を切り上げた加算結果を得
ることができ、この加算結果をマルチプレクサ(6)を
介して累積加算値レジスタ(1)にフィードバックする
。即ち、この処理によって、稜線上、または稜線に最も
近い平面ポリゴン内部の整数格子点を整数部に有する値
が累積加算値レジスタ(1)に保持される。
Next, the content of the first constant value register (4) is selected by the multiplexer (7) and is supplied to the adder (3) together with the edge interpolation result. The addition result can be obtained by rounding up the decimal part, and this addition result is fed back to the cumulative addition value register (1) via the multiplexer (6). That is, by this process, a value whose integer part is an integer grid point on the edge line or inside the planar polygon closest to the edge line is held in the cumulative addition value register (1).

その後は、マルチプレクサ(7)により勾配値レジスタ
(2)の内容が選択され、従来装置と同様に順次補間結
果を得ることができる。
Thereafter, the contents of the gradient value register (2) are selected by the multiplexer (7), and interpolation results can be obtained sequentially in the same manner as in the conventional device.

そして、ぬりつぶし終了点の値を得る場合には、マルチ
プレクサ(7)により第2定数値レジスタ(5)の内容
が選択され、累積加算値と共に加算器(3)に供給され
るので、稜線補間結果が整数格子上の値である場合を除
いて小数部を切り上げて1だけ減算した加算結果を得る
ことができる。即ち、この処理によって、稜線上、また
は稜線に最も近い平面ポリゴン内部の整数格子点を整数
部に有する値が累積加算値レジスタ(1)に保持される
Then, when obtaining the value of the filling end point, the contents of the second constant value register (5) are selected by the multiplexer (7) and supplied to the adder (3) together with the cumulative addition value, so that the edge interpolation result is Unless is a value on an integer lattice, the addition result can be obtained by rounding up the decimal part and subtracting 1. That is, by this process, a value whose integer part is an integer grid point on the edge line or inside the planar polygon closest to the edge line is held in the cumulative addition value register (1).

尚、上記累積加算値レジスタ(1)の内容はそのままぬ
りつぶし方向の補間結果として出力され、小数部の切り
捨て処理が施された状態で図示しない画像メモリに供給
される。したがって、平面ポリゴンの状態の如何に拘ら
ず、ぬりつぶし方向の補間結果として平面ポリゴン内の
格子点上の値を出力でき、隣合う平面ポリゴンとの境界
部において格子点上の画素を共有するという不都合を解
消できる。
The contents of the cumulative addition value register (1) are output as they are as the interpolation results in the filling direction, and are supplied to an image memory (not shown) with the decimal part truncated. Therefore, regardless of the state of the plane polygon, the value on the grid point within the plane polygon can be output as the interpolation result in the filling direction, and the pixels on the grid point are shared at the boundary between adjacent plane polygons, which is an inconvenience. can be resolved.

第2図は奥行き値(以下、z値と称する)の補間演算を
行なう補間演算部の構成を示すプロ・ツク図であり、初
期値および勾配値を保持するマルチポート・レジスタ・
ファイル(11)と、マルチポート・レジスタ・ファイ
ル(11)からの読み出しデータをシフトさせる双方向
シフト・レジスタ(12)と、稜線補間時の累積加算結
果を保持する稜線用累積加算結果レジスタ(13)と、
ぬりつぶし方向補間時の累積加算結果を保持するぬりつ
ぶし用累積加算結果レジスタ(14)と、双方向シフト
φレジスタ(12)の内容または“0°データを選択す
るマルチプレクサ(15)と、上記累積加算結果レジス
タの内容または“O°データを選択するマルチプレクサ
(1B)と、マルチプレクサ(15)により選択された
データおよびマルチプレクサ(16)により選択された
データに基づく加算を行なう加算器(17)と、加算結
果を一時的に保持するパイプライン・レジスタ(18)
とを有している。尚、加算結果は、何れかの累積加算結
果レジスタに供給される。
Figure 2 is a block diagram showing the configuration of an interpolation calculation unit that performs interpolation calculations of depth values (hereinafter referred to as z values), and includes a multiport register that holds initial values and gradient values.
file (11), a bidirectional shift register (12) that shifts read data from the multiport register file (11), and an edge cumulative addition result register (13) that holds the cumulative addition result during edge interpolation. )and,
A filling cumulative addition result register (14) that holds the cumulative addition result during interpolation in the filling direction, a multiplexer (15) that selects the contents of the bidirectional shift φ register (12) or "0° data," and the cumulative addition result described above. A multiplexer (1B) that selects the contents of the register or "O° data, an adder (17) that performs addition based on the data selected by the multiplexer (15) and the data selected by the multiplexer (16), and the addition result. Pipeline register (18) that temporarily holds
It has Note that the addition result is supplied to one of the cumulative addition result registers.

第2図の構成の補間演算部の動作を、第3図および第4
図のタイミング・チャートを参照しながら以下に説明す
る。
The operation of the interpolation calculation unit configured as shown in Fig. 2 is explained in Figs. 3 and 4.
This will be explained below with reference to the timing chart shown in the figure.

(1)  z値の補正を行なわない場合但し、第3図(
G)に示す三角形ポリゴンの場合について説明する。
(1) When not correcting the z value However, as shown in Figure 3 (
The case of the triangular polygon shown in G) will be explained.

この場合には、第3図(B)に示すようにマルチボート
・レジスタ・ファイル(11)から先ず初期値z00が
読み出され、次いで、同図(C)に示すように双方向シ
フト・レジスタ(12)から初期値z00がそのまま出
力される。この場合には、マルチプレクサ(16)によ
り“0′データが選択されるので、両累積加算結果レジ
スタに初期値zoOが供給されるとともに、パイプライ
ン・レジスタ(18)にも初期値z00が供給され、次
のクロック・タイミングでそれぞれ出力される(同IN
 (D)  (E)(F)参照)。
In this case, the initial value z00 is first read out from the multi-board register file (11) as shown in FIG. 3(B), and then the bidirectional shift register is read out as shown in FIG. 3(C). The initial value z00 is output as is from (12). In this case, since "0' data is selected by the multiplexer (16), the initial value zoO is supplied to both cumulative addition result registers, and the initial value z00 is also supplied to the pipeline register (18). , are output at the next clock timing (the same IN
(D) (See (E) and (F)).

その後は、同図(B)に示すように、マルチボート・レ
ジスタ・ファイル(11)が2方向の勾配値d z /
 d xを出力し続けるとともに、同図(C)に示すよ
うに、双方向シフト・レジスタ(12)も上記勾配値d
z/dxを出力し続け、さらに同図(D)に示すように
、稜線用累積加算値レジスタ(13)が上記初期値z0
0を出力し続ける。そして、マルチプレクサ(16)に
よりぬりつぶし用累積加算値レジスタ(14)の内容を
選択して累積加算を行なうことにより、ぬりつぶし方向
の2値z 01.  z 02゜z 03.  z 0
4.  z 05を順次得ることができる(同図。
After that, as shown in FIG.
In addition to continuing to output the gradient value d x, the bidirectional shift register (12) also outputs the gradient value d
z/dx continues to be output, and as shown in FIG.
Continues to output 0. Then, by selecting the contents of the cumulative addition value register (14) for filling by the multiplexer (16) and performing cumulative addition, the binary values z01. z 02゜z 03. z 0
4. z 05 can be obtained sequentially (see the same figure).

(E)(F)参照)。(E) (see (F)).

ぬりつぶし方向の補間演算が終了した後、即ち、2値z
05が得られた後は、双方向シフト・レジスタ(12)
を通してマルチボート・レジスタ・ファイル(月)から
稜線方向の勾配値dz02/dy02が出力され、稜線
用累積加算値レジスタ(15)の内容zDOが出力され
るので、加算器(17)によって加算することにより次
のぬりつぶし方向の2値の初期値zlOが得られる。そ
して、得られた初期値zlOおよび上記勾配値d z 
/ d xに基づいて累積加算動作を行なうことにより
、次のぬりつぶし方向の2値z 11.  z 12・
・・を順次行ることができる。
After the interpolation calculation in the filling direction is completed, that is, the binary z
After obtaining 05, the bidirectional shift register (12)
The gradient value dz02/dy02 in the ridgeline direction is output from the multi-board register file (month) through , and the content zDO of the cumulative addition value register for ridgeline (15) is outputted, so it can be added by the adder (17). As a result, a binary initial value zlO for the next filling direction is obtained. Then, the obtained initial value zlO and the above gradient value d z
/ d By performing the cumulative addition operation based on x, the next filling direction binary value z 11. z 12・
... can be performed sequentially.

尚、第3図(A)はクロック信号出力を示す。Note that FIG. 3(A) shows the clock signal output.

その後は、上記一連の動作を反復することにより、平面
ポリゴンの全範囲の2値を得ることができる。
Thereafter, by repeating the above series of operations, binary values for the entire range of the plane polygon can be obtained.

(Il)  z値の補正を行なう場合 但し、第4図i)に示す点PAからPBまでのzM算出
について説明する。
(Il) When correcting the z value However, the calculation of zM from the point PA to PB shown in FIG. 4 i) will be explained.

この場合には、両累積加算値レジスタ(13)(14)
およびパイプライン・レジスタ(18)から第4図(F
)(G)()I)に示すようにそれぞれ前のぬりつぶし
方向の最後の補間値Ez5.Ez55が出力されている
状態において、第4図(B)に示すようにマルチボート
・レジスタ・ファイル(11)から先ず稜線方向の勾配
値dzo1/dy01が出力され、次いでぬりつぶし方
向の勾配値d z / d xが出力され続ける。上記
勾配値dzo1/dyo1は、同図(C)に示すように
、そのまま双方向シフト・レジスタ(12)から出力さ
れ、稜線用累積加算値レジスタ(13)に保持されてい
る値Ez5と共に加算器(17)に供給される(同図(
D)(E)参照)。
In this case, both cumulative addition value registers (13) (14)
and pipeline register (18) to Figure 4 (F
)(G) ()I), the last interpolated values Ez5. In the state where Ez55 is being output, as shown in FIG. 4(B), the multi-board register file (11) first outputs the gradient value dzo1/dy01 in the ridge direction, and then the gradient value dz in the filling direction. / d x continues to be output. The gradient value dzo1/dyo1 is output as is from the bidirectional shift register (12), as shown in FIG. (17) (same figure (
D) (See (E)).

したがって、加算器(17)によって加算が行なわれる
ことにより新たな稜線上のzf[Ez6が得られ、両累
積加算値レジスタ(13)(14)に供給されるので、
その後は両累積加算値レジスタ(13)(14)から上
記z ii E z 6が出力される(同図(F)(G
)参照)。
Therefore, by performing addition by the adder (17), a new zf[Ez6 on the ridgeline is obtained, which is supplied to both cumulative addition value registers (13) and (14).
After that, the above z ii E z 6 is output from both cumulative addition value registers (13) and (14) ((F) (G) in the same figure).
)reference).

その後は、先ず、マルチボート・レジスタ・ファイル(
11)からの出力データを受けて双方向シフト・レジス
タ(12)が勾配値d z / d xを出力し、次い
で、双方向シフト・レジスタ(12)を順次1ビツトず
つ右シフトさせることにより順次勾配値dz/2dx、
  dz/4dx、  dz/8dx。
After that, first the multi-board register file (
11), the bidirectional shift register (12) outputs the gradient value dz/dx, and then the bidirectional shift register (12) is sequentially shifted to the right one bit at a time. gradient value dz/2dx,
dz/4dx, dz/8dx.

d z / 16 d xを出力する(同図(C)参照
)。
d z / 16 d x is output (see (C) in the same figure).

そして、ぬりつぶし用累積加算値レジスタに保持されて
いる値Ez6に対して勾配値d z / 2 d x 
Then, the gradient value d z / 2 d x is calculated for the value Ez6 held in the cumulative addition value register for filling.
.

d z / 4 d x 、 d z / 8 d x
 、 d z / 16 d xを順次累積加算するこ
とによりZ値の補正を達成できる。例えば、X座標値の
小数部が二進数で、1010である場合には、値が“1
°の桁に対して対応する勾配値を選択し、値が“0°で
ある場合には、勾配値に代えて“0°データを選択すれ
ばよく(同図(D)参照)、最終的に補正された2値A
z3を得ることができる。尚、途中の2値は、AzO−
Ez6 +dz/2dx、Azl−AzO1Az2 =
Azl +dz/8dx、Az3−Az2である。
dz/4dx, dz/8dx
, d z / 16 d x can be sequentially cumulatively added to achieve correction of the Z value. For example, if the decimal part of the X coordinate value is a binary number and is 1010, the value is “1”.
Select the slope value corresponding to the ° digit, and if the value is 0°, select 0° data instead of the slope value (see figure (D)), and the final Binary A corrected to
z3 can be obtained. In addition, the intermediate two values are AzO-
Ez6 +dz/2dx, Azl-AzO1Az2 =
Azl +dz/8dx, Az3-Az2.

その後は、Az3をぬりつぶし方向の2値の初期値とし
て勾配値d z / d xの累積加算を行なうことに
より、順次2値z 61.  z 132・・・を得る
ことができる。
After that, by cumulatively adding the gradient values d z / d x using Az3 as the initial value of the binary values in the filling direction, the binary values z 61 . z 132... can be obtained.

尚、第4図(A)は、クロック信号出力を示す。Note that FIG. 4(A) shows the clock signal output.

以下、上記処理を必要回数だけ反復することにより図形
の描画を達成できる。
Thereafter, the drawing of the figure can be achieved by repeating the above process as many times as necessary.

〈実施例2〉 第5図はこの発明の境界発生装置を組み込んだ図形描画
装置の他の実施例を示すブロック図であり、第1図の実
施例と異なる点は、勾配値レジスタ(2)およびマルチ
プレクサ(7)に代えて勾配値、および定数値“000
0.FFFF (HEX)“。
<Embodiment 2> FIG. 5 is a block diagram showing another embodiment of a graphic drawing device incorporating the boundary generation device of the present invention. The difference from the embodiment of FIG. 1 is that the gradient value register (2) and the gradient value in place of the multiplexer (7), and the constant value “000
0. FFFF (HEX)“.

“FFFF、FFFF CHEX)″を保持し、選択的
に読み出し可能なマルチボート・レジスタ・ファイルま
たはマルチボート・メモリ(9)を用いる点のみである
The only difference is that a multi-vote register file or multi-vote memory (9) that holds "FFFF, FFFF CHEX)" and can be selectively read is used.

したがって、この実施例の場合には、マルチボート・レ
ジスタ・ファイルまたはマルチボート・メモリ(9)か
ら勾配値または定数値を選択して読み出すだけで第1図
の実施例と同様の作用を達成できる。
Therefore, in this embodiment, the same effect as in the embodiment of FIG. 1 can be achieved by simply selecting and reading out the gradient value or constant value from the multi-vote register file or multi-vote memory (9). .

〈実施例3〉 第6図はこの発明の境界発生装置を組み込んだ図形描画
装置のさらに他の実施例を示すブロック図であり、第2
図に示す構成に加えて、小数部切り上げ用の定数値“0
000.FFFF (HEX)°を保持する第1定数値
レジスタ(19)と、小数部を切り上げて1だけ減算す
るための定数値“FFFF、FFFF (HEX)”を
保持する第2定数値レジスタ(20)とを設け、稜線用
累積加算結果レジスタ(13)、ぬりつぶし用累積加算
結果レジスタ(14)の内容、第1定数値レジスタ(1
9)の内容、第2定数値レジスタ(20)の内容をマル
チプレクサ(I6)により選択するようにしている。
<Embodiment 3> FIG. 6 is a block diagram showing still another embodiment of a graphic drawing device incorporating the boundary generation device of the present invention.
In addition to the configuration shown in the figure, a constant value “0” for rounding up the decimal part is added.
000. The first constant value register (19) holds FFFF (HEX)°, and the second constant value register (20) holds the constant value “FFFF, FFFF (HEX)” for rounding up the decimal part and subtracting by 1. The contents of the edge line cumulative addition result register (13), the contents of the filling cumulative addition result register (14), and the first constant value register (1
9) and the contents of the second constant value register (20) are selected by a multiplexer (I6).

したがって、この実施例の場合にも、上記実施例と同様
に平面ポリゴンの内部に位置する境界を発生できるとと
もに、z値の補正をも達成できる。
Therefore, in the case of this embodiment as well, it is possible to generate a boundary located inside a planar polygon as in the above embodiment, and also to achieve correction of the z value.

尚、この実施例の場合には、初期値を累積加算値レジス
タに移した後に定数値を加算するのではなく、初期値に
定数値を加算した状態で累積加算値レジスタに供給でき
るので、全体としての図形描画速度を多少向上させるこ
とができる。
In this embodiment, instead of moving the initial value to the cumulative addition value register and then adding a constant value, it is possible to add the constant value to the initial value and supply it to the cumulative addition value register. The drawing speed can be improved somewhat.

尚、この発明は上記の実施例に限定されるものではなく
、例えば、双方向シフト・レジスタ(12)に代えて一
方向シフト・レジスタを採用することが可能である他、
この発明の要旨を変更しない範囲内において種々の設計
変更を施すことが可能である。
It should be noted that the present invention is not limited to the above-described embodiment; for example, it is possible to use a unidirectional shift register instead of the bidirectional shift register (12).
Various design changes can be made without departing from the gist of the invention.

〈発明の効果〉 以上のように第1の発明は、隣合う平面ポリゴンの全て
について該当する平面ポリゴン内部のぬりつぶし画素の
みを発生できるので、境界を共有するという不都合を解
消できるという特有の効果を奏する。
<Effects of the Invention> As described above, the first invention has the unique effect of eliminating the inconvenience of sharing boundaries, since it is possible to generate only the filled pixels inside the corresponding plane polygon for all adjacent plane polygons. play.

第2の発明は、構成を簡素化でき、しかも第1の発明と
同様の作用を達成できるという特有の効果を奏する。
The second invention has the unique effect of simplifying the configuration and achieving the same effect as the first invention.

第3の発明は、ぬりつぶし描画開始側の境界発生を高速
に達成でき、全体としての描画速度を高速化できるとい
う特有の効果を奏する。
The third aspect of the invention has the unique effect of being able to quickly generate a boundary on the fill drawing start side and increasing the overall drawing speed.

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

第1図はこの発明の境界発生装置を組み込んだ図形描画
装置の一実施例を示すブロック図、第2図は奥行き値の
補間演算を行なう補間演算部の構成を示すブロック図、 第3図および第4図は、それぞれ第2図の補間演算部の
動作を説明するタイミング・チャート、第5図はこの発
明の境界発生装置を組み込んだ図形描画装置の他の実施
例を示すブロック図、第6図はこの発明の境界発生装置
を組み込んだ図形描画装置のさらに他の実施例を示すブ
ロック図、 第7図は従来の図形描画装置の構成を示すブロック図。 (1)・・・累積加算値レジスタ、(2)・・・勾配値
レジスタ、(3)・・・加算器、(4)(19)・・・
第1定数値レジスタ、(5)(20)・・・第2定数値
レジスタ、(7)・・・マルチプレクサ、 (11)・・・マルチボート・レジスタ・ファイル、(
14)・・・ぬりつぶし用累積加算結果レジスタ、(1
5)・・・マルチプレクサ、(17)・・・加算器、第
5図
FIG. 1 is a block diagram showing an embodiment of a graphic drawing device incorporating the boundary generation device of the present invention, FIG. 2 is a block diagram showing the configuration of an interpolation calculation unit that performs depth value interpolation calculation, and FIG. 4 is a timing chart explaining the operation of the interpolation calculation unit shown in FIG. 2, FIG. 5 is a block diagram showing another embodiment of a graphic drawing device incorporating the boundary generation device of the present invention, and FIG. The figure is a block diagram showing still another embodiment of a graphic drawing device incorporating the boundary generation device of the present invention, and FIG. 7 is a block diagram showing the configuration of a conventional graphic drawing device. (1)... Cumulative addition value register, (2)... Gradient value register, (3)... Adder, (4) (19)...
First constant value register, (5) (20)...Second constant value register, (7)...Multiplexer, (11)...Multi-vote register file, (
14)... Cumulative addition result register for coloring, (1
5)...Multiplexer, (17)...Adder, Fig. 5

Claims (1)

【特許請求の範囲】 1、平面ポリゴンの稜線補間データまたはぬりつぶし累
積加算値を保持する累積加算値保持手段(1)と、ぬり
つぶし方向の勾配値を保持する勾配値保持手段(2)と
、小数部切り上げ用の定数値を保持する第1定数値保持
手段(4)と、小数部を切り上げて1だけ減算するため
の定数値を保持する第2定数値保持手段(5)と、勾配
値保持手段(2)、第1定数値保持手段(4)および第
2定数値保持手段(5)の内容を選択する選択手段(7
)と、累積加算値保持手段(1)の内容と選択手段(7
)により選択された内容とを加算して再び累積加算値保
持手段(1)に供給する加算手段(3)とを含むことを
特徴とする平面ポリゴンの境界点発生装置。 2、勾配値保持手段(2)、第1定数値保持手段(4)
および第2定数値保持手段(5)がマルチポート・レジ
スタ・ファイルまたはマルチポート・メモリである上記
特許請求の範囲第1項記載の平面ポリゴンの境界発生装
置。 3、平面ポリゴンの稜線補間データまたはぬりつぶし累
積加算値を保持する累積加算値保持手段(14)と、ぬ
りつぶし方向の勾配値を保持する勾配値保持手段(11
)と、小数部切り上げ用の定数値を保持する第1定数値
保持手段(19)と、小数部を切り上げて1だけ減算す
るための定数値を保持する第2定数値保持手段(20)
と、累積加算値保持手段(14)、第1定数値保持手段
(19)および第2定数値保持手段(20)の内容を選
択する選択手段(16)と、勾配値保持手段(11)の
内容と選択手段(16)により選択された内容とを加算
して再び累積加算値保持手段(14)に供給する加算手
段(17)とを含むことを特徴とする平面ポリゴンの境
界点発生装置。
[Claims] 1. Cumulative addition value holding means (1) for holding edge interpolation data of plane polygons or filling cumulative addition values, gradient value holding means (2) for holding gradient values in the filling direction, and decimal A first constant value holding means (4) for holding a constant value for rounding up the decimal part, a second constant value holding means (5) for holding a constant value for rounding up the decimal part and subtracting by 1, and a slope value holding means means (2), selection means (7) for selecting the contents of the first constant value holding means (4) and the second constant value holding means (5);
), the contents of the cumulative addition value holding means (1) and the selection means (7
2.) Adding means (3) for adding the contents selected by (1) to the accumulated added value holding means (1). 2. Gradient value holding means (2), first constant value holding means (4)
2. The planar polygon boundary generation device according to claim 1, wherein the second constant value holding means (5) is a multiport register file or a multiport memory. 3. Cumulative addition value holding means (14) for holding edge interpolation data of plane polygons or filling cumulative addition values, and gradient value holding means (11) for holding gradient values in the filling direction.
), a first constant value holding means (19) for holding a constant value for rounding up the decimal part, and a second constant value holding means (20) for holding a constant value for rounding up the decimal part and subtracting by 1.
and selection means (16) for selecting the contents of the cumulative addition value holding means (14), the first constant value holding means (19) and the second constant value holding means (20), and the slope value holding means (11). An apparatus for generating boundary points of plane polygons, comprising an adding means (17) for adding the content and the content selected by the selection means (16) and supplying the sum again to the cumulative addition value holding means (14).
JP2317136A 1990-11-20 1990-11-20 Boundary point generator for plane polygon Pending JPH04184688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2317136A JPH04184688A (en) 1990-11-20 1990-11-20 Boundary point generator for plane polygon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2317136A JPH04184688A (en) 1990-11-20 1990-11-20 Boundary point generator for plane polygon

Publications (1)

Publication Number Publication Date
JPH04184688A true JPH04184688A (en) 1992-07-01

Family

ID=18084845

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2317136A Pending JPH04184688A (en) 1990-11-20 1990-11-20 Boundary point generator for plane polygon

Country Status (1)

Country Link
JP (1) JPH04184688A (en)

Similar Documents

Publication Publication Date Title
KR950012931B1 (en) Graphic display device
JPS62256186A (en) Graphic display processing system
WO1996031843A1 (en) Method and apparatus for image rotation
US6437781B1 (en) Computer graphics system having per pixel fog blending
KR920007507B1 (en) Three-dimensional graphic processing apparatus
US4607340A (en) Line smoothing circuit for graphic display units
US5157385A (en) Jagged-edge killer circuit for three-dimensional display
US7015930B2 (en) Method and apparatus for interpolating pixel parameters based on a plurality of vertex values
JP3985321B2 (en) Arithmetic apparatus and image processing apparatus
JP2001222712A (en) Image processor, convolutional integration circuit and method therefor
JPH03144782A (en) Three-dimensional processor
JPH04184688A (en) Boundary point generator for plane polygon
US5299299A (en) Scan line full figure filling device for display units and printers
JPS6266383A (en) Method and apparatus for generating halftone image signal from reference image signal
JP2634126B2 (en) Graphics display method and apparatus
US5167018A (en) Polygon-filling apparatus
JP4325038B2 (en) Image processing device
JPH05298456A (en) Texture mapping system
JP2009048509A (en) Multi-texture mapping device and memory storage method of multi-texture data
JP4224887B2 (en) Signal processing apparatus and image processing apparatus
JPH11242585A (en) Division circuit and graphic arithmetic unit
JP2836617B2 (en) Rendering processor
JP2766478B2 (en) Image processing system
JP2814631B2 (en) Arithmetic circuit in shading
JP2770514B2 (en) Shading device