JPH0544712B2 - - Google Patents

Info

Publication number
JPH0544712B2
JPH0544712B2 JP8022386A JP8022386A JPH0544712B2 JP H0544712 B2 JPH0544712 B2 JP H0544712B2 JP 8022386 A JP8022386 A JP 8022386A JP 8022386 A JP8022386 A JP 8022386A JP H0544712 B2 JPH0544712 B2 JP H0544712B2
Authority
JP
Japan
Prior art keywords
edge
data
pointer
vertex
approach
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.)
Expired - Lifetime
Application number
JP8022386A
Other languages
Japanese (ja)
Other versions
JPS62237579A (en
Inventor
Takayoshi Yoshida
Yasushi Wauke
Ikuo Ooya
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP8022386A priority Critical patent/JPS62237579A/en
Publication of JPS62237579A publication Critical patent/JPS62237579A/en
Publication of JPH0544712B2 publication Critical patent/JPH0544712B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、3次元画像表示装置で併用される多
角形の走査変換器に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a polygonal scan converter used in conjunction with a three-dimensional image display device.

(従来の技術) 3次元の色彩付き画像をラスター走査型CRT
表示装置の表示画面上に生成表示する方式に、多
角形モデルのZバツフア法を用いた表示処理方式
がある。まずその方法を順を追つて述べる。
(Prior technology) Raster scanning type CRT for 3D colored images
As a method for generating and displaying images on the display screen of a display device, there is a display processing method using a Z-buffer method of a polygonal model. First, I will explain the method step by step.

() 形状モデリング 物体形状を3次元世界座標系内に定義する。多
角形モデルでは、3次元物体の表面を多角形の集
合として表現する。物体表面が曲面を含む場合
は、曲面を多角形に分割して近似する。
() Shape modeling Define the object shape within the 3D world coordinate system. In a polygonal model, the surface of a three-dimensional object is expressed as a set of polygons. If the object surface includes a curved surface, the curved surface is divided into polygons and approximated.

() 座標変換 3次元世界座標系内に投影面及び投影方法(平
行投影か中心投影か)を指定し、投影面上に設定
した2次元座標系に投影変換する。多角形モデル
では、多角形のすべての頂点を投影変換する。こ
のとき、後述する隠面消去のために頂点毎に投影
面に至る奥行きの値(深度Z)も求める。次にク
リツピングを行うことがある。これは、投影面上
に矩形の窓枠を設定し、投影図の窓枠内部にある
部分のみを表示するために、窓枠の外部にある多
角形を除去し、窓枠と交差する多角形は窓枠の内
部に含まれる部分のみ残す処理である。
() Coordinate transformation Specify the projection plane and projection method (parallel projection or central projection) in the 3D world coordinate system, and perform projection transformation to the 2D coordinate system set on the projection plane. For polygonal models, project all vertices of the polygon. At this time, the depth value (depth Z) reaching the projection plane is also determined for each vertex in order to eliminate hidden surfaces, which will be described later. Next, clipping may be performed. This sets a rectangular window frame on the projection plane, and in order to display only the part inside the window frame of the projection, removes the polygons outside the window frame, and removes the polygons that intersect with the window frame. is a process that leaves only the part included inside the window frame.

() 走査変換 頂点の系列で表現された多角形を表示画面上の
画素の系列に変換する。それには、多角形の頂点
座標からその稜線上の画素を補間して生成し、次
に多角形の内部の画素を生成する。隠面消去のた
めには、画素毎に投影面から当該多角形に至る深
度Zも計算する。
() Scan conversion Converts a polygon represented by a sequence of vertices into a sequence of pixels on the display screen. To do this, pixels on the edges of the polygon are interpolated from the coordinates of the vertices of the polygon, and then pixels inside the polygon are generated. In order to remove hidden surfaces, the depth Z from the projection plane to the polygon is also calculated for each pixel.

() 隠面消去を伴う画像メモリ更新 複数個の多角形が表示画面上で重なる場合に
は、視点側から見て最も手前にある多角形を優先
的に表示する必要がある。この隠面消去処理を画
素単位に行うのがZバツフア法である。Zバツフ
ア法によれば、画面上の画素アドレス(x,y)
に対して三原色の強度(R,G,B)を記憶する
画像メモリの他に、深度Zを記憶するZバツフア
メモリ(デプスバツフアメモリとも呼ぶ)を使用
し、予め画像メモリ(R,G,B)を背景色で、
Zバツフアメモリを深度の最大値Znaxで満たして
おく。多角形を走査変換して、深度及び三原色を
もつ画素の系列(xi,yi,zi,Ri,Gi,Bi)i=
1,2,3、……に展開し、画像メモリのアドレ
ス(xi,yi)に三原色強度(Ri,Gi,Bi)を書き
込む以前に、Zバツフアメモリのアドレス(xi
yi)における深度ZMを読み出し、ZMとZiの大小を
比較し、Zi<ZMのときに限り、前記(Ri,Gi
Bi)の書き込みを行うと共に、Zバツフアメモリ
ZMの値をZiで置き換える。すなわち、Zバツフア
メモリは現在までに描画された最も視点に近い多
角形の深度を記憶し、これより深度の大きい画素
の書き込みを抑制する。以上の処理をすべての多
角形の走査変換されたすべての画素について順次
実行すれば、最終的に正しく隠面消去された画素
が画像メモリ(R,G,B)に得られる。
() Image memory update with hidden surface removal When multiple polygons overlap on the display screen, it is necessary to preferentially display the polygon that is closest to the viewer as viewed from the viewpoint. The Z buffer method performs this hidden surface removal process pixel by pixel. According to the Z buffer method, the pixel address (x, y) on the screen
In addition to the image memory that stores the intensities of the three primary colors (R, G, B), a Z buffer memory (also called depth buffer memory) that stores the depth Z is used. ) as the background color,
Fill the Z buffer memory with the maximum depth Z nax . Scan-convert the polygon to obtain a sequence of pixels (x i , y i , z i , R i , G i , B i ) with depth and three primary colors i=
1, 2, 3, ..., and before writing the three primary color intensities (R i , G i , B i ) to the image memory address (x i , y i ), the Z buffer memory address (x i ,
The depth Z M at y i ) is read out, the magnitude of Z M and Z i is compared, and only when Z i < Z M , the depth Z M at (R i , G i ,
B i ) and Z buffer memory.
Replace the value of Z M with Z i . That is, the Z buffer memory stores the depth of the polygon closest to the viewpoint that has been drawn so far, and suppresses writing of pixels with a greater depth than this. By sequentially performing the above processing on all scan-converted pixels of all polygons, pixels whose hidden surfaces have been correctly removed are finally obtained in the image memory (R, G, B).

以上の処理方式はアルゴリズムが単純で、ハー
ドウエアによる高速処理が可能であるから、画像
メモリの他に、座標変換器、走査変換器、Zバツ
フアメモリを装備した3次元画像表示装置が存在
する。このような装置は例えば、IEEE コンピ
ユータ グラフイツクス アンド アプリケーシ
ヨンズ(IEEE Computer Graphics and
Applications),vol.4,No.6,(1984)P.11−23
に開示されたものがあり、その構成図を第11図
に示す。また、座標変換された多角形の種類を示
す図を第12図a〜bに示す。セグメントメモリ
101に記憶された多角形データは、座標変換器
35により前述したように2次元座標系の投影面
に投影して座標変換される(中心投影の場合は除
算器105も使用する)。
Since the above processing method has a simple algorithm and can be processed at high speed by hardware, three-dimensional image display devices exist that are equipped with a coordinate converter, a scan converter, and a Z buffer memory in addition to an image memory. Such devices are, for example, IEEE Computer Graphics and Applications
Applications), vol.4, No.6, (1984) P.11-23
There is a device disclosed in , and its configuration diagram is shown in FIG. 11. Further, figures showing the types of polygons whose coordinates have been transformed are shown in FIGS. 12a to 12b. The polygon data stored in the segment memory 101 is projected onto the projection plane of the two-dimensional coordinate system by the coordinate converter 35 as described above, and its coordinates are converted (in the case of central projection, the divider 105 is also used).

次に、座標変換された多角形は走査変換器11
2内の三角形分割器103により三角形に分割さ
れる。例えば第12図aに示すような6角形V1
V2V3V4V5V6は3本の対角線V1V3,V1V4,V1
V5により4個の3角形に分割される。これらの
分割された三角形の1つであるV1V2V3の座標を
V1(x1,y1,z1)、V2(x2,y2,z2)、V3(x3,y3
z3)とすると、走査変換器112内の初期化器1
04及び除算器105は次式により増分値を計算
する。
Next, the coordinate-converted polygon is sent to a scan converter 11.
It is divided into triangles by a triangulator 103 in 2. For example, a hexagon V 1 as shown in Figure 12a
V 2 V 3 V 4 V 5 V 6 is the three diagonal lines V 1 V 3 , V 1 V 4 , V 1
Divided into 4 triangles by V 5 . The coordinates of one of these divided triangles, V 1 V 2 V 3 , are
V 1 (x 1 , y 1 , z 1 ), V 2 (x 2 , y 2 , z 2 ), V 3 (x 3 , y 3 ,
z 3 ), initializer 1 in scan converter 112
04 and the divider 105 calculate the increment value using the following equation.

∂z/∂x=(z2−z1)(y3−y1)−(z3
z1)(y2−y1)/(x2−x1)(y3−y1)−(x3−x1)(
y2−y1)…… ∂z/∂y=(x2−x1)(z3−z1)−(x3
x1)(z2−z1)/(x2−x1)(y3−y1)−(x3−x1)(
y2−y1)…… これらの値は三角形内部におけるx方向、y方
向に関する深度Zの傾斜を示す。増分器106と
メモリ更新器107が三角形内部の連続する画素
を塗りつぶす際に、画素を左右上下に移動する毎
に深度Zに∂z/∂xまたは∂z/∂yを加算または減算す
る ことにより、画素の深度Zを正しく計算できるよ
うにしている。
∂z/∂x=(z 2 −z 1 )(y 3 −y 1 )−(z 3
z 1 )(y 2 −y 1 )/(x 2 −x 1 )(y 3 −y 1 )−(x 3 −x 1 )(
y 2 −y 1 )... ∂z/∂y=(x 2 −x 1 )(z 3 −z 1 )−(x 3
x 1 )(z 2 −z 1 )/(x 2 −x 1 )(y 3 −y 1 )−(x 3 −x 1 )(
y 2 −y 1 )... These values indicate the slope of the depth Z in the x direction and the y direction inside the triangle. When the incrementer 106 and the memory updater 107 fill consecutive pixels inside the triangle, they add or subtract ∂z/∂x or ∂z/∂y to the depth Z each time the pixel is moved left, right, up, or down. , the pixel depth Z can be calculated correctly.

