JPH03192480A - Shading method - Google Patents

Shading method

Info

Publication number
JPH03192480A
JPH03192480A JP1333632A JP33363289A JPH03192480A JP H03192480 A JPH03192480 A JP H03192480A JP 1333632 A JP1333632 A JP 1333632A JP 33363289 A JP33363289 A JP 33363289A JP H03192480 A JPH03192480 A JP H03192480A
Authority
JP
Japan
Prior art keywords
value
circuit
vertex
output
calculation
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
JP1333632A
Other languages
Japanese (ja)
Inventor
Mutsuhiro Omori
睦弘 大森
Hidehiro Hirase
平瀬 英弘
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP1333632A priority Critical patent/JPH03192480A/en
Priority to KR1019900020769A priority patent/KR100232931B1/en
Priority to EP90124779A priority patent/EP0434037B1/en
Priority to DE69032367T priority patent/DE69032367T2/en
Publication of JPH03192480A publication Critical patent/JPH03192480A/en
Priority to US08/302,965 priority patent/US5418901A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To prevent a divider from overflowing and to improve the connectable ability of a graphic by replacing an almost horizontal side with a vertical side with the same starting point when a distance in the longitudinal direction of a polygon is less than a prescribed value. CONSTITUTION:A trapezoid 48A is generated with a length in the longitudinal direction less than 1. When calculating variation at a left side connecting an upper left apex LS1 and a lower left apex LE1, the left side is almost horizontal and extremely long in respect to the length in the longitudinal direction and therefore, there is possibility for the divider to overflow. In such a case, the left side connecting the apexes LS1 and LE1 is replaced with the vertical line (LS1-LE2) with the same starting point LS1 and processed as a trapezoid 48B. Even concerning the right side of an adjacent graphic 49A, it is processed as a trapezoid 49B. Thus, the possibility for the divider to overflow can be prevented and the connectable ability of the graphic is made satisfactory.

Description

【発明の詳細な説明】 (産業上の利用分野〕 この発明は、3次元物体を2次元デイスプレィ上に表示
させる際、3次元物体に陰影を付加するのに用いられる
シェーディング方法に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a shading method used to add shadows to a three-dimensional object when the object is displayed on a two-dimensional display.

〔発明の概要] この発明は、曲面を複数の多角形で近似し、この多角形
の各頂点に値を入力し、多角形の各頂点に入力された値
から、多角形内の値を線形補間により求めるようにした
シェーディング方法において、多角形の縦方向の距離が
1以下の場合には、水平に近い辺を始点を同じにする垂
直な辺に置き換えるようにすることにより、割算器がオ
ーバーフローすることを防止するとともに、図形の接続
性が改善できるようにしたものである。
[Summary of the Invention] This invention approximates a curved surface with a plurality of polygons, inputs a value to each vertex of the polygon, and linearly calculates the value within the polygon from the value input to each vertex of the polygon. In a shading method that uses interpolation, if the vertical distance of a polygon is less than or equal to 1, the divider can be This prevents overflow and improves the connectivity of figures.

〔従来の技術〕[Conventional technology]

コンピュータグラフィックスにおいて、2次元デイスプ
レィ上に3次元物体を表示する場合、3次元物体を写実
的に見せ、3次元物体の認識を高めるために、3次元物
体の表面に陰影を付加することが行われている。このよ
うに、3次元物体の表面に陰影を付加して表示する手法
は、シェーディングと呼ばれている。シェーディングの
表示方法としては、例えば点光源の位置を定め、点光源
からの光源に対して垂直な面を明るくし、面が光源に対
して垂直でなくなるに従って暗くするような方法が用い
られる。
In computer graphics, when displaying a 3D object on a 2D display, shading is added to the surface of the 3D object in order to make the 3D object look realistic and to improve recognition of the 3D object. It is being said. This method of adding and displaying shadows to the surface of a three-dimensional object is called shading. As a shading display method, for example, a method is used in which the position of a point light source is determined, a surface perpendicular to the light source from the point light source is brightened, and the surface becomes darker as the surface is no longer perpendicular to the light source.

2次元デイスプレィ上に表示される3次元物体は、複雑
な曲面をもっている。このような複雑な曲面を持つ3次
元物体に対して、曲面の形状に応じた自然で最適なシェ
ーディングを行うために、曲面を複数の多角形で近似し
、それぞれの多角形の各頂点座標の値を入力し、各頂点
座標に与えられた値から、多角形内の値を線形補間によ
り求めることが行われている。線形補間は、座標格子間
隔毎の値の変分を足し込んでい<DDA(ディジタル 
ディファレンシャル アナライザ)演算により行なわれ
る(例えば特開昭61−52737号公報)。
A three-dimensional object displayed on a two-dimensional display has a complex curved surface. In order to perform natural and optimal shading for a three-dimensional object with such a complex curved surface according to the shape of the curved surface, the curved surface is approximated by multiple polygons, and the coordinates of each vertex of each polygon are calculated. Values are input and the values within the polygon are determined by linear interpolation from the values given to the coordinates of each vertex. Linear interpolation adds the variation of values for each coordinate grid interval.
differential analyzer) calculation (for example, Japanese Patent Laid-Open No. 61-52737).

2次元デイスプレィ上に3次元物体を表示させる場合、
座標格子点上にビクセルが設けられ、このビクセルに対
応する値(深さ値、明るさ値)が入力される。
When displaying a 3D object on a 2D display,
A vixel is provided on the coordinate grid point, and a value (depth value, brightness value) corresponding to this vixel is input.

上述のように、曲面を複数の多角形で近似し、それぞれ
の多角形の各頂点座標の値を入力し、多角形内の値を線
形補間により求め°る場合、多角形の各頂点の座標が座
標格子点から外れた位置にくることがある。
As mentioned above, when a curved surface is approximated by multiple polygons, the values of the coordinates of each vertex of each polygon are input, and the values within the polygon are determined by linear interpolation, the coordinates of each vertex of the polygon are may be located outside the coordinate grid points.

ところが、従来では、座標格子点上以外の座標には値を
入力できない。このため、従来では、曲面を近似して得
られた多角形の頂点の座標が座標格子点から外れた位置
にくる場合には、その値を、その座標から最も近傍にあ
る座標格子点上の値として処理するようにしている。
However, conventionally, values cannot be input to coordinates other than those on the coordinate grid points. For this reason, conventionally, when the coordinates of the vertices of a polygon obtained by approximating a curved surface are located outside the coordinate grid points, the values are changed to the coordinate grid points closest to the coordinates. I am trying to process it as a value.

この場合、座標格子点のビクセルに正しい値が入力され
るのではなく、座標格子点に近い座標の値が座標格子点
のビクセルに入力される。したがって、3次元物体を移
動させたり、変形させたり、光源を移動させたりすると
、1ビクセル以内で表示が揺らぐことになる。
In this case, the correct value is not input into the pixel of the coordinate grid point, but the value of the coordinate close to the coordinate grid point is input into the pixel of the coordinate grid point. Therefore, when a three-dimensional object is moved or deformed or a light source is moved, the display will fluctuate within one pixel.

そこで、本願発明者は、各頂点の値に縦方向の補正演算
を施してスキャンライン端点での値を算出し、スキャン
ライン端点での値に水平方向の補正演算を施して座標格
子点上にあるスタート点に対応する値を算出し、スター
ト点での値に変分を足し込んで座標格子点上での各値を
求めることにより、画面のちらつきがなく、自然な描画
を行なえるシェーディング方法を提案している。このよ
うなシェーディング方法では、小数点以下まで座標が入
力できるサブビクセルアドレシングが行われ、座標格子
点から外れた位置の値が入力可能とされる。
Therefore, the inventor calculated the value at the end point of the scan line by performing a vertical correction calculation on the value of each vertex, and calculated the value at the end point of the scan line by performing a correction calculation in the horizontal direction on the value at the end point of the scan line. A shading method that allows natural drawing without flickering on the screen by calculating the value corresponding to a certain starting point and adding the variation to the value at the starting point to find each value on the coordinate grid point. is proposed. In such a shading method, sub-vixel addressing is performed in which coordinates can be input down to the decimal point, and values at positions outside the coordinate grid points can be input.

このようなシェーディング方法では、縦方向の補正演算
を行う際に、左辺及び右辺縦方向の変分が求められる。
In such a shading method, when performing a vertical correction calculation, vertical variations of the left side and the right side are determined.

この変分は、縦方向の各値の変化量を、縦方向の距離で
割算することにより求められる。
This variation is obtained by dividing the amount of change in each value in the vertical direction by the distance in the vertical direction.

ところで、サブビクセルアドレシングを行なえるように
すると、曲面を近似して得られた台形の縦方向の長さが
1より小さくなる場合がある。この場合、縦方向の変分
を求める際、0に近い数を除数として割算することにな
るので、変分を求める際に、割算器がオーバーフローす
る可能性が高い。特に、水平に近い辺では、縦方向の各
僅の変化量が大きくなるので、割算器がオーバーフロー
する可能性が非常に高い。オーバーフローした値で図形
が表示されてしまうと、描画が乱れてしまう。
By the way, if sub-vixel addressing is enabled, the length in the vertical direction of a trapezoid obtained by approximating a curved surface may become smaller than 1. In this case, when determining the displacement in the vertical direction, a number close to 0 is used as a divisor for division, so there is a high possibility that the divider will overflow when determining the displacement. In particular, on sides that are close to horizontal, each slight change in the vertical direction becomes large, so there is a very high possibility that the divider will overflow. If a figure is displayed with an overflow value, the drawing will be distorted.

したがって、この発明の目的は、縦方向の長さが1以下
の多角形が入力されても割算器がオーバーフローせず、
描画が乱れることがないシェーディング方法を提供する
ことにある。
Therefore, an object of the present invention is to prevent the divider from overflowing even if a polygon whose length in the vertical direction is 1 or less is input.
The purpose of the present invention is to provide a shading method that does not disrupt drawing.

この発明の他の目的は、図形の接続性の問題が改善でき
るシェーディング方法を提供することにある゛。
Another object of the present invention is to provide a shading method that can improve the problem of connectivity of figures.

[課題を解決するための手段] この発明は、曲面を複数の多角形で近似し、多角形の各
頂点に値を入力し、各頂点に入力された値から多角形内
の値を線形補間により求めるようにしたシェーディング
方法において、多角形の縦方向の距離が所定値以下にな
る場合には、水平に近い辺を始点を同じにする垂直な辺
に置き換えるようにしたことを特徴とするシェーディン
グ方法である。
[Means for Solving the Problems] This invention approximates a curved surface with a plurality of polygons, inputs a value to each vertex of the polygon, and linearly interpolates the value within the polygon from the value input to each vertex. In the shading method determined by , if the vertical distance of the polygon is less than a predetermined value, the near-horizontal side is replaced with a vertical side having the same starting point. It's a method.

〔作用] 縦方向の長さが1より小さい台形を処理する場合、辺の
長さが長くなり、割算器がオーバーフローする可能性が
高い水平に近い辺では、この辺が始点を同じにする垂直
な辺に置き換えられる。このようにすると、割算器がオ
ーバーフローする可能性が回避できるとともに、図形の
接続性が良好である。
[Effect] When processing a trapezoid whose length in the vertical direction is less than 1, the length of the sides becomes long and the divider is likely to overflow.If the side is close to horizontal, can be replaced by any side. In this way, the possibility of overflow of the divider can be avoided and the connectivity of the figures is good.

(実施例] この発明の実施例について、以下の順序で説明する。(Example] Examples of the present invention will be described in the following order.

a、シェーディング方法の概要 す、補正演算について bl、補正演算の原理 b2.補正演算機能付きDDA演算回路C,シェーディ
ング方法の説明 cl、処理に必要な演算 c2.描画手順 c3.任意の多角形への拡張 c4.大きな演算誤差が発生する場合の処理d、シェー
ディング装置 dl、シェーディング装置の構成 d2.演算精度とビット数 e、並列処理状態遷移回路 el、基本回路の説明 e2.シェーディング処理のための並列処理状態遷移回
路 a、シェーディング方法の概要 この発明は、曲面を複数の多角形で近似し、それぞれの
多角形の各頂点座標の値を入力し、各頂点座標に与えら
れた値から、多角形内の値を線形補間により求め、曲面
の形状に応じた自然で最適なシェーディングを行う場合
に適用される。
a. Overview of shading method, correction calculation bl, principle of correction calculation b2. DDA calculation circuit with correction calculation function C, explanation cl of shading method, calculations necessary for processing c2. Drawing procedure c3. Extension to arbitrary polygons c4. Process d when a large calculation error occurs, shading device dl, shading device configuration d2. Arithmetic accuracy and number of bits e, parallel processing state transition circuit el, basic circuit explanation e2. Parallel processing state transition circuit a for shading processing, overview of shading method This invention approximates a curved surface with a plurality of polygons, inputs the value of each vertex coordinate of each polygon, and calculates the value given to each vertex coordinate. This method is used to obtain natural and optimal shading according to the shape of a curved surface by calculating values within a polygon by linear interpolation.

このように、曲面を複数の多角形で近似し、それぞれの
多角形の各頂点座標の値を入力し、多角形内の値を線形
補間により求める場合、多角形の各頂点の座標が座標格
子点から外れた位置にくることがある。
In this way, when a curved surface is approximated by multiple polygons, the values of the coordinates of each vertex of each polygon are input, and the values within the polygon are found by linear interpolation, the coordinates of each vertex of the polygon are It may end up in a position that is off point.

この発明の一実施例では、小数部分まで水平値X及び垂
直値Yを入力することで、座標格子点と座標格子点との
間のビクセルの無い座標に値を入力することが可能であ
る。このことを、以下、サブピクセルアドレシングと称
する。したがって、曲面を近似して得られた多角形の頂
点の座標が座標格子点から外れた位置にきても、そのま
まの頂点座標(水平値X、垂直値Y)に対応する値(深
さ値Z、明るさ値R(赤)、G(緑)、B(青))を入
力できる。
In one embodiment of the present invention, by inputting the horizontal value X and the vertical value Y up to the decimal part, it is possible to input a value at a coordinate without a pixel between the coordinate grid points. This is hereinafter referred to as sub-pixel addressing. Therefore, even if the coordinates of the vertices of a polygon obtained by approximating a curved surface are located outside the coordinate grid points, the values (depth values) corresponding to the vertex coordinates (horizontal value X, vertical value Y) remain unchanged. Z, brightness values R (red), G (green), B (blue)) can be input.

この発明の一実施例では、このように、サブピクセルア
ドレシングが行われる。そして、補正演算が行われ、各
スキャンラインでのDDA演算のスタート点の座標格子
点上のビクセルでの正しい値が求められる。以後、DD
A演算が繰り返され、座標格子点上の各ピクセルの値が
求められる。
In one embodiment of the invention, sub-pixel addressing is performed in this manner. Then, a correction calculation is performed, and the correct value at the pixel on the coordinate grid point of the start point of the DDA calculation in each scan line is determined. From then on, DD
The A calculation is repeated to obtain the value of each pixel on the coordinate grid point.

つまり、曲面を近似して得られた台形のプリミティブに
対して、左辺の縦方向の補正演算と、右辺の縦方向の補
正演算とが行われ、スキャンラインの左端(左側から右
側にスキャンしているので、スキャンラインの始端に対
応する)とスキャンラインの右端(スキャンラインの終
端に対応する)の値が求められる。スキャンラインの左
端の値とスキャンラインの右端の値から、水平方向の補
正演算により、スキャンラインの左端近傍の座標格子点
上にあるスタート点のビクセルの正しい値が求められる
。スタート点のピクセルの値に対して、水平方向の変分
を足し込んでいく水平方向のDDA演算を繰り返すこと
により、各スキャンラインの座標格子点上にあるビクセ
ルの正しい値が求められる。次のスキャンラインの左端
の値及び次のスキャンラインの右端の値は、前スキャン
ラインの左端の値及び前スキャンラインの右端の値に、
左辺の縦方向の変分及び右辺の縦方向の変分をそれぞれ
足し込んでいく縦方向のDDA演算により求められる。
In other words, for the trapezoidal primitive obtained by approximating the curved surface, vertical correction calculations are performed on the left side and vertical correction calculations are performed on the right side. Therefore, the values of the right end of the scan line (corresponding to the start end of the scan line) and the right end of the scan line (corresponding to the end of the scan line) are determined. From the value at the left end of the scan line and the value at the right end of the scan line, the correct value of the pixel at the start point on the coordinate grid point near the left end of the scan line is determined by correction calculation in the horizontal direction. By repeating the horizontal DDA operation in which the horizontal variation is added to the value of the pixel at the start point, the correct value of the pixel on the coordinate grid point of each scan line is determined. The leftmost value of the next scanline and the rightmost value of the next scanline are the leftmost value of the previous scanline and the rightmost value of the previous scanline,
It is determined by a vertical DDA operation in which the vertical variation of the left side and the vertical variation of the right side are respectively added.