このようにして得られた多角形の内部の深度Z
を含む画素データは、前述のようにメモリ更新器
107、Zバツフアメモリ108、画像メモリ1
09により隠面消去された画像となり、ビデオリ
フレツシユ110を介してCRT111の表示画
面上に表示される。
The interior depth Z of the polygon thus obtained
As mentioned above, the pixel data including the
09, the hidden surface is removed and the image is displayed on the display screen of the CRT 111 via the video refresh 110.

なお、第12図bに示すような凹頂点を2個以
上含む凹多角形は三角形分割器103では処理で
きないので制御プロセツサ100に戻して分割し
ている。
It should be noted that a concave polygon including two or more concave vertices as shown in FIG.

(発明が解決しようとする問題点) しかしながら、前記従来装置の走査変換器では
前述のような凹多角形や第12図cのような穴の
ある多角形や第12図dのような複数の島に分か
れた多角形は処理することができない問題点があ
つた。また、初期化のために式,に示すよう
な複雑な増分値計算を行うのに高精度の乗除算を
伴う四則計算が必要となるので、処理時間が長く
かかるという問題点があつた。
(Problems to be Solved by the Invention) However, the scanning converter of the conventional device has a concave polygon as described above, a polygon with a hole as shown in FIG. 12c, or a plurality of polygons as shown in FIG. There was a problem that polygons divided into islands could not be processed. In addition, since four arithmetic calculations involving highly accurate multiplication and division are required to perform complex incremental value calculations as shown in equation (2) for initialization, there is a problem in that processing time is long.

本発明は以上述べた問題点を解決し、多角形の
形状に制約されず、任意形状の多角形の走査変換
が可能であると共に、比較的単純な構成で高機能
かつ高速の走査変換器を提供することを目的とす
る。
The present invention solves the above-mentioned problems, enables scan conversion of polygons of arbitrary shapes without being restricted by the shape of the polygon, and provides a highly functional and high-speed scan converter with a relatively simple configuration. The purpose is to provide.

(問題点を解決するための手段) 本発明は前記問題点を解決するために、3次元
画像表示装置における多角形の走査変換器におい
て、入力端子と、出力端子と、少なくとも第1の
データメモリ、第1の頂点ポインタ、第1のエツ
ジポインタ、第1の算術論理演算ユニツトから成
る左エツジプロセツサと、少なくとも第2のデー
タメモリ、第2の頂点ポインタ、第2のエツジポ
インタ、第2の算術論理演算ユニツトから成る右
エツジプロセツサと、2つの整数の除算を行なう
除算器と、前記走査変換器全体の制御を行なうマ
イクロプログラムコントローラと、前記入力端
子、前記出力端子、前記左エツジプロセツサ、前
記右エツジプロセツサ、前記除算器、前記マイク
ロプログラムコントローラの間を結びデータ転送
を行なう内部データバスとから成り、x座標、y
座標、z座標、次の頂点へのポインタから成り、
前記多角形の内部領域を右側に見込むように並べ
た頂点データの系列として表現された多角形デー
タを前記入力端子から入力し、前記第1及び第2
のデータメモリに記憶する多角形データ入力処理
と、前記左エツジプロセツサと前記右エツジプロ
セツサとを用いて前記多角形を囲むすべての稜線
をy座標の増加する方向に進む左側稜線とy座標
の減少する方向に進む右側稜線に分類し、x座標
及びz座標の初期値と増分値、高さ、次の稜線へ
のポインタから成る左側稜線データの系列を前記
第1のデータメモリに作成し、x座標及びz座標
の初期値と増分値、高さ、次の稜線へのポインタ
から成る右側稜線データの系列を前記第2のデー
タメモリに作成し、前記除算器を用いて前記左右
稜線データのx座標及びz座標の増分値を演算
し、y座標、進入差分、進入エツジへのポインタ
から成りy座標の昇順にソートされた進入頂点デ
ータの系列を前記第1のデータメモリに作成する
稜線データ作成処理と、前記進入頂点データの系
列の最初の進入頂点を前記第1の頂点ポインタに
よつて指し、走査線のy座標を最小値に設定し、
左アクテイブエツジリストと右アクテイブエツジ
リストを空にするスキヤンライン初期化処理と、
走査線毎にy座標を1だけ増加し、前記進入差分
を1だけ減じるスキヤンライン更新処理と、前記
進入頂点データの進入差分が0になつたら次の進
入頂点の進入エツジへのポインタを前記左アクテ
イブエツジリスト及び右アクテイブエツジリスト
にx座標の昇順にソートされるように挿入するエ
ツジ進入処理と、前記左右アクテイブエツジリス
トが空でない走査線に対し最初の左右稜線データ
の対を前記第1及び第2のエツジポインタによつ
て指すエツジポインタ初期化処理と、左右稜線デ
ータを処理する毎に左右アクテイブエツジリスト
の次の左右稜線データを第1及び第2のエツジポ
インタによつて指すエツジポインタ更新処理と、
前記左右稜線データを用いて前記多角形の内部領
域に属し、少なくとも左端点のx座標及びz座
標、z座標の増分値、長さから成る走査線分デー
タを作成し、前記出力端子に出力し、前記左右稜
線データのx座標及びz座標の次の走査線の値に
更新するセグメント発生処理と、前記スキヤンラ
イン初期化処理、前記スキヤンライン更新処理、
前記エツジ進入処理、前記エツジポインタ初期化
処理、前記エツジポインタ更新処理、前記セグメ
ント発生処理とを用いて前記多角形の内部領域に
属するすべての走査線分データを作成して走査変
換処理を行なうものである。
(Means for Solving the Problems) In order to solve the above problems, the present invention provides a polygonal scan converter in a three-dimensional image display device, which includes an input terminal, an output terminal, and at least a first data memory. , a left edge processor consisting of a first vertex pointer, a first edge pointer, a first arithmetic logic unit, and at least a second data memory, a second vertex pointer, a second edge pointer, and a second arithmetic logic unit. a right edge processor consisting of an arithmetic unit, a divider for dividing two integers, a microprogram controller for controlling the entire scan converter, the input terminal, the output terminal, the left edge processor, the right edge processor, the It consists of a divider, an internal data bus that connects the microprogram controller, and performs data transfer.
Consists of coordinates, z coordinates, and a pointer to the next vertex,
Polygonal data expressed as a series of vertex data arranged so that the inner region of the polygon is seen on the right side is inputted from the input terminal, and the first and second
polygon data input processing to be stored in the data memory of , and all the edges surrounding the polygon using the left edge processor and the right edge processor, the left edge line moving in the direction of increasing y-coordinate and the direction of decreasing y-coordinate. A series of left edge data consisting of initial values and increment values of x and z coordinates, height, and a pointer to the next edge is created in the first data memory, and A series of right edge data consisting of the initial value and increment value of the z coordinate, height, and a pointer to the next edge is created in the second data memory, and the x coordinate and the left edge data of the left and right edge data are created using the divider. an edge line data creation process of calculating an increment value of the z coordinate and creating in the first data memory a series of approach vertex data consisting of the y coordinate, approach difference, and a pointer to the approach edge and sorted in ascending order of the y coordinate; , point to the first approach vertex of the series of approach vertex data with the first vertex pointer, and set the y-coordinate of the scan line to a minimum value;
Scan line initialization processing to empty the left active edge list and right active edge list,
A scan line update process in which the y coordinate is increased by 1 for each scan line and the approach difference is decreased by 1, and when the approach difference of the approach vertex data becomes 0, the pointer to the approach edge of the next approach vertex is moved to the left edge entry processing for inserting the first pair of left and right edge data into the active edge list and the right active edge list so as to be sorted in ascending order of x-coordinates; Initialize the edge pointer pointed by the second edge pointer, and update the edge pointer by pointing the next left and right edge data in the left and right active edge list with the first and second edge pointers each time left and right edge data is processed. processing and
Using the left and right edge data, create scanning line segment data belonging to the internal region of the polygon and consisting of at least the x and z coordinates of the left end point, the increment value of the z coordinate, and the length, and output it to the output terminal. , a segment generation process for updating the x-coordinate and z-coordinate of the left and right edge data to the values of the next scan line, the scan line initialization process, the scan line update process,
All scan line segment data belonging to the internal region of the polygon is created using the edge entry process, the edge pointer initialization process, the edge pointer update process, and the segment generation process, and scan conversion process is performed. It is.

好ましくは前記除算器が入力の逆数を発生する
逆数表と、該逆数表の出力と入力を乗算する乗算
器とを有するものである。
Preferably, the divider has a reciprocal table that generates a reciprocal of an input, and a multiplier that multiplies the output of the reciprocal table and the input.

(作用) 本発明によれば以上のように走査変換器を構成
したので、技術的手段は次のように作用する。
(Operation) According to the present invention, since the scanning converter is configured as described above, the technical means operates as follows.

稜線データ作成処理は多角形の頂点データから
左側及び右側の稜線データを作成してそれぞれ左
右のエツジプロセツサに記憶する。この際、稜線
データに含まれる稜線方向の増分値(dx/dy,dz/dy) を除算器にて演算する。次に走査変換処理は当該
多角形と交差する走査線を画面の垂直方向(下か
ら上、又は上から下)へ順次掃引し、走査線を更
新する毎に左右のエツジプロセツサより左側稜線
データ及び右側稜線データを読出し更新しつつ当
該走査線と当該多角形との交点から走査線分デー
タを作成して出力する。この際、走査線分データ
に含まれる線分方向の深度Zの増分値(dz/dx)を 除算器を用いて演算する。このように、多角形を
直接走査線分に分解すると共に左右のプロセツサ
で並列処理しているため、任意の形状の多角形の
走査変換を高速に行なうことができる。従つて、
前記従来技術の問題点を解決できるのである。
The edge data creation process creates left and right edge data from polygon vertex data and stores them in the left and right edge processors, respectively. At this time, the increment value (dx/dy, dz/dy) in the ridge direction included in the ridge line data is calculated using a divider. Next, the scan conversion process sequentially sweeps the scan lines that intersect the polygon in the vertical direction of the screen (from bottom to top, or from top to bottom), and each time the scan line is updated, the left and right edge data are processed by the left and right edge processors. While reading and updating the edge line data, scanning line segment data is created and output from the intersection of the scanning line and the polygon. At this time, the increment value (dz/dx) of depth Z in the line segment direction included in the scanning line segment data is calculated using a divider. In this way, polygons are directly decomposed into scanning line segments and processed in parallel by the left and right processors, so that scan conversion of polygons of arbitrary shapes can be performed at high speed. Therefore,
The problems of the prior art described above can be solved.