この場合、座標格子点上のピクセルの正確な値を入力し
ているので、3次元物体の動きや光源の動きにリアルタ
イムでスムーズに対応でき、画面のちらつきがなく、精
度の高いシェーディングが行なえる。
In this case, since accurate values of pixels on the coordinate grid points are input, it is possible to smoothly respond to the movement of 3D objects and light sources in real time, and to perform highly accurate shading without flickering on the screen. .

ところで、曲面を複数の多角形で近似する際、任意の多
角形で近似できれば、効率良く曲面を分割でき、描画効
率が向上する。この発明の一実施例では、左辺の頂点と
右辺の頂点とが同じ水平ライン上にあった場合にのみ、
左辺の頂点の値と右辺の頂点の値とが同時に入力される
ようにし、−方の頂点だけ入力された時には、他方の頂
点をナルとし、ナルの場合には、前回のDDA演算を引
き継ぐような処理が行われる。これにより、台形の演算
処理を任意の多角形に拡張できる。
By the way, when a curved surface is approximated by a plurality of polygons, if the curved surface can be approximated by arbitrary polygons, the curved surface can be efficiently divided and the drawing efficiency will be improved. In one embodiment of the invention, only if the vertices on the left side and the vertices on the right side are on the same horizontal line,
The value of the vertex on the left side and the value of the vertex on the right side are input at the same time, and when only the - side vertex is input, the other vertex is set to null, and in the case of null, the previous DDA calculation is inherited. processing is performed. This allows the calculation process for trapezoids to be extended to any polygon.

b、補正演算について bl、補正演算の原理 この発明の一実施例では、上述のように、左辺及び右辺
の縦方向の補正演算によりスキャンラインの端点の値を
求め、水平方向の補正演算によりスタート点の座標格子
点上のピクセルの正しい値を求め、以後、左辺縦方向及
び右辺縦方向のDDA演算と水平方向のDDA演算を“
繰り返して、座標格子点上の各ピクセルの値を求めるよ
うにしている。
b.About correction calculationbl.Principle of correction calculationIn an embodiment of the present invention, as described above, the value of the end point of the scan line is determined by vertical correction calculation on the left and right sides, and the process starts with correction calculation in the horizontal direction. Find the correct value of the pixel on the coordinate grid point of the point, and then perform the left side vertical direction, right side vertical direction DDA operation, and horizontal direction DDA operation.
The value of each pixel on the coordinate grid point is determined repeatedly.

このようなシェーディング処理の説明に先立って、この
補正演算について説明する。
Prior to explaining such shading processing, this correction calculation will be explained.

第2図に示すように、2点A及びBに値A(V) 、B
 (V)がそれぞれ与えられているとし、この値が直線
的に変化しているとする。そして、いま、2点A、B間
の点Rの値R(V)を求めたいとする。
As shown in Figure 2, the values A(V) and B are at two points A and B.
Assume that (V) is given, and that this value changes linearly. Now, suppose that we want to find the value R(V) of point R between two points A and B.

この場合、値が直線的に変化していれば、2点A、B間
の点Rの値R(V)は、線形補間により求めることがで
きる。
In this case, if the value changes linearly, the value R(V) at point R between the two points A and B can be determined by linear interpolation.

すなわち、2点A、 B間の点Rの値R(V)は、で求
められる。
That is, the value R(V) of the point R between the two points A and B can be found as follows.

このような線形補間演算の場合、2回の乗算と1回の割
算が必要である。乗算や割算を多く行うと、回路規模が
増大し、演算時間が長く必要になる。
For such a linear interpolation operation, two multiplications and one division are required. If a large number of multiplications and divisions are performed, the circuit scale increases and calculation time becomes longer.

そこで、上式が 回路について、以下に説明する。Therefore, the above formula is The circuit will be explained below.

のように変形される。It is transformed as follows.

上式で、 −A の項は変分DDである。In the above formula, -A The term is the variational DD.

したがって、2点A、B間の点Rの値R(V)は、 R(V)  =A(V)+(R−A)  ・DD  −
@で求められる。
Therefore, the value R(V) of point R between two points A and B is: R(V) = A(V) + (R-A) ・DD −
Required with @.

曲面を複数の多角形で近似し、各多角形内の値を線形補
間により求めるようなシェーディングを行う場合、変分
DDは、DDA演算を行うために予め求められている。
When performing shading in which a curved surface is approximated by a plurality of polygons and values within each polygon are determined by linear interpolation, the variation DD is determined in advance in order to perform the DDA calculation.

したがって、上式のように補正演算を変形すると、1回
の乗算だけで補正演算が行なえるようになる。そして、
補正演算処理には、DDA演算回路の一部が利用できる
ことになる。このような、補正演算機能付きDDA演算
b2.補正演算機能付きDDA演算回路補正演算処理は
、上述したように、初期位置Aから補正位置Rまでの長
さ(R−A)と変分DDとの積に、初期位置での値A 
(V)を加算して求められる。このような処理は、第3
図に示すような補正演算機能付きDDA演算回路で実現
できる。
Therefore, if the correction calculation is modified as shown in the above equation, the correction calculation can be performed with only one multiplication. and,
A part of the DDA calculation circuit can be used for the correction calculation process. Such DDA calculation with correction calculation function b2. DDA arithmetic circuit with correction arithmetic function As described above, the correction arithmetic processing is performed by adding the value A at the initial position to the product of the length (R-A) from the initial position A to the correction position R and the variation DD.
It is obtained by adding (V). Such processing is performed in the third
This can be realized by a DDA calculation circuit with a correction calculation function as shown in the figure.

この補正演算機能付きDDA演算回路は、3つのモード
に設定される。1つのモードは、補正値を求める補正値
演算モードである。この補正値演算モードの時には、入
力端子30からの補正位置までの距離(R−A)と、入
力端子33から変分DDとが乗算され、 (R−A)  ・DD なる演算がなされる。なお乗算は、補正位置までの距離
(R−A)を最下位ビットからシリアルデータで与え、
この補正位置までの距離(R−A)の各ピントと変分D
Dとをビット毎に乗算し、これを、右シフトさせながら
加算していくことにより求められている。
This DDA calculation circuit with a correction calculation function is set to three modes. One mode is a correction value calculation mode for calculating a correction value. In this correction value calculation mode, the distance (RA) from the input terminal 30 to the correction position is multiplied by the variation DD from the input terminal 33, and the following calculation is performed. For multiplication, the distance (R-A) to the corrected position is given as serial data from the least significant bit,
Each focus and variation D of the distance (R-A) to this correction position
It is obtained by multiplying D bit by bit and adding the results while shifting them to the right.

2つ目のモードは、補正値と初期位置での値とを加算し
、補正後の値を求めるモードである。これにより、 A (V)+ (R−A)  ・DD なる演算が行われ、点Rでの値R(V)が求められる。
The second mode is a mode in which the correction value and the value at the initial position are added to obtain the corrected value. As a result, the following calculation is performed: A (V) + (R-A) ·DD, and the value R(V) at point R is obtained.

3つ目のモードは、DDA演算を行うモードである。D
DA演算では、前回の値に変分DDを加算していく処理
が繰り返される。
The third mode is a mode for performing DDA calculations. D
In the DA calculation, the process of adding the variation DD to the previous value is repeated.

第3図において、マルチプレクサ31の一方の入力端に
は、入力端子32から初期位置での値A(V)が供給さ
れる。マルチプレクサ31の他方の入力端には、入力端
子33からの変分DDが供給される。この入力端子32
からの初期位置での値A (V)及び入力端子33から
変分DDは、パラレルデータで入力される。
In FIG. 3, one input terminal of a multiplexer 31 is supplied with a value A(V) at an initial position from an input terminal 32. In FIG. The other input of the multiplexer 31 is supplied with the variation DD from the input terminal 33. This input terminal 32
The value A (V) at the initial position from and the variation DD from the input terminal 33 are input as parallel data.

マルチプレクサ31の出力がゼロ判定回路34に供給さ
れる。ゼロ判定回路34には、入力端子30から、補正
位置までの距離(R−A)が最下位ビットからシリアル
データで供給される。
The output of the multiplexer 31 is supplied to a zero determination circuit 34. The zero determination circuit 34 is supplied with the distance (RA) from the input terminal 30 to the correction position in the form of serial data starting from the least significant bit.

ゼロ判定回路34は、補正値演算モードの時に、補正位
置までの距離(R−A)と変分DDとの乗算を実行する
のに用いられる。
The zero determination circuit 34 is used to multiply the distance to the correction position (RA) by the variation DD in the correction value calculation mode.

ゼロ判定回路34は、第4図に示すように、ANDゲー
ト421.422.423 、・42nがら構成される
。ANDゲート42..42□、421、・・・42f
iのそれぞれの一方の入力端に、マルチプレクサ31の
出力データの各ビットの出力が供給される。ANDゲー
ト42..42□、423、・・・42.の他方の入力
端に、入力端子3゜からのシリアルデータが供給される
As shown in FIG. 4, the zero determination circuit 34 is composed of AND gates 421, 422, 423, and 42n. AND gate 42. .. 42□, 421,...42f
The output of each bit of the output data of the multiplexer 31 is supplied to one input terminal of each of the i. AND gate 42. .. 42□, 423,...42. Serial data from input terminal 3° is supplied to the other input terminal of .

第3図において、ゼロ判定回路34の出力が加算器35
に供給される。加算器35の出力がラッチ回路36に供
給される。
In FIG. 3, the output of the zero determination circuit 34 is output to the adder 35.
is supplied to The output of adder 35 is supplied to latch circuit 36.

ラッチ回路36には、クロック入力端子39からDDA
クロックDDA CKが供給される。また、ラッチ回路
36には、リセット端子40がら、リセット信号RST
が供給される。
The latch circuit 36 has a clock input terminal 39 connected to the DDA
A clock DDA CK is supplied. The latch circuit 36 also has a reset signal RST from the reset terminal 40.
is supplied.

ラッチ回路36の出力が出力端子37から取り出される
。これとともに、ラッチ回路36の出力がマルチプレク
サ38に供給される。
The output of the latch circuit 36 is taken out from the output terminal 37. At the same time, the output of the latch circuit 36 is supplied to the multiplexer 38.

マルチプレクサ38には、入力端子41がら補正ループ
信号へ几が供給される。マルチプレクサ38に入力端子
41からの補正ループ信号AJLが与えられると、ラッ
チ回路36の出力は、1クロツク毎に1ビツトづつ右に
シフトされながら、マルチプレクサ38から出力される
The multiplexer 38 is supplied with a correction loop signal from an input terminal 41 . When the correction loop signal AJL from the input terminal 41 is applied to the multiplexer 38, the output of the latch circuit 36 is outputted from the multiplexer 38 while being shifted to the right by one bit every clock.

マルチプレクサ38の出力が加算器35に供給される。The output of multiplexer 38 is supplied to adder 35.

最初に、ラッチ回路36に、入力端子40からリセット
信号RSTが供給される。このリセット信号RSTによ
り、ラッチ回路36がリセットされる。
First, the latch circuit 36 is supplied with the reset signal RST from the input terminal 40. The latch circuit 36 is reset by this reset signal RST.

そして、補正値演算モードに設定され、補正値が求めら
れる。補正値演算モードでは、マルチプレクサ31で、
入力端子33からの変分DDが選択サレる。この変分D
Dがパラレルデータでマルチプレクサ31からゼロ判定
回路34に供給される。また、入力端子30からは、補
正位置までの距離(R−A)が最下位ビットから順にシ
リアルデータでゼロ判定回路34に供給される。
Then, the correction value calculation mode is set, and a correction value is calculated. In the correction value calculation mode, the multiplexer 31
The variation DD from the input terminal 33 is selected. This variation D
D is supplied as parallel data from the multiplexer 31 to the zero determination circuit 34. Further, from the input terminal 30, the distance (R-A) to the correction position is supplied as serial data to the zero determination circuit 34 in order from the least significant bit.

ゼロ判定回路34で、補正位置までの距離(R−A)と
、変分DDとの乗算が1ビツト毎に行われる。補正位置
までの距離(R−A)の1つのビットが「1」なら、変
分DDに「1」を乗じたことになるので、変分DDがゼ
ロ判定回路34を介してそのまま出力される。補正位置
までの距離(R−A)の1つのビットが「0」なら、変
分DDに「0」を乗じたことになるので、ゼロ判定回路
34から「00・・・Ojが出力される。
The zero determination circuit 34 multiplies the distance (RA) to the correction position by the variation DD for each bit. If one bit of the distance to the correction position (R-A) is "1", this means that the variation DD is multiplied by "1", so the variation DD is output as is via the zero determination circuit 34. . If one bit of the distance to the correction position (R-A) is "0", this means that the variation DD is multiplied by "0", so the zero determination circuit 34 outputs "00...Oj". .

加算器35の出力は、ラッチ回路36を介して、マルチ
プレクサ38に供給される。マルチプレクサ38には、
入力端子41から補正ループ信号AJLが供給される。
The output of the adder 35 is supplied to a multiplexer 38 via a latch circuit 36. The multiplexer 38 has
A correction loop signal AJL is supplied from an input terminal 41.

したがって、加算器35の出力は、マルチプレクサ38
で、1ビツトづつ右にシフトされながら、加算器35に
供給され、累積される。
Therefore, the output of adder 35 is sent to multiplexer 38
Then, the data is shifted to the right one bit at a time and supplied to the adder 35, where it is accumulated.

このような加算を繰り返すことにより、補正位置までの
距離(R−A)と変分DDとの乗算が実行される。
By repeating such addition, the distance (RA) to the correction position is multiplied by the variation DD.

つまり、例えば変分DDが4ビツトのデータrds 、
tL 、dt 、do Jであり、補正位置までの距離
(R−A)が4ビツトのデータ「a、。
In other words, for example, if the variation DD is 4-bit data rds,
tL, dt, do J, and the distance to the correction position (R-A) is 4-bit data "a."

am +  aI +  ao Jであったとする。こ
の場合、補正位置までの距離(R−A)と変分DDとの
乗算は、第5図に示すようにして実行できる。
Suppose that am + aI + ao J. In this case, the multiplication of the distance (R-A) to the corrected position and the variation DD can be performed as shown in FIG.