(実施例) 第1図は本発明の一実施例を示す走査変換器の
ブロツク図である。同図において、1は入力端
子、2は内部バス、3−1,3−2,3−3,3
−4,3−5はバスドライバ、4はバスレシー
バ、5は先入れ先出しメモリ(FIFO)、6は出力
端子である。内部バス2には点線で囲んだ左エツ
ジプロセツサ29、右エツジプロセツサ30、除
算器31、マイクロプログラムコントローラ32
が接続されている。左エツジプロセツサ29内に
は左側稜線データメモリDM1,12−1があつ
て、そのアドレス線には進入頂点ポインタVP1,
7−1、前記エツジポインタPEP1,8−1、
エツジポインタEP1,9−1が、アドレスマル
チプレクサMXA1,10−1、アドレス加算器
11−1を経由して接続されている。DM1,1
2−1の出力データはデータマルチプレクサ
MXD1,13−1及びレジスタS1,14−
1、又はレジスタR1,15−1を通り演算器
ALU1,16=1を経由してDM1,12−1
の入力データとなるか、またはバスドライバ3−
3を経由して内部バス2に読み出される。MXD
1,13−1の他の入力端子には、内部バス2,
MAX1,10−1の出力が接続されている。右
エツジプロセツサ30は左エツジプロセツサ29
と同じ構成をもつ(参照符号はハイフオン2で示
す)。除算器31は、除数レジスタR3,17、
逆数テーブルINV18、逆数レジスタR4,1
9、被除数レジスタR5,20、乗算器21、商
レジスタR6,22から成り、同図から明らかな
ようにR5/R3の値を求める。マイクロプログ
ラムコントローラ32は、マイクロプログラムシ
ーケンサSEQ23、マイクロプログラムメモリ
MPM24、マイクロプログラムレジスタMPR
25から成り、MPM24に記憶されたマイクロ
プログラムを実行することにより、走査変換器全
体を制御する。MPR25の出力からの一方のデ
ータ線26はバスドライバ3−4を経由して内部
バス2に定数データを供給するか、またはSEQ
23に飛び先アドレスを供給する。他方のデータ
線27はアドレス加算器11−1及び11−2に
共通のアドレス加算量を供給する。制御線28は
走査変換器の各部に制御信号を供給する。
(Embodiment) FIG. 1 is a block diagram of a scan converter showing an embodiment of the present invention. In the same figure, 1 is an input terminal, 2 is an internal bus, 3-1, 3-2, 3-3, 3
-4, 3-5 are bus drivers, 4 is a bus receiver, 5 is a first-in first-out memory (FIFO), and 6 is an output terminal. The internal bus 2 includes a left edge processor 29, a right edge processor 30, a divider 31, and a microprogram controller 32, which are surrounded by dotted lines.
is connected. The left edge data memory DM1, 12-1 is located in the left edge processor 29, and the approach vertex pointer VP1,
7-1, the edge pointer PEP1, 8-1,
Edge pointers EP1, 9-1 are connected via address multiplexers MXA1, 10-1 and address adder 11-1. DM1,1
2-1 output data is data multiplexer
MXD1, 13-1 and register S1, 14-
1, or arithmetic unit through register R1, 15-1
DM1,12-1 via ALU1,16=1
or bus driver 3-
3 to the internal bus 2. MXD
The other input terminals of 1 and 13-1 include internal buses 2 and 13-1.
The outputs of MAX1 and 10-1 are connected. The right edge processor 30 is the left edge processor 29.
It has the same structure as (the reference number is indicated by a hyphen 2). The divider 31 includes divisor registers R3, 17,
Reciprocal table INV18, reciprocal register R4,1
9, a dividend register R5, 20, a multiplier 21, and a quotient register R6, 22.As is clear from the figure, the value of R5/R3 is determined. The microprogram controller 32 includes a microprogram sequencer SEQ23 and a microprogram memory.
MPM24, micro program register MPR
25 and controls the entire scan converter by executing a microprogram stored in MPM 24. One data line 26 from the output of the MPR 25 supplies constant data to the internal bus 2 via the bus driver 3-4, or
23 with the destination address. The other data line 27 supplies a common address addition amount to address adders 11-1 and 11-2. Control lines 28 provide control signals to various parts of the scan converter.

次に動作を説明する。本実施例の走査変換器の
走査変換する処理手順は入力処理を行つた後は、
左右の稜線リスト作成処理と走査変換処理に大き
く分けられる。
Next, the operation will be explained. The processing procedure for scan conversion of the scan converter in this embodiment is as follows after input processing:
The process can be broadly divided into left and right edge list creation processing and scan conversion processing.

まず、入力処理及び稜線リスト作成処理につい
て説明する。
First, input processing and edge line list creation processing will be explained.

第2図a〜eは多角形データの説明図であつ
て、同図aは多角形の具体例、同図b,cはそれ
ぞれDM1,12−1,DM2,12−2に格納
された同図aの多角形データを記憶する記憶ブロ
ツク、同図d,eは同図b,cの各記憶ブロツク
内部要素を示すものである。
Figures 2a to 2e are explanatory diagrams of polygon data, in which figure a is a specific example of a polygon, and figures b and c are polygon data stored in DM1, 12-1, DM2, and 12-2, respectively. Figure a shows a memory block for storing polygon data, and figures d and e show the internal elements of each memory block shown in figures b and c.

第2図aの多角形データは、入力端子1から、
内部バス2,MXD1,13−1及びMXD2,
13−2,ALU1,16−1及びALU2,16
−2を経由してデータメモリDM1,12−1及
びDM2,12−2に転送され、第2図b,cに
示すようにDM1,12−1とDM2,12−2
に同一の多角形データが格納される。多角形デー
タは固定長の記憶ブロツク(ここでは仮に8語×
20ビツトとする)の集まりで表現され、第2図
b,cのように1個の共通データブロツクCと頂
点個数だけの頂点データブロツクV1〜V9から成
り、各ブロツクの内容は第2図d,eの形式をも
つとする。メモリ内の記憶ブロツクとブロツク内
の要素には第2図b〜dのように0から始まる番
号を付けておき、例えば第3記憶ブロツクの第
要素は頂点V3のy座標を示している。この例で
は頂点番号と記憶ブロツク番号が一致するように
多角形データを格納しており、要素番号〜は
空になつている。第2図b,cの記憶ブロツク番
号は第1図においてMXA1,10−1及び
MXA2,10−2の出力データが指定し、第2
図d,eの要素番号はデータ線27が指定するよ
うに結線されている。1記憶ブロツクの語数を2
の累乗とすれば、アドレス加算器11−1及び1
1−2を用いる必要はない。6個の頂点V1〜V6
は多角形の外側境界ループを、3個の頂点V7
V9は内側境界ループを形成するが、これらの頂
点ループは多角形の内部領域(横線を施した部
分)を右側に見込むように方向づけられている。
即ち、外側境界ループは時計回り、内側境界ルー
プは反時計回りとなつている。頂点データ内の頂
点ポインタvpが次の頂点の番号を記憶している
(第2図dの第◎要素)頂点ポインタvpによる頂
点ループの形成の模様を第2図bの実線の矢印で
示す。共通データ領域Cの中にはこれらのループ
へのポインタである第1〜第3ループポインタが
記憶されている(第2図dの第要素から第要
素)、これを第2図b,cの破線の矢印で示す。
また、第2図dの第◎要素の色cは3原色R,
G,Bの値またはコード化された色情報をもつ。
The polygon data in Figure 2a is input from input terminal 1,
Internal bus 2, MXD1, 13-1 and MXD2,
13-2, ALU1, 16-1 and ALU2, 16
-2 to the data memories DM1, 12-1 and DM2, 12-2, as shown in Fig. 2 b, c.
The same polygon data is stored in . The polygon data is a fixed length memory block (here, 8 words x
20 bits), and consists of one common data block C and as many vertex data blocks V1 to V9 as the number of vertices, as shown in Fig. 2b and c, and the contents of each block are Assume that it has the format shown in Figures d and e. The storage blocks in the memory and the elements within the blocks are numbered starting from 0 as shown in FIG . In this example, polygon data is stored so that the vertex number and memory block number match, and element numbers ~ are empty. The memory block numbers in Figures 2b and 2c are MXA1, 10-1 and MXA1 in Figure 1.
The output data of MXA2, 10-2 is specified, and the second
The element numbers in FIGS. d and e are connected as specified by the data line 27. The number of words in one memory block is 2.
Address adders 11-1 and 1
There is no need to use 1-2. 6 vertices V 1 ~ V 6
defines the outer boundary loop of the polygon with three vertices V 7 ~
V 9 forms inner boundary loops, but these vertex loops are oriented to look into the inner region of the polygon (shaded) to the right.
That is, the outer boundary loop is clockwise, and the inner boundary loop is counterclockwise. The vertex pointer vp in the vertex data stores the number of the next vertex (element ◎ in FIG. 2d). The formation of a vertex loop by the vertex pointer vp is shown by the solid arrow in FIG. 2b. In the common data area C, the first to third loop pointers, which are pointers to these loops, are stored (element d to element 2 in Figure 2). Indicated by dashed arrows.
In addition, the color c of the ◎ element in Fig. 2 d is the three primary colors R,
It has G, B values or coded color information.

次に頂点データから稜線(エツジとも呼ぶ)デ
ータを作成する。第3図a〜dは稜線リストと進
入頂点リストの説明図である。多角形の各稜線は
第3図aに示すようにy座標の増加する方向(下
から上)に向きが付けられ、x座標とz座標の初
期値と増分が付与される。頂点ループに沿つて頂
点Viから頂点Vjに至る稜線において、頂点Vi
y座標yiが頂点Vjのy座標yjより小さければ(即
ちyi<yj)、Viを始点としVjを終点とする順方向
の稜線データVij−−→=Eijを左側稜線データメモ

DM1,12−1に作成する。またyi>yjならば
逆方向の稜線データVji−−→=Ejiを右側稜線デー

メモリDM2,12−2に作成する。頂点V4
V6,V9のように左側稜線と右側稜線の共通の始
点となる頂点を進入頂点と呼び、進入頂点データ
EV4,EV6,EV9をDM1,12−1の第10記憶
ブロツクから第12記憶ブロツクに作成する(第3
図b)。例えばEV4には左側稜線E45と右側稜線
E43へのポインタが記憶される。すべての進入頂
点はy座標の昇順に、すなわちEV6,EV4,EV7
の順にソーテイングされ、進入頂点のy座標の差
分としてh′64=y4−y6がEV6に、h′49=h9−h4
EV4に記憶される。頂点V2,V5,V7のように左
側稜線と右側稜線の共通の終点となる頂点を退出
頂点と呼び、V2を終点とするE12とE32,V5を終
点とするE45とE65,V7を終点とするE87とE97を退
出稜線と呼ぶ。
Next, edge line (also called edge) data is created from the vertex data. FIGS. 3A to 3D are explanatory diagrams of an edge line list and an approach vertex list. Each edge of the polygon is oriented in the direction of increasing y coordinate (from bottom to top) as shown in FIG. 3a, and is given initial values and increments of x and z coordinates. On the edge line from vertex V i to vertex V j along the vertex loop, if the y coordinate y i of vertex V i is smaller than the y coordinate y j of vertex V j (i.e., y i < y j ), set V i as the starting point. Then, the forward direction edge data V i V j −−→=E ij with V j as the end point is stored in the left edge data memory.
Create on DM1, 12-1. Moreover, if y i >y j , the edge line data in the opposite direction V j V i −−→=E ji is created in the right edge line data memory DM2, 12-2. Vertex V 4 ,
The vertex that is the common starting point of the left and right edges, such as V 6 and V 9 , is called the approach vertex, and the approach vertex data is
Create EV 4 , EV 6 , and EV 9 from the 10th memory block of DM1 and 12-1 to the 12th memory block (3rd
Figure b). For example, EV 4 has a left ridgeline E 45 and a right ridgeline.
A pointer to E 43 is stored. All approach vertices are in ascending order of y coordinate, i.e. EV 6 , EV 4 , EV 7
h′ 64 = y 4 − y 6 is EV 6, h′ 49 = h 9 − h 4 is EV 6, and h′ 64 = y 4 − y 6 is EV 6 as the difference in the y coordinate of the approach vertex.
Stored in EV 4 . Vertices that are the common end points of the left and right edges, such as vertices V 2 , V 5 , and V 7 , are called exit vertices, and E 12 and E 32 have V 2 as the end point, and E 45 has V 5 as the end point. E 87 and E 97 , which end at E 65 and V 7 , are called exit ridges.

こうして作成された左側稜線リスト、右側稜線
リスト、進入頂点リストを第3図bに示し、稜線
データと進入頂点データの内容を第3図cに示
す。稜線データEijは両端点のうちy座標の大き
くない方の頂点Viと同じ記憶ブロツクに作成する
ものとする。但し、稜線データと頂点データの記
憶ブロツク内の対応関係は考慮していない。進入
頂点V4を始点とする左側稜線E45はDM1,12
−1のV4領域に、右側稜線E43はDM2,12−
2のV4領域に作成される。退出頂点V2,V5,V7
の領域は空になる。
The left edge list, right edge list, and approach vertex list created in this way are shown in FIG. 3b, and the contents of the edge line data and approach vertex data are shown in FIG. 3c. It is assumed that the edge line data E ij is created in the same memory block as the vertex V i with the smaller y-coordinate among both end points. However, the correspondence within the storage block between edge data and vertex data is not taken into account. The left ridge line E 45 starting from approach apex V 4 is DM1, 12
-1 V 4 area, right edge E 43 is DM2,12-
Created in the V 4 area of 2. Exiting vertices V 2 , V 5 , V 7
The area becomes empty.

第4図は稜線リスト及び進入頂点リストを作成
する処理のフローチヤートを示す。ステツプ40は
第1頂点ループの頂点番号を変数i0に設定する。
点線で囲んだステツプ42の処理は、頂点i0からル
ープをたどり、最初の水平でない稜線Eijを求め、
その稜線Eijの始点iを改めてi0に設定し、その稜
線Eijがy座標の増加する上昇ベクトルならばsp
sgn(yj−yi)>0とし、Eijが下降ベクトルならば
sp<0とする。ここにsgnは正、負または0の符
号を与える関数記号である。ステツプ49は次の稜
線Eijの上昇、下降、水平の種別をsに求め、s
>0ならステツプ51で左エツジデータをDM1,
12−1に、x<0ならステツプ55で右エツジデ
ータをDM2,12−2に作成する。引き続く2
つの稜線の符号spとsとが異符号のときは、Eij
始点Viが進入頂点または退出頂点であるとして、
以下の処理を行う。sp<0,s>0のときは稜線
の向きが下降(または水平)から上昇に移るから
ステツプ53で稜線Eijへのポインタを有する進入
頂点データEViを作成し、ステツプ54でspの符号
を負から正に変えて次の稜線に進む。sp>0,s
<0のときは稜線の向きが上昇(または水平)か
ら下降に移るから、ステツプ56で今回作成した下
降する右側稜線と、ステツプ57で前回の上昇する
(または水平の)左側稜線とをいずれも退出稜線
とし、ステツプ58でspの符号を正から負に変えて
次の稜線に進む。水平な稜線については、s=0
となるのでステツプ59で処理されるが、これは単
にhij=0とすることによりEijが水平な稜線であ
ることを示す。但し、左エツジに引き続く水平エ
ツジは左エツジとみなし、DM1のブロツクiに
Eijとして作成し、右エツジに引き続く水平エツ
ジは右エツジとみなし、DM2のブロツクjに
Ejiとして作成する。ステツプ60は稜線Eijの始点
iが頂点ループの出発点に戻つたかどうかを判定
する。ループ60aは頂点ループに含まれる頂点
の個数回実行され、ループ61aは頂点ループの
個数回実行される。ステツプ41でi0=0ならばす
べての頂点ループの処理が終了したことを示すか
ら、ステツプ62で進入頂点データEViのソーテイ
ングを行う。
FIG. 4 shows a flowchart of processing for creating an edge line list and an approach vertex list. Step 40 sets the vertex number of the first vertex loop to the variable i0 .
The process in step 42, which is surrounded by a dotted line, follows a loop from vertex i 0 , finds the first non-horizontal edge E ij ,
The starting point i of the ridge line E ij is set to i 0 again, and if the ridge line E ij is an ascending vector whose y coordinate increases, then s p =
If sgn(y j −y i )>0 and E ij is a descending vector, then
Let sp < 0. Here, sgn is a function symbol that gives a positive, negative, or 0 sign. In step 49, the type of ascending, descending, and horizontal of the next ridge line E ij is determined in s, and s
>0, in step 51 the left edge data is DM1,
In step 12-1, if x<0, right edge data is created in DM2, 12-2 in step 55. Successive 2
When the signs s p and s of the two ridgelines are of different signs, assuming that the starting point V i of E ij is the entry apex or the exit apex,
Perform the following processing. When s p <0, s > 0, the direction of the ridge changes from descending (or horizontal) to ascending, so in step 53 approach vertex data EV i having a pointer to the ridge E ij is created, and in step 54 s p Change the sign of from negative to positive and proceed to the next edge. s p >0, s
When <0, the direction of the ridgeline changes from rising (or horizontal) to descending, so in step 56, the descending right ridgeline created this time and the previous rising (or horizontal) left ridgeline are changed in step 57. This is set as the exit edge, and in step 58, the sign of sp is changed from positive to negative and the process proceeds to the next edge. For horizontal edges, s=0
Therefore, it is processed in step 59, but simply setting hij=0 indicates that Eij is a horizontal edge. However, the horizontal edge that follows the left edge is considered a left edge, and is added to block i of DM1.
Eij, the horizontal edge that follows the right edge is regarded as the right edge, and is added to block j in DM2.
Create as Eji. Step 60 determines whether the starting point i of the edge E ij has returned to the starting point of the vertex loop. The loop 60a is executed as many times as the number of vertices included in the vertex loop, and the loop 61a is executed as many times as the number of vertices included in the vertex loop. If i 0 =0 in step 41, this indicates that the processing of all vertex loops has been completed, and therefore, in step 62, the incoming vertex data EV i is sorted.

次に第3図cの稜線データEijと第3図dの進
入頂点データEViの内容について説明する。進入
頂点データEViの差分h′ij(第要素)は非負の整
数で次の進入頂点までの走査線の本数を示すか
ら、走査線を更新する毎にh′ijを1つだけ減じて
行けばh′ij=0により次の進入頂点到達したこと
を知る。最後の進入頂点EV9のh′ijは負の値を設
定しておく。稜線データEijは、始点Viにおける
補正された初期値xip及びzip,y座標が1だけ増
加したときの増分値(dx/dy)ij及び(dz/dy)ij,y
方 向の高さhij,2つのポインタsep及びaepを含ん
でいる(第◎要素から第要素)。稜線データEij
におけるsep及び進入頂点データEVjにおけるevp
は、進入頂点から退出頂点に至る稜線の結合を示
すポインタであり、この結合を第3図bに示す。
退出稜線であることはsep=0とすることによつ
て示す。稜線データEijのポインタaepは後述する
走査変換処理でアクテイブエツジリスト(AEL)
を形成するために用いられる。
Next, the contents of the edge line data E ij shown in FIG. 3 c and the approach vertex data EV i shown in FIG. 3 d will be explained. The difference h′ ij (th element) of the approach vertex data EV i is a non-negative integer and indicates the number of scanning lines to the next approach vertex, so every time you update the scanning line, reduce h′ ij by one. If h′ ij =0, it is known that the next approach vertex has been reached. h′ ij of the last approach vertex EV 9 is set to a negative value. The edge line data E ij is the corrected initial value x ip and z ip at the starting point Vi , and the increment value (dx/dy) ij and (dz/dy) ij , y when the y coordinate increases by 1.
It includes the height in the direction h ij and two pointers sep and aep (from the ◎th element to the th element). Edge line data E ij
sep at and approach vertex data EV j at evp
is a pointer indicating the connection of edges from the entry vertex to the exit vertex, and this connection is shown in FIG. 3b.
The exit edge is indicated by setting sep=0. The pointer aep of the edge data E ij is converted to an active edge list (AEL) by the scan conversion process described later.
used to form