ゼロ判定回路34には、先ず、補正位置までの距H(R
−A)の最下位ビット’an Jが供給され、この最下
位ビットraoJとr ds 、  dt +d+ 、
do Jとが乗算され、「ao ds +  C6dt
 +  aOdI *  aOd(l Jが求められる
The zero determination circuit 34 firstly calculates the distance H(R
- the least significant bit 'an J of A) is supplied, and this least significant bit raoJ and r ds , dt + d+ ,
do J is multiplied, "ao ds + C6dt
+ aOdI * aOd(l J is determined.

次に、補正位置までの距離(R−A)の下位2ビツト目
「al」が供給され、この下位2ビツト「al」と’d
3.dz、d+ 、do Jとが乗算され、”aI  
ds +  al  ag +  al  dl + 
 al  d。」が求められる。
Next, the second lower bit "al" of the distance to the correction position (R-A) is supplied, and the lower two bits "al" and 'd
3. dz, d+, do J are multiplied, and “aI
ds + al ag + al dl +
al d. ” is required.

この’ ” +  d 31  a +  d 21 
 a 1  d + + 、 a 1  d。」と、右
に1ビツトシフトされた’ao d。
This' ” + d 31 a + d 21
a 1 d + + , a 1 d. ” and 'ao d shifted one bit to the right.

ao dZ+  ao al 、ao do Jとが加
算される。
ao dZ+ ao al and ao do J are added.

以下、同様にして、「al ds 、*  C2dt 
T  az  dt  +  az  do  J\ 
’a3 ds、C3at、asd++a*doJが求め
られ、右に1ビツトづつシフトされながら、これらが加
算される。
Hereinafter, in the same manner, "al ds, *C2dt
T az dt + az do J\
'a3 ds, C3at, asd++a*doJ are obtained, and these are added while being shifted to the right one bit at a time.

これにより、rd、+  dt +  dt +  d
OJ 、とra、l  al +  aI +  ao
 Jとの乗算が実行され、乗算値’C?+  C&+ 
 C5+  C4+  c=、’!+C++CoJが求
められる。
This gives rd, + dt + dt + d
OJ, and ra, l al + aI + ao
Multiplication with J is performed and the multiplication value 'C? +C&+
C5+ C4+ c=,'! +C++CoJ is required.

第3図において、このようにして求められた補正値((
R−A)DD)は、ラッチ回路36に格納される。ラッ
チ回路36に、補正値((R−A)DD)が格納された
ら、補正値((R−A)DD)と初期位置での値A (
V)とを加算し、補正後の値を求めるモードとなる。
In Figure 3, the correction value ((
RA)DD) is stored in the latch circuit 36. When the correction value ((R-A)DD) is stored in the latch circuit 36, the correction value ((R-A)DD) and the value A (
V) and calculates the corrected value.

このモードの時には、マルチプレクサ31から、入力端
子32からの初期位置での値A (V)が出力される。
In this mode, the value A (V) at the initial position from the input terminal 32 is output from the multiplexer 31.

この初期位置での値A (V)がゼロ判定回路34を介
して加算器35に供給される。
The value A (V) at this initial position is supplied to the adder 35 via the zero determination circuit 34.

ラッチ回路36には、補正値演算値モードで求められた
補正値((R−A)DD)が格納されている。この補正
値((R−A)DD)がマルチプレクサ38を介して加
算器35に供給される。加算器35で、補正値((R−
A)DD)と初期位置での値A (V)とが加算され、
この値がラッチ回路36に蓄えられる。
The latch circuit 36 stores the correction value ((RA)DD) obtained in the correction value calculation value mode. This correction value ((RA)DD) is supplied to the adder 35 via the multiplexer 38. The adder 35 adds a correction value ((R-
A) DD) and the value A (V) at the initial position are added,
This value is stored in the latch circuit 36.

ラッチ回路36に、補正値((R−A)DD)と初期位
置での値A (V)とが加算された値(A(V) +(
R−A)DD)が蓄えられたら、DDAモードに設定さ
れる。
The latch circuit 36 receives a value (A(V) + (
Once R-A)DD) is stored, the DDA mode is set.

DDAモードでは、マルチプレクサ31から、入力端子
33からの変分DDが出力される。この変分DDがゼロ
判定回路34を介して加算器35に供給される。
In the DDA mode, the multiplexer 31 outputs the variation DD from the input terminal 33. This variation DD is supplied to an adder 35 via a zero determination circuit 34.

加算器35で、ラッチ回路36に蓄えられていた前回ま
での値と、変分DDとが加算され、この値がラッチ回路
36に蓄えられる。このように、変分DDを足し込んで
いく演算が繰り返される。
The adder 35 adds the previous value stored in the latch circuit 36 and the variation DD, and this value is stored in the latch circuit 36. In this way, the operation of adding the variation DD is repeated.

C,シェーディング方法の説明 この発明が適用されたシェーディング方法について、以
下に詳述する。
C. Description of Shading Method The shading method to which this invention is applied will be described in detail below.

いま、曲面を複数の多角形で近似した時の一つのプリミ
ティブとして、第6図に示すような台形が得られたとす
る。第6図において、縦方向に並ぶ破線と横方向に並ぶ
破線との交点が座標格子であり、この座標格子点上にピ
クセルがある。各座標格子間の距離は1である。そして
、この台形の各頂点LS、LE、R3,REの値(水平
値X、垂直値Y、深さ値Z、明るさ値R(赤の値)、G
(緑の値)、B(青の値))を入力し、この各頂点LS
、LE、R3,REの多値から、台形内部の座標格子点
上にあるビクセルの多値を線形補間により求めることに
する。
Suppose now that a trapezoid as shown in FIG. 6 is obtained as one primitive when a curved surface is approximated by a plurality of polygons. In FIG. 6, the intersections of the vertically aligned broken lines and the horizontally aligned broken lines are coordinate grids, and pixels are located on these coordinate grid points. The distance between each coordinate grid is 1. Then, the values of each vertex LS, LE, R3, and RE of this trapezoid (horizontal value X, vertical value Y, depth value Z, brightness value R (red value), G
(green value), B (blue value)), and each vertex LS
, LE, R3, and RE, the multi-values of the pixels located on the coordinate grid points inside the trapezoid are determined by linear interpolation.

cl、処理に必要な演算 このようなシェーディング処理を行う場合、以下のよう
な演算が行われる。
cl, Calculations Necessary for Processing When performing such shading processing, the following calculations are performed.

・左辺縦方向の変分の演算(0式) ・右辺縦方向の変分の演算(0式) ・左辺縦方向の補正演算(0式) ・右辺縦方向の補正演算(0式) ・左辺縦方向のDDA演算(0式) ・右辺縦方向のDDA演算(0式) ・水平方向の変分の演算(0式) ・水平方向の補正演算(0式) ・水平方向のDDA演算(0式) ・左辺縦方向の変分の演算 先ず、縦方向の演算について説明する。左辺での縦方向
の1座標格子間当たりの多値の変分DL(X、Z。
・Calculation of the vertical variation on the left side (0 formula) ・Calculation of the vertical variation on the right side (0 formula) ・Correction calculation on the left side vertical direction (0 formula) ・Correction calculation on the right side vertical direction (0 formula) ・Left side Vertical DDA calculation (0 formula) ・Right side vertical DDA calculation (0 formula) ・Horizontal variation calculation (0 formula) ・Horizontal correction calculation (0 formula) ・Horizontal DDA calculation (0 formula) (Formula) ・Calculation of the variation in the vertical direction on the left side First, the calculation in the vertical direction will be explained. Multi-value variation DL (X, Z) per coordinate grid interval in the vertical direction on the left side.

R,G、B) は、 ・・・■ LS(X、Y)  :左上の頂点LSでの水平値X及び
垂直値Y LS(Z)  :左上の頂点LSでの深さ値ZLS (
R,G、B) :左上の頂点LSでの明るさ値R,G。
R, G, B) are ... ■ LS (X, Y): Horizontal value X and vertical value Y at the top left vertex LS LS (Z): Depth value ZLS (
R, G, B): Brightness values R, G at the upper left vertex LS.

LE(X、Y)  :左下の頂点LEでの水平値X及び
垂直値Y LE(Z)  :左下の頂点LEでの深さ値ZLH(R
,G、B) :左下の頂点LEでの明るさ値R,G。
LE (X, Y): Horizontal value X and vertical value Y at the lower left vertex LE LE (Z): Depth value ZLH (R
, G, B): Brightness values R, G at the lower left vertex LE.

で求められる。is required.

・右辺縦方向の変分の演算 同様に、右上の縦方向の1座標格子間当たりの多値の変
分DR(X、Z、R,G、B)は、・・・■ RS(X、Y)  :右上の頂点R3での水平値X及び
垂直値Y R5(Z)  :右上の頂点R3での深さ値ZR5(R
,G、B) :右上の頂点R3で(7)明るさ値R,G
・Similar to the calculation of the variation in the vertical direction on the right side, the multi-value variation DR (X, Z, R, G, B) per one coordinate grid in the vertical direction on the upper right is...■ RS (X, Y): Horizontal value X and vertical value Y at the top right vertex R3 R5(Z): Depth value ZR5(R
, G, B): (7) Brightness value R, G at the top right vertex R3
.

RE(X、Y)  :右上の頂点REでの水平値X及び
垂直値Y RE(Z)  :右上の頂点REでの深さ値ZRE (
R,G、B) :右上の頂点REでの明るさ値R,G。
RE(X, Y): Horizontal value X and vertical value Y at the upper right vertex RE RE(Z): Depth value ZRE at the upper right vertex RE (
R, G, B): Brightness values R, G at the top right vertex RE.

で求められる。is required.

・左辺縦方向のDDA演算 サブピクセルアドレシングを行った場合、各ピクセル間
の距離が1なので、左上の頂点LSから最も近傍のスキ
ャンラインy0までの縦方向の距離は、 1−(LS(Y)−1nt(LS(Y)))である。な
お、Intは、小数部分を0にする演算である。(つま
り、(LS (Y) −In t (LS (Y) )
)は、頂点LSの垂直値Yの小数部を求めることである
。)したがって、スキャンラインy0の左端の値H5O
(X、Z、R,G、B)  は、 )ISO(X、Z、R,G、B) =LS(X、Z、R,G、B)+ (1−(LS(Y)
−Int(LS(Y)))DL(X、Z、R,G、B)
 ・・・■で求められる。これを、左辺縦方向の補正演
算とする。なお、補正演算の求め方は、前述の0式と同
様である。
・DDA calculation in the left side vertical direction When sub-pixel addressing is performed, the distance between each pixel is 1, so the vertical distance from the upper left vertex LS to the nearest scan line y0 is 1-(LS(Y) −1 nt(LS(Y))). Note that Int is an operation that sets the decimal part to 0. (That is, (LS (Y) −In t (LS (Y) )
) is to find the decimal part of the vertical value Y of the vertex LS. ) Therefore, the leftmost value H5O of scan line y0
(X, Z, R, G, B) is ) ISO (X, Z, R, G, B) = LS (X, Z, R, G, B) + (1 - (LS (Y)
-Int(LS(Y)))DL(X,Z,R,G,B)
・・・It is found by ■. This is a correction calculation for the vertical direction of the left side. Note that the method of calculating the correction calculation is the same as the above-mentioned equation 0.

・右辺縦方向の補正演算 同様に、スキャンラインy0の右端の値H1l!o (
X、Z。
・Similar to the right side vertical direction correction calculation, the right end value H1l of scan line y0! o (
X, Z.

R,G、B)  は、 HEO(X、Z、F?、G、B) −R5(X、Z、R,G、B)+ (1−(RS(Y)
−1nt(RS(Y)))DR(X、Z、R,G、B)
   −・・■で求められる。これを、右辺縦方向の補
正演算とする。
R, G, B) is HEO(X, Z, F?, G, B) -R5(X, Z, R, G, B) + (1-(RS(Y)
-1nt(RS(Y)))DR(X,Z,R,G,B)
−・・It is determined by ■. This is a correction calculation for the vertical direction on the right side.

・左辺縦方向のDDA演算 次のスキャンライン)’jiでの左端の値H3j、I(
X、Z、R,G、B)は、前回のスキャンラインy、の
左端の値H3j(X、Z、R,G、B) ニ左辺縦方向
の変分DL(X、Z。
・DDA operation in the left side vertical direction Next scan line) 'ji Left end value H3j, I (
X, Z, R, G, B) is the leftmost value H3j (X, Z, R, G, B) of the previous scan line y.

R,G、B)を足し込んでいく左辺縦方向のDDA演算
により求められる。すなわち、次のスキャンライン)’
 j++での左端の値H5j−1(X+Z、R+G、B
) ハ、H5J++ (X、Z、R,G、B) =H5J(X、Z、R,G、B)+0L(X、Z、R,
G、B) −”■で求められる。
R, G, B) are calculated by DDA calculation in the vertical direction on the left side. i.e. next scanline)'
The leftmost value H5j-1 (X+Z, R+G, B
) Ha, H5J++ (X, Z, R, G, B) = H5J (X, Z, R, G, B) + 0L (X, Z, R,
G, B) −”■.