稜線データEijの諸要素の計算法を第5図を用
いて説明する。始点Vi(xi,yi,zi)と終点Vj(xj
yj,zj)の座標値はすべて整数であるものとし、
yiyjとする。また、走査線はy座標が整数であ
る水平線で区画された水平な帯状領域であるとす
れば、稜線Eijはyj−yi=hij(本)の走査線を横切
る。これらの走査線を第5図に示すように稜線
Eijにおける第1,2,……,hij走査線と呼び、
これらの走査線の中心線と稜線Eijとの交点をそ
れぞれP1,P2,……,PhijとしてEijの両端点から
これらの分点における(x,y,z)の値を線形
内挿したい。そのために、初期値としてP1にお
ける値(Xip,yip,zip)と、増分としてP12−−−
→=
((dx/dy)ij,1,(dz/dy)ij)を次式によつて求
める。
A method of calculating various elements of the edge line data E ij will be explained using FIG. 5. Starting point V i (x i , y i , z i ) and ending point V j (x j ,
y j , z j ) are all integers,
Let y i y j . Further, assuming that the scanning line is a horizontal band-shaped area partitioned by horizontal lines whose y coordinates are integers, the ridgeline E ij crosses y j −y i =h ij (main) scanning lines. These scanning lines are used as ridge lines as shown in Figure 5.
Called the first, second, ..., h ij scan lines in E ij ,
The intersection points of the center line of these scanning lines and the edge line E ij are respectively P 1 , P 2 , ..., Ph ij , and the values of (x, y, z) at these equinox points are linearly calculated from both end points of E ij . I want to interpolate. For that purpose, the value at P 1 (X ip , y ip , zi ip ) as the initial value and P 1 P 2 --- as the increment.
→=
((dx/dy) ij , 1, (dz/dy) ij ) is determined by the following formula.

hij=yi−yi …… (dx/dy)ij=xj−xi/hij …… (dz/dy)ij=zj−zi/hij …… yip=yi+0.5 …… xip=xi+0.5×(dx/dy)ij …… zip=zi+0.5×(dz/dy)ij …… 稜線データEijは式のyip以外のこれらの値を
前述のように記憶する(第3図c)。hij=0であ
る水平な稜線については、分点P1,P2、……が
存在しないからhij以外の上記の値を記憶する必要
はない。
h ij =y i −y i ... (dx/dy) ij =x j −x i /h ij ... (dz/dy) ij =z j −z i /h ij ... y ip =y i +0 .5... x ip = x i +0.5×(dx/dy) ij ... z ip =z i +0.5×(dz/dy) ij ... Edge line data E ij are these other than y ip in the equation The value of is stored as described above (FIG. 3c). For a horizontal edge line where h ij =0, there is no equinox P 1 , P 2 , . . . , so there is no need to store the above values other than h ij .

以上は左右の稜線リストの作成手順とその結果
を述べたもので、次にこれを第1図の走査変換器
を用いて実行する手順を説明する。第4図のステ
ツプ43の処理は、第2図dのループポインタの値
ipをDM1,12−1から読み出し、第1図のレ
ジスタR1,15−1、演算器ALU1,16−
1、バスドライバ3−3、内部バス2を経てレジ
スタEP1,9−1に設定してEP1,9−1の値
をiとする。次にEP1,9−1の指すDM1,
12−1の記憶ブロツクの頂点データV1のポイ
ンタvpを読み出し、レジスタR1,15−1、
演算器ALU1,16−1、バスドライバ3−3、
内部バス2を経てレジスタEP2,9−2に設定
してEP2の値をjとし、DM2の頂点データVj
を指す。以後の説明ではデータの転送経路は省略
する。
The above has described the procedure for creating left and right edge lists and the results thereof.Next, the procedure for executing this using the scan converter shown in FIG. 1 will be explained. The process at step 43 in FIG. 4 is performed using the value of the loop pointer in FIG.
i p is read from DM1, 12-1, register R1, 15-1 in FIG. 1, arithmetic unit ALU1, 16-
1. Set in register EP1, 9-1 via bus driver 3-3 and internal bus 2, and set the value of EP1, 9-1 to i. Next, DM1 pointed to by EP1, 9-1,
The pointer vp of the vertex data V1 of the storage block 12-1 is read out, and the register R1, 15-1,
Arithmetic unit ALU1, 16-1, bus driver 3-3,
Set it in register EP2, 9-2 via internal bus 2, set the value of EP2 to j, and set the vertex data of DM2 as V j
refers to In the following explanation, the data transfer route will be omitted.

第4図のステツプ44の処理は、第1図において
EP1,9−1の指すDM1,12−1の頂点デ
ータViのy座標yiと、EP2,9−2の指すDM2
の頂点データVjのy座標yjを読み出し、yiをレジ
スタR1,15−1に、yjをレジスタS1,14
−1に設定し、演算器ALU1,16−1でyj−yi
を計算し、その符号をspとしてALU1内に設け
た状態レジスタに設定する。第4図のステツプ47
及び48の処理は、第1図においてEP1,9−1
の値iをPEP1,8−1に、EP2,9−2の値
jをPEP2,8−2に移動し、次にEP1,9−
1の指すDM1,12−1の頂点データViのポイ
ンタvpiをEP1,9−1に転送し、EP2,9−
2の指すDM2,12−2の頂点データVjのポイ
ンタvpjをEP2に転送することにより、i,jの
値を更新する。PEP1,8−1,PEP2,8−
2は前回処理した稜線のi,jの値を保持する。
第4図のステツプ46の処理は、EP1,9−1の
値iをDM1,12−1内のループポインタに再
設定する。第4図のステツプ49の処理は、ステツ
プ44と同様にyj−yiの符号sを求め、演算器ALU
1,16−1内の状態レジスタに設定する。yj
yi>0の場合はステツプ51で左側稜線データEij
EP1,9−1の指すDM1の記憶ブロツクに作
成する。まず式のhij=yj−yiの値を第3図cの
稜線データEijのhijとして記憶する。次に、hij
除算器31内のレジスタR3,17に設定し、逆
数表(INV)18で1/hijを求める。次に式
において、xiをDM1,12−1から読み出して
R1,15−1に、xjをDM2,12−2から読
み出してS1,14−1に設定し、ALU1,1
6−1でxj−xiを計算してその結果をレジスタR
5,20に設定し、乗算器21により(dx/dy)ij= xj−xi/hijを求め、この値を第3図cのEijの(dx/dy
ij として記憶する。式の(dz/dy)ijの求め方は (dx/dy)ijと同様である。式は(dx/dy)ijをR1
,1 5−1に読み出し、xiをS1,14−1に読み出
し、ALU1,16−1においてR1,15−1
を右に1ビツト算術シフトした値とS1,14−
1の値を加算してxip=xi+0.5×(dx/dy)ijを求め、 その結果を第3図cの稜線データEijのxipとして
記憶する。式のzipはxipと同様に求める。yj−yi
<0の場合はステツプ55で右側稜線データEji
EP2,9−2の指すDM2,12−2の記憶ブ
ロツクに作成する。この場合、添字iとjを交換
し、以下の値を求め、DM2,12−2に記憶す
る。
The process of step 44 in FIG. 4 is similar to that in FIG.
The y coordinate y i of the vertex data V i of DM1, 12-1 pointed to by EP1, 9-1, and the DM2 pointed to by EP2, 9-2
Read the y coordinate y j of the vertex data V j of , and set y i to register R1, 15-1 and y j to register S1, 14.
-1, and the calculation unit ALU1, 16-1 calculates y j −y i
is calculated and its sign is set as sp in the status register provided in ALU1. Step 47 in Figure 4
and 48 processing is EP1, 9-1 in Fig. 1
Move the value i of EP1,8-1 to PEP1,8-1, move the value j of EP2,9-2 to PEP2,8-2, then move EP1,9-
The pointer vp i of the vertex data V i of DM1, 12-1 pointed to by DM1, 12-1 is transferred to EP1, 9-1, and
By transferring the pointer vp j of the vertex data V j of DM 2, 12-2 pointed to by 2 to EP 2, the values of i, j are updated. PEP1,8-1, PEP2,8-
2 holds the values of i and j of the edge line processed last time.
The process at step 46 in FIG. 4 resets the value i of EP1,9-1 to the loop pointer in DM1,12-1. The process at step 49 in FIG .
1, set in the status register in 16-1. y j−
If y i > 0, in step 51, the left edge data E ij is
Create it in the memory block of DM1 pointed to by EP1, 9-1. First, the value of the equation h ij =y j −y i is stored as h ij of the edge line data E ij in FIG. 3c. Next, h ij is set in the register R3, 17 in the divider 31, and 1/h ij is determined using the inverse number table (INV) 18. Next, in the equation, x i is read from DM1, 12-1 and set to R1, 15-1, x j is read from DM2, 12-2 and set to S1, 14-1, and ALU1, 1
In 6-1, calculate x j −x i and store the result in register R.
5, 20, the multiplier 21 calculates (dx/dy) ij = x j −x i /h ij , and this value is expressed as (dx/dy) of E ij in Figure 3c.
) memorized as ij . The method for finding (dz/dy) ij in the equation is the same as (dx/dy) ij . The formula is (dx/dy) ij is R1
, 1 5-1, read x i to S1, 14-1, read R1, 15-1 in ALU 1, 16-1
The value obtained by arithmetic shifting 1 bit to the right and S1,14-
1 is added to obtain x ip = x i +0.5×(dx/dy) ij , and the result is stored as x ip of the edge data E ij in Figure 3c. Find z ip in the formula in the same way as x ip . y j −y i
If <0, in step 55 the right edge data E ji is
It is created in the memory block of DM2, 12-2 pointed to by EP2, 9-2. In this case, the subscripts i and j are exchanged, and the following values are obtained and stored in the DM 2, 12-2.

hji=yi−yj ……′ (dx/dy)ji=xi−xj/hji ……′ (dz/dy)ji=zi−zj/hji ……′ xjp=xj+0.5×(dx/dy)ji ……′ zjp=zj+0.5×(dz/dy)ji ……′ 左側稜線データEijのポインタsepは頂点ループ
のポインタvpをそのまま用いればよいが、右側
稜線データEjiのポインタsepは頂点ループはポイ
ンタvpとは逆向きにする必要がある。それには
EP1,9−1の値iをEP2,9−2の指すDM
2,12−2の第j記憶ブロツクのsepの転送す
る。第4図のステツプ53の進入頂点データEVi
作成するには進入頂点の最初の記憶ブロツク番号
をvp0として共通データブロツク等に保持し、
最初vp0をVP1に設定し、以後VP1をカウン
タとして用いて記憶ブロツク番号を指定し、EP
1,9−1の値iをVP1,7−1の指すDM1,
12−1の記憶ブロツクEViのポインタevpに設
定し、EP1,9−1の指すDM1,12−1の
記憶ブロツクの頂点Viのy座標yiをVP1,7−
1の指すEViのyipに設定する。このyipは式のよ
うに0.5を加えない。これは走査線のy座標値が
(整数+0.5)の形をしていて、この0.5を省略し
ても差し支えないためである。第4図のステツプ
56と57の処理は、EP2,9−2の指す右側稜線
データEjiとPEP1,8−1の指す前回の左側稜
線データEijとの稜線属性を「退出」にする。こ
れはポインタsepの値を0にすることによつて表
示する。第4図のステツプ60の処理はEP1,9
−1のiとDM1,12−1内の共通データ領域
のループポインタipをALU1,16−1で比較す
る。第4図のステツプ62の進入頂点リストのソー
テイングを行うには、第1図のVP1,7−1と
EP1,9−1をソーテイングのための2つのポ
インタとして用い、yipをキーとして昇順に並べ
変え、その後h′ijを計算する。
h ji =y i −y j ……′ (dx/dy) ji =x i −x j /h ji ……′ (dz/dy) ji =z i −z j /h ji ……′ x jp = x j +0.5×(dx/dy) ji …′ z jp =z j +0.5×(dz/dy) ji …′ The pointer sep of the left edge data E ij can be used as is, the pointer vp of the vertex loop. However, the pointer sep of the right edge data E ji needs to be in the opposite direction of the vertex loop to the pointer vp. For that
DM that EP2,9-2 points to the value i of EP1,9-1
2, the sep of the j-th storage block of 12-2 is transferred. To create the approach vertex data EV i in step 53 of FIG. 4, the first memory block number of the approach vertex is stored as vp0 in a common data block, etc.
First set vp0 to VP1, then use VP1 as a counter to specify the memory block number, and
1,9-1 value i is pointed to by VP1,7-1 DM1,
Set the pointer evp of the memory block EV i of 12-1 to the pointer evp of the memory block EV i of DM1, 12-1, and set the y coordinate y i of the vertex V i of the memory block of DM1, 12-1 pointed to by EP1, 9-1 to VP1, 7-
Set to y ip of EV i pointed to by 1. This y ip does not add 0.5 as in the formula. This is because the y-coordinate value of the scanning line has the form (integer + 0.5), and this 0.5 can be omitted. Steps in Figure 4
The processes 56 and 57 change the edge line attributes of the right edge data E ji pointed to by EP2, 9-2 and the previous left edge line data E ij pointed to by PEP1, 8-1 to "exit". This is displayed by setting the value of the pointer sep to 0. The process of step 60 in Fig. 4 is performed in EP1 and 9.
-1 and the loop pointer i p of the common data area in the DMs 1 and 12-1 are compared in the ALUs 1 and 16-1. To sort the entry vertex list in step 62 in Figure 4, use VP1, 7-1 in Figure 1 and
Using EP1 and 9-1 as two pointers for sorting, rearrange them in ascending order using y ip as a key, and then calculate h' ij .

以上が左右稜線リスト及び進入頂点リストの作
成手順である。次に走査変換を行うためのアクテ
イブエツジリスト(AELとも呼ぶ)及びエツジ
ポインタ(EPとも呼ぶ)について説明する。
AELとは一本の走査線と交差するすべての左側
稜線と右側稜線をx座標の昇順に並べたもので、
稜線データEijのアクテイブエツジポインタaepを
使つて、DM1,12−1内に左アクテイブエツ
ジリスト(左AEL)を、DM2,12−2内に右
アクテイブエツジリスト(右AEL)を形成する。
AELの例を第6図a,bに示す。第6図aにお
いて、DM1,12−1の共通データ領域C1内
の左アクテイブエツジルートポインタaep1が第
1の左側稜線E61を指し、このE61のアクテイブエ
ツジポインタE61.aepが第2の左側稜線E97を指
し、このE97のアクテイブエツジポインタE97
aepが第3の左側稜線E45を指す。このE45のアク
テイブエツジポインタE45.aepには終端を示す
0が記されている。第6図bにおいては、DM
2,12−2の共通データ領域C2内の右アクテ
イブエツジルートポインタaep2も同様に第1、
第2、第3の右側稜線E98,E65,E43を順に指し
て右アクテイブエツジリストを形成している。多
角形と走査線の交差線分(走査セグメントまたは
セグメントとも呼ぶ)を生成するには、アクテイ
ブエツジリストAELの第1の左側稜線E61と第1
の右側稜線E98を対にして当該走査線と2つの交
点を求め、これらを両端点として第1の走査セグ
メントを生成し、同様に第2の左右稜線E97とE65
の対が第2の走査セグメントを、第3の左右稜線
E45とE43の対が第3の走査セグメントを生成す
る。左アクテイブエツジルートポインタaep1は
DM1,12−1の共通データ領域C1内に、右
アクテイブエツジルートポインタaep2はDM2,
12−2の共通データ領域C2内に設けるものと
する。次に、エツジポインタEPとAELを走査す
るポインタであつて、第6図a,bに示すよう
に、左エツジポインタEP1、左前エツジポイン
タPEP1、右エツジポインタEP2、右前エツジ
ポインタPEP2の4個があり、それぞれ第1図
走査変換器における同名のレジスタを使用する。
第6図a,bではEP1とEP2が第2の左右稜線
E97とE65を指しており、PEP1とPEP2が第1の
左右稜線E61とE98を指している状態にある。
The above is the procedure for creating the left and right edge list and the approach vertex list. Next, the active edge list (also called AEL) and edge pointer (also called EP) for performing scan conversion will be explained.
AEL is all the left and right edges that intersect with one scanning line, arranged in ascending order of x coordinate.
Using the active edge pointer aep of the edge data Eij , a left active edge list (left AEL) is created in DM1, 12-1, and a right active edge list (right AEL) is created in DM2, 12-2.
Examples of AEL are shown in Figures 6a and b. In FIG. 6a, the left active edge root pointer aep1 in the common data area C1 of DM1, 12-1 points to the first left edge E61 , and the active edge pointer E61 . aep points to the second left edge E 97 , and the active edge pointer E 97 of this E 97 .
aep points to the third left ridgeline E 45 . This E 45 active edge pointer E 45 . 0 is written in aep to indicate the end. In Figure 6b, DM
Similarly, the right active edge root pointer aep2 in the common data area C2 of 2 and 12-2 is
The second and third right edge lines E 98 , E 65 , and E 43 are sequentially pointed to form a right active edge list. To generate a line segment (also called a scan segment or segment) of a polygon and a scan line, the first left edge E 61 of the active edge list AEL and the first
Find two intersection points with the scanning line by pairing the right edge E 98 of , generate the first scanning segment using these as both end points, and similarly create the second left and right edges E 97 and E 65.
the second scanning segment to the third left and right edges.
The pair E 45 and E 43 generates the third scan segment. The left active edge root pointer aep1 is
In the common data area C1 of DM1, 12-1, the right active edge root pointer aep2 is set to DM2,
12-2 in the common data area C2. Next, there are four pointers that scan the edge pointers EP and AEL, as shown in FIG. 1, each using the register of the same name in the scan converter of FIG.
In Figure 6 a and b, EP1 and EP2 are the second left and right ridgelines.
They are pointing at E 97 and E 65 , and PEP1 and PEP2 are pointing at first left and right ridge lines E 61 and E 98 .

次に第3図のように作成した左右稜線リスト及
び進入頂点リストを使つて多角形の走査変換を行
う処理手順を第7図、第8図及び第9図のフロー
チヤートと第10図の処理内容の説明図によつて
説明する。これらの処理手順では説明を簡単にす
るため、多角形は水平稜線を含まないものと仮定
する。第7図のスキヤンライン初期化(ステツプ
64)は第10図 に示すように、進入頂点リス
トの先頭アドレスvp0をレジスタVP1,7−1
に設定し、VP1,7−1の指し示す進入頂点EV
6のy座標をyminとし、このyminを読み出して
共通データ領域C2内の変数yに設定する。さら
にaep1=aep2=0とすることによつてAELを
空にする。次に第7図のエツジ進入処理(ステツ
プ65)を実行するとaep1がE61をaep2がE65
指す。エツジ進入処理の詳細は後に述べる。次に
第7図のステツプ66でAELはすでに空でなくな
つたから、ステツプ67のEP初期化に進む。この
EP初期化(ステツプ67)は第10図のように
EP1,9−1が第1の左側稜線を指し、EP2,
9−2が第1の右側稜線を指すようにし、PEP
1,8−1及びPEP2,8−2を0に設定する
操作である。また、EP更新(ステツプ70)は第
10図のようにEP1,9−1,EP2,9−2
をそれぞれPEP1,8−1,PEP2,8−2に
移動し、EP1,9−1,EP2,9−2の指す稜
線データのaepをそれぞれEP1,9−1,EP2,
9−2に再設定することにより、AEL上を右に
1段階進める操作である。また、EP終了判定
(ステツプ69)はEP1,9−1またはEP2,9
−2の指すaepの値の0判定を行う操作である。
Next, the processing procedure for performing scan conversion of a polygon using the left and right edge list and entry vertex list created as shown in Fig. 3 is shown in the flowcharts of Figs. 7, 8, and 9, and the processing shown in Fig. 10. The content will be explained using an explanatory diagram. In order to simplify the explanation in these processing steps, it is assumed that the polygon does not include horizontal edges. Scan line initialization (step
64) stores the start address vp0 of the entry vertex list in register VP1,7-1 as shown in Figure 10.
, and the approach apex EV pointed to by VP1, 7-1
The y coordinate of 6 is set as ymin, and this ymin is read out and set as the variable y in the common data area C2. Further, AEL is emptied by setting aep1=aep2=0. Next, when the edge entry process (step 65) in FIG. 7 is executed, aep1 points to E61 and aep2 points to E65 . Details of the edge entry process will be described later. Next, in step 66 of FIG. 7, since the AEL is no longer empty, the process proceeds to step 67 to initialize the EP. this
EP initialization (step 67) is as shown in Figure 10.
EP1, 9-1 points to the first left ridgeline, EP2,
9-2 points to the first right ridgeline, and PEP
This is an operation to set PEP1, 8-1 and PEP2, 8-2 to 0. Also, EP update (step 70) is performed for EP1, 9-1, EP2, 9-2 as shown in Figure 10.
are moved to PEP1, 8-1, PEP2, 8-2 respectively, and the aep of the edge line data pointed to by EP1, 9-1, EP2, 9-2 are moved to EP1, 9-1, EP2, EP2, respectively.
By resetting to 9-2, the AEL is moved one step to the right. Also, the EP end determination (step 69) is EP1, 9-1 or EP2, 9
This is an operation to determine 0 of the value of aep pointed to by -2.