・右辺縦方向のDDA演算 同様に、次のスキャンラインyJ。1での右端の値HE
j、I は、右辺縦方向のDDA演算により求められる
。すなわち、スキャンライン)’ J+1での右端の値
t(Ej*+ (X、Z、R,G、B)は、HEJ、、
 (X、 Z、 R,G、 B)=FIEJ(X、Z、
R,G、B)+DR(X、Z、R,G、B)  ・・・
■で求められる。
・Similar to the DDA calculation in the vertical direction on the right side, the next scan line yJ. Rightmost value HE at 1
j, I are obtained by DDA calculation in the vertical direction on the right side. That is, the rightmost value t(Ej*+ (X, Z, R, G, B) at scan line)' J+1 is HEJ,...
(X, Z, R, G, B)=FIEJ(X, Z,
R, G, B) + DR (X, Z, R, G, B)...
■It is determined by

・水平方向の変分の演算 次に水平方向の演算について説明する。スキャンライン
y、での水平方向の1座標格子間当たりの多値の変分D
Hj(Z、 R,G、 B)は、スキャンラインyJで
の左端の値)1s、(X、Z、R,G、B)  (0式
、0式で求められる)と、スキャンライン3’jでの右
端の値HEJ(X、Z、’R,G、B)  (0式、0
式で求められてる)とを用いて、 ・・・■ で求められる。
- Calculation of variation in the horizontal direction Next, calculations in the horizontal direction will be explained. Multi-value variation D per horizontal coordinate grid interval at scan line y
Hj (Z, R, G, B) is the leftmost value at scan line yJ) 1s, (X, Z, R, G, B) (calculated by formula 0, formula 0) and scan line 3' Rightmost value at j HEJ (X, Z, 'R, G, B) (0 formula, 0
(obtained by the formula) is obtained by ...■.

・水平方向の補正演算 スキャンラインy、での左端近傍の座標格子点上のピク
セルの値HjO(Z、R,G、B)は、スキャンライン
yJの左端の値HSj (Z、 R,G、 B)と、水
平方向の変分DH,(Z、R,G、B) とを用いて、
H4゜(Z、 R,G、 B) =H5j(Z、LG、B)+ (1−(HSj(X)−
Int(HSj(X)) ・DH,(Z、 R,G、 
B) ・・・■ で求められる。これをスキャンラインVjでの水平方向
の補正演算とする。そして、Hl。(Z、R,G。
・Horizontal correction calculation The value HjO (Z, R, G, B) of the pixel on the coordinate grid point near the left end of scan line y is the value HSj (Z, R, G, B) and the horizontal variation DH, (Z, R, G, B),
H4゜(Z, R, G, B) = H5j(Z, LG, B)+ (1-(HSj(X)-
Int(HSj(X)) ・DH,(Z, R,G,
B) ・・・■ It can be found. This is assumed to be a horizontal correction calculation on the scan line Vj. And Hl. (Z, R, G.

B)をスキャンラインyjでのスタート点の値とする。Let B) be the value of the starting point at scan line yj.

・水平方向のDDA演算 スキャンライン3’jでのスタート点以降の座標格子点
上の値は、水平方向のDDA演算を繰り返していくこと
により順次求められる。すなわち、スキャンラインyj
での座標格子点上の値Hj i。1(Z、R,G、B)
 は、 HJt、+(Z、R,G、B) =Hji(ZIRIG、B)+DH,(ZIRIGIB
)  ・・・■で求められる。
- Horizontal DDA calculation Values on the coordinate grid points after the start point on the scan line 3'j are sequentially obtained by repeating the horizontal DDA calculation. That is, scan line yj
The value Hj i on the coordinate grid point at . 1 (Z, R, G, B)
is HJt, + (Z, R, G, B) = Hji (ZIRIG, B) + DH, (ZIRIGIB
) ... can be found by ■.

c2.描画手順 この発明が適用されたシェーディング方法の描画手順を
、第7図を参照しながら説明する。
c2. Drawing Procedure The drawing procedure of the shading method to which this invention is applied will be explained with reference to FIG.

先ず、0式に基づいて、頂点LSと頂点LEとを結ぶ左
辺での縦方向の変分DL (X、 Z、 R,G、 B
)が求められる(ステップl)。また、0式に基づいて
、頂点R3と頂点REとを結ぶ右辺での縦方向の変分D
R(X、 Z、 R,G、 B)が求められる(ステッ
プ2)。
First, based on equation 0, the vertical variation DL on the left side connecting the vertex LS and the vertex LE (X, Z, R, G, B
) is determined (step l). Also, based on equation 0, the vertical variation D on the right side connecting vertex R3 and vertex RE
R(X, Z, R, G, B) is found (step 2).

次に、■弐に基づいて、左辺での縦方向の補正演算が行
われ、最初のスキャンラインy0の左端の値HSo (
X、Z、R,G、B)が求められる(ステップ3)。ま
た、0式に基づいて、右辺での縦方向の補正演算が行わ
れ、最初のスキャンラインy0の右端の値1(Eo (
X、Z、R,G、B)が求められる(ステップ4)。な
お、ステップ3及びステップ4は、並列処理可能である
Next, a vertical correction calculation is performed on the left side based on ■2, and the value HSo (
X, Z, R, G, B) are determined (step 3). Also, based on Equation 0, a vertical correction calculation is performed on the right side, and the value 1 (Eo (
X, Z, R, G, B) are obtained (step 4). Note that Step 3 and Step 4 can be processed in parallel.

ステップ3及びステップ4で、最初のスキャンラインy
。の左端の値H5,(X、Z、R,G、B)と右端の値
HEo (X、Z、R,G、B)が求められたら、■式
に基づいて、最初のスキャンラインy0での水平方向の
変分DHo (Z、R,G、B)が求められる(ステッ
プ5)。
In steps 3 and 4, the first scan line y
. After finding the leftmost value H5, (X, Z, R, G, B) and the rightmost value HEo (X, Z, R, G, B), at the first scan line y0 based on the formula The horizontal variation DHo (Z, R, G, B) is determined (step 5).

0式に基づいて、最初のスキャンラインy0での水平方
向の補正演算が行われ、最初のスキャンラインy0での
左端近傍の座標格子点の値H0゜(Z、R,G、B)が
求められる(ステップ6)。
Based on formula 0, a horizontal correction calculation is performed on the first scan line y0, and the value H0° (Z, R, G, B) of the coordinate grid point near the left end on the first scan line y0 is calculated. (Step 6).

スキャンラインy0でのスタート点の値H0゜(Z、R
,G、B)が求められたら、スキャンラインy0での水
平方向の変分[IFIO(Z、R,G、B)を加算しし
てい<DDA演算が繰り返される(ステップ7)。
The starting point value H0° (Z, R
, G, B) is obtained, the horizontal variation [IFIO(Z, R, G, B) at scan line y0 is added and the <DDA operation is repeated (step 7).

これにより、スタート点以降の座標格子点の値Ho+ 
(X、Z、R,G、B)、Hox (X、 Z、 R,
G、B)、・・・が順次求められる。
As a result, the value Ho+ of the coordinate grid point after the start point
(X, Z, R, G, B), Hox (X, Z, R,
G, B), . . . are sequentially obtained.

スキャンラインy0での座標格子点上の値H0゜(X、
Z、R,G、B)、Ho+ (X、Z、R,G、B)、
Hot (X、Z、R。
The value H0° (X,
Z, R, G, B), Ho+ (X, Z, R, G, B),
Hot (X, Z, R.

G、B)・・・が全て求められたら、0式に基づく左辺
での縦方向のDDA演算により、次のスキャンライン7
+ (7)左端の値HS+ (X、Z、R,G、B)が
求められる(ステップ8)。また、0式に基づく右辺で
の縦方向のDDA演算により、次のスキャンラインy1
での右端の値HEI (X、Z、R,に、B)が求めら
れる(ステップ9)。
G, B)..., the next scan line 7 is calculated by vertical DDA calculation on the left side based on formula 0.
+ (7) The leftmost value HS+ (X, Z, R, G, B) is found (step 8). Also, by vertical DDA calculation on the right side based on formula 0, the next scan line y1
The rightmost value HEI (X, Z, R, B) at is determined (step 9).

ステップ8及びステップ9で、スキャンライン7、の左
端の値HSI (X、Z、R,G、B)と右端の値HE
In steps 8 and 9, the leftmost value HSI (X, Z, R, G, B) and the rightmost value HE of scan line 7 are determined.
.

(X、Z、R,G、B)が求められたら、ステップ5に
戻り、■式に基づいて、次のスキャンラインy、での水
平方向の変分on、 (χ、Z、R,G、B)が求めら
れる(ステップ5)。
Once (X, Z, R, G, B) is obtained, return to step 5 and calculate the horizontal variation on the next scan line y, (χ, Z, R, G , B) are determined (step 5).

ステップ6で、■式に基づいて、次のスキャンラインy
1での補正演算が行われ、次のスキャンラインyIでの
座標格子上のスタート点の値HIO(X、 Z、 R,
G、 B)が求められる。そして、ステップ7で、0式
に基づく水平方向のDDA演算を繰り返していくことに
より、スキャンラインy1での座標格子上の値Lo(X
、Z、R,G、B) 、Hll(X、Z、R,G、B)
・・・が順次求められる。
In step 6, the next scan line y is determined based on the formula.
1 is performed, and the value HIO(X, Z, R,
G, B) are required. Then, in step 7, the value Lo(X
,Z,R,G,B) ,Hll(X,Z,R,G,B)
... are determined in sequence.

スキャンラインy、での座標格子上の値H8゜(X、Z
The value H8° (X, Z
.

R,G、B) 、Hll(X、Z、R,G、B) 、H
+z(X、Z、R,G、B)・・・が全て求められたら
、■弐に基づく左辺での縦方向のDDA演算により、更
に次のスキャンラインy2での左端の値Hh  (X、
Z、R,G、B)が求められ(ステップ8)、また、0
式に基づく右辺での縦方向のDDA演算により、更に次
のスキャンライフ’jtO)右端の値HEz (X、Z
、R,G、B)が求められる(ステップ9)。そして、
ステップ5に戻り、同様な処理が繰り返される。
R, G, B), Hll(X, Z, R, G, B), H
When +z (X, Z, R, G, B)... are all obtained, the left end value Hh (X,
Z, R, G, B) are determined (step 8), and 0
By vertical DDA calculation on the right side based on the formula, the next scan life 'jtO) rightmost value HEz (X, Z
, R, G, B) are determined (step 9). and,
Returning to step 5, the same process is repeated.

c3.任意の多角形への拡張 この発明の一実施例では、曲面を近似して得られた多角
形に対して、左辺の頂点と右辺の頂点とが同じ水平ライ
ン上にあった場合のみ、左辺の頂点の値と右辺の頂点の
値とが同時に入力されるようにし、一方の頂点だけ入力
された時には、他方の頂点をナルとし、ナルの場合には
、前回のDDA演算を引き継ぐような処理が行なわれる
。これにより、台形の演算処理を任意の多角形に拡張で
きる。
c3. Extension to arbitrary polygons In one embodiment of the present invention, for a polygon obtained by approximating a curved surface, only when the vertices of the left side and the vertices of the right side are on the same horizontal line, the left side is The value of the vertex and the value of the vertex on the right side are input at the same time, and when only one vertex is input, the other vertex is set to null, and if it is null, the previous DDA calculation is carried over. It is done. This allows the calculation process for trapezoids to be extended to any polygon.

例えば、第8図に示すような凸多角形が与えられたとす
る。入力された図形は、ひとまず台形と見做し、左辺か
右辺かを判断しながら、上から下に、左上の頂点をLS
、左下の頂点をLE、右上の頂点をR3、右下の頂点を
REとしながら値を入力していく。
For example, assume that a convex polygon as shown in FIG. 8 is given. The input figure is assumed to be a trapezoid for the time being, and while determining whether it is the left side or the right side, the upper left vertex is LS from top to bottom.
, enter values while setting the lower left vertex as LE, the upper right vertex as R3, and the lower right vertex as RE.

ラインL1では、左上の頂点LSとして頂点A1の値が
入力され、左下の頂点LEとして頂点A3の値が入力さ
れる。右上の頂点R5として頂点A1の値が入力され、
右下の頂点REとして頂点A2の値が入力される。
In line L1, the value of vertex A1 is input as the upper left vertex LS, and the value of vertex A3 is input as the lower left vertex LE. The value of vertex A1 is input as the upper right vertex R5,
The value of vertex A2 is input as the lower right vertex RE.

ラインL2で右辺の頂点A2が見つかる。ラインL2で
、右上の頂点R3として頂点A2の値が入力され、右下
の頂点REとして頂点A5の値が入力される。頂点A2
と同一の水平線上には、左辺の頂点は無い。そこで、左
辺はナルとされる。
Vertex A2 on the right side is found on line L2. On line L2, the value of vertex A2 is input as the upper right vertex R3, and the value of vertex A5 is input as the lower right vertex RE. Vertex A2
There is no vertex on the left side on the same horizontal line as . Therefore, the left side is assumed to be null.

ラインL3で左辺の頂点A3が見つかる。ラインL3で
左上の頂点LSとして頂点A3の値が入力され、左下の
頂点LEとして頂点A4の値が入力される。頂点A3と
同一の水平線上には、右辺の頂点は無いので、右辺はナ
ルとされる。
Vertex A3 on the left side is found on line L3. On line L3, the value of vertex A3 is input as the upper left vertex LS, and the value of vertex A4 is input as the lower left vertex LE. Since there is no vertex on the right side on the same horizontal line as vertex A3, the right side is set to be null.

ラインL4で左辺の頂点A4が見つかる。ラインL4で
は、左上の頂点LSとして頂点A4の値が入力され、左
下の頂点LEとして頂点A6の値が入力される。頂点A
4と同一の水平線上には、右辺の頂点は無いので、右辺
はナルとされる。
Vertex A4 on the left side is found on line L4. In line L4, the value of vertex A4 is input as the upper left vertex LS, and the value of vertex A6 is input as the lower left vertex LE. Vertex A
Since there is no vertex on the right side on the same horizontal line as 4, the right side is taken as a null.

ラインL5で右辺の頂点A5が見つかる。ラインL5で
は、右上の頂点R3として頂点A5の値が人力され、右
下の頂点REとして頂点A8の値が入力される。頂点A
5と同一の水平線上には、左辺の頂点は無いので、左辺
はナルとされる。
Vertex A5 on the right side is found on line L5. In line L5, the value of vertex A5 is input as the upper right vertex R3, and the value of vertex A8 is input as the lower right vertex RE. Vertex A
Since there is no vertex on the left side on the same horizontal line as 5, the left side is taken as a null.

ラインL6で左辺の頂点A6が見つかる。ラインL6で
は、左上の頂点LSとして頂点A6の値が入力され、左
下の頂点LEとして頂点A7の値が入力される。頂点A
6と同一の水平線上には、右辺の頂点は無いので、右辺
はナルとされる。
Vertex A6 on the left side is found on line L6. In line L6, the value of vertex A6 is input as the upper left vertex LS, and the value of vertex A7 is input as the lower left vertex LE. Vertex A
Since there is no vertex on the right side on the same horizontal line as 6, the right side is taken as a null.

ラインL7で左辺の頂点A7が見つかる。ラインL7で
は、左上の頂点LSとして頂点A7の値が入力され、左
下の頂点LEとして頂点A8の値が入力される。頂点A
7と同一の水平線上には、右辺の頂点は無いので、右辺
はナルとされる。
Vertex A7 on the left side is found on line L7. In line L7, the value of vertex A7 is input as the upper left vertex LS, and the value of vertex A8 is input as the lower left vertex LE. Vertex A
Since there is no vertex on the right side on the same horizontal line as 7, the right side is taken as a null.

このように、左辺の頂点と右辺の頂点とが同じ水平ライ
ン上にあった場合のみ、左辺の頂点の値と右辺の頂点の
値とが同時に入力されるようにし、一方の頂点だけ入力
された時には、他方の頂点をナルとし、ナルの場合には
、前回のDDA演算を引き継ぐような処理を行うと、メ
モリ数を増加することなく、台形の処理を任意の多角形
に拡張できる。
In this way, only when the left side vertex and the right side vertex are on the same horizontal line, the value of the left side vertex and the right side vertex value are input at the same time, and only one vertex is input. Sometimes, the other vertex is nulled, and if it is null, processing is performed to inherit the previous DDA operation, thereby allowing the processing of trapezoids to be expanded to any polygon without increasing the number of memories.

つまり、ラインL1〜L2では、頂点A1の値と頂点A
3の値とを用いて左辺縦方向の変分が求められるととも
に、左辺縦方向の補正演算が行われる。頂点AIの値と
頂点A2の値とを用いて右辺縦方向の変分が求められる
とともに、右辺縦方向の補正演算が行われる。そして、
各スキャンラインでの左端の値及び右端の値が求められ
、これから水平方向の変分が求められ、水平方向の補正
演算が行われ、スタート点の値が求められる。そして、
水平方向のDDA演算により、ラインL1〜L2でのス
キャンラインの座標格子点上のピクセルの値が求められ
る。
In other words, in lines L1 to L2, the value of vertex A1 and the value of vertex A
Using the value of 3, the variation in the left side vertical direction is determined, and a correction calculation is performed in the left side vertical direction. Using the value of the vertex AI and the value of the vertex A2, the variation in the vertical direction of the right side is determined, and a correction calculation for the vertical direction of the right side is performed. and,
The left end value and right end value of each scan line are determined, horizontal variation is determined from these values, horizontal correction calculations are performed, and the starting point value is determined. and,
The value of the pixel on the coordinate grid point of the scan line in lines L1 to L2 is determined by the horizontal DDA calculation.

ラインL2〜L3では、左辺では、前回までの左辺縦方
向の変分が引き継がれ、左辺縦方向のDDA演算により
、スキャンラインでの左端の値が求められる。右辺では
、頂点A2の値と頂点A5の値とを用いて右辺での変分
が求められるとともに、右辺の補正演算が行われ、スキ
ャンラインでの右端の値が求められる。これから水平方
向の変分が求められ、水平方向の補正演算が行われ、ス
タート点での値が求められる。そして、水平方向のDD
A演算により、ラインL2〜L3でのスキャンラインの
座標格子点上のピクセルの値が求められる。
In lines L2 to L3, the left side carries over the previous variation in the left side vertical direction, and the left end value on the scan line is determined by DDA calculation in the left side vertical direction. On the right side, the variation on the right side is determined using the value of vertex A2 and the value of vertex A5, and a correction calculation is performed on the right side to determine the value at the right end of the scan line. From this, the horizontal displacement is determined, a horizontal correction calculation is performed, and the value at the starting point is determined. And horizontal DD
By the A calculation, the value of the pixel on the coordinate grid point of the scan line in lines L2 to L3 is determined.

以下同様にして、ラインL3〜L4では、左辺では、頂
点A3の値と頂点A4の値とを用いて左辺縦方向の変分
が求められ、右辺では、前回までの変分が引き継がれる
Similarly, in the lines L3 to L4, on the left side, the vertical variation of the left side is calculated using the value of the vertex A3 and the value of the apex A4, and on the right side, the previous variation is inherited.

ラインL4〜L5では、左辺では、頂点A4と頂点A6
の値を用いて左辺縦方向の変分が求められ、右辺では、
前回までの変分が引き継がれる。
In lines L4-L5, on the left side, apex A4 and apex A6
The vertical variation on the left side is found using the value of , and on the right side,
The previous variation will be carried over.

ラインL5〜L6では、左辺では、前回までの変分が引
き継がれ、右辺では、頂点A5と頂点A8の値を用いて
右辺縦方向の変分が求められる。
In lines L5 to L6, on the left side, the previous variation is carried over, and on the right side, the vertical variation on the right side is determined using the values of apex A5 and apex A8.

ラインL6〜L7では、左辺では、頂点A6と頂点A7
の値を用いて左辺縦方向の変分が求められ、右辺では、
前回までの変分が引き継がれる。
In lines L6-L7, on the left side, apex A6 and apex A7
The vertical variation on the left side is found using the value of , and on the right side,
The previous variation will be carried over.

ラインL7〜L8では、左辺では、頂点A7と頂点A8
の値を用いて左辺縦方向の変分が求められ、右辺では、
前回までの変分が引き継がれる。
In lines L7-L8, on the left side, apex A7 and apex A8
The vertical variation on the left side is found using the value of , and on the right side,
The previous variation will be carried over.

任意の多角形を、このように処理していくと、頂点でだ
け演算処理が行われ、直線部分では演算処理が行われな
いので、図形の接続性が良好である。つまり、曲面を多
角形で近似した時に、第9図において、図形45と図形
46とが生じたとする。図形を所定の多角形で管理して
いこうとすると、図形46を図形46Aと図形46Bと
に分割しなければならなくなる。すると、図形46Aと
図形46Bと、図形45との接続部47に演算誤差によ
る隙間が生じる可能性がある。
When an arbitrary polygon is processed in this manner, the arithmetic processing is performed only on the vertices and not on the straight line parts, so that the connectivity of the figure is good. That is, suppose that when a curved surface is approximated by a polygon, figures 45 and 46 are generated in FIG. 9. In order to manage figures using predetermined polygons, the figure 46 must be divided into a figure 46A and a figure 46B. Then, there is a possibility that a gap will occur in the connecting portion 47 between the graphic 46A, the graphic 46B, and the graphic 45 due to a calculation error.

上述のように任意の多角形を処理する場合には、各図形
の直線部分と直線との接続部に隙間が生じることはない
。なぜなら、頂点の無い部分は、ナルとされ、前回のD
DA演算を引き継ぐ処理をするからである。
When processing arbitrary polygons as described above, no gaps will be created at the connections between the straight line parts of each figure. This is because the part without a vertex is considered a null, and the previous D
This is because the processing that takes over the DA calculation is performed.

c4.大きな演算誤差が発生する場合の処理曲面を近似
して得られた台形の縦方向の長さが1より小さくなる場
合がある。この場合、縦方向の変分を求める際、0に近
い数を除数として割算することになるので、割算器がオ
ーバーフローする可能性が高い。オーバーフローした値
で図形が表示されてしまうと、描画が乱れてしまう。
c4. When a large calculation error occurs, the length in the vertical direction of a trapezoid obtained by approximating a processing surface may be smaller than 1. In this case, when calculating the displacement in the vertical direction, a number close to 0 is used as a divisor for division, so there is a high possibility that the divider will overflow. If a figure is displayed with an overflow value, the drawing will be distorted.

そこで、縦方向の長さが0に近い図形は無視してしまう
ことが考えられる。
Therefore, it may be possible to ignore figures whose length in the vertical direction is close to 0.

ところが、縦方向の長さがOに近い図形を無視してしま
うと、図形の接続性の問題が生じる。
However, if a figure whose length in the vertical direction is close to O is ignored, a problem arises in the connectivity of the figures.

そこで、この発明の一実施例では、縦方向の長さが1よ
り小さい台形を処理する場合、辺の長さが長くなり、割
算器がオーバーフローする可能性が高い水平に近い辺で
は、この辺が始点を同じにする垂直な辺に置き換えられ
る。このようにすると、割算器がオーバーフローする可
能性が回避できるとともに、図形の接続性が良好である
Therefore, in one embodiment of the present invention, when processing a trapezoid whose length in the vertical direction is smaller than 1, the length of the sides becomes long, and the side near the horizontal where there is a high possibility of overflow of the divider is is replaced by a vertical edge that has the same starting point. In this way, the possibility of overflow of the divider can be avoided and the connectivity of the figures is good.

つまり、第10図に示すように、縦方向の長さが1以下
の台形48Aが生じたとする。この図形は、座標格子点
上にあるので、この図形を表示しないと、図形の接続性
の問題が生じる。このような図形では、左上の頂点LS
Iと左下の頂点LE1とを結ぶ左辺での変分を求める際
に、左辺が水平に近く縦方向の長さに対して非常に長い
ので、割算器がオーバーフローする可能性がある。
That is, as shown in FIG. 10, it is assumed that a trapezoid 48A whose length in the vertical direction is 1 or less is generated. Since this figure is located on a coordinate grid point, if this figure is not displayed, a problem with the connectivity of the figure will occur. In such a figure, the top left vertex LS
When calculating the variation on the left side connecting I and the lower left vertex LE1, the left side is close to horizontal and is very long compared to the length in the vertical direction, so there is a possibility that the divider will overflow.

そこで、第10図において、頂点LSIとLElとを結
ぶ左辺が第11図に示すように始点LSIを同じにする
垂直線(LSI〜LE2)に置き換えられ、台形48B
として処理される。水平に近い辺(LSI〜LEI)が
垂直な辺(LS1〜LE2)に置き換えられれば、辺の
長さが短くなるので、左辺の変分を求める際に、割算器
がオーバーフローすることはなくなる。
Therefore, in FIG. 10, the left side connecting the apex LSI and LEl is replaced with a vertical line (LSI to LE2) having the same starting point LSI as shown in FIG.
will be processed as If the near-horizontal sides (LSI to LEI) are replaced with vertical sides (LS1 to LE2), the length of the sides will become shorter, so the divider will no longer overflow when calculating the variation of the left side. .

そして、この時、台形48Aと隣接していた図形49A
の右辺についても、第11図に示すように、水平に近い
右辺R33〜RE3が始点R33を同じにする垂直な辺
(R33〜RE4)で置き換えられ、台形49Bとして
処理される。
At this time, the figure 49A adjacent to the trapezoid 48A
Regarding the right side, as shown in FIG. 11, the nearly horizontal right side R33 to RE3 is replaced with a vertical side (R33 to RE4) having the same starting point R33, and is processed as a trapezoid 49B.

台形48Bの左辺(LSI〜LE2)と、台形49Bの
右辺(R33〜RE 4.)とを結ぶ右辺とは一致する
ので、図形の接続性の問題が生じない。
Since the right side connecting the left side (LSI to LE2) of the trapezoid 48B and the right side (R33 to RE4.) of the trapezoid 49B coincides with each other, there is no problem with the connectivity of the figures.

d、シェーディング装置 dl、シェーディング装置の構成 第1図は、前述のようにして、座標格子点上の各ピクセ
ルの深さ値Z及び明るさ値R,G、Bを求めるハードウ
ェアの構成を示すものである。なお、第1図では、説明
を簡単とするために、多値(Z、R,C,B)を1つの
ハードウェアで処理するようにしているが、多値(Z、
R,G、B)に対して、別々なハードウェアが用意され
、これらが並列的に動作している。
d, shading device dl, shading device configuration FIG. 1 shows the hardware configuration for determining the depth value Z and brightness values R, G, and B of each pixel on the coordinate grid point as described above. It is something. Note that in FIG. 1, in order to simplify the explanation, multi-value (Z, R, C, B) is processed by one hardware, but multi-value (Z,
Separate hardware is prepared for R, G, B), and these are operated in parallel.

第1図において、入力端子11に左上の頂点の値LS(
X、Y、Z、R,G、B)が入力され、入力端子12に
左下の頂点の値LE(X、Y、Z、R,G、B)が入力
される。
In FIG. 1, the value LS (
X, Y, Z, R, G, B) are input, and the value LE (X, Y, Z, R, G, B) of the lower left vertex is input to the input terminal 12.

入力端子13に右上の頂点の値RS(X、Y、Z、R,
G、B)が入力され、入力端子14に右下の頂点の値R
E(X、 Y、 Z、 R,G、 B)が入力される。
The value RS (X, Y, Z, R,
G, B) are input, and the value R of the lower right vertex is input to the input terminal 14.
E (X, Y, Z, R, G, B) is input.

入力端子11からの値がマルチプレクサ15のa側入力
端に供給される。入力端子13からの値がマルチプレク
サ15のb側入力端に供給される。
The value from the input terminal 11 is supplied to the a-side input terminal of the multiplexer 15. The value from the input terminal 13 is supplied to the b-side input terminal of the multiplexer 15.

入力端子12からの値がマルチプレクサ16のa側入力
端に供給される。入力端子14からの値がマルチプレク
サ16のb側入力端に供給される。
The value from the input terminal 12 is supplied to the a-side input terminal of the multiplexer 16. The value from the input terminal 14 is supplied to the b-side input terminal of the multiplexer 16.

マルチプレクサ15で、入力端子11からの値と、入力
端子13からの値とが選択される。マルチプレクサ16
で、入力端子12からの値と、入力端子14からの値と
が選択される。
Multiplexer 15 selects the value from input terminal 11 and the value from input terminal 13. multiplexer 16
Then, the value from input terminal 12 and the value from input terminal 14 are selected.

マルチプレクサ15及び16の出力が減算器17に供給
される。
The outputs of multiplexers 15 and 16 are supplied to a subtracter 17.

減算器17の出力がマルチプレクサ18のa側入力端に
供給される。マルチプレクサ18のb側入力端には、減
算器22の出力が供給される。
The output of the subtracter 17 is supplied to the a-side input terminal of the multiplexer 18. The b-side input terminal of the multiplexer 18 is supplied with the output of the subtracter 22 .

マルチプレクサ18の出力が割算器19に供給される。The output of multiplexer 18 is supplied to divider 19 .

割算器19の出力が左辺補正演算機能付きDDA演算回
路20に供給されるとともに、右辺補正演算機能付きD
DA演算回路21に供給される。また、割算器19の出
力が水平補正演算機能付きDDA演算回路23に供給さ
れる。
The output of the divider 19 is supplied to the DDA arithmetic circuit 20 with a left side correction arithmetic function, and the DDA arithmetic circuit 20 with a right side correction arithmetic function
The signal is supplied to the DA calculation circuit 21. Further, the output of the divider 19 is supplied to a DDA calculation circuit 23 with a horizontal correction calculation function.

左辺補正演算機能付きDDA演算回路20の出力及び右
辺補正演算機能付きDDA演算回路21の出力が減算器
22に供給される。減算器22の出力がマルチプレクサ
18のb側入力端に供給される。
The output of the DDA arithmetic circuit 20 with a left side correction arithmetic function and the output of the DDA arithmetic circuit 21 with a right side correction arithmetic function are supplied to a subtracter 22 . The output of the subtracter 22 is supplied to the b-side input terminal of the multiplexer 18.

水平補正演算機能付きDDA回路23の出力が出力端子
24から出力される。
The output of the DDA circuit 23 with horizontal correction calculation function is output from the output terminal 24.

先ず、マルチプレクサ15がa側に設定され、入力端子
11からの左上の頂点の値LS (X、 Y、 Z、 
R。
First, the multiplexer 15 is set to the a side, and the value LS (X, Y, Z,
R.

G、B)が減算器17に与えられる。また、マルチプレ
クサ16がa側に設定され、入力端子12からの左下の
頂点の値LH(X、Y、Z、R,G、B)が減算器17
に与えられる。
G, B) are given to the subtractor 17. Further, the multiplexer 16 is set to the a side, and the value LH (X, Y, Z, R, G, B) of the lower left vertex from the input terminal 12 is sent to the subtracter 17.
given to.

減算器17で、左下の頂点の値と左上の頂点の値とが減
算され、この減算値がマルチプレクサ18のa側入力端
に供給される。
The subtracter 17 subtracts the value of the lower left vertex and the value of the upper left vertex, and this subtracted value is supplied to the a-side input terminal of the multiplexer 18 .

マルチプレクサ18は、a側に設定されており、この減
算値が割算器19に供給される。
The multiplexer 18 is set on the a side, and this subtracted value is supplied to the divider 19.

割算器19で、■式に基づいて、左辺縦方向の変分が求
められる。この左辺縦方向の変分が左辺補正演算機能付
きDDA演算回路20にセットされる。
A divider 19 calculates the vertical variation of the left side based on equation (2). This vertical variation on the left side is set in the DDA arithmetic circuit 20 with a left side correction arithmetic function.

左辺縦方向の変分が左辺補正演算機能付きDDA演算回
路20にセットされると、マルチプレクサ15がb側に
設定され、入力端子13からの右上の頂点の値R3(X
、Y、Z、R,G、B)が減算器17に与えられる。ま
た、マルチプレクサ16がb側に設定され、入力端子1
4からの右下の頂点の値RE(X。
When the variation in the left side vertical direction is set in the DDA calculation circuit 20 with left side correction calculation function, the multiplexer 15 is set to the b side, and the upper right vertex value R3 (X
, Y, Z, R, G, B) are provided to the subtractor 17. Also, the multiplexer 16 is set to the b side, and the input terminal 1
The value of the lower right vertex from 4 RE(X.

Y、Z、R,G、B)が減算器17に与えられる。Y, Z, R, G, B) are provided to the subtracter 17.

減算器17で、右下の頂点の値と右上の頂点の値とが減
算され、この減算値がマルチプレクサ18のa側入力端
に供給される。
The subtracter 17 subtracts the value of the lower right vertex and the value of the upper right vertex, and this subtracted value is supplied to the a-side input terminal of the multiplexer 18.

マルチプレクサ18は、a側に設定されており、この減
算値が割算器19に供給される。
The multiplexer 18 is set on the a side, and this subtracted value is supplied to the divider 19.

割算器19で、0式に基づいて、右辺縦方向の変分が求
められる。この右辺縦方向の変分が右辺補正演算機能付
きDDA演算回路21にセットされる。
A divider 19 calculates the vertical variation of the right side based on Equation 0. This vertical variation on the right side is set in the DDA arithmetic circuit 21 with a right side correction arithmetic function.

左辺縦方向の変分が左辺補正演算機能付きDDA演算回
路20にセットされ、右辺縦方向の変分が右辺補正演算
機能付きDDA演算回路21にセットされたら、左辺補
正演算機能付きDDA演算回路20及び右辺補正演算機
能付きDDA演算回路21で、左辺縦方向及び右辺縦方
向の補正演算がそれぞれ行われる。
When the left side vertical variation is set in the DDA calculation circuit 20 with left side correction calculation function and the right side vertical variation is set in the DDA calculation circuit 21 with right side correction calculation function, the DDA calculation circuit 20 with left side correction calculation function is set. A DDA calculation circuit 21 with a right-side correction calculation function performs correction calculations for the left-side vertical direction and the right-side vertical direction, respectively.

これにより、スキャンラインの左端及び右端の値が求め
られる。
As a result, the values at the left and right ends of the scan line are determined.

このスキャンラインの左端及び右端の値が減算器22に
供給される。減算器22で、スキャンラインの右端の値
とスキャンラインの左端の値とが減算される。
The values at the left and right ends of this scan line are supplied to the subtracter 22. A subtracter 22 subtracts the value at the right end of the scan line and the value at the left end of the scan line.

左辺補正演算機能付きDDA演算回路20及び右辺補正
演算機能付きDDA演算回路21で、左辺縦方向及び右
辺縦方向の補正演算が終了されると、マルチプレクサ1
8がb側に切り換えられる。
When the left-side correction calculation function-equipped DDA calculation circuit 20 and the right-side correction calculation function-equipped DDA calculation circuit 21 complete correction calculations for the left-side vertical direction and the right-side vertical direction, the multiplexer 1
8 is switched to the b side.

したがって、減算器22で求められたスキャンラインの
右端の値とスキャンラインの左端の値との減算値がマル
チプレクサ18を介して割算器19に供給される。
Therefore, the subtracted value between the value at the right end of the scan line and the value at the left end of the scan line determined by the subtracter 22 is supplied to the divider 19 via the multiplexer 18 .

割算器19で、■弐に基づいて、水平方向の変分が求め
られる。この水平方向の変分が水平補正演算機能付きD
DA演算回路23に供給される。
A divider 19 calculates the displacement in the horizontal direction based on (2). This horizontal variation is D with horizontal correction calculation function.
The signal is supplied to the DA calculation circuit 23.

水平補正演算機能付きDDA演算回路23で、水平方向
の補正演算が行われ、スキャンラインのスタート点の座
標格子点上の値が求められる。水平補正演算機能付きD
DA演算回路23で、このスタート点での値に対してD
DA演算が繰り返され、スキャンライン上の座標格子点
上の値が順次求められる。この値が出力端子24から出
力される。
A DDA arithmetic circuit with a horizontal correction arithmetic function 23 performs a correction arithmetic operation in the horizontal direction to obtain a value on the coordinate grid point of the start point of the scan line. D with horizontal correction calculation function
The DA calculation circuit 23 calculates D for the value at this starting point.
The DA calculation is repeated, and values on the coordinate grid points on the scan line are successively determined. This value is output from the output terminal 24.

1スキヤンラインの座標格子点上の値がすべて求められ
ると、左辺補正演算機能付きDDA演算回路20及び右
辺補正演算機能付きDDA演算回路21で、左辺縦方向
及び右辺縦方向のDDA演算が行われ、次のスキャンラ
インの右端の値と左端の値が求められる。
When all the values on the coordinate grid points of one scan line are obtained, the DDA calculation circuit 20 with a left side correction calculation function and the DDA calculation circuit 21 with a right side correction calculation function perform DDA calculations in the left side vertical direction and the right side vertical direction. , the rightmost and leftmost values of the next scan line are determined.

次のスキャンラインの左端の値及び右端値が減算器22
に供給される。減算器22で、次のスキャンラインの右
端の値と次のスキャンラインの左端の値とが減算される
The leftmost value and rightmost value of the next scan line are subtracted by the subtracter 22.
is supplied to A subtracter 22 subtracts the rightmost value of the next scan line and the leftmost value of the next scanline.

減算器22で求められた次のスキャンラインの右端の値
と左端の値との減算値がマルチプレクサ18を介して割
算器19に供給される。
The subtracted value between the rightmost value and the leftmost value of the next scan line, determined by the subtracter 22, is supplied to the divider 19 via the multiplexer 18.

割算器19で、次のスキャンラインでの水平方向の変分
が求められる。この水平方向の変分が水平補正演算機能
付きDDA演算回路23に供給される。
A divider 19 determines the horizontal variation in the next scan line. This horizontal variation is supplied to a DDA calculation circuit 23 with a horizontal correction calculation function.

水平補正演算機能付きDDA演算回路23で、水平方向
の補正演算が行われ、次のスキャンラインのスタート点
の座標格子点上の値が求められる。
A horizontal correction calculation is performed in the DDA calculation circuit 23 with a horizontal correction calculation function, and the value on the coordinate grid point of the start point of the next scan line is determined.

水平補正演算機能付きDDA演算回路23で、このスタ
ート点での値に対してDDA演算が繰り返され、スキャ
ンライン上の座標格子点上の値が順次求められる。この
値が出力端子24から出力される。
The DDA calculation circuit 23 with horizontal correction calculation function repeats the DDA calculation on the value at this starting point, and the values on the coordinate grid points on the scan line are sequentially determined. This value is output from the output terminal 24.

以下、同様の動作が繰り返される。Thereafter, similar operations are repeated.

d2.演算精度とビット数 第1図に示すようなハードウェアを、多値(深さ値Zと
、明るさR,G、B)毎にそれぞれ別々に用意して並列
処理を図っても、回路規模が増大することはい。これは
、多値の演算を行う場合に必要とされる小数部分のビッ
ト数が決められるので、固定小数点演算で演算を行なえ
るからである。
d2. Arithmetic precision and number of bits Even if hardware as shown in Figure 1 is prepared separately for each multi-value (depth value Z and brightness R, G, B) and parallel processing is attempted, the circuit scale will be limited. Yes, it will increase. This is because the number of bits of the decimal part required when performing multi-value calculations is determined, so that calculations can be performed using fixed-point calculations.

このことについて説明する。先ず水平値X及び垂直値Y
のデバイス座標の最大値と深さ値Zの小数部分のビット
数との関係を考察する。
This will be explained. First, horizontal value X and vertical value Y
Let us consider the relationship between the maximum value of the device coordinates and the number of bits of the decimal part of the depth value Z.

深さ値Zは、DDA演算を繰り返して求められる。した
がって、深さ値Zの誤差は、画面の端から端までDDA
演算が繰り返された時に最大となる。この最大誤差を±
1以下にする必要がある。
The depth value Z is obtained by repeating the DDA calculation. Therefore, the error in depth value Z is DDA from edge to edge of the screen.
Maximum occurs when the operation is repeated. This maximum error is ±
Must be less than 1.

デバイス座標が画面の端から端まででnビット分あった
とすると、画面の端から端までDDA演算を繰り返して
深さ値Z値を求めるのに、2″回のDDA演算が繰り返
される。したがって、1回のDDA演算での誤差をεと
すると、誤差の最大値は、2″ εとなる。この時の深
さ値Zの誤差を±1以下にするためには、DDA演算演
算1九当の誤差を(ε<1/2”)としなければならな
い。すなわち、深さ値Zには、(1/2″)の精度が必
要であり、深さ値Zの小数部分のビット数ZFBは少な
(ともnビット必要である。
Assuming that the device coordinates are n bits from one end of the screen to the other, the DDA calculation is repeated 2'' times to obtain the depth Z value by repeating the DDA calculation from one end of the screen to the other. Therefore, If the error in one DDA calculation is ε, the maximum value of the error is 2″ε. In order to make the error of the depth value Z at this time less than ±1, the error of the DDA operation 19 must be (ε<1/2"). In other words, the depth value Z has the following: (1/2″) precision is required, and the number of bits ZFB of the decimal part of the depth value Z is small (n bits are required).

このことから、深さ値Zの小数部分のビット数ZFBと
水平値X及び垂直値Yのデバイス座標の最大値との関係
は、 ZFB=Max(XD、YD) XD:水平価Xのデバイス座標の最大値(整数部分のビ
ット数) YD:水平値Yのデバイス座標の最大値(整数部分のビ
ット数) とされる。
From this, the relationship between the number of bits ZFB of the decimal part of depth value Z and the maximum value of the device coordinates of horizontal value X and vertical value Y is as follows: ZFB=Max(XD, YD) XD: Device coordinate of horizontal value Maximum value of (number of bits in integer part) YD: Maximum value of device coordinates of horizontal value Y (number of bits in integer part).

次に深さ値Zの最大値と水平値X及び垂直値Yの小数部
分のビット数との関係について考察する。
Next, the relationship between the maximum value of depth value Z and the number of bits of the decimal part of horizontal value X and vertical value Y will be considered.

0式、0式及び■式で示したように、補正演算を行う際
に、垂直値Yの小数部分(LS (Y)−1nt(LS
(Y)))  (R3(Y)−1nt(RS(Y)))
及び水平値Xの小数部分(H3j(X)−1nt(HS
(X)))と、深さ値Zの変分(DL(Z))、(DR
(Z))及び(DH,(Z))との乗算が行われる。こ
の時、求められる誤差を±1以下のにするためには、深
さ値Zの変分の有効数字分(「1」となっている最上位
の桁から整数部の最下位の桁分)だけ水平値Xの小数点
部分及び垂直値Yの小数点部分のビット数を設ける必要
がある。
As shown in formula 0, formula 0, and formula ■, when performing the correction calculation, the decimal part of the vertical value Y (LS
(Y))) (R3(Y)-1nt(RS(Y)))
and the decimal part of the horizontal value X (H3j(X)-1nt(HS
(X))) and the variation of depth value Z (DL(Z)), (DR
(Z)) and (DH, (Z)) are performed. At this time, in order to make the required error less than ±1, the number of significant digits of the variation of depth value Z (from the most significant digit that is "1" to the least significant digit of the integer part) is required. It is necessary to provide the number of bits for the decimal point part of the horizontal value X and the decimal point part of the vertical value Y.

深さ値Zの変分が最大になった場合には、深さ値Zの変
分の整数部分が全て有効数字になる。したがって、水平
値Xの小数点ビット数XFD及び垂直値Yの小数点ビッ
ト数YFDは、深さ値Zの最大値分だけ必要になる。
When the variation of the depth value Z becomes maximum, all the integer parts of the variation of the depth value Z become significant figures. Therefore, the number of decimal point bits XFD for the horizontal value X and the number of decimal point bits YFD for the vertical value Y are required by the maximum value of the depth value Z.

すなわち、Xの小数点ビット数XFD及びYの小数点ビ
ット数YFDは、 XFD=ZD YFD=ZD ZD:深さ値Zの最大値(整数部分のビット数)必要で
ある。
That is, the number of decimal point bits XFD of X and the number of decimal point bits YFD of Y are as follows: XFD=ZD YFD=ZD ZD: The maximum value of the depth value Z (number of bits of the integer part) is required.

以上、深さ値Zで必要とされるビット数について説明し
たが、明るさ値R,C,Bとの演算を行う場合に必要と
される小数部分のビット数の関係についても、同様に求
めることができる。このように、多値の演算を行う場合
に必要とされる小数部分のビット数が決められる。した
がって、浮動小数点演算で演算処理を行う必要がない。
The number of bits required for the depth value Z has been explained above, but the relationship between the number of bits for the decimal part required when performing calculations with the brightness values R, C, and B is also found in the same way. be able to. In this way, the number of bits of the decimal part required when performing multi-value operations is determined. Therefore, there is no need to perform arithmetic processing using floating point arithmetic.

浮動小数点演算を行わなければ、各値毎に演算を行うハ
ードウェアを設けても、回路規模が大きくならない。
If floating point operations are not performed, the circuit scale will not increase even if hardware is provided to perform operations for each value.

e、並列処理状態遷移回路 el、基本回路の説明 第1図に示すハードウェアは、第17図に示すような並
列処理状態遷移回路により制御される。
e. Description of Parallel Processing State Transition Circuit el and Basic Circuit The hardware shown in FIG. 1 is controlled by a parallel processing state transition circuit as shown in FIG.

この並列処理状態遷移回路は、ウェイト回路、ジャンプ
回路、ジョイン回路、デイレイ回路の4種類の基本回路
からなっている。これらの基本回路について説明する。
This parallel processing state transition circuit consists of four types of basic circuits: a wait circuit, a jump circuit, a join circuit, and a delay circuit. These basic circuits will be explained.

・ウェイト回路 ウェイト回路は、二つの入力A、Bを持ち、A入力パル
ス後に、B入力パルスが入るまで出力パルスを止めてお
く機能を持つ。このウェイト回路は、ある処理を開始さ
せるためのトリガーパルスが出力された際、そのトリガ
ーパルスに対する処理が終了するまで、次の処理に進ま
ないように制御するのに用いられる。
・Wait circuit The wait circuit has two inputs A and B, and has the function of stopping the output pulse after the A input pulse until the B input pulse is input. This wait circuit is used to control, when a trigger pulse for starting a certain process is output, not to proceed to the next process until the process for that trigger pulse is completed.

・ウェイト回路の構成 ウェイト回路は、第12図・に示すように構成でいきる
。第12図において、51及び52が入力端子である。
・Configuration of the weight circuit The weight circuit can be configured as shown in FIG. In FIG. 12, 51 and 52 are input terminals.

入力端子51からのトリガーパルスT+がフリップフロ
ップ53に供給されるとともに、NORゲート54の一
方の入力端に供給される。入力端子52からのトリガー
パルスTtがフリップフロップ55に供給される。フリ
ップフロップ53及び55のクロック入力端には、クロ
ックCLKが供給される。フリップフロップ53及び5
5は、D入力端にトリガーパルスが与えられると、クロ
ックCLKの立ち上がりでセットされ、その出力がハイ
レベルになる。そして、そのリセット端子にローレベル
のリセット信号が与えられるまで、出力がハイレベルに
維持される。
A trigger pulse T+ from an input terminal 51 is supplied to a flip-flop 53 and also to one input terminal of a NOR gate 54. A trigger pulse Tt from input terminal 52 is supplied to flip-flop 55 . Clock CLK is supplied to the clock input terminals of flip-flops 53 and 55. Flip-flops 53 and 5
5 is set at the rising edge of the clock CLK when a trigger pulse is applied to the D input terminal, and its output becomes high level. The output is maintained at high level until a low level reset signal is applied to the reset terminal.

56がリセット入力端子である。リセット入力端子56
からのリセット信号R3TがORゲート57の一方の入
力端に供給される。ORゲート57の出力がNORゲー
ト54の他方の入力端に供給されるとともに、インバー
タ58に供給される。
56 is a reset input terminal. Reset input terminal 56
A reset signal R3T from the OR gate 57 is supplied to one input terminal of the OR gate 57. The output of OR gate 57 is supplied to the other input terminal of NOR gate 54 and also to inverter 58 .

NORゲート54の出力がフリップフロップ55のリセ
ット端子に供給される。インバータ58の出力がフリッ
プフロップ53のリセット端子に供給されるとともに、
NANDゲート59の入力端に供給される。
The output of NOR gate 54 is supplied to the reset terminal of flip-flop 55. The output of the inverter 58 is supplied to the reset terminal of the flip-flop 53, and
It is supplied to the input terminal of NAND gate 59.

フリップフロップ53の出力がNANDゲート59の入
力端に供給される。フリップフロップ55の出力がNA
NDゲート59の入力端に供給される。
The output of flip-flop 53 is supplied to the input terminal of NAND gate 59. The output of flip-flop 55 is NA
It is supplied to the input terminal of ND gate 59.

NANDゲート59の出力がDフリップフロップ60の
入力端に供給される。Dフリップフロップ60のクロッ
ク入力端には、クロックCLKが供給される。Dフリッ
プフロップ60の出力がインバータ61を介して出力端
子62から出力される。また、Dフリップフロップ60
の反転出力がORゲート57の他方の入力端に供給され
る。
The output of NAND gate 59 is supplied to the input terminal of D flip-flop 60. A clock CLK is supplied to the clock input terminal of the D flip-flop 60. The output of the D flip-flop 60 is outputted from an output terminal 62 via an inverter 61. Also, D flip-flop 60
The inverted output of is supplied to the other input terminal of OR gate 57.

リセット入力端子56にハイレベルのリセット信号R3
Tが与えられると、ORゲート57の出力がハイレベル
になり、インバータ58の出力がローレベルになるとと
もに、NORゲート54の出力がローレベルになる。こ
れにより、フリップフロップ53がリセットされるとと
もに、フリップフロップ55がリセットされる。
A high level reset signal R3 is input to the reset input terminal 56.
When T is applied, the output of OR gate 57 becomes high level, the output of inverter 58 becomes low level, and the output of NOR gate 54 becomes low level. As a result, the flip-flop 53 and the flip-flop 55 are reset.

また、インバータ58の出力がローレベルになると、N
ANDゲート59の出力がハイレベルになり、Dフリッ
プフロップ60の出力がハイレベルに維持される。した
がって、Dフリップフロップ60の出力をインバータ6
1で反転して得られる出力はローレベルになる。
Furthermore, when the output of the inverter 58 becomes low level, N
The output of AND gate 59 becomes high level, and the output of D flip-flop 60 is maintained at high level. Therefore, the output of the D flip-flop 60 is transferred to the inverter 6.
The output obtained by inverting with 1 becomes a low level.

第13図Bに示すように、時点1.で入力端子51にト
リガーパルスT、が供給されるとする。
As shown in FIG. 13B, time 1. Assume that a trigger pulse T is supplied to the input terminal 51.

すると、第13図りに示すように、クロックCLK(第
13図A)の立ち上がりの時点t!でこのトリガーパル
スT1がフリップフロップ53に取り込まれ、フリップ
フロップ53の出力Q、がハイレベルになる。
Then, as shown in Figure 13, the clock CLK (A in Figure 13) rises at the time t! This trigger pulse T1 is taken into the flip-flop 53, and the output Q of the flip-flop 53 becomes high level.

次に、時点t3で入力端子52にトリガーパルスT、が
供給されるとする。すると、第13図Eに示すように、
クロックCLK (第13図A)の立ち上がりの時点t
、4で、このトリガーパルスT2がフリップフロップ5
5に取り込まれ、フリップフロップ55の出力Qzがハ
イレベルになる。
Next, assume that a trigger pulse T is supplied to the input terminal 52 at time t3. Then, as shown in Figure 13E,
Time t at the rising edge of clock CLK (Fig. 13A)
, 4, this trigger pulse T2 is applied to the flip-flop 5
5, and the output Qz of the flip-flop 55 becomes high level.

この時、第13図りに示すように、フリップフロップ5
3の出力はハイレベルである。また、リセット時にDフ
リップフロップ60にハイレベルが取り込まれるので、
Dフリップフロップ60の反転出力がローレベルであり
、ORゲート57の出力がローレベルであり、インバー
タ58の出力はハイレベルである。したがって、トリガ
ーパルスT2が与えられ、フリップフロップ55の出力
Q、がハイレベルになると、NANDゲート59の出力
がローレベルになる。
At this time, as shown in Figure 13, the flip-flop 5
The output of No. 3 is high level. Also, since a high level is taken into the D flip-flop 60 at reset,
The inverted output of the D flip-flop 60 is at a low level, the output of the OR gate 57 is at a low level, and the output of the inverter 58 is at a high level. Therefore, when the trigger pulse T2 is applied and the output Q of the flip-flop 55 goes high, the output of the NAND gate 59 goes low.

NANDゲート59の出力がローレベルになると、クロ
ックCLKの立ち上がりの時点tsで、Dフリップフロ
ップ60の出力がローレベルになり、第13図Fに示す
ように、出力端子62の出力Pがハイレベルになる。
When the output of the NAND gate 59 becomes low level, the output of the D flip-flop 60 becomes low level at time ts when the clock CLK rises, and the output P of the output terminal 62 becomes high level as shown in FIG. 13F. become.

Dフリップフロップ60の出力がローレベルになると、
Dフリップフロップ600反転出力がハイレベルになり
、ORゲート57の出力がハイレベルになる。
When the output of the D flip-flop 60 becomes low level,
The inverted output of the D flip-flop 600 goes high, and the output of the OR gate 57 goes high.

ORゲート57の出力がハイレベルになると、インバー
タ58の出力がローレベルになるとともに、NORゲー
ト54の出力がローレベルになる。
When the output of OR gate 57 becomes high level, the output of inverter 58 becomes low level, and the output of NOR gate 54 becomes low level.

これにより、第13図りに示すように、フリップフロッ
プ53及び55がリセットされる。
As a result, the flip-flops 53 and 55 are reset as shown in Figure 13.

そして、フリップフロップ53の出力及びフリップフロ
ップ55の出力がローレベルになり、インバータ58の
出力がローレベルになるので、NANDゲート59の出
力がハイレベルになる。NANDゲート59の出力がハ
イレベルになると、クロックCLKの立ち上がる時点t
、で、Dフリップフロップ60の出力がハイレベルにな
る。したがって、時点t6で、出力パルスPはローレベ
ルになる。
Then, the output of the flip-flop 53 and the output of the flip-flop 55 become low level, and the output of the inverter 58 becomes low level, so that the output of the NAND gate 59 becomes high level. When the output of the NAND gate 59 becomes high level, the rising time t of the clock CLK
, the output of the D flip-flop 60 becomes high level. Therefore, at time t6, the output pulse P becomes low level.

第13図Fに示すように、このようなウェイト回路では
、トリガーパルスT1 (第13図B)が供給されてか
ら、トリガーパルスT2 (第13図C)が供給された
後に、出力端子62からパルスPが出力される。
As shown in FIG. 13F, in such a wait circuit, after the trigger pulse T1 (FIG. 13B) is supplied and the trigger pulse T2 (FIG. 13C) is supplied, the output terminal 62 is Pulse P is output.

・ジャンプ回路 ジャンプ回路は、二つの入力A、Sを持ち、S入力のレ
ベルにより、六入カパルスを二つの出力01或いは02
のどちらに出力するかを選択する機能を持つ。このJU
MP回路は、外部の状態に応じて、制御を変えたい場合
に適用される。
・Jump circuit The jump circuit has two inputs A and S, and depending on the level of the S input, outputs six input pulses to two outputs 01 or 02.
It has a function to select which one to output to. This JU
The MP circuit is applied when it is desired to change control depending on external conditions.

・ジャンプ回路の構成 ジャンプ回路は、第14図に示すようにして構成される
。第14図において、入力端子71にトリガーパルスT
、が供給される。このトリガーパルスTllがANDゲ
ート73の一方の入力端に供給されるとともに、AND
ゲート74の一方の入力端に供給される。
・Construction of jump circuit The jump circuit is constructed as shown in FIG. In FIG. 14, a trigger pulse T is input to the input terminal 71.
, is supplied. This trigger pulse Tll is supplied to one input terminal of the AND gate 73, and
It is supplied to one input end of gate 74.

入力端子72に選択パルスSl+が供給される。A selection pulse Sl+ is supplied to the input terminal 72.

この選択パルスSllがANDゲート73の他方の入力
端に供給されるとともに、インバータ75を介してAN
Dゲート74の他方の入力端に供給される。ANDゲー
ト73の出力が出力端子76から出力される。ANDゲ
ート74の出力が出力端子77から出力される。
This selection pulse Sll is supplied to the other input terminal of the AND gate 73, and is passed through the inverter 75 to the AN
It is supplied to the other input terminal of D gate 74. The output of AND gate 73 is output from output terminal 76. The output of AND gate 74 is output from output terminal 77.

入力端子72からの選択パルスS11がハイレベルの間
に、入力端子71からトリガーパルスTllが供給され
ると、ANDゲート73を介して、出力端子76からト
リガーパルスT11が出力される。
When the trigger pulse Tll is supplied from the input terminal 71 while the selection pulse S11 from the input terminal 72 is at a high level, the trigger pulse T11 is output from the output terminal 76 via the AND gate 73.

入力端子72からの選択パルスS、がローレベルの間に
、入力端子71からトリガーパルスTIIが供給される
と、ANDゲート74を介して、出力端子77からトリ
ガーパルスT11が出力される。
When the trigger pulse TII is supplied from the input terminal 71 while the selection pulse S from the input terminal 72 is at a low level, the trigger pulse T11 is output from the output terminal 77 via the AND gate 74.

・ジョイン回路 ジョイン回路は、二つの入力■1及びI2を持ち、I1
又はI2にパルスが入ったら、パルスを出力する機能を
持つ。このジョイン回路は、別々の制御系からの信号を
ひとつの制御系に集める場合に適用される。
・Join circuit The join circuit has two inputs ■1 and I2, and I1
Or, when a pulse is input to I2, it has the function of outputting a pulse. This join circuit is applied when signals from different control systems are collected into one control system.

・ジョイン回路の構成 ジョイン回路は、第15図に示すようにして構成できる
。第15図において、入力端子81にトリガーパルスT
’z+が供給される。入力端子81からのトリガーパル
スTt、がORゲート83の一方の入力端に供給される
。入力端子82にトリガーパルスT22が供給される。
・Construction of join circuit The join circuit can be constructed as shown in FIG. In FIG. 15, a trigger pulse T is input to the input terminal 81.
'z+ is supplied. A trigger pulse Tt from the input terminal 81 is supplied to one input terminal of the OR gate 83. A trigger pulse T22 is supplied to the input terminal 82.

入力端子82からのトリガーパルスT2!がORゲート
83の他方の入力端に供給される。ORゲート83の出
力が出力端子84から出力される。
Trigger pulse T2 from input terminal 82! is supplied to the other input terminal of OR gate 83. The output of OR gate 83 is output from output terminal 84.

入力端子81にトリガーパルスT’z+が供給される時
には、ORゲート83を介して、このトリガーパルスT
2.が出力端子84から出力される。
When the trigger pulse T'z+ is supplied to the input terminal 81, the trigger pulse T'z+ is
2. is output from the output terminal 84.

入力端子82にトリガーパルスT2□が供給される時に
は、ORゲート83を介して、このトリガーパルスT2
□が出力端子84から出力される。
When the trigger pulse T2□ is supplied to the input terminal 82, this trigger pulse T2
□ is output from the output terminal 84.

・デイレイ回路 デイレイ回路は、入力を一定時間遅らせる機能を持つ。・Delay circuit A delay circuit has the function of delaying input for a certain period of time.

このデイレイ回路は、トリガーパルスから常に一定の遅
れ時間後、処理が終了するような制御に適用される。
This delay circuit is applied to control such that processing always ends after a certain delay time from a trigger pulse.

・デイレイ回路の構成 デイレイ回路は、第16図に示すようにして構成される
。第16図において、入力端子91にトリガーパルスT
R+が供給される。この入力端子91からのトリガーパ
ルスT31がフリブフロップ92に供給される。フリプ
フロップ92の出力が出力端子93から出力される。
- Construction of delay circuit The delay circuit is constructed as shown in FIG. In FIG. 16, a trigger pulse T is input to the input terminal 91.
R+ is supplied. A trigger pulse T31 from this input terminal 91 is supplied to a frib-flop 92. The output of flip-flop 92 is output from output terminal 93.

入力端子91にトリガーパルスT3.は、フリップフロ
ップ92を介して遅延されて、出力端子93から出力さ
れる。
A trigger pulse T3. is delayed via the flip-flop 92 and output from the output terminal 93.

e2.  シェーディング処理のための並列処理状態遷
移回路 第17図は、第1図に示したハードウェアを制御するた
めの並列処理状態遷移回路の一例である。
e2. Parallel processing state transition circuit for shading processing FIG. 17 is an example of a parallel processing state transition circuit for controlling the hardware shown in FIG. 1.

この並列処理状態遷移回路には、上述の4つの基本回路
が用いられる。第17図と第1図とを参照しながら、こ
の発明の一実施例の演算処理制御について説明する。
The four basic circuits described above are used in this parallel processing state transition circuit. The arithmetic processing control of one embodiment of the present invention will be explained with reference to FIG. 17 and FIG. 1.

第17図において、入力端子101に外部トリガーパル
スEXTRGが与えられる。この外部トリガーパルスE
XT’RGは、並列処理状態遷移回路を構成する各基本
回路間を伝えられていく。この時、各基本回路から、ハ
ードウェアの各部を制御するためのトリガー信号が出力
されてい(。
In FIG. 17, an external trigger pulse EXTRG is applied to the input terminal 101. This external trigger pulse E
XT'RG is transmitted between each basic circuit that constitutes the parallel processing state transition circuit. At this time, each basic circuit outputs a trigger signal to control each part of the hardware (.

すなわち、入力端子101からの外部トリガーパルスE
XTRGがデイレイ回路102に供給され、外部トリガ
ーパルスεXTRGがデイレイ回路102に供給されて
から所定時間経過後、デイレイ回路102からトリガー
信号が出力される。このトリガー信号がセレクト信号S
EL ABCとされる。セレクトSEL ABCにより
、第1図におけるマルチプレクサ15及び16がa側に
切り換えられ、マルチプレクサ18がa側に切り換えら
れる。そして、左下の頂点の値と左上の頂点の値が減算
器17で減算され、割算器19に設定される。
That is, the external trigger pulse E from the input terminal 101
XTRG is supplied to the delay circuit 102, and after a predetermined period of time has elapsed since the external trigger pulse εXTRG was supplied to the delay circuit 102, a trigger signal is output from the delay circuit 102. This trigger signal is the select signal S
EL ABC. By selecting SEL ABC, multiplexers 15 and 16 in FIG. 1 are switched to the a side, and multiplexer 18 is switched to the a side. Then, the value of the lower left vertex and the value of the upper left vertex are subtracted by the subtractor 17 and set in the divider 19.

ジャンプ回路103のへ入力端には、デイレイ回路10
2からのトリガー信号が供給される。ジャンプ回路10
3のS入力端には、ナル判別信号Nullが供給される
。左辺に頂点があれば、(第8図参照)ジャンプ回路1
03の01出力端からトリカーパルスが出力される。こ
のトリガーパルスが割算トリガー信号DIV TRGと
される。この割算トリガー信号DIV TRGにより、
第1図における割算器19で割算が開始される。これに
より、左辺縦方向の変分が求められる。左辺に頂点が無
く、左辺の頂点がナルとされていたら、ジャンプ回路1
03の02出力端からトリガーパルスが出力され、この
トリガーパルスがデイレイ回路105に供給される。
A delay circuit 10 is connected to the input terminal of the jump circuit 103.
A trigger signal from 2 is supplied. jump circuit 10
A null determination signal Null is supplied to the S input terminal of No. 3. If there is a vertex on the left side (see Figure 8), jump circuit 1
A trigger pulse is output from the 01 output terminal of 03. This trigger pulse is used as the division trigger signal DIV TRG. With this division trigger signal DIV TRG,
Division is started in divider 19 in FIG. As a result, the variation in the vertical direction of the left side is found. If there is no vertex on the left side and the vertex on the left side is null, jump circuit 1
A trigger pulse is output from the 02 output terminal of 03, and this trigger pulse is supplied to the delay circuit 105.

ウェイト回路104のA入力端には、ジャンプ回路10
3のO1出力端からのトリガーパルスが供給される。ウ
ェイト回路104のS入力端には、割算終了信号DIV
 ENDが供給される。割算器19で割算が終了され、
左辺縦方向の変分が求められると、割算器19から割算
終了信号DIV ENDが発生される。割算終了信号D
IV ENDが発生されると、ウェイト回路104から
トリガーパルスが出力される。このトリガーパルスがD
DAセット信号ODA SET Aとされる。このDD
Aセット信号ODA 5ETAにより、割算器19で求
められた左辺縦方向の変分が左辺補正演算機能付きDD
A演算回路20にセットされる。
A jump circuit 10 is connected to the A input terminal of the wait circuit 104.
A trigger pulse is supplied from the O1 output of No. 3. The S input terminal of the wait circuit 104 receives a division end signal DIV.
END is supplied. The division is completed by the divider 19,
When the vertical displacement of the left side is determined, the divider 19 generates a division end signal DIV END. Division end signal D
When IV END is generated, the wait circuit 104 outputs a trigger pulse. This trigger pulse is D
The DA set signal ODA SET A is used. This DD
With the A set signal ODA 5ETA, the vertical variation of the left side obtained by the divider 19 is converted to DD with left side correction calculation function.
It is set in the A calculation circuit 20.

ジョイン回路106の■1入力端には、ウェイト回路1
04から出力されるトリガーパルスが供給される。ジョ
イン回路106の12入力端には、デイレイ回路105
から出力されるトリガーパルスが供給される。ジョイン
回路106のI、入力端にウェイト回路104からトリ
ガーパルスが与えられるか、又は、ジョイン回路106
の工2入力端にデイレイ回路105からトリガーパルス
が与えられると、ジョイン回路106からトリガーパル
スが出力される。このトリガーパルスがセレクト信号S
EL ABとされる。このセレクト信号5ELAHによ
り、マルチプレクサ15及び16がb側に切り換えられ
、右下の頂点の値と右上の頂点の値が減算器17で減算
され、割算器19に設定される。
The wait circuit 1 is connected to the ■1 input terminal of the join circuit 106.
A trigger pulse output from 04 is supplied. A delay circuit 105 is connected to the 12 input terminal of the join circuit 106.
A trigger pulse outputted from the trigger pulse is supplied. A trigger pulse is given from the wait circuit 104 to the I input terminal of the join circuit 106, or the join circuit 106
When a trigger pulse is applied from the delay circuit 105 to the input terminal of the second input terminal, a trigger pulse is output from the join circuit 106. This trigger pulse is the select signal S
It is considered to be EL AB. This select signal 5ELAH switches the multiplexers 15 and 16 to the b side, and the value at the lower right vertex and the value at the upper right vertex are subtracted by the subtracter 17 and set in the divider 19.

ジャンプ回路107のA入力端には、ジョイン回路10
6からのトリガー信号が供給される。ジャンプ回路10
3のS入力端には、ナル判別信号Nullが供給される
。右辺に頂点があれば、ジャンプ回路107の01出力
端からトリガーパルスが出力される。このトリガーパル
スが割算トリガー信号DIV TRGとされる。割算ト
リガー信号DIV TRGにより、割算器19で割算が
開始される。これにより、右辺縦方向の変分が求められ
る。右辺に頂点が無く、右辺の頂点がナルとされていた
ら、ジャンプ回路107の02出力端からトリガーパル
スが出力され、このトリガーパルスがデイレイ回路10
9に供給される。
A join circuit 10 is connected to the A input terminal of the jump circuit 107.
A trigger signal from 6 is supplied. jump circuit 10
A null determination signal Null is supplied to the S input terminal of No. 3. If there is a vertex on the right side, a trigger pulse is output from the 01 output terminal of the jump circuit 107. This trigger pulse is used as the division trigger signal DIV TRG. The division trigger signal DIV TRG causes the divider 19 to start division. As a result, the variation in the vertical direction of the right side is obtained. If there is no vertex on the right side and the vertex on the right side is null, a trigger pulse is output from the 02 output terminal of the jump circuit 107, and this trigger pulse is sent to the delay circuit 10.
9.

ウェイト回路108のA入力端には、ジャンプ回路10
7の01出力端からのトリガーパルスが供給される。ウ
ェイト回路107のB入力端には、割算終了信号DIV
 ENDが供給される。割算器19で割算が終了され、
右辺縦方向の変分が求められると、割算器19から割算
終了信号DIV ENDが発生される。割算終了信号D
IV ENDが発生されると、ウェイト回路108から
トリガーパルスが出力される。このトリガーパルスがD
DAセット信号DDA SET B とされる。このD
DAセット信号ODA 5ETBにより、割算器19で
求められた右辺縦方向の変分が右辺補正演算機能付きD
DA演算回路21にセットされる。
A jump circuit 10 is connected to the A input terminal of the wait circuit 108.
A trigger pulse from the 01 output terminal of 7 is supplied. The B input terminal of the wait circuit 107 receives the division end signal DIV.
END is supplied. The division is completed by the divider 19,
When the vertical displacement of the right side is determined, the divider 19 generates a division end signal DIV END. Division end signal D
When IV END is generated, the wait circuit 108 outputs a trigger pulse. This trigger pulse is D
It is set as a DA set signal DDA SET B. This D
By the DA set signal ODA 5ETB, the vertical variation of the right side obtained by the divider 19 is converted to D with the right side correction calculation function.
It is set in the DA calculation circuit 21.

ジョイン回路110の■、入力端には、ウェイト回路1
08から出力されるトリガーパルスが供給される。ジョ
イン回路110の12入力端には、デイレイ回路109
から出力されるトリガーパルスが供給される。ジョイン
回路110の11入力端にウェイト回路108からトリ
ガーパルスが与えられるか、又は、ジ式イン回路110
の12入力端にデイレイ回路109からトリガーパルス
が与えられると、ジョイン回路110からトリガーパル
スが出力される。このトリガーパルスがDDA補正演算
トリガー信号DOA TRG ABとされる。このDD
A補正演算トリガー信号DDA TRG ABにより、
左辺補正演算機能付きDDA演算回路20及び右辺補正
演算機能付きDDA演算回路21がトリガーされ、左辺
補正演算及び右辺補正演算が開始される。この補正演算
により、スキャンラインの左端及び右端の値が求められ
る。
■The input terminal of the join circuit 110 has a wait circuit 1.
A trigger pulse output from 08 is supplied. A delay circuit 109 is connected to the 12 input terminal of the join circuit 110.
A trigger pulse outputted from the trigger pulse is supplied. A trigger pulse is given from the wait circuit 108 to the 11 input terminal of the join circuit 110, or the input terminal 110 of the join circuit 110
When a trigger pulse is applied from the delay circuit 109 to the 12 input terminal of the circuit, a trigger pulse is output from the join circuit 110. This trigger pulse is used as the DDA correction calculation trigger signal DOA TRG AB. This DD
By the A correction calculation trigger signal DDA TRG AB,
The DDA calculation circuit with left side correction calculation function 20 and the DDA calculation circuit with right side correction calculation function 21 are triggered, and left side correction calculation and right side correction calculation are started. Through this correction calculation, values at the left end and right end of the scan line are determined.

ウェイト回路111のA入力端には、ジョイン回路11
0から出力されるトリガーパルスが供給される。ウェイ
ト回路111のB入力端には、補正演算終了信号AJS
T ENDが供給される。左辺補正演算機能付きDDA
演算回路20及び右辺補正演算機能付きODA演算回路
21で左辺補正演算及び右辺補正演算が終了されると、
左辺補正演算機能付きDDA演算回路20及び右辺補正
演算機能付きDDA演算回路21から、補正演算終了信
号^JST ENDが発生される。補正演算終了信号A
JST ENDが発生されると、ウェイト回w1111
からトリガーパルスが出力される。
A join circuit 11 is connected to the A input terminal of the wait circuit 111.
A trigger pulse output from 0 is supplied. The B input terminal of the wait circuit 111 receives a correction calculation end signal AJS.
T END is supplied. DDA with left side correction calculation function
When the left side correction calculation and the right side correction calculation are completed in the calculation circuit 20 and the ODA calculation circuit with right side correction calculation function 21,
A correction calculation end signal ^JST END is generated from the DDA calculation circuit 20 with a left-side correction calculation function and the DDA calculation circuit 21 with a right-side correction calculation function. Correction calculation end signal A
When JST END is generated, wait time w1111
A trigger pulse is output from.

ジョイン回路112のI、入力端には、ウェイト回路1
11から出力されるトリガーパルスが供給される。ジョ
イン回路112のI!入力端には、ウェイト回路117
から出力されるトリガーパルスが供給される。ジョイン
回路112の11入力端にウェイト回路111からトリ
ガーパルスが与えられるか、又は、ジョイン回路112
の12入力端にウェイト回路107からトリガーパルス
が与えられると、ジョイン回路112からトリガーパル
スが出力される。このトリガーパルスがセレクト信号S
EL Cとされる。このセレクト信号5ELCにより、
第1図におけるマルチプレクサ18がb側に切り換えら
れる。
The wait circuit 1 is connected to the input terminal of the join circuit 112.
A trigger pulse output from 11 is supplied. I of the join circuit 112! A weight circuit 117 is provided at the input end.
A trigger pulse outputted from the trigger pulse is supplied. A trigger pulse is given to the 11 input terminal of the join circuit 112 from the wait circuit 111, or the join circuit 112
When a trigger pulse is applied from the wait circuit 107 to the 12 input terminal of the join circuit 112, the trigger pulse is output from the join circuit 112. This trigger pulse is the select signal S
It is considered to be EL C. With this select signal 5ELC,
The multiplexer 18 in FIG. 1 is switched to the b side.

マルチプレクサ18がb側に切り換えられると、減算器
22で求められた水平方向の変分が割算器19にセット
される。
When the multiplexer 18 is switched to the b side, the horizontal variation determined by the subtracter 22 is set in the divider 19.

デイレイ回路113には、ジョイン回路112から出力
されるトリガーパルスが供給される。デイレイ回路11
3で、このトリガーパルスが所定時間遅延され、所定時
間経過後、デイレイ回路113からトリガーパルスが出
力される。このトリガーパルスが割算トリガー信号DI
V TRGとされる。
The delay circuit 113 is supplied with a trigger pulse output from the join circuit 112 . Delay circuit 11
3, this trigger pulse is delayed for a predetermined time, and after the predetermined time has elapsed, the trigger pulse is output from the delay circuit 113. This trigger pulse is the divided trigger signal DI
V TRG.

この割算トリガー信号DIV TRGにより、割算器1
9で割算が開始される。
This division trigger signal DIV TRG causes the divider 1
Division begins at 9.

ウェイト回路114のA入力端には、デイレイ回路11
3から出力されるトリガーパルスが供給される。ウェイ
ト回路114のB入力端には、割算終了信号DIV E
NDが供給される。割算器19で割算が終了され、水平
方向の変分が求められると、割算器19から割算終了信
号DIV BNOが発生される。割算終了信号DIV 
ENDが発生されると、ウェイト回路114からトリガ
ーパルスが出力される。
The delay circuit 11 is connected to the A input terminal of the wait circuit 114.
A trigger pulse output from 3 is supplied. The B input terminal of the wait circuit 114 receives the division end signal DIV E
ND is supplied. When the divider 19 completes the division and determines the horizontal displacement, the divider 19 generates a division end signal DIV BNO. Division end signal DIV
When END is generated, the wait circuit 114 outputs a trigger pulse.

このトリガーパルスがDDAセット信号DDA 5ET
Hとされる。このDDAセット信号ODA SET H
により、割算器19で求められた水平方向の変分が水平
補正演算機能付きDDA演算回路23にセットされる。
This trigger pulse is the DDA set signal DDA 5ET
It is considered H. This DDA set signal ODA SET H
As a result, the horizontal variation obtained by the divider 19 is set in the DDA arithmetic circuit 23 with a horizontal correction arithmetic function.

デイレイ回路115には、ウェイト回路114から出力
されるトリガーパルスが供給される。デイレイ回路11
5で、このトリガーパルスが所定時間遅延され、所定時
間経過後、デイレイ回路115からトリガーパルスが出
力される。このトリガーパルスがDDA補正演算トリガ
ー信号DDA TRGOとされる。このDDA補正演算
トリガー信号DDA TRG Hにより、水平補正演算
機能付きDDA演算回路23がトリガーされ、水平補正
演算が開始される。このDDA補正演算により、スキャ
ンラインの左端の座標格子点の値が求められる。
A trigger pulse output from the wait circuit 114 is supplied to the delay circuit 115 . Delay circuit 11
In step 5, this trigger pulse is delayed for a predetermined time, and after the predetermined time has elapsed, the trigger pulse is output from the delay circuit 115. This trigger pulse is used as the DDA correction calculation trigger signal DDA TRGO. This DDA correction calculation trigger signal DDA TRG H triggers the DDA calculation circuit 23 with horizontal correction calculation function, and starts horizontal correction calculation. Through this DDA correction calculation, the value of the coordinate grid point at the left end of the scan line is determined.

ウェイト回路116のへ入力端には、デイレイ回路11
5から出力されるトリガーパルスが供給される。ウェイ
ト回路1160B入力端には、補正演算終了信号AJS
T ENDが供給される。水平補正演算機能付きDDA
演算回路23で水平補正演算が終了されると、水平補正
演算機能付きDDA演算回路23から、補正演算終了信
号AJST ENDが発生される。補正演算終了信号A
JST ENDが発生されると、ウェイト回路116か
らトリガーパルスが出力される。このトリガーパルスが
DDA演算トリガー信号DDA HINCとされる。こ
のDDA演算トリガー信号DDA HINCにより、水
平補正演算機能付きDDA演算回路23でDDA演算を
繰り返される。これにより、スキャンラインの各座標格
子点の値が求められる。
The delay circuit 11 is connected to the input terminal of the wait circuit 116.
A trigger pulse output from 5 is supplied. The input end of the wait circuit 1160B receives a correction calculation end signal AJS.
T END is supplied. DDA with horizontal correction calculation function
When the horizontal correction calculation is completed in the calculation circuit 23, a correction calculation end signal AJST END is generated from the DDA calculation circuit 23 with horizontal correction calculation function. Correction calculation end signal A
When JST END is generated, a trigger pulse is output from the wait circuit 116. This trigger pulse is used as the DDA calculation trigger signal DDA HINC. This DDA calculation trigger signal DDA HINC causes the DDA calculation circuit 23 with horizontal correction calculation function to repeat the DDA calculation. Thereby, the value of each coordinate grid point of the scan line is determined.

ウェイト回路117のA入力端には、ウェイト回路11
6から出力されるトリガー信号が供給される。ウェイト
回路117のB入力端には、ラインの終端を示す信号E
ND OF LINEが供給される。
The weight circuit 11 is connected to the A input terminal of the weight circuit 117.
A trigger signal output from 6 is supplied. The B input terminal of the wait circuit 117 receives a signal E indicating the end of the line.
ND OF LINE is supplied.

ラインの終わりまで各座標格子点の値が求められると、
ラインの終端を示す信号END OF LINEが発生
される。そして、ラインの終端を示す信号ENDOF 
LINEが発生されると、ウェイト回路117からトリ
ガーパルスが出力される。このトリガーパルスがDDA
演算トリガー信号DDA AB INCとされる。この
トリガーパルスがDDA演算トリガー信号DDA AB
 INCにより、左辺補正演算機能付きDDA演算回路
20及び右辺補正演算機能付きDDA演算回路21でD
DA演算が行われ、次のスキャンラインの左端の値及び
右端の値が求められる。
Once the value of each coordinate grid point is calculated up to the end of the line,
A signal END OF LINE is generated indicating the end of the line. And the signal ENDOF indicating the end of the line
When LINE is generated, the wait circuit 117 outputs a trigger pulse. This trigger pulse is DDA
The calculation trigger signal DDA AB INC is used. This trigger pulse is the DDA calculation trigger signal DDA AB
By INC, the DDA calculation circuit 20 with a left-side correction calculation function and the DDA calculation circuit 21 with a right-side correction calculation function
A DA operation is performed to find the leftmost value and rightmost value of the next scan line.

ウェイト回路117からの出力パルスがジョイン回路1
12の12入力端に供給される。そして、次ラインの処
理が行われる。
The output pulse from the wait circuit 117 is sent to the join circuit 1.
12 of the 12 input terminals. Then, the next line is processed.

[発明の効果〕 この発明によれば、縦方向の長さが1より小さい台形を
処理する場合、辺の長さが長くなり、割算器がオーバー
フローする可能性が高い水平に近い辺では、この辺が始
点を同じにする垂直な辺に置き換えられる。このように
すると、割算器がオーバーフローする可能性が回避でき
るとともに、図形の接続性が良好である。
[Effects of the Invention] According to the present invention, when processing a trapezoid whose length in the vertical direction is smaller than 1, the length of the sides becomes long and the side near the horizontal where there is a high possibility of overflow of the divider, This edge is replaced by a vertical edge that has the same starting point. In this way, the possibility of overflow of the divider can be avoided and the connectivity of the figures is good.

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

第1図はこの発明の一実施例のブロック図、第2図は補
正演算の説明に用いる路線図、第3図は補正演算機能付
きDDA演算回路のブロック図。 第4図は補正演算機能付きDDA演算回路の説明に用い
るブロック図、第5図は補正演算機能付きDDA演算回
路での乗算の説明に用いる路線図。 第6図はシェーディングの説明に用いる路線図。 第7図はこの発明の一実施例の説明に用いるフロー図、
第8図及び第9図はこの発明の一実施例において任意の
多角形を処理する場合の説明に用いる路線図、第10図
及び第11図はこの発明の一実施例において大きな演算
誤差が生じる場合の処理の説明に用いる路線図、第12
図はウェイト回路の一例のブロック図、第13図はウェ
イト回路の一例の説明に用いるタイミング図、第14図
はジャンプ回路の一例のブロック図、第15図はジョイ
ン回路の一例のブロック図、第16図はデイレイ回路の
一例のブロック図、第17図はこの発明が適用された並
列処理状態遷移回路の一例のブロック図である。 図面における主要な符号の説明 19:割算器。 20:左辺補正演算機能付きDDA演算回路。 21:右辺補正演算機能付きDDA演算回路。 23:水平補正演算機能付きDDA演算回路。
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a route diagram used to explain correction calculations, and FIG. 3 is a block diagram of a DDA calculation circuit with a correction calculation function. FIG. 4 is a block diagram used to explain the DDA arithmetic circuit with a correction arithmetic function, and FIG. 5 is a route diagram used to explain multiplication in the DDA arithmetic circuit with a correction arithmetic function. Figure 6 is a route map used to explain shading. FIG. 7 is a flow diagram used to explain one embodiment of the present invention;
Figures 8 and 9 are route maps used to explain processing arbitrary polygons in an embodiment of this invention, and Figures 10 and 11 are route maps in which large calculation errors occur in an embodiment of this invention. Route map used to explain processing in case, 12th
13 is a timing diagram used to explain an example of a wait circuit. FIG. 14 is a block diagram of an example of a jump circuit. FIG. 15 is a block diagram of an example of a join circuit. FIG. 16 is a block diagram of an example of a delay circuit, and FIG. 17 is a block diagram of an example of a parallel processing state transition circuit to which the present invention is applied. Explanation of main symbols in the drawings 19: Divider. 20: DDA calculation circuit with left side correction calculation function. 21: DDA calculation circuit with right side correction calculation function. 23: DDA calculation circuit with horizontal correction calculation function.

Claims (1)

【特許請求の範囲】 曲面を複数の多角形で近似し、上記多角形の各頂点に値
を入力し、上記各頂点に入力された値から上記多角形内
の値を線形補間により求めるようにしたシェーディング
方法において、 上記多角形の縦方向の距離が所定値以下になる場合には
、水平に近い辺を始点を同じにする垂直な辺に置き換え
るようにしたことを特徴とするシェーディング方法。
[Claims] A curved surface is approximated by a plurality of polygons, a value is input to each vertex of the polygon, and a value within the polygon is determined from the value input to each vertex by linear interpolation. A shading method characterized in that, if the vertical distance of the polygon is less than or equal to a predetermined value, a near-horizontal side is replaced with a vertical side having the same starting point.
JP1333632A 1989-12-21 1989-12-22 Shading method Pending JPH03192480A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP1333632A JPH03192480A (en) 1989-12-22 1989-12-22 Shading method
KR1019900020769A KR100232931B1 (en) 1989-12-21 1990-12-17 A shading method and shading apparatus for computer graphics
EP90124779A EP0434037B1 (en) 1989-12-21 1990-12-19 A shading method and shading apparatus for computer graphics
DE69032367T DE69032367T2 (en) 1989-12-21 1990-12-19 Shading method and device in a graphics calculator
US08/302,965 US5418901A (en) 1989-12-21 1994-09-12 Shading method and shading apparatus for computer graphics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1333632A JPH03192480A (en) 1989-12-22 1989-12-22 Shading method

Publications (1)

Publication Number Publication Date
JPH03192480A true JPH03192480A (en) 1991-08-22

Family

ID=18268219

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1333632A Pending JPH03192480A (en) 1989-12-21 1989-12-22 Shading method

Country Status (1)

Country Link
JP (1) JPH03192480A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039986A (en) * 2009-08-18 2011-02-24 Oki Data Corp Graphics processing device, graphics processing system and graphics processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039986A (en) * 2009-08-18 2011-02-24 Oki Data Corp Graphics processing device, graphics processing system and graphics processing method

Similar Documents

Publication Publication Date Title
KR100278565B1 (en) Geometry pipeline implemented on a simd machine
US5142617A (en) Method of shading a graphics image
JP2910979B2 (en) Method and apparatus for generating sub-pixel mask in computer graphic system
JP3675488B2 (en) Circuit for determining non-homogeneous secondary perspective texture mapping coordinates using linear interpolation
JP2618951B2 (en) 3D graphics processor
US4951230A (en) Method and apparatus for tiling an image
US5036316A (en) Method and apparatus for high speed linear shading in a raster graphics system
JPH01124077A (en) Pixel generation method and system
KR100232931B1 (en) A shading method and shading apparatus for computer graphics
JPS62219182A (en) Display processor for graphics display system
JPH03192480A (en) Shading method
JP2770513B2 (en) Shading method and shading device
EP0327001B1 (en) Pattern data generating system
KR970004120B1 (en) Three-dimension graphic processing apparatus
US4484189A (en) Memoryless artificial horizon generator
JPH03192483A (en) Arithmetic circuit for shading
JP2770514B2 (en) Shading device
JPH03192482A (en) Shading method
JPH06215143A (en) Method and apparatus for representation of graphics object
US5315540A (en) Method and hardware for dividing binary signal by non-binary integer number
JPS6266383A (en) Method and apparatus for generating halftone image signal from reference image signal
US4393453A (en) Region information processing system
KR970004107B1 (en) Parameter curve generator
US5167018A (en) Polygon-filling apparatus
JP2001283242A (en) Image processor and image processing method