第7図のステツプ68のセグメント発生処理は、
第8図に示すように左エツジプロセツサ29と右
エツジプロセツサ30が並行して動作し、協同し
てセグメントデータを発生する。すなわちEP1,
9−1の指す左側稜線データx1,z1,dx1/dy,dz1/dy 及びEP2,9−2の指す右側稜線データxr,zr
dxr/dy,dzr/dyを使用して、セグメントデータの計算 と出力、左右稜線データの更新、左右AELの更
新を行う。セグメントデータとして走査線のy座
標、多角形の色c、左端点のx座標x1、セグメン
トの長さxr−x1、左端点z座標z1、セグメント上
のz座標の増分値dz/dx=zr−z1/xr−x1を計算し、こ
の 順に第1図のFIF05に書き込み、出力する(ス
テツプ74〜80及び86,87)。加減算は演算器ALU
1,16−1を使用し、除算は除算器31を使用
して計算する。左右稜線データの中でx1,xr
z1,zr,h1,hrは次の走査線に更新される。h1
0またはhr=0になるとエツジの更新またはエツ
ジ退出処理を行う(ステツプ82〜85)。左エツジ
更新(ステツプ84a)は第10図の上段に示す
ように、EP1,9−1の指す現エツジをポイン
タEP1,sepの指す更新エツジに置き換えるべ
く、PEP1,8−1の指す左前エツジ及び更新
エツジのポインタaepを書き換える。左エツジ退
出(ステツプ85a)は第10図の上段に示すよ
うに、左現エツジを除去すべく左前エツジのaep
を書き換え、EP1,9−1にはPEP1,8−1
の値を移す。右エツジ更新(ステツプ84b)、右
エツジ退出(ステツプ85b)も第10図,の
下段に示すように同様である。第7図のステツプ
71のスキヤンライン更新は第10図に示すよう
に共通データ領域yと進入頂点データのh′を変更
する。ステツプ72でh′=0のときエツジ進入処理
(ステツプ65)を実行する。このエツジ進入処理
は進入頂点番号をiとし、左進入エツジをEi1
右進入エツジをEirとすると、Ei1を左AELに、Eir
を右AELにx座標が昇順となるように挿入する。
The segment generation process at step 68 in FIG.
As shown in FIG. 8, the left edge processor 29 and the right edge processor 30 operate in parallel and cooperate to generate segment data. That is, EP1,
Left edge data x 1 , z 1 , dx 1 /dy, dz 1 /dy indicated by 9-1 and right edge data x r , z r , indicated by EP 2, 9-2.
Use dx r /dy and dz r /dy to calculate and output segment data, update left and right edge data, and update left and right AEL. Segment data includes the y coordinate of the scanning line, the color c of the polygon, the x coordinate of the left end point x 1 , the length of the segment x r −x 1 , the z coordinate of the left end point z 1 , and the increment value of the z coordinate on the segment dz/ dx=z r -z 1 /x r -x 1 is calculated, written in this order to FIF05 in FIG. 1, and output (steps 74 to 80 and 86, 87). Addition and subtraction are performed by the arithmetic unit ALU
1, 16-1, and the division is calculated using the divider 31. In the left and right edge data, x 1 , x r ,
z 1 , z r , h 1 , h r are updated to the next scanning line. h 1 =
0 or h r =0, edge updating or edge exit processing is performed (steps 82 to 85). As shown in the upper part of FIG. 10, the left edge update (step 84a) updates the front left edge and the edge pointed to by PEP1, 8-1 to replace the current edge pointed to by EP1, 9-1 with the updated edge pointed to by pointer EP1, sep. Rewrite the update edge pointer aep. The left edge exit (step 85a) is performed by moving the aep of the front left edge to remove the left current edge, as shown in the upper part of FIG.
Rewrite PEP1, 8-1 for EP1, 9-1.
Shift the value of The right edge update (step 84b) and right edge exit (step 85b) are also similar as shown in the lower part of FIG. 10. Steps in Figure 7
71 scan line update changes the common data area y and the approach vertex data h' as shown in FIG. When h'=0 in step 72, edge entry processing (step 65) is executed. In this edge entry process, the entry vertex number is i, and the left entry edge is E i1 ,
If the right entry edge is E ir , E i1 is the left AEL, E ir
Insert into the right AEL so that the x coordinate is in ascending order.

Ei1及びEirのエツジ進入処理手順を第9図に示
す。この処理手順では左右エツジプロセツサ2
9,30が並行動作しているが両プロセツサの干
渉はない。ステツプ89でVP1,7−1の指示す
る進入頂点データから頂点番号iを読み出してい
るが、このiの値はEi1及びEirを指し、AEL探索
処理で両エツジプロセツサ29,30によつて使
用されるから、進入頂点ポインタVP1,7−1
を共通データ領域に退避し、iの値をVP1,7
−1及びVP2,7−2に設定し、ステツプ96の
判定処理の直前で進入頂点ポインタをVP1,7
−1に復帰させるものとする。左エツジプロセツ
サ29はEP1,9−1及びPEP1,8−1を使
つて左AELを走査し、ステツプ92aでEP1,9
−1の指す稜線のx座標がEi1のx座標を始めて
超えたところでステツプ93aに進み、Ei1及びPEP
1,8−1のaepを書き換えることによりEi1の挿
入を行う。ステツプ96では走査線上に進入頂点が
複数個存在するときh′=0が記憶されているから
ステツプ97を通つて次の進入頂点の進入処理を繰
り返す。右エツジプロセツサ30も同様である
(ステツプ90b〜95b)。次に第7図のステツプ66
でaep1またはaep2のゼロ判定を行い、ステツ
プ73ではVP1,h′(VP1,7−1の指示する
DM1,12−1内のh′)のゼロ判定を行い、共
にゼロのとき走査変換処理を終了する。
FIG. 9 shows the edge entry processing procedure for E i1 and E ir . In this processing procedure, the left and right edge processor 2
Although processors 9 and 30 are operating in parallel, there is no interference between the two processors. In step 89, the vertex number i is read from the entry vertex data indicated by VP1, 7-1, and the value of i refers to E i1 and E ir , and is used by both edge processors 29, 30 in the AEL search process. Therefore, the entry vertex pointer VP1, 7-1
is saved in the common data area, and the value of i is set to VP1, 7.
-1 and VP2, 7-2, and set the entry vertex pointer to VP1, 7-2 immediately before the judgment process in step 96.
-1 shall be returned. The left edge processor 29 scans the left AEL using EP1, 9-1 and PEP1, 8-1, and in step 92a, EP1, 9
When the x-coordinate of the edge indicated by -1 exceeds the x-coordinate of E i1 for the first time, the process proceeds to step 93a, and E i1 and PEP
E i1 is inserted by rewriting aep of 1 and 8-1. In step 96, when there are a plurality of approach vertices on the scanning line, h'=0 is stored, so the approach process for the next approach vertex is repeated through step 97. The same applies to the right edge processor 30 (steps 90b to 95b). Next, step 66 in Figure 7
At step 73, aep1 or aep2 is determined to be zero, and at step 73, VP1, h' (VP1, 7-1
h') in DM1 and DM12-1 is determined to be zero, and when both are zero, the scan conversion process is completed.

(発明の効果) 以上、詳細に説明したように、本発明による走
査変換器は、任意形状の多角形を直接走査線分に
分解できるから、三角形等に分割するための煩雑
な手続きを必要としないこと、多角形の左側稜線
と右側稜線を左右のエツジプロセツサで並列処理
していること、増分値計算式が簡単で逆数表と乗
算器を用いて即座に求められることにより、高速
な走査変換器が実現できる。任意形状の多角形が
取り扱えるから、平面上に描かれた文字パタンや
地図領域等の閉じた領域で穴や島のあるものも多
角形近似すれば走査変換できる。本発明の実施例
では多角形の頂点上の深度Zを内挿する方法を述
べているが、曲面を多面体近似したとき、その頂
点上での輝度値Iを深度Zと同様に線形内挿する
ことによつて滑らかな陰影付け(スムーズシエー
デイング)の高速処理もできる。また、出力デー
タとして互いに独立した多数の走査線分データを
出力するので、画像メモリを走査線単位で分割し
て並列にメモリ更新処理を行うマルチプロセツサ
に接続すれば高性能の画像表示装置を実現でき
る。
(Effects of the Invention) As explained above in detail, the scanning converter according to the present invention can directly decompose a polygon of any shape into scanning line segments, so there is no need for complicated procedures for dividing it into triangles, etc. A high-speed scan converter can be realized. Since polygons of arbitrary shapes can be handled, closed areas such as character patterns drawn on a plane or map areas with holes or islands can be scan-converted by approximating them to polygons. The embodiment of the present invention describes a method of interpolating the depth Z on the vertex of a polygon, but when a curved surface is approximated as a polyhedron, the brightness value I on the vertex is linearly interpolated in the same way as the depth Z. This also enables high-speed processing of smooth shading. In addition, since a large number of mutually independent scanning line segment data are output as output data, it is possible to create a high-performance image display device by dividing the image memory in units of scanning lines and connecting it to a multiprocessor that updates the memory in parallel. realizable.

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

第1図は本発明の一実施例を示す走査変換器の
構成図、第2図a〜eは多角形データの説明図、
第3図a〜dは稜線リストと進入頂点リストの説
明図、第4図は稜線リスト作成処理のフローチヤ
ート、第5図は稜線データの計算法の説明図、第
6図a,bはアクテイブエツジリストの説明図、
第7図は走査変換処理のフローチヤート、第8図
は第7図のセグメント発生処理のフローチヤー
ト、第9図は第7図のエツジ進入処理のフローチ
ヤート、第10図は処理内容の説明図、第11図
は従来の3次元画像表示装置の構成図、第12図
a〜dは多角形の種類を示す図である。 1……入力端子、2……内部バス、3−1〜3
−5……バスドライバ、4……バスレシーバ、5
……先入れ先出しメモリ(FIF0)、6……出力端
子、7−1,7−2……進入頂点ポインタ(VP
1,VP2)、8−1,8−2……前エツジポイン
タ(PEP1,PEP2)、9−1,9−2……エツ
ジポインタ(EP1,EP2)、10−1,10−
2……アドレスマルチプレクサ(MXA1,
MXA2)、11−1,11−2……アドレス加
算器、12−1,12−2……データメモリ
(DM1,DM2)、13−1,13−2……デー
タマルチプレクサ(MXD1,MXD2)、14−
1,14−2……レジスタ(S1,S2)、15
−1,15−2……レジスタ(R1,R2)、1
6−1,16−2……演算器(ALU1,ALU
2)、17,19,20,22……レジスタ(R
3,R4,R5,R6)、18……逆数テーブル
(INV)、21……乗算器、23……マイクロプ
ログラムシーケンサ(SEQ)、24……マイクロ
プログラムメモリ(MPM)、25……マイクロ
プログラムレジスタ(MPR)、26,27……デ
ータ線、28……制御線、29……左エツジプロ
セツサ、30……右エツジプロセツサ、31……
除算器、32……マイクロプログラムコントロー
ラ。
FIG. 1 is a configuration diagram of a scan converter showing an embodiment of the present invention, FIGS. 2 a to e are explanatory diagrams of polygon data,
Figures 3 a to d are explanatory diagrams of the edge list and approach vertex list, Figure 4 is a flowchart of the edge list creation process, Figure 5 is an explanatory diagram of the calculation method of edge line data, and Figures 6 a and b are active diagrams. Illustration of Edgelist,
FIG. 7 is a flowchart of scan conversion processing, FIG. 8 is a flowchart of segment generation processing in FIG. 7, FIG. 9 is a flowchart of edge entry processing in FIG. 7, and FIG. 10 is an explanatory diagram of processing contents. , FIG. 11 is a block diagram of a conventional three-dimensional image display device, and FIGS. 12 a to 12 d are diagrams showing types of polygons. 1...Input terminal, 2...Internal bus, 3-1 to 3
-5...Bus driver, 4...Bus receiver, 5
...First-in first-out memory (FIF0), 6...Output terminal, 7-1, 7-2...Entry vertex pointer (VP
1, VP2), 8-1, 8-2... Previous edge pointer (PEP1, PEP2), 9-1, 9-2... Edge pointer (EP1, EP2), 10-1, 10-
2...Address multiplexer (MXA1,
MXA2), 11-1, 11-2... Address adder, 12-1, 12-2... Data memory (DM1, DM2), 13-1, 13-2... Data multiplexer (MXD1, MXD2), 14-
1, 14-2...Register (S1, S2), 15
-1, 15-2...Register (R1, R2), 1
6-1, 16-2... Arithmetic unit (ALU1, ALU
2), 17, 19, 20, 22...Register (R
3, R4, R5, R6), 18... Reciprocal table (INV), 21... Multiplier, 23... Micro program sequencer (SEQ), 24... Micro program memory (MPM), 25... Micro program register (MPR), 26, 27...data line, 28...control line, 29...left edge processor, 30...right edge processor, 31...
Divider, 32...Microprogram controller.

Claims (1)

【特許請求の範囲】 1 3次元画像表示装置における多角形の走査変
換器において、 入力端子と、 出力端子と、 少なくとも第1のデータメモリ、第1の頂点ポ
インタ、第1のエツジポインタ、第1の算術論理
演算ユニツトからなる左エツジプロセツサと、 少なくとも第2のデータメモリ、第2の頂点ポ
インタ、第2のエツジポインタ、第2の算術論理
演算ユニツトから成る右エツジプロセツサと、 2つの整数の除算を行なう除算器と、 前記走査変換器全体の制御を行なうマイクロプ
ログラムコントローラと、 前記入力端子、前記出力端子、前記左エツジプ
ロセツサ、前記右エツジプロセツサ、前記除算
器、前記マイクロプログラムコントローラの間を
結びデータ転送を行なう内部データバスとからな
り、 x座標、y座標、z座標、次の頂点へのポイン
タから成り、前記多角形の内部領域を右側に見込
むように並べた頂点データの系列として表現され
た多角形データを前記入力端子から入力し、前記
第1及び第2のデータメモリに記憶する多角形デ
ータ入力処理と、 前記左エツジプロセツサと前記右エツジプロセ
ツサとを用いて前記多角形を囲むすべての稜線を
y座標の増加する方向に進む左側稜線とy座標の
減少する方向に進む右側稜線に分類し、x座標及
びz座標の初期値と増分値、高さ、次の稜線への
ポインタから成る左側稜線データの系列を前記第
1のデータメモリに作成し、x座標及びz座標の
初期値と増分値、高さ、次の稜線へのポインタか
ら成る右側稜線データの系列を前記第2のデータ
メモリに作成し、前記除算器を用いて前記左右稜
線データのx座標及びz座標の増分値を演算し、
y座標、進入差分、進入エツジへのポインタから
成りy座標の昇順にソートされた進入頂点データ
の系列を前記第1のデータメモリに作成する稜線
データ作成処理と、 前記進入頂点データの系列の最初の進入頂点を
前記第1の頂点ポインタによつて指し、走査線の
y座標を最小値に設定し、左アクテイブエツジリ
ストと右アクテイブエツジリストを空にするスキ
ヤンライン初期化処理と、 走査線毎にy座標を1だけ増加し、前記進入差
分を1だけ減じるスキヤンライン更新処理と、 前記進入頂点データの進入差分が0になつたら
次の進入頂点の進入エツジへのポインタを前記左
アクテイブエツジリスト及び右アクテイブエツジ
リストにx座標の昇順にソートされるように挿入
するエツジ進入処理と、 前記左右アクテイブエツジリストが空でない走
査線に対し最初の左右稜線データの対を前記第1
及び第2のエツジポインタによつて指すエツジポ
インタ初期化処理と、 左右稜線データを処理する毎に左右アクテイブ
エツジリストの次の左右稜線データを第1及び第
2のエツジポインタによつて指すエツジポインタ
更新処理と、 前記左右稜線データを用いて前記多角形の内部
領域に属し、少なくとも左端点のx座標及びz座
標、z座標の増分値、長さから成る走査線分デー
タを作成し、前記出力端子に出力し、前記左右稜
線データのx座標及びz座標を次の走査線の値に
更新するセグメント発生処理と、 前記スキヤンライン初期化処理、前記スキヤン
ライン更新処理、前記エツジ進入処理、前記エツ
ジポインタ初期化処理、前記エツジポインタ更新
処理、前記セグメント発生処理とを用いて前記多
角形の内部領域に属するすべての走査線分データ
を作成して走査変換を行なうことを特徴とする走
査変換器。 2 前記除算器は第1の入力の逆数を発生する逆
数表と、該逆数表の出力と第2の入力を乗算する
乗算器とを有することを特徴とする特許請求の範
囲第1項記載の走査変換器。
[Scope of Claims] 1. A polygonal scan converter in a three-dimensional image display device, comprising: an input terminal, an output terminal, at least a first data memory, a first vertex pointer, a first edge pointer, and a first edge pointer. a left edge processor consisting of an arithmetic and logic operation unit; a right edge processor consisting of at least a second data memory, a second vertex pointer, a second edge pointer, and a second arithmetic and logic operation unit; A divider, a microprogram controller that controls the entire scan converter, and a connection between the input terminal, the output terminal, the left edge processor, the right edge processor, the divider, and the microprogram controller for data transfer. Polygon data consisting of an internal data bus, x coordinates, y coordinates, z coordinates, and a pointer to the next vertex, expressed as a series of vertex data arranged so that the internal area of the polygon is seen on the right side. is inputted from the input terminal and stored in the first and second data memories, and all edges surrounding the polygon are calculated using the y-coordinate using the left edge processor and the right edge processor. A series of left edge data consisting of initial values and increment values of x and z coordinates, height, and a pointer to the next edge, categorized into left edge that increases in the direction of increase and right edge that increases in the direction of decrease in y coordinate. is created in the first data memory, and a series of right edge data consisting of initial values and increment values of x and z coordinates, height, and a pointer to the next edge is created in the second data memory, calculating increment values of the x and z coordinates of the left and right edge data using the divider;
an edge line data creation process of creating in the first data memory a series of approach vertex data consisting of a y-coordinate, an approach difference, and a pointer to an approach edge, sorted in ascending order of the y-coordinate; and scan line initialization processing that points to the approach vertex of by the first vertex pointer, sets the y-coordinate of the scan line to the minimum value, and empties the left active edge list and the right active edge list; a scan line update process in which the y coordinate is increased by 1 and the approach difference is decreased by 1; and when the approach difference of the approach vertex data becomes 0, a pointer to the approach edge of the next approach vertex is added to the left active edge list. and edge entry processing for inserting the first pair of left and right edge data into the right active edge list so as to be sorted in ascending order of x-coordinates;
and an edge pointer initialization process that points by a second edge pointer, and an edge pointer that points to the next left and right edge data in the left and right active edge list by the first and second edge pointers each time left and right edge data is processed. updating processing, using the left and right edge data to create scanning line segment data belonging to the internal region of the polygon and consisting of at least the x and z coordinates of the left end point, the increment value of the z coordinate, and the length; segment generation processing for outputting to a terminal and updating the x and z coordinates of the left and right edge data to the values of the next scanning line; the scan line initialization processing; the scan line update processing; the edge entry processing; A scan converter characterized in that the pointer initialization process, the edge pointer update process, and the segment generation process are used to create all scan line segment data belonging to the internal area of the polygon and perform scan conversion. 2. The divider according to claim 1, wherein the divider has a reciprocal table that generates a reciprocal of a first input, and a multiplier that multiplies the output of the reciprocal table and a second input. Scan converter.
JP8022386A 1986-04-09 1986-04-09 Scanning converter Granted JPS62237579A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8022386A JPS62237579A (en) 1986-04-09 1986-04-09 Scanning converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8022386A JPS62237579A (en) 1986-04-09 1986-04-09 Scanning converter

Publications (2)

Publication Number Publication Date
JPS62237579A JPS62237579A (en) 1987-10-17
JPH0544712B2 true JPH0544712B2 (en) 1993-07-07

Family

ID=13712364

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8022386A Granted JPS62237579A (en) 1986-04-09 1986-04-09 Scanning converter

Country Status (1)

Country Link
JP (1) JPS62237579A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0357087A (en) * 1989-07-25 1991-03-12 Seiko Instr Inc Polygon painting-out device

Also Published As

Publication number Publication date
JPS62237579A (en) 1987-10-17

Similar Documents

Publication Publication Date Title
JP3313221B2 (en) Image generation method and image generation device
US4975976A (en) Image transformation method and device
US4935879A (en) Texture mapping apparatus and method
JP4385524B2 (en) Polygon data generation method and image display apparatus using the same
JP3240447B2 (en) Image processing device
JPH0916806A (en) Stereoscopic image processor
US5739826A (en) Polygon display based on x coordinates of edges on scan line
KR910009102B1 (en) Image synthesizing apparatus
JP2000348206A (en) Image generating device and method for deciding image priority
JPH0544712B2 (en)
JP3979162B2 (en) Image processing apparatus and method
JPH07105404A (en) Stereoscopic image processor and its processing method
JP3522714B2 (en) Image generation method
JP2001283242A (en) Image processor and image processing method
JPH05298456A (en) Texture mapping system
JPS63113785A (en) Graphic pattern displaying method
JPH11195134A (en) Picture processor
JP3278828B2 (en) Translucent stereoscopic image processing device
KR100283071B1 (en) Fast Texture Mapping Method
JP2766478B2 (en) Image processing system
JP3453410B2 (en) Image processing apparatus and method
JP3358891B2 (en) Z-value perspective transformation processing method and image processing apparatus
JPH08180207A (en) Stereoscopic picture processor
JP2611599B2 (en) Computer graphics data processing method and apparatus
JPH0535912B2 (en)

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term