JPH1131232A - Method and device for plotting polygon - Google Patents

Method and device for plotting polygon

Info

Publication number
JPH1131232A
JPH1131232A JP18559097A JP18559097A JPH1131232A JP H1131232 A JPH1131232 A JP H1131232A JP 18559097 A JP18559097 A JP 18559097A JP 18559097 A JP18559097 A JP 18559097A JP H1131232 A JPH1131232 A JP H1131232A
Authority
JP
Japan
Prior art keywords
intersection
scan line
luminance value
edge
polygon
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
JP18559097A
Other languages
Japanese (ja)
Inventor
Yasuhiro Enomoto
保宏 榎本
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.)
Yamaha Corp
Original Assignee
Yamaha 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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP18559097A priority Critical patent/JPH1131232A/en
Publication of JPH1131232A publication Critical patent/JPH1131232A/en
Priority to US09/932,810 priority patent/US7142224B2/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To attain high speed plotting by successively generating pixel data along a scan line by using an anti-aliasing technique. SOLUTION: Line cross point data to be generated includes first outside cross point XLe and inside cross point XLi corresponding to the upstream edge of the scan direction of a scan line N, second outside cross point XRe and inside cross point XRi corresponding to the downstream side edge, the increase ratio of a luminance value from the first outside cross point to the inside cross point, and the decrease ratio of the luminance from the second inside cross point to the outside point. A first processing for mainly calculating the change of the luminance value from the first outside cross point to inside point, second processing for mainly calculating the change of the luminance value from the second inside cross point to outside cross point, and third processing for synthesizing the first and second processed results are executed in parallel so that each luminance value of the inside part of a polygon can be sequentially calculated in a scan direction for each scan line.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、図形をメモリ上
に描画し表示する画像表示装置等に適用され、エッジ部
分が滑らかになるように三角形等の多角形を描画する多
角形描画方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is applied to an image display device or the like which draws and displays a figure on a memory, and draws a polygon such as a triangle so that an edge portion becomes smooth. About.

【従来の技術】[Prior art]

【0002】図形をメモリ上に描画する場合、理想的な
線を縦横に等間隔で配置されたグリッド上の点によって
表現するため、図23に示すように、通常は直線がジャ
ギと呼ばれるギザギザの線となってしまう。このジャギ
を軽減するために、アンチエイリアシングの手法が提案
されている。図24は、この手法を説明するための図で
ある。この手法では、1ピクセルを1つの正方形と考え
た場合、同図(a)に示すように、直線が各ピクセルを
どの程度覆っているかによって、その輝度値が決定され
る。同図(b)は、そのような基準によって各ピクセル
の輝度を決定した例を示している。この例のように、1
本の直線を輝度差をもって表現することにより、直線を
滑らかに描画することができる。
When a figure is drawn on a memory, an ideal line is represented by points on a grid arranged at equal intervals in the vertical and horizontal directions. Therefore, as shown in FIG. It becomes a line. In order to reduce this jagging, an anti-aliasing technique has been proposed. FIG. 24 is a diagram for explaining this technique. In this method, when one pixel is considered as one square, the brightness value is determined depending on how much a straight line covers each pixel as shown in FIG. FIG. 2B shows an example in which the luminance of each pixel is determined based on such a criterion. As in this example, 1
The straight line can be drawn smoothly by expressing the straight line with the luminance difference.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
アンチエイリアシングの手法は、理想的な直線が各ピク
セルをどの程度覆っているかを計算しなければならない
ので、計算が複雑である。また、三角形のエッジにおい
ては、エッジの部分だけ特別な処理をしなければならな
いので、三角形の描画速度が遅くなってしまうという問
題もある。
However, in the conventional anti-aliasing method, the calculation is complicated because it is necessary to calculate how much an ideal straight line covers each pixel. In addition, special processing must be performed only on the edge portion of the triangle edge, so that there is a problem that the drawing speed of the triangle is reduced.

【0004】この発明は、このような問題点に鑑みなさ
れたもので、エッジを滑らかに描画するアンチエイリア
シングの手法を使用しながら、通常の描画処理と同様に
スキャンラインに沿って順番に画素のデータを生成する
ことができ、高速描画が可能な多角形描画方法及び装置
を提供することを目的としている。
The present invention has been made in view of such a problem, and uses an anti-aliasing technique for smoothly drawing edges, and sequentially performs pixel-sharing along a scan line in the same manner as a normal drawing process. An object of the present invention is to provide a polygon drawing method and apparatus which can generate data and can perform high-speed drawing.

【0005】[0005]

【課題を解決するための手段】この発明の多角形描画装
置は、描画平面上の各グリッドを覆う面積に応じた輝度
値を与えることにより、多角形のエッジ部分を滑らかに
描画するようにした多角形描画装置において、前記描画
すべき多角形の各エッジとスキャンラインとの交差部に
関するデータであって、前記スキャンラインのスキャン
方向上流側エッジに対応する第1の外側交点及び内側交
点、前記スキャンラインのスキャン方向下流側エッジに
対応する第2の外側交点及び内側交点、前記第1の外側
交点から内側交点までの前記輝度値の増加率、並びに前
記第2の内側交点から外側交点までの前記輝度値の減少
率を含むライン交点データを各スキャンライン毎に求め
るエッジ計算手段と、このエッジ計算手段で求められた
前記各スキャンライン毎のライン交点データに基づい
て、各スキャンライン毎に前記第1の外側交点から内側
交点にかけての輝度値の変化を主として算出する第1の
処理と、前記第2の内側交点から外側交点にかけての輝
度値の変化を主として算出する第2の処理と、これら第
1及び第2の処理で得られた結果を合成する第3の処理
とを並行して実行することにより、前記多角形の内部の
各輝度値を前記スキャンラインに沿ってシーケンシャル
に求めるスキャンライン処理手段とを備えてなることを
特徴とする。
According to the polygon drawing apparatus of the present invention, an edge portion of a polygon is drawn smoothly by giving a luminance value corresponding to an area covering each grid on a drawing plane. In the polygon drawing apparatus, data on an intersection between each edge of the polygon to be drawn and a scan line, wherein the first outside intersection and the inside intersection corresponding to the scan direction upstream edge of the scan line, A second outer intersection and an inner intersection corresponding to the scanning direction downstream edge of the scan line, an increase rate of the luminance value from the first outer intersection to the inner intersection, and a second inner intersection to an outer intersection from the second inner intersection. Edge calculating means for obtaining line intersection data including the reduction rate of the luminance value for each scan line; and each of the scan line data obtained by the edge calculating means. A first process for mainly calculating a change in the luminance value from the first outer intersection to the inner intersection for each scan line based on the line intersection data for each scan line, and a process for calculating the change from the second inner intersection to the outer intersection for each scan line. By executing in parallel a second process for mainly calculating a change in the brightness value of the polygon and a third process for synthesizing the results obtained in the first and second processes, Scan line processing means for sequentially obtaining the respective luminance values along the scan line.

【0006】また、この発明に係る媒体に記憶される多
角形描画プログラムは、描画平面上の各グリッドを覆う
面積に応じた輝度値を与えることにより、多角形のエッ
ジ部分を滑らかに描画するようにしたものにおいて、前
記描画すべき多角形の各エッジとスキャンラインとの交
差部に関するデータであって、前記スキャンラインのス
キャン方向上流側エッジに対応する第1の外側交点及び
内側交点、前記スキャンラインのスキャン方向下流側エ
ッジに対応する第2の外側交点及び内側交点、前記第1
の外側交点から内側交点までの前記輝度値の増加率、並
びに前記第2の内側交点から外側交点までの前記輝度値
の減少率を含むライン交点データを各スキャンライン毎
に求めるエッジ計算ステップと、このエッジ計算ステッ
プで求められた前記各スキャンライン毎のライン交点デ
ータに基づいて、各スキャンライン毎に前記第1の外側
交点から内側交点にかけての輝度値の変化を主として算
出する第1の処理と、前記第2の内側交点から外側交点
にかけての輝度値の変化を主として算出する第2の処理
と、これら第1及び第2の処理で得られた結果を合成す
る第3の処理とを並行して実行することにより、前記多
角形の内部の各輝度値を前記スキャンラインに沿ってシ
ーケンシャルに求めるスキャンライン処理ステップとを
備えてなることを特徴とする。
A polygon drawing program stored in a medium according to the present invention provides a brightness value according to an area covering each grid on a drawing plane, so that an edge portion of a polygon is drawn smoothly. A first outer intersection and an inner intersection corresponding to an intersection between each edge of the polygon to be drawn and the scan line, the first outer intersection and the inner intersection corresponding to an upstream edge in the scan direction of the scan line; A second outer intersection and an inner intersection corresponding to a downstream edge of the line in the scanning direction;
An edge calculation step of obtaining, for each scan line, line intersection data including an increase rate of the luminance value from the outer intersection to the inner intersection, and a decrease rate of the luminance value from the second inner intersection to the outer intersection. A first process of mainly calculating a change in luminance value from the first outer intersection to the inner intersection for each scan line based on the line intersection data for each scan line obtained in the edge calculation step; The second processing for mainly calculating the change in the luminance value from the second inner intersection to the outer intersection and the third processing for synthesizing the results obtained in the first and second processing are performed in parallel. And a scan line processing step of sequentially obtaining each luminance value inside the polygon along the scan line. And butterflies.

【0007】更に、この発明に係る多角形描画方法は、
描画平面上の各グリッドを覆う面積に応じた輝度値を与
えることにより、多角形のエッジ部分を滑らかに描画す
るようにした多角形描画方法において、前記描画すべき
多角形の各エッジとスキャンラインとの交差部に関する
データであって、前記スキャンラインのスキャン方向上
流側エッジに対応する第1の外側交点及び内側交点、前
記スキャンラインのスキャン方向下流側エッジに対応す
る第2の外側交点及び内側交点、前記第1の外側交点か
ら内側交点までの前記輝度値の増加率、並びに前記第2
の内側交点から外側交点までの前記輝度値の減少率を含
むライン交点データを各スキャンライン毎に求め、この
求められた前記各スキャンライン毎のライン交点データ
に基づいて、各スキャンライン毎に前記第1の外側交点
から内側交点にかけての輝度値の変化を主として算出す
る第1の処理と、前記第2の内側交点から外側交点にか
けての輝度値の変化を主として算出する第2の処理と、
これら第1及び第2の処理で得られた結果を合成する第
3の処理とを並行して実行することにより、前記多角形
の内部の各輝度値を前記スキャンラインに沿ってシーケ
ンシャルに求めるようにしたことを特徴とする。
Further, a polygon drawing method according to the present invention is characterized in that:
In the polygon drawing method in which a polygon edge portion is smoothly drawn by giving a luminance value according to an area covering each grid on the drawing plane, each edge of the polygon to be drawn and a scan line A first outer intersection and an inner intersection corresponding to the scan direction upstream edge of the scan line, and a second outer intersection and an inner intersection corresponding to the scan direction downstream edge of the scan line. An intersection, an increasing rate of the luminance value from the first outer intersection to the inner intersection, and the second
The line intersection data including the reduction rate of the luminance value from the inner intersection to the outer intersection is obtained for each scan line, and based on the obtained line intersection data for each scan line, the line intersection data is obtained for each scan line. A first process for mainly calculating a change in luminance value from the first outer intersection to the inner intersection, and a second process for mainly calculating a change in luminance value from the second inner intersection to the outer intersection.
By executing the third processing for synthesizing the results obtained in the first and second processings in parallel, each luminance value inside the polygon is sequentially obtained along the scan line. It is characterized by the following.

【0008】この発明によれば、エッジ計算によってス
キャンラインのスキャン方向上流側エッジに対応する第
1の外側交点及び内側交点、同じく下流側エッジに対応
する第2の外側交点及び内側交点、第1の外側交点から
内側交点までの輝度値の増加率、並びに第2の内側交点
から外側交点までの輝度値の減少率をそれぞれスキャン
ライン毎に求め、更に第1の外側交点から内側交点まで
の輝度値の変化を主として算出する第1の処理と、前記
第2の内側交点から外側交点までの輝度値の変化を主と
して算出する第2の処理と、これら第1及び第2の処理
結果を合成する第3の処理とを並行に実行するようにし
ていので、スキャンラインの上流側から下流側へかけて
順番に輝度値を求めていくことができ、スキャンライン
に沿ったシーケンシャルな処理が可能になる。また、特
に、この場合、上下端の頂点やその途中の頂点、更に
は、これらの頂点がライン上に位置していない場合で
も、共通の処理方法によって簡単に輝度値を算出するこ
とができる。このため、高速描画処理が実現できる。
According to the present invention, the first outer intersection and the inner intersection corresponding to the upstream edge in the scan direction of the scan line by the edge calculation, the second outer intersection and the inner intersection also corresponding to the downstream edge, the first The increase rate of the luminance value from the outer intersection to the inner intersection and the decrease rate of the luminance value from the second inner intersection to the outer intersection are determined for each scan line, and the luminance from the first outer intersection to the inner intersection is calculated. A first process for mainly calculating a change in the value, a second process for mainly calculating a change in the luminance value from the second inner intersection to the outer intersection, and the results of the first and second processes are combined. Since the third processing and the third processing are executed in parallel, the luminance value can be obtained in order from the upstream side to the downstream side of the scan line, and the sequence along the scan line can be obtained. Catcher Le processing becomes possible. In particular, in this case, even when the vertices at the upper and lower ends, the vertices in the middle thereof, and these vertices are not located on the line, the luminance value can be easily calculated by the common processing method. Therefore, high-speed drawing processing can be realized.

【0009】前記エッジ計算手段が、前記第1の外側交
点及び内側交点として、実際の交点にそれぞれスキャン
方向下流側で隣接するグリッド上の位置を求め、前記第
2の外側交点及び内側交点として、実際の交点にそれぞ
れスキャン方向上流側で隣接するグリッド上の位置を求
め、第1の外側交点における輝度値及び前記第2の内側
交点とスキャン方向下流側で隣接するグリッド上の点に
おける輝度値をそれぞれ初期値として算出するものであ
ると、全ての処理がグリッド上の輝度値の算出処理とな
るので、更に高速な処理が可能になる。
The edge calculating means finds a position on the grid adjacent to the actual intersection on the downstream side in the scanning direction as the first outer intersection and the inner intersection, respectively, as the second outer intersection and the inner intersection. The position on the grid adjacent to the actual intersection on the upstream side in the scanning direction is determined, and the luminance value at the first outer intersection and the luminance value at the point on the grid adjacent to the second inner intersection on the downstream side in the scanning direction are calculated. If each of them is calculated as an initial value, all the processing is calculation processing of the luminance value on the grid, so that higher-speed processing can be performed.

【0010】前記第1及び第2の外側交点及び内側交点
は、例えば前記描画すべき多角形の頂点間をグリッド間
隔に対応した縦横寸法のダイアモンドブロックによって
ドラッグしたときの軌跡に基づいて求めることができ
る。
The first and second outer intersections and the inner intersections can be obtained based on, for example, a trajectory when the vertices of the polygon to be drawn are dragged by a diamond block having vertical and horizontal dimensions corresponding to a grid interval. it can.

【0011】また、前記スキャンライン処理手段は、例
えば第1の処理として各スキャンライン毎に前記第1の
外側交点から内側交点まで増加率を累算して各輝度値を
出力すると共に、第1の内側交点以降は一定の輝度値を
出力し、第2の処理として第2の内側交点から外側交点
まで減少率を累算して各輝度値を出力すると共に、第2
の外側交点以降は一定の輝度値を出力し、第3の処理と
して第1の処理の結果から第2の処理の結果を減算する
というように、加減算のみの処理で各スキャンライン上
の輝度値を算出していくことができるので、高速描画処
理が可能になる。
The scan line processing means outputs, for example, as a first process, an increase rate from the first outer intersection to the inner intersection for each scan line, and outputs each luminance value. A constant luminance value is output after the inner intersection of, and as a second process, the reduction rate is accumulated from the second inner intersection to the outer intersection, and each luminance value is output.
A constant luminance value is output after the outer intersection of, and a luminance value on each scan line is processed only by addition and subtraction, such as subtracting the result of the second processing from the result of the first processing as the third processing. Can be calculated, so that high-speed drawing processing can be performed.

【0012】また、スキャンライン処理手段は、多角形
の頂点がスキャンライン間に位置するとき、スキャンラ
インから前記頂点までの距離に相当する値を前記一定の
輝度値として使用するようにすればよい。
The scan line processing means may use a value corresponding to a distance from the scan line to the vertex as the constant luminance value when the vertex of the polygon is located between the scan lines. .

【0013】更に、スキャンライン処理手段は、多角形
の上下端の頂点以外の頂点がスキャンライン間に位置す
るとき、前記頂点から上側のスキャンラインまでの距離
に基づく処理と、前記頂点から下側のスキャンラインま
での距離に基づく処理とを別々に実行して合成すること
により、処理の共通化を図ることができ、簡単な演算で
輝度値を算出することができる。
Further, when the vertices other than the vertices at the upper and lower ends of the polygon are located between the scan lines, the scan line processing means performs processing based on the distance from the vertices to the upper scan line; By separately executing and combining the processing based on the distance to the scan line, the processing can be shared, and the luminance value can be calculated by a simple calculation.

【0014】[0014]

【発明の実施の形態】以下、図面を参照して、この発明
の好ましい実施の形態について説明する。図1は、この
発明の一実施例に係る三角形描画装置の構成を示すブロ
ック図である。この装置は、エッジ計算回路1、水平ラ
イン処理回路2、ピクセル処理回路3及びメモリ4を備
えて構成されている。エッジ計算回路1は、与えられた
三角形の頂点座標(XA,YA),(XB,YB),
(XC,YC)から上記三角形と各スキャンラインとの交
差部に関するライン交点データを算出する。このライン
交点データは、この例では、ラインNに対して、
(YN,XLe,XLi,XRi,XRe)という座標
値と、(I0L,ddIL,I0R,ddIR)という輝
度値の情報からなる。水平ライン処理回路2は、これら
のライン交点データから、各スキャンラインについて、
例えば左から順に1ピクセル毎の座標値(XP,YP
と、そのピクセルに対応する輝度値IPとを生成し、こ
れをピクセル処理回路3に供給する。ピクセル処理回路
3は、水平ライン処理部で求められたピクセル単位の座
標値(XP,YP)に対し、輝度値IPに対応するピクセ
ルデータを生成し、メモリ4に書き込む。なお、本願明
細書では、ピクセルの輝度値IPは、0〜1の値をとる
こととしている。これはそのまま輝度値としても良い
が、別途算出される輝度値を補正する輝度補正係数を、
ここで言う輝度値として処理しても良い。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a triangle drawing apparatus according to one embodiment of the present invention. This device includes an edge calculation circuit 1, a horizontal line processing circuit 2, a pixel processing circuit 3, and a memory 4. The edge calculation circuit 1 calculates the vertex coordinates (X A , Y A ), (X B , Y B ),
From (X C , Y C ), line intersection data relating to the intersection between the triangle and each scan line is calculated. In this example, the line intersection data is
It consists of coordinate values (Y N , XLe, XLi, XRi, XRe) and luminance value information (I 0 L, ddIL, I 0 R, ddIR). From these line intersection data, the horizontal line processing circuit 2 calculates, for each scan line,
For example, coordinate values (X P , Y P ) for each pixel in order from the left
And a luminance value I P corresponding to the pixel, and supplies this to the pixel processing circuit 3. The pixel processing circuit 3 generates pixel data corresponding to the luminance value I P with respect to the pixel-based coordinate values (X P , Y P ) obtained by the horizontal line processing unit, and writes the pixel data to the memory 4. In the specification of the present application, the luminance value I P of a pixel takes a value of 0 to 1. This may be a luminance value as it is, but a luminance correction coefficient for correcting a luminance value calculated separately is
It may be processed as the luminance value here.

【0015】図2は、エッジ計算回路1で求められる各
座標値を示す図である。ここでは、クヌースのアルゴリ
ズム(ダイアモンドルール)によって、各頂点A,B,
Cを、水平(X)、垂直(Y)方向にそれぞれグリッド
幅の±0.5の幅を持つダイアモンド状のボックスを、
各頂点A,B,C間でドラッグさせたときの図中破線で
示すボックスの軌跡を三角形のエッジとする。このエッ
ジと各水平(スキャン)ラインとの交点は、左右のエッ
ジと、各エッジそれぞれについて、その外側及び内側
で、各ラインについて4つずつ求められる。また、これ
らの交点は、実際の交点ではなく、実際の交点のすぐ内
側のグリッド上の点が選択される。従って、ライン交点
データに含まれる座標値をまとめると、次のようにな
る。
FIG. 2 is a diagram showing each coordinate value obtained by the edge calculation circuit 1. Here, each vertex A, B,
C is a diamond-shaped box having a width of ± 0.5 of the grid width in the horizontal (X) and vertical (Y) directions, respectively.
The locus of the box indicated by the broken line in the figure when dragging between the vertices A, B, and C is defined as a triangular edge. Four intersections between the edge and each horizontal (scan) line are obtained for the left and right edges and for each line outside and inside each edge. Also, these intersections are not actual intersections, but points on the grid immediately inside the actual intersections are selected. Therefore, the coordinate values included in the line intersection data are summarized as follows.

【0016】 YN :ラインNのY座標 XLe: 〃 の左側エッジ外側X座標(グリッド上) XLi: 〃 の左側エッジ内側X座標(グリッド上) XRi: 〃 の右側エッジ内側X座標(グリッド上) XRe: 〃 の右側エッジ外側X座標(グリッド上)Y N : Y coordinate of line N XLe: X coordinate outside left edge of 〃 (on grid) XLi: X coordinate inside left edge of ((on grid) XRi: X coordinate inside right edge of N (on grid) XRe: X coordinate outside right edge of 〃 (on grid)

【0017】このようにして求められた各座標値に基づ
き、図3に示すように、XLeからXLiまで徐々に輝
度値Iが増加し、XRiからXReまで徐々に輝度値I
が減少していくように、三角形の内部の輝度値Iを決定
していくため、XLeでの輝度の初期値I0Lとその増
加率ddIL、XRiの次のX方向ピクセルでの輝度の
初期値I0Rとその減少率ddIRとが求められる。
Based on the coordinate values thus obtained, as shown in FIG. 3, the luminance value I gradually increases from XLe to XLi, and gradually increases from XRi to XRe.
In order to determine the brightness value I inside the triangle so that the brightness decreases, the initial value I 0 L of the brightness in XLe and the increase rate ddIL thereof, and the initial brightness value in the next X-direction pixel of XRi. The value I 0 R and its reduction rate ddIR are determined.

【0018】図4及び図5は、これらの各座標値及び輝
度値を求める方法を説明するための図であり、図4は左
側のエッジを求めるときの方法、図5は右側のエッジを
求めるときの方法である。いずれのエッジについても、
各頂点間のY方向距離に対するX方向距離(Y座標が1
ライン分移動したときのX座標の移動量)をXD、X方
向距離に対するY方向距離(X座標が1画素分移動した
ときのY座標の移動量)をYDとしたとき、|YD|<
|XD|の場合(a)と、|YD|≧|XD|の場合
(b)とで求め方は多少異なってくる。
FIGS. 4 and 5 are diagrams for explaining a method for obtaining these coordinate values and luminance values. FIG. 4 shows a method for obtaining the left edge, and FIG. 5 shows a method for obtaining the right edge. That's how it works. For both edges,
The distance in the X direction relative to the distance between the vertices in the Y direction (Y coordinate is 1
Assuming that XD is the amount of movement of the X coordinate when moving by the line, and YD is the distance in the Y direction relative to the distance in the X direction (the amount of movement of the Y coordinate when the X coordinate moves by one pixel), | YD | <
In the case of | XD | (a) and in the case of | YD | ≧ | XD | (b), the method of obtaining is slightly different.

【0019】・左側エッジが|YD|<|XD|(水平
に近い)の場合 図4(a)において、ラインNと左側エッジとの真の交
点XLは、このエッジの上側の頂点から傾きXDをライ
ン分だけ加算していくことにより求められ、交点XLか
らXマイナス方向に|XD|/2だけ離れた点が真の外
側交点XLer、交点XLからXプラス方向に|XD|
/2だけ離れた点が真の内側交点XLirとなる。そし
て、真の外側交点XLer及び真の内側交点XLirの
小数点以下を切り上げた値がそれぞれグリッド上の外側
交点XLe及びグリッド上の内側交点XLiとなる。
When the left edge is | YD | <| XD | (close to horizontal) In FIG. 4 (a), the true intersection XL between the line N and the left edge has a slope XD from the upper vertex of this edge. Are added by the number of lines, and a point separated by | XD | / 2 in the X minus direction from the intersection XL is a true outside intersection XLer, and | XD | in the X plus direction from the intersection XL.
A point separated by / 2 is a true inner intersection point XLir. The values obtained by rounding up the decimal points of the true outer intersection XLer and the true inner intersection XLir are the outer intersection XLe on the grid and the inner intersection XLi on the grid, respectively.

【0020】また、真の外側交点XLerでの輝度値I
が0、真の内側交点XLirでの輝度値Iが1となるよ
うにXLe〜XLiまでの各ピクセルの輝度値Iを決定
するため、ddIL=|YD|として、
The luminance value I at the true outer intersection XLer
Is 0, and the luminance value I of each pixel from XLe to XLi is determined such that the luminance value I at the true inner intersection XLir is 1, so that ddIL = | YD |

【0021】[0021]

【数1】I0L=(XLe−XLer)*ddIL InL=In-1L+ddIL (n≠0)[Number 1] I 0 L = (XLe-XLer ) * ddIL I n L = I n-1 L + ddIL (n ≠ 0)

【0022】とする。XLi以降の輝度値Iは1とな
る。
It is assumed that The luminance value I after XLi is 1.

【0023】・左側エッジが|YD|≧|XD|(垂直
に近い)の場合 図4(b)において、ラインNと左側エッジとの真の交
点XLは、このエッジの上側の頂点から傾きXDをライ
ン分だけ加算していくことにより求められ、交点XLか
らXマイナス方向に0.5だけ離れた点が真の外側交点
XLer、交点XLからXプラス方向に0.5だけ離れ
た点が真の内側交点XLirとなる。そして、真の外側
交点XLer及び真の内側交点XLirの小数点以下を
切り上げた値がそれぞれグリッド上の外側交点XLe及
びグリッド上の内側交点XLiとなる。この場合、XL
eとXLiとは、必然的にX方向に隣接したピクセル位
置となる。
When the left edge is | YD | ≧ | XD | (close to vertical) In FIG. 4 (b), the true intersection XL between the line N and the left edge has a slope XD from the vertex above this edge. Are added by the number of lines, and a point that is 0.5 away from the intersection XL in the X minus direction is a true outer intersection XLer, and a point that is 0.5 away from the intersection XL in the X plus direction is true. Becomes the inside intersection XLir. The values obtained by rounding up the decimal points of the true outer intersection XLer and the true inner intersection XLir are the outer intersection XLe on the grid and the inner intersection XLi on the grid, respectively. In this case, XL
e and XLi are necessarily pixel positions adjacent in the X direction.

【0024】また、真の外側交点XLerでの輝度値I
が0、真の内側交点XLirでの輝度値Iが1となるよ
うにXLeのピクセルの輝度値I0Lを、
The luminance value I at the true outer intersection XLer
Is 0 and the luminance value I 0 L of the pixel of XLe is set so that the luminance value I at the true inner intersection XLir is 1.

【0025】[0025]

【数2】I0L=XLe−XLer## EQU2 ## I 0 L = XLe-XLer

【0026】のように決定する。隣のXLiの輝度値I
は1となる。この場合、ddILは、特に求める必要は
ない。
Is determined as follows. Brightness value I of the next XLi
Becomes 1. In this case, ddIL does not need to be determined.

【0027】・右側エッジが|YD|<|XD|(水平
に近い)の場合 図5(a)において、ラインNと右側エッジとの真の交
点XRは、このエッジの上側の頂点から傾きXDをライ
ン分だけ加算していくことにより求められ、交点XRか
らXマイナス方向に|XD|/2だけ離れた点が真の内
側交点XRir、交点XRからXプラス方向に|XD|
/2だけ離れた点が真の外側交点XRerとなる。そし
て、真の内側交点XRir及び真の外側交点XRerの
小数点以下を切り捨てた値がそれぞれグリッド上の内側
交点XRi及びグリッド上の外側交点XReとなる。
When the right edge is | YD | <| XD | (close to horizontal) In FIG. 5A, the true intersection XR between the line N and the right edge has a slope XD from the vertex above this edge. Are added by the number of lines, and a point separated by | XD | / 2 in the X minus direction from the intersection XR is a true inner intersection XRir, and | XD | in the X plus direction from the intersection XR.
A point separated by / 2 is a true outer intersection XRer. The values obtained by truncating the true inner intersection XRir and the true outer intersection XRer after the decimal point are the inner intersection XRi on the grid and the outer intersection XRe on the grid, respectively.

【0028】また、真の内側交点XRirでの輝度値I
が1、真の外側交点XRerでの輝度値Iが0となるよ
うにXRi+1〜XReまでの各ピクセルの輝度値Iを
決定するため、ddIR=|YD|として、
The luminance value I at the true inner intersection XRir
Is 1 and the luminance value I of each pixel from XRi + 1 to XRe is determined so that the luminance value I at the true outer intersection XRer becomes 0, so that ddIR = | YD |

【0029】[0029]

【数3】I0R=(XRer−XRi−1)*ddIR InR=In-1R−ddIR (n≠0)[Number 3] I 0 R = (XRer-XRi -1) * ddIR I n R = I n-1 R-ddIR (n ≠ 0)

【0030】とする。XRe+1以降の輝度値Iは0と
なる。
It is assumed that The luminance value I after XRe + 1 is 0.

【0031】・右側エッジが|YD|≧|XD|(垂直
に近い)の場合 図5(b)において、ラインNと右側エッジとの真の交
点XRは、このエッジの上側の頂点から傾きXDをライ
ン分だけ加算していくことにより求められ、交点XRか
らXマイナス方向に0.5だけ離れた点が真の内側交点
XRir、交点XRからXプラス方向に0.5だけ離れ
た点が真の外側交点XRerとなる。そして、真の内側
交点XRir及び真の外側交点XRerの小数点以下を
切り捨てた値がそれぞれグリッド上の内側交点XRi及
びグリッド上の外側交点XReとなる。この場合、XR
iとXReとは、必然的にX方向に隣接したピクセル位
置となる。
When the right edge is | YD | ≧ | XD | (close to vertical) In FIG. 5B, the true intersection XR between the line N and the right edge has a slope XD from the upper vertex of this edge. Are added by the number of lines, and a point separated by 0.5 in the X minus direction from the intersection XR is a true inner intersection XRir, and a point separated by 0.5 in the X plus direction from the intersection XR is true. Is the outer intersection point XRer. The values obtained by truncating the true inner intersection XRir and the true outer intersection XRer after the decimal point are the inner intersection XRi on the grid and the outer intersection XRe on the grid, respectively. In this case, XR
i and XRe are necessarily pixel positions adjacent in the X direction.

【0032】また、真の内側交点XRirでの輝度値I
が1、真の外側交点XRerでの輝度値Iが0となるよ
うにXReのピクセルの輝度値I0Rを、
The luminance value I at the true inner intersection XRir
Is 1 and the luminance value I 0 R of the pixel of XRe is set so that the luminance value I at the true outer intersection XRer becomes 0 .

【0033】[0033]

【数4】I0R=XRer−XRe## EQU4 ## I 0 R = XRer-XRe

【0034】のように決定する。隣のXRiの輝度値I
は1となる。この場合、ddIRは、特に求める必要は
ない。
Is determined as follows. Brightness value I of the next XRi
Becomes 1. In this case, ddIR does not need to be determined.

【0035】このようにライン交点データが求められれ
ば、図3に示すように、左側エッジの外側交点XLeか
ら輝度値I0Lを初期値とし、輝度の増分値をddIL
として、内側交点XLiにかけて輝度値を1まで徐々に
増加させ、右エッジの内側交点XRiの右隣りから輝度
値I0Rを初期値とし、輝度の増分値(減少値)をdd
IRとして、外側交点XReにかけて輝度値を0まで徐
々に減少させることにより、通常のスキャンラインに沿
ったシーケンシャルな処理に基づいて各ピクセルの輝度
値Iを求めることができる。なお、図6に示すように、
頂点付近では、左右のエッジが近接するために、左エッ
ジの外側交点XLeと右エッジの内側交点XRiとの関
係及び左エッジの内側交点XLiと右エッジの外側交点
XReとの関係がそれぞれX方向に逆転することがあ
る。このため、輝度値Iの描画は、XLeからXReま
でとし、この間にXLi及びXRiが現れなかったとき
には、これを無視するような処理が必要となる。
When the line intersection data is obtained in this way, as shown in FIG. 3, the luminance value I 0 L is set as the initial value from the outer intersection XLe of the left edge, and the luminance increment value is ddIL.
, The luminance value is gradually increased to 1 over the inner intersection XLi, the luminance value I 0 R is set as an initial value from the right side of the inner intersection XRi of the right edge, and the increment value (decrease value) of the luminance is dd.
By gradually decreasing the luminance value to 0 as the IR toward the outer intersection XRe, the luminance value I of each pixel can be obtained based on sequential processing along a normal scan line. In addition, as shown in FIG.
In the vicinity of the vertex, since the left and right edges are close to each other, the relationship between the outside intersection XLe of the left edge and the inside intersection XRi of the right edge and the relationship between the inside intersection XLi of the left edge and the outside intersection XRe of the right edge are respectively in the X direction. May be reversed. For this reason, the drawing of the luminance value I is performed from XLe to XRe, and if XLi and XRi do not appear during this time, a process for ignoring them is required.

【0036】次に、エッジ計算回路1の詳細について説
明する。図7は、エッジ計算回路1の構成例を示すブロ
ック図である。まず、三角形の頂点座標(X1,Y1),
(X2,Y2),(X3,Y3)が与えられると、Y座標値
が最も小さい頂点をA(XA,YA)、残りの2つの頂点
のうち、頂点Aと接続されたときエッジが左側に位置す
る頂点をB(XB,YB)、頂点Aと接続されたときエッ
ジが右側に位置する頂点をC(XC,YC)とし、これが
エッジ傾き計算回路11に与えられる。エッジ傾き計算
回路11は、例えば図8に示すように構成され、セレク
タ21,22でX座標XA〜XCの一つをそれぞれ選択す
ると共に、セレクタ23,24でY座標YA〜YCの一つ
をそれぞれ選択し、セレクタ21,22の出力及びセレ
クタ23,24の出力をそれぞれ減算器25,26で減
算し、その減算結果を除算器27で除算することによ
り、頂点座標から、下記数1で示される直線AB,A
C,BCの傾きをそれぞれ算出する。
Next, the details of the edge calculation circuit 1 will be described. FIG. 7 is a block diagram illustrating a configuration example of the edge calculation circuit 1. First, the vertex coordinates (X 1 , Y 1 ) of the triangle,
Given (X 2 , Y 2 ) and (X 3 , Y 3 ), the vertex with the smallest Y coordinate value is connected to A (X A , Y A ) and the vertex A of the remaining two vertices. the vertex edge is located on the left side B when the (X B, Y B), the vertex edges when connected with the apex a is located on the right side and C (X C, Y C) , which edge gradient calculation circuit 11 Given to. Edge gradient calculation circuit 11 is configured as shown for example in FIG. 8, the selecting each one of the X-coordinate X A to X C in the selector 21, 22, Y-coordinate by the selector 23, 24 Y A to Y C Are subtracted by the subtracters 25 and 26 from the outputs of the selectors 21 and 22 and the outputs of the selectors 23 and 24, respectively, and the result of the subtraction is divided by the divider 27. Straight lines AB and A shown by Equation 1
The inclinations of C and BC are calculated respectively.

【0037】[0037]

【数5】XD1=(XB−XA)/(YB−YA) XD2=(XC−XA)/(YC−YA) XD3=(XC−XB)/(YC−YB) YD1=(YB−YA)/(XB−XA) YD2=(YC−YA)/(XC−XA) YD3=(YC−YB)/(XC−XBEquation 5] XD1 = (X B -X A) / (Y B -Y A) XD2 = (X C -X A) / (Y C -Y A) XD3 = (X C -X B) / (Y C -Y B) YD1 = (Y B -Y A) / (X B -X A) YD2 = (Y C -Y A) / (X C -X A) YD3 = (Y C -Y B) / ( X C -X B)

【0038】これらの傾きデータは、レジスタ28にそ
れぞれ格納される。なお、セレクタ29は、分子分母の
選択を行い、セレクタ30は、計算結果をどのレジスタ
28に格納するかを選択する。そして、セレクタ21〜
24,29,30は、セレクタコントローラ31によっ
てコントロールされる。
These inclination data are stored in the registers 28, respectively. The selector 29 selects a numerator denominator, and the selector 30 selects which register 28 stores the calculation result. Then, the selectors 21 to 21
24, 29 and 30 are controlled by the selector controller 31.

【0039】傾きデータXD1〜XD3及び頂点データ
A,XB,XC,YAは、エッジ座標算出回路12に供給
され、ここで各スキャンラインについてのY座標値YN
と、真のエッジ位置XL,XRとが求められる。このエッ
ジ座標算出回路12は、例えば図9に示すように構成さ
れている。まず、Y座標値YNの初期値としてYAがセレ
クタ41によって選択され、YNレジスタ42に格納さ
れる。以後、Y座標値YNは、加算器43によって1ず
つ加算されて更新される。また、各ラインにおいて、セ
レクタ44,46でまず頂点XAが選択され、セレクタ
45,47でそれぞれ傾きXD1,XD2が選択され
る。そして、最初はセレクタ48,49によって頂点座
標XAがエッジ座標XL,XRとして選択されてXLレジス
タ50及びXRレジスタ51にそれぞれ格納され、以
後、加算器52,53によってこれらに傾きXD1,X
D2が順次加算されてエッジ座標XL,XRが求められ
る。
The inclination data XD1~XD3 and vertex data X A, X B, X C , Y A is supplied to the edge coordinate calculating circuit 12, where Y coordinate value Y N for each scan line
And the true edge positions X L and X R are obtained. The edge coordinate calculation circuit 12 is configured, for example, as shown in FIG. First, Y A as an initial value of the Y coordinate value Y N are selected by the selector 41 and stored in Y N register 42. Thereafter, the Y coordinate value Y N is updated by being added one by one by the adder 43. In each line, the first selected vertex X A is the selector 44 and 46, the slope respectively the selector 45, 47 XD1, XD2 is selected. The initially stored respectively are selected vertex coordinates X A edge coordinates X L, as X R to X L register 50 and X R register 51 by the selector 48 and 49, thereafter, the inclination of these by the adder 52 and 53 XD1, X
D2 is sequentially added to obtain edge coordinates X L and X R.

【0040】ここで、図7のコントローラ13は、YN
とYB,YCとの大小関係に基づいてYBが最初に現れた
ときにはコントロール信号S1を出力し、YCが最初に
現れたときにはコントロール信号S2を出力する。コン
トロール信号S1が出力された場合には、セレクタ4
4,45がそれぞれXB,XD3を選択し、コントロー
ル信号S2が出力された場合には、セレクタ46,47
がそれぞれXC,XD3を選択する。これにより、直線
の切替が行われる。
[0040] Here, the controller 13 of FIG. 7, Y N
And Y B, and outputs a control signal S1 when Y B first appeared on the basis of the magnitude relationship between Y C, and outputs a control signal S2 when Y C first appears. When the control signal S1 is output, the selector 4
4 and 45 respectively select X B and XD 3, and when the control signal S 2 is output, the selectors 46 and 47 select
Selects X C and XD 3 respectively. Thereby, switching of the straight line is performed.

【0041】求められたエッジ座標XL,XRは、傾きX
D1〜XD3と共にエッジ範囲算出回路14に供給され
る。エッジ範囲算出回路14は、例えば図10に示すよ
うに構成されている。この回路のうち上側の回路は、左
側エッジの外側交点XLe,及び内側交点XLiを算出
するための回路、下側の回路は、右側エッジの内側交点
XRi及び外側交点XReを算出するための回路であ
る。まず、セレクタ61,62は、傾きデータXD1,
XD2を選択し、これを絶対値化回路63,64で絶対
値化すると共に、1/2回路65,66で1/2した値
を算出する。セレクタ67,68は、一方に1/2回路
65,66の出力を、また他方に“0.5”を導入し、
コントロール信号S3によっていずれか一方を選択す
る。このため、図7のコントローラ13は、傾きデータ
YD1〜YD3に基づいて、エッジの傾斜が緩い傾斜で
あるか(|YD|<|XD|)、急な傾斜であるか(|
YD|≧|XD|)を示すコントロール信号S3を出力
する。セレクタ67,68の出力は、減算器69,70
及び加算器71,72によってそれぞれエッジ座標
L,XRと加減算され、左側エッジの場合には、切り上
げ回路73,74によって演算結果が切り上げられ、右
側エッジの場合には、切り捨て回路75,76によって
演算結果が切り捨てられることにより、交点座標XL
e,XLi,XRi,XReがそれぞれ算出され、これ
らがレジスタ77,78,79,80にそれぞれ格納さ
れる。また、切り捨て及び切り上げ前の途中の演算結果
から、真の外側交点XLer,XRerが求められる。
新たなエッジに切り替わるときには、コントロール信号
S1,S2によってセレクタ61,62がいずれか一方
の傾きデータをXD3に切り替える。
The obtained edge coordinates X L and X R correspond to the inclination X
It is supplied to the edge range calculation circuit 14 together with D1 to XD3. The edge range calculation circuit 14 is configured, for example, as shown in FIG. The upper circuit is a circuit for calculating the outer intersection XLe and the inner intersection XLi of the left edge, and the lower circuit is a circuit for calculating the inner intersection XRi and the outer intersection XRe of the right edge. is there. First, the selectors 61 and 62 determine the inclination data XD1,
XD2 is selected, the absolute value is converted into absolute values by absolute value converting circuits 63 and 64, and a value obtained by halving the values by 1/2 circuits 65 and 66 is calculated. The selectors 67 and 68 introduce the outputs of the half circuits 65 and 66 on one side and “0.5” on the other side,
Either one is selected by the control signal S3. For this reason, the controller 13 in FIG. 7 determines whether the edge has a gentle inclination (| YD | <| XD |) or a steep inclination based on the inclination data YD1 to YD3 (|
YD│ ≧ │XD│). Outputs of the selectors 67 and 68 are supplied to subtracters 69 and 70.
And the addition and subtraction of the edge coordinates X L and X R by the adders 71 and 72, respectively, the calculation result is rounded up by the round-up circuits 73 and 74 for the left edge, and the round-down circuits 75 and 76 for the right edge. The calculation result is rounded down, so that the intersection coordinates XL
e, XLi, XRi, and XRe are calculated and stored in registers 77, 78, 79, and 80, respectively. Further, true outer intersections XLer and XRer are obtained from the calculation results before rounding and rounding up.
When switching to a new edge, the selectors 61 and 62 switch one of the inclination data to XD3 by the control signals S1 and S2.

【0042】求められた交点座標XLe,XLi,XR
i,XRe,XLer.XRerは、傾きデータYD1
〜YD3と共に輝度初期値・増分値算出回路15に供給
される。輝度初期値・増分値算出回路15は、例えば図
11に示すように構成されている。傾きデータYD1〜
YD3は、それぞれ絶対値化回路85〜88で絶対値化
されてセレクタ92,99にそれぞれ供給される。図1
1の回路のうち、上半分は左側エッジの輝度、下半分は
右側エッジの輝度を算出する回路である。即ち、左側エ
ッジの真の外側交点XLerとグリッド上の外側交点X
Leとの差分が減算器91で求められ、この差分がセレ
クタ92で選択された|YD1|又は|YD3|と乗算
器93において乗算される。セレクタ94は、左側エッ
ジの傾きが緩やかな場合にこの乗算結果を輝度の初期値
0Lとして選択するが、左側エッジの傾きが急な場合
には、乗算前の差分値を輝度の初期値I0Lとして選択
する。この初期値I0LがI0Lレジスタ95に格納さ
れ、セレクタ92で選択された|YD1|又は|YD3
|がddILレジスタ96に格納される。
The calculated intersection coordinates XLe, XLi, XR
i, XRe, XLer. XRer is the inclination data YD1
Are supplied to the luminance initial value / increment value calculation circuit 15 together with .about.YD3. The luminance initial value / increment value calculating circuit 15 is configured, for example, as shown in FIG. Slope data YD1
YD3 is converted into absolute values by absolute value conversion circuits 85 to 88 and supplied to selectors 92 and 99, respectively. FIG.
In one circuit, the upper half is a circuit for calculating the luminance of the left edge, and the lower half is a circuit for calculating the luminance of the right edge. That is, the true outer intersection XLe of the left edge and the outer intersection X on the grid
The difference from Le is obtained by the subtractor 91, and this difference is multiplied by the multiplier 93 with | YD 1 | or | YD 3 | selected by the selector 92. The selector 94 selects the result of the multiplication as the initial luminance value I 0 L when the inclination of the left edge is gentle. However, when the inclination of the left edge is steep, the selector 94 uses the difference value before the multiplication as the initial luminance value. Select as I 0 L. The initial value I 0 L is stored in the I 0 L register 95 and | YD1 | or | YD3 selected by the selector 92.
Is stored in the ddIL register 96.

【0043】また、右側エッジの真の外側交点XRer
とセレクタ97で選択されたグリッド上の外側交点XR
e又は内側交点XRi+1との差分が減算器98で求め
られ、この差分がセレクタ99で選択された|YD2|
又は|YD3|と乗算器100において乗算される。セ
レクタ101は、左側エッジの傾きが緩やかな場合にこ
の乗算結果を輝度の初期値I0Rとして選択するが、左
側エッジの傾きが急な場合には、乗算前の差分値を輝度
の初期値I0Rとして選択する。この初期値I0 RがI0
Rレジスタ102に格納され、セレクタ99で選択され
た|YD2|又は|YD3|がddIRレジスタ103
に格納される。
Also, the true outer intersection XRer of the right edge
And the outer intersection XR on the grid selected by the selector 97
e or the difference from the inside intersection XRi + 1 is obtained by the subtractor 98.
This difference is | YD2 |
Or | YD3 | in the multiplier 100. C
Lector 101 is used when the inclination of the left edge is gentle.
Multiplied by the initial luminance value I0Select as R, but left
If the side edge is steep, the difference value before multiplication is
Initial value I of0Select as R. This initial value I0 R is I0
Stored in the R register 102 and selected by the selector 99.
| YD2 | or | YD3 | is the ddIR register 103.
Is stored in

【0044】次に水平ライン処理回路について説明す
る。図12は、水平ライン処理回路2の構成例を示すブ
ロック図である。この例では、YNの値はそのままピク
セルY座標YPとなる。1スキャンラインの処理の開始
時、XPレジスタ111には、スキャンライン上での最
初の処理ピクセルのX座標XPが格納される。このX座
標XPは、セレクタ112により選択され、初期値はX
Leである。また、XLe,XLi,XRi,XRe
は、それぞれ対応するレジスタ113,114,11
5,116にセットされる。X座標XPは、加算器11
0で“1”が順次加算されてスキャンラインに沿って1
つずつ右側に移動する。このX座標XPが比較器11
7,118,119,120においてそれぞれXLe,
XLi,XRi,XReと比較され、その比較結果に基
づいてコントローラ121が各部を制御する。
Next, the horizontal line processing circuit will be described. FIG. 12 is a block diagram illustrating a configuration example of the horizontal line processing circuit 2. In this example, the value of Y N becomes the pixel Y coordinate Y P as it is. At the start of the processing of one scan line, the X P register 111, X-coordinate X P of the first processing pixels on the scan line is stored. The X coordinate XP is selected by the selector 112, and the initial value is X
Le. Also, XLe, XLi, XRi, XRe
Are the corresponding registers 113, 114, 11
Set to 5,116. The X coordinate XP is calculated by the adder 11
“0” is sequentially added to “0”, and “1” is added along the scan line.
Move to the right one by one. This X coordinate XP is used as the comparator 11
XLe, 7, 118, 119, 120 respectively.
XLi, XRi, and XRe are compared with each other, and the controller 121 controls each unit based on the comparison result.

【0045】即ち、XPがXLeと等しいときには、セ
レクタ122でI0Lが選択され、これがIP1レジスタ
123に格納され、XPがXLeよりも大きくXLiよ
りも小さいときには、IP1レジスタ123の値に加算器
124で増分値ddILを累積加算した値が選択されて
P1レジスタ123に格納される。また、XPがXRi
を超えた場合には、セレクタ125でI0Rが選択さ
れ、これがIP2レジスタ126に格納される。XPがX
Ri+1よりも大きくXRe以下のときには、IP2レジ
スタ126の値に減算器127で増分値(減少値)dd
IRを順次減算した値が選択されてIP2レジスタ126
に格納される。レジスタ123,126の値及び“1”
がセレクタ128に供給され、XPがXLeからXLi
−1までの間はレジスタ123の出力、XPがXLiか
らXRiまでは“1”、XPがXRi+1からXReま
での間はレジスタ126の出力が輝度値IPとして選択
されることになる。また、コントローラ121は、前段
回路からのSTART信号によって1スキャンライン分
の動作を開始し、XPがXReを超えたことをもって前
段回路に処理終了を示すEND信号を出力する。
[0045] That is, when X P equals XLe is I 0 L is selected by the selector 122, which is stored in the I P1 register 123, when X P is less than the larger XLi than XLe is the I P1 register 123 with the cumulated value of the increment ddIL adder 124 to the value is stored is selected in the I P1 register 123. In addition, X P is XRi
Is exceeded, the selector 125 selects I 0 R, which is stored in the IP2 register 126. XP is X
When the large XRe less than ri + 1 is increment (decrement value) the value to the subtractor 127 of the I P2 register 126 dd
The value obtained by sequentially subtracting IR is selected and the I P2 register 126 is selected.
Is stored in The value of the registers 123 and 126 and "1"
XLi but is supplied to the selector 128, X P from XLe
Until -1 output of the register 123, the X P from XLi to XRi "1", X P is between from XRi + 1 until XRe will be the output of the register 126 is selected as the luminance value I P. Further, the controller 121 starts the operation of one scan line by the START signal from the preceding circuit, X P outputs an END signal indicating completion of processing in the preceding stage circuit with that exceeding the XRE.

【0046】このように、この回路によれば、スキャン
ラインに沿って順次ピクセルの輝度値を求めていくこと
ができるので、高速処理が可能になる。
As described above, according to this circuit, the luminance value of a pixel can be sequentially obtained along a scan line, so that high-speed processing can be performed.

【0047】ところで、上記実施例では、頂点のY座標
はライン上に存在することを前提として説明したが、例
えば図13に示すように、各頂点A,B,Cの座標(X
A,YA),(XB,YB),(XC,YC)がライン上に存
在しない場合には、Y座標の小数部分(以下、YLSB
呼ぶ)を考慮することにより、更に滑らかな表現が可能
になる。この場合、図14に示すように、スキャンライ
ン間に頂点を含む場合、輝度値の基準となるΔYを次の
ように設定し、前述した輝度値にΔYを乗算した値をも
って輝度値IPとする。
In the above embodiment, the description has been made on the assumption that the Y coordinate of the vertex exists on the line. However, as shown in FIG. 13, for example, the coordinates (X
A, Y A), (X B, Y B), (X C, when Y C) is not present on the line, the fractional part of the Y-coordinate (hereinafter referred to as Y LSB) by considering the, Further smooth expression is possible. In this case, as shown in FIG. 14, when a vertex is included between scan lines, ΔY serving as a reference of a luminance value is set as follows, and a luminance value I P is obtained by multiplying the above-described luminance value by ΔY. I do.

【0048】 (a)スキャンライン間に上端の頂点を含む場合 ΔY=1−YLSB (b)スキャンライン間に頂点を含まない場合 ΔY=YLSB=1 (c)スキャンライン間に下端の頂点を含む場合 ΔY=YLSB (A) When the top vertex is included between the scan lines ΔY = 1−Y LSB (b) When the vertex is not included between the scan lines ΔY = Y LSB = 1 (c) The bottom apex between the scan lines When ΔY = Y LSB

【0049】このため、この実施例では、図9に示した
エッジ座標算出回路12を、図15のように構成する。
この回路では、頂点A,B,CのY座標YA,YB,YC
をコントロール信号S1,S2によってセレクタ131
で選択し、このセレクタ131の出力とこれを切り捨て
回路132で切り捨てた値とを減算器133で減算する
ことにより、頂点でのYLSBを算出する。セレクタ13
4は、減算器133の出力と“1”とを切り換えること
により、YLSBレジスタ135に、頂点では1よりも小
さい値、その他の部分では“1”となるYLSBを格納す
る。また、切り捨て回路132の出力はセレクタ136
を介してYNレジスタ137に初期値として格納され
る。YNレジスタ137には、加算器138で“1”が
順次加算された値が更新値として格納されていく。Y
LSBレジスタ135に格納されたYLSB は、減算器139
によって“1”から減算される。セレクタ140は、上
述した(a),(b),(c)の各場合に応じたΔYの
値を出力する。
For this reason, in this embodiment, FIG.
The edge coordinate calculation circuit 12 is configured as shown in FIG.
In this circuit, the Y coordinate Y of the vertices A, B, and C isA, YB, YC
To the selector 131 by the control signals S1 and S2.
Select the output of this selector 131 and round it down.
Subtractor 133 subtracts the value rounded down by circuit 132
By this, Y at the vertexLSBIs calculated. Selector 13
4 switches between the output of the subtractor 133 and "1"
Yields YLSBRegister 135 contains less than 1 at the vertex
Y, which is “1” in other partsLSBStore
You. The output of the truncation circuit 132 is supplied to the selector 136.
Through YNStored as an initial value in the register 137
You. YNThe register 137 stores “1” in the adder 138.
The sequentially added values are stored as updated values. Y
LSBY stored in register 135LSB Is the subtractor 139
Is subtracted from "1". Selector 140
ΔY corresponding to each of the cases (a), (b) and (c) described above
Output the value.

【0050】エッジ交点のX座標XL,XRを求めるため
の回路は、基本的には図9に示した回路と同様である
が、XD1,XD2,XD3は、乗算器150,15
1,152,153によってそれぞれΔYが乗算される
ので、頂点の次のラインにおけるXL,XRを決定する際
の増分値は、他のラインの増分値とは異なる値となる。
The circuit for obtaining the X coordinates X L and X R of the edge intersection is basically the same as the circuit shown in FIG. 9, but XD 1, XD 2 and XD 3 include multipliers 150 and 15.
Since ΔY are respectively multiplied by 1,152,153, increment in determining the X L, X R in the next line of vertices, a different value is the increment of the other line.

【0051】図16は、この実施例における水平ライン
処理回路2のブロック図であり、図12と同一部分には
同一符号を付して詳しい説明は割愛する。この実施例で
は、左側エッジの処理と右側エッジの処理とを別々に行
った結果IP1,IP2を減算器164で減算することによ
り、頂点を含む部分の処理を簡素化させている。セレク
タ162,163には、ΔYの値も与えられており、コ
ントローラ161は、XPがXLi以上になったときに
セレクタ162でΔYを選択し、XPがXReを超えた
ときにセレクタ163でΔYを選択する。I0L,dd
IL,I0R,ddIRは、予めΔYを基準とした値に
設定されている。また、この例では、I0R,ddIR
がそれぞれ右側エッジの内側からの輝度の減少値の初期
値及び増加値である点が先の実施例とは異なっている。
勿論、ΔYによる重み付けは、加算値IP1,IP2や最終
結果の輝度値IPに対して行うようにしてもよい。
FIG. 16 is a block diagram of the horizontal line processing circuit 2 in this embodiment. The same parts as those in FIG. In this embodiment, the processing of the portion including the vertices is simplified by subtracting the results I P1 and I P2 of the left edge processing and the right edge processing separately by the subtractor 164. The selector 162 and 163, the value of ΔY are also given, the controller 161 selects the ΔY by the selector 162 when the X P is equal to or greater than XLi, the selector 163 when the X P exceeds XRe Select ΔY. I 0 L, dd
IL, I 0 R, and ddIR are set to values based on ΔY in advance. In this example, I 0 R, ddIR
Are the initial value and the increase value of the luminance decrease value from the inside of the right edge, respectively.
Of course, the weighting by ΔY may be performed on the added values I P1 and I P2 and the luminance value I P of the final result.

【0052】この回路では、最初に上の頂点が存在する
スキャンラインを次のように処理する。即ち、上側の頂
点につながる2本のエッジは、それらの傾きにより、図
17に示すように3つのパターンに分けられる。同図
(a)は左右のエッジの傾きの符号が異なる場合、同図
(b)は左右のエッジが共に負である場合、同図(c)
は左右のエッジが共に正である場合である。各場合につ
いて、加算器124,127の出力IP1,IP2は、図1
8の各塗り潰し領域の面積で表される。従って、IP1
らIP2を減算器164で減算することにより、ライン間
に有する頂点部分の輝度IPを簡単に求めることができ
る。
In this circuit, the scan line on which the upper vertex exists first is processed as follows. That is, the two edges connected to the upper vertex are divided into three patterns according to their inclinations, as shown in FIG. FIG. 11A shows the case where the signs of the inclinations of the left and right edges are different, and FIG. 10B shows the case where both the left and right edges are negative.
Indicates that both the left and right edges are positive. In each case, the outputs I P1 and I P2 of the adders 124 and 127 are as shown in FIG.
8 is represented by the area of each filled area. Accordingly, by subtracting I P2 from I P1 by the subtractor 164, the luminance I P of the vertex portion between the lines can be easily obtained.

【0053】スキャンライン内に頂点が存在しないとき
には、図19に示すように、ΔY=1となるが、上記と
全く同様の演算によって各ピクセルXPでの輝度IPを算
出することができる。
[0053] When there is no vertex on the scan in line, as shown in FIG. 19, but the [Delta] Y = 1, it is possible to calculate the luminance I P at each pixel X P by exactly the same operation as described above.

【0054】更に、図20に示すように、スキャンライ
ン間に端点Bが存在する場合には、スキャンラインを端
点Bの上側と下側とに分けて同様の処理を行う。まず、
図21(a)に示すように、上側の部分の輝度IPを計
算し、次に、同図(b)のように、下側の部分の輝度I
Pを計算する。このとき、Y座標値は同じである。そし
て、これらの演算結果は、加算・混合され、同一の画素
に対する輝度値IPとして求められる。
Further, as shown in FIG. 20, when an end point B exists between scan lines, the same processing is performed by dividing the scan line into upper and lower sides of the end point B. First,
As shown in FIG. 21A, the luminance I P of the upper part is calculated, and then, as shown in FIG. 21B, the luminance I P of the lower part is calculated.
Calculate P. At this time, the Y coordinate values are the same. Then, these calculation results are added and mixed, is determined as the luminance value I P for the same pixel.

【0055】図22に示すように、スキャンライン間に
下側の頂点が存在する場合も、上記と全く同様の手順に
より、各ピクセルの輝度値IPを求めることができる。
[0055] As shown in FIG. 22, even if there is a lower apex of between scan lines, and by exactly the same procedure described above, it is possible to determine the brightness value I P of each pixel.

【0056】なお、以上の実施例では、三角形のエッジ
処理について説明したが、これを応用することにより、
更に多角形のエッジ処理にも応用可能であることは言う
までもない。また、上記実施例では、グリッド上の点の
輝度値を求めるようにしているが、実際の点の輝度値か
ら水平ライン描画時に補正を加えていくようにしても良
い。
In the above embodiment, the edge processing of a triangle has been described.
Needless to say, the present invention can be applied to edge processing of a polygon. In the above embodiment, the brightness value of a point on the grid is obtained. However, the correction may be made at the time of drawing a horizontal line from the brightness value of an actual point.

【0057】また、上述した実施例は、各部の処理をハ
ードウェアにて実現したが、各部の処理をソフトウェア
によって実現することもできる。この場合には、多角形
描画処理プログラムは、適当な記録媒体に記録して提供
可能である。
Further, in the above-described embodiment, the processing of each unit is realized by hardware, but the processing of each unit can be realized by software. In this case, the polygon drawing processing program can be provided by being recorded on an appropriate recording medium.

【0058】[0058]

【発明の効果】以上述べたようにこの発明によれば、エ
ッジ計算によってスキャンラインのスキャン方向上流側
エッジに対応する第1の外側交点及び内側交点、同じく
下流側エッジに対応する第2の外側交点及び内側交点、
第1の外側交点から内側交点までの輝度値の増加率、並
びに第2の内側交点から外側交点までの輝度値の減少率
をそれぞれスキャンライン毎に求め、更に第1の外側交
点から内側交点までの輝度値の変化を主として算出する
第1の処理と、前記第2の内側交点から外側交点までの
輝度値の変化を主として算出する第2の処理と、これら
第1及び第2の処理結果を合成する第3の処理とを並行
に実行するようにしていので、スキャンラインの上流側
から下流側へかけて順番に輝度値を求めていくことがで
き、スキャンラインに沿ったシーケンシャルな処理が可
能になる。また、特に、この場合、上下端の頂点やその
途中の頂点、更には、これらの頂点がライン上に位置し
ていない場合でも、共通の処理方法によって簡単に輝度
値を算出することができる。このため、高速描画処理が
実現できる
As described above, according to the present invention, the first outer intersection and the inner intersection corresponding to the upstream edge in the scan direction of the scan line, and the second outer intersection corresponding to the downstream edge are also calculated by the edge calculation. Intersection and inner intersection,
The increasing rate of the luminance value from the first outer intersection to the inner intersection and the decreasing rate of the luminance value from the second inner intersection to the outer intersection are obtained for each scan line, and further from the first outer intersection to the inner intersection. A first process for mainly calculating a change in the brightness value of the second, a second process for mainly calculating a change in the brightness value from the second inner intersection to the outer intersection, and a first and a second processing result. Since the third processing to be combined is executed in parallel, the luminance value can be obtained in order from the upstream side to the downstream side of the scan line, and sequential processing along the scan line is possible. become. In particular, in this case, even when the vertices at the upper and lower ends, the vertices in the middle thereof, and these vertices are not located on the line, the luminance value can be easily calculated by the common processing method. Therefore, high-speed drawing processing can be realized.

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

【図1】 この発明の一実施例に係る多角形描画装置の
ブロック図である。
FIG. 1 is a block diagram of a polygon drawing apparatus according to an embodiment of the present invention.

【図2】 同装置におけるエッジ計算回路の処理内容を
説明するための図である。
FIG. 2 is a diagram for explaining processing contents of an edge calculation circuit in the same device.

【図3】 同装置における水平ライン処理回路の動作を
説明するための図である。
FIG. 3 is a diagram for explaining an operation of a horizontal line processing circuit in the same device.

【図4】 エッジ計算回路での右側エッジの各種データ
の算出方法を説明するための図である。
FIG. 4 is a diagram for explaining a method of calculating various data of a right edge in the edge calculation circuit.

【図5】 エッジ計算回路での左側エッジの各種データ
の算出方法を説明するための図である。
FIG. 5 is a diagram for explaining a method of calculating various data of a left edge in the edge calculation circuit.

【図6】 水平ライン処理回路での頂点部の処理を説明
するための図である。
FIG. 6 is a diagram for explaining processing of a vertex in a horizontal line processing circuit.

【図7】 エッジ計算回路の詳細ブロック図である。FIG. 7 is a detailed block diagram of an edge calculation circuit.

【図8】 同回路におけるエッジ傾き計算回路のブロッ
ク図である。
FIG. 8 is a block diagram of an edge inclination calculation circuit in the same circuit.

【図9】 同回路におけるエッジ座標算出回路のブロッ
ク図である。
FIG. 9 is a block diagram of an edge coordinate calculation circuit in the circuit.

【図10】 同回路におけるエッジ範囲算出回路のブロ
ック図である。
FIG. 10 is a block diagram of an edge range calculation circuit in the same circuit.

【図11】 同回路における輝度初期値・増分値算出回
路のブロック図である。
FIG. 11 is a block diagram of a luminance initial value / increment value calculation circuit in the same circuit.

【図12】 水平ライン処理回路の詳細ブロック図であ
る。
FIG. 12 is a detailed block diagram of a horizontal line processing circuit.

【図13】 この発明の他の実施例に適用される多角形
を示す図である。
FIG. 13 is a diagram showing a polygon applied to another embodiment of the present invention.

【図14】 同多角形のライン間のパターンを示す図で
ある。
FIG. 14 is a diagram showing a pattern between lines of the same polygon.

【図15】 同実施例のエッジ座標算出回路のブロック
図である。
FIG. 15 is a block diagram of an edge coordinate calculation circuit of the embodiment.

【図16】 同実施例の水平ライン処理回路のブロック
図である。
FIG. 16 is a block diagram of a horizontal line processing circuit of the embodiment.

【図17】 同多角形の頂点の態様を示す図である。FIG. 17 is a diagram showing an aspect of vertices of the same polygon.

【図18】 同各態様に対応した水平ライン処理回路の
動作を説明するための図である。
FIG. 18 is a diagram for explaining the operation of the horizontal line processing circuit corresponding to each of the aspects.

【図19】 同多角形の中間部での水平ライン処理回路
の動作を説明するための図である。
FIG. 19 is a diagram for explaining the operation of the horizontal line processing circuit in the middle part of the polygon.

【図20】 ライン間に多角形の端部を含む態様を示す
図である。
FIG. 20 is a diagram showing an embodiment including polygonal ends between lines.

【図21】 図20の場合の水平ライン処理回路の動作
を説明するための図である。
FIG. 21 is a diagram for explaining an operation of the horizontal line processing circuit in the case of FIG. 20;

【図22】 多角形の下端部の処理を説明するための図
である。
FIG. 22 is a diagram for explaining processing of a lower end portion of a polygon.

【図23】 従来の直線描画方法を示す図である。FIG. 23 is a diagram illustrating a conventional straight line drawing method.

【図24】 従来のアンチエイリアシング直線描画方法
を説明するための図である。
FIG. 24 is a diagram for explaining a conventional anti-aliasing straight line drawing method.

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

1…エッジ計算回路、2…水平ライン処理回路、3…ピ
クセル処理回路、4…メモリ。
1 ... edge calculation circuit, 2 ... horizontal line processing circuit, 3 ... pixel processing circuit, 4 ... memory.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 描画平面上の各グリッドを覆う面積に応
じた輝度値を与えることにより、多角形のエッジ部分を
滑らかに描画するようにした多角形描画装置において、 前記描画すべき多角形の各エッジとスキャンラインとの
交差部に関するデータであって、前記スキャンラインの
スキャン方向上流側エッジに対応する第1の外側交点及
び内側交点、前記スキャンラインのスキャン方向下流側
エッジに対応する第2の外側交点及び内側交点、前記第
1の外側交点から内側交点までの前記輝度値の増加率、
並びに前記第2の内側交点から外側交点までの前記輝度
値の減少率を含むライン交点データを各スキャンライン
毎に求めるエッジ計算手段と、 このエッジ計算手段で求められた前記各スキャンライン
毎のライン交点データに基づいて、各スキャンライン毎
に前記第1の外側交点から内側交点にかけての輝度値の
変化を主として算出する第1の処理と、前記第2の内側
交点から外側交点にかけての輝度値の変化を主として算
出する第2の処理と、これら第1及び第2の処理で得ら
れた結果を合成する第3の処理とを並行して実行するこ
とにより、前記多角形の内部の各輝度値を前記スキャン
ラインに沿ってシーケンシャルに求めるスキャンライン
処理手段とを備えてなることを特徴とする多角形描画装
置。
1. A polygon drawing device which smoothly draws an edge portion of a polygon by giving a luminance value according to an area covering each grid on a drawing plane, wherein: Data on the intersection between each edge and the scan line, wherein the first outer intersection and the inner intersection corresponding to the scan direction upstream edge of the scan line, and the second outer intersection and the inner intersection corresponding to the scan line downstream edge of the scan line. Outer intersection and inner intersection, the rate of increase of the brightness value from the first outer intersection to the inner intersection,
Edge calculating means for obtaining, for each scan line, line intersection data including a reduction rate of the luminance value from the second inner intersection to the outer intersection; and a line for each scan line obtained by the edge calculator. A first process for mainly calculating a change in luminance value from the first outer intersection to the inner intersection for each scan line based on the intersection data; and a luminance processing from the second inner intersection to the outer intersection for each scan line. By executing in parallel a second process for mainly calculating the change and a third process for synthesizing the results obtained in the first and second processes, each brightness value inside the polygon is obtained. And a scan line processing means for sequentially obtaining the following along the scan line.
【請求項2】 前記エッジ計算手段は、前記第1の外側
交点及び内側交点として、実際の交点にそれぞれスキャ
ン方向下流側で隣接するグリッド上の位置を求め、前記
第2の外側交点及び内側交点として、実際の交点にそれ
ぞれスキャン方向上流側で隣接するグリッド上の位置を
求め、第1の外側交点における輝度値及び前記第2の内
側交点とスキャン方向下流側で隣接するグリッド上の点
における輝度値をそれぞれ初期値として算出するもので
あることを特徴とする請求項1記載の多角形描画装置。
2. The edge calculating means finds a position on a grid adjacent to an actual intersection on the downstream side in the scanning direction as the first outer intersection and the inner intersection, respectively, and calculates the second outer intersection and the inner intersection. The position on the grid adjacent to the actual intersection on the upstream side in the scanning direction is determined, and the luminance value at the first outer intersection and the luminance at the point on the grid adjacent to the second inner intersection on the downstream side in the scanning direction are determined. 2. The polygon drawing apparatus according to claim 1, wherein values are calculated as initial values.
【請求項3】 前記エッジ計算手段は、前記描画すべき
多角形の頂点間をグリッド間隔に対応した縦横寸法のダ
イアモンドブロックによってドラッグしたときの軌跡に
基づいて、前記第1及び第2の外側交点及び内側交点を
算出するものであることを特徴とする請求項1又は2記
載の多角形描画装置。
3. The first and second outer intersections based on a trajectory when the vertices of the polygon to be drawn are dragged by a diamond block having a vertical and horizontal dimension corresponding to a grid interval. The polygon drawing apparatus according to claim 1, wherein the polygon intersection calculating section calculates an inside intersection point.
【請求項4】 前記スキャンライン処理手段は、前記第
1の処理として各スキャンライン毎に前記第1の外側交
点から内側交点まで前記増加率を累算して各輝度値を出
力すると共に、前記第1の内側交点以降は一定の輝度値
を出力し、前記第2の処理として前記第2の内側交点か
ら外側交点まで前記減少率を累算して各輝度値を出力す
ると共に、前記第2の外側交点以降は一定の輝度値を出
力し、前記第3の処理として前記第1の処理の結果から
前記第2の処理の結果を減算するものであることを特徴
とする請求項1〜3のいずれか1項記載の多角形描画装
置。
4. The scan line processing means outputs the luminance values by accumulating the increasing rate from the first outer intersection to the inner intersection for each scan line as the first processing, After the first inner intersection, a constant luminance value is output. As the second processing, the reduction rates are accumulated from the second inner intersection to the outer intersection, and each luminance value is output. A constant luminance value is output after the outer intersection point of, and the result of the second processing is subtracted from the result of the first processing as the third processing. The polygon drawing apparatus according to any one of claims 1 to 6.
【請求項5】 前記スキャンライン処理手段は、前記多
角形の頂点がスキャンライン間に位置するとき、スキャ
ンラインから前記頂点までの距離に相当する値を前記一
定の輝度値として使用するものであることを特徴とする
請求項4記載の多角形描画装置。
5. The scan line processing means uses a value corresponding to a distance from a scan line to the vertex as the constant luminance value when a vertex of the polygon is located between the scan lines. 5. The polygon drawing apparatus according to claim 4, wherein:
【請求項6】 前記スキャンライン処理手段は、前記多
角形の上下端の頂点以外の頂点がスキャンライン間に位
置するとき、前記頂点から上側のスキャンラインまでの
距離に基づく処理と、前記頂点から下側のスキャンライ
ンまでの距離に基づく処理とを別々に実行して合成する
ことにより輝度値を算出するものであることを特徴とす
る請求項1〜5のいずれか1項記載の多角形描画装置。
6. When the vertices other than the upper and lower vertices of the polygon are located between the scan lines, the scan line processing means performs processing based on a distance from the vertex to an upper scan line. The polygon drawing according to any one of claims 1 to 5, wherein a luminance value is calculated by separately performing processing based on a distance to a lower scan line and performing synthesis. apparatus.
【請求項7】 描画平面上の各グリッドを覆う面積に応
じた輝度値を与えることにより、多角形のエッジ部分を
滑らかに描画するようにした多角形描画プログラムを記
憶した媒体において、 前記描画すべき多角形の各エッジとスキャンラインとの
交差部に関するデータであって、前記スキャンラインの
スキャン方向上流側エッジに対応する第1の外側交点及
び内側交点、前記スキャンラインのスキャン方向下流側
エッジに対応する第2の外側交点及び内側交点、前記第
1の外側交点から内側交点までの前記輝度値の増加率、
並びに前記第2の内側交点から外側交点までの前記輝度
値の減少率を含むライン交点データを各スキャンライン
毎に求めるエッジ計算ステップと、 このエッジ計算ステップで求められた前記各スキャンラ
イン毎のライン交点データに基づいて、各スキャンライ
ン毎に前記第1の外側交点から内側交点にかけての輝度
値の変化を主として算出する第1の処理と、前記第2の
内側交点から外側交点にかけての輝度値の変化を主とし
て算出する第2の処理と、これら第1及び第2の処理で
得られた結果を合成する第3の処理とを並行して実行す
ることにより、前記多角形の内部の各輝度値を前記スキ
ャンラインに沿ってシーケンシャルに求めるスキャンラ
イン処理ステップとを備えてなることを特徴とする多角
形描画プログラムを記憶した媒体。
7. A medium storing a polygon drawing program for rendering a polygon edge portion smoothly by giving a luminance value corresponding to an area covering each grid on a drawing plane. Data on the intersection of each edge of the power polygon with the scan line, including a first outer intersection and an inner intersection corresponding to the scan direction upstream edge of the scan line, and a scan direction downstream edge of the scan line. A corresponding second outer intersection and an inner intersection, the rate of increase of the luminance value from the first outer intersection to the inner intersection,
An edge calculating step of obtaining line intersection data including a decrease rate of the luminance value from the second inner intersection to the outer intersection for each scan line; and a line for each scan line obtained in the edge calculation step. A first process for mainly calculating a change in the luminance value from the first outer intersection to the inner intersection for each scan line based on the intersection data; and a luminance processing from the second inner intersection to the outer intersection for each scan line. By simultaneously executing a second process for mainly calculating the change and a third process for synthesizing the results obtained in the first and second processes, each brightness value inside the polygon is obtained. And a scan line processing step of sequentially obtaining the following along the scan line.
【請求項8】 描画平面上の各グリッドを覆う面積に応
じた輝度値を与えることにより、多角形のエッジ部分を
滑らかに描画するようにした多角形描画方法において、 前記描画すべき多角形の各エッジとスキャンラインとの
交差部に関するデータであって、前記スキャンラインの
スキャン方向上流側エッジに対応する第1の外側交点及
び内側交点、前記スキャンラインのスキャン方向下流側
エッジに対応する第2の外側交点及び内側交点、前記第
1の外側交点から内側交点までの前記輝度値の増加率、
並びに前記第2の内側交点から外側交点までの前記輝度
値の減少率を含むライン交点データを各スキャンライン
毎に求め、 この求められた前記各スキャンライン毎のライン交点デ
ータに基づいて、各スキャンライン毎に前記第1の外側
交点から内側交点にかけての輝度値の変化を主として算
出する第1の処理と、前記第2の内側交点から外側交点
にかけての輝度値の変化を主として算出する第2の処理
と、これら第1及び第2の処理で得られた結果を合成す
る第3の処理とを並行して実行することにより、前記多
角形の内部の各輝度値を前記スキャンラインに沿ってシ
ーケンシャルに求めるようにしたことを特徴とする多角
形描画方法。
8. A polygon drawing method in which an edge portion of a polygon is smoothly drawn by giving a luminance value according to an area covering each grid on a drawing plane, wherein: Data on the intersection between each edge and the scan line, wherein the first outer intersection and the inner intersection corresponding to the scan direction upstream edge of the scan line, and the second outer intersection and the inner intersection corresponding to the scan line downstream edge of the scan line. Outer intersection and inner intersection, the rate of increase of the brightness value from the first outer intersection to the inner intersection,
In addition, line intersection data including the reduction rate of the luminance value from the second inner intersection to the outer intersection is obtained for each scan line, and each scan is determined based on the obtained line intersection data for each scan line. A first process for mainly calculating a change in luminance value from the first outer intersection to the inner intersection for each line, and a second process for mainly calculating a change in luminance value from the second inner intersection to the outer intersection. By executing the processing and the third processing for synthesizing the results obtained in the first and second processing in parallel, each luminance value inside the polygon is sequentially read along the scan line. A polygon drawing method, characterized in that a polygon drawing method is provided.
JP18559097A 1997-07-10 1997-07-10 Method and device for plotting polygon Pending JPH1131232A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP18559097A JPH1131232A (en) 1997-07-10 1997-07-10 Method and device for plotting polygon
US09/932,810 US7142224B2 (en) 1997-07-10 2001-08-20 Polygon drawing apparatus and method, and storage medium for implementing the same method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18559097A JPH1131232A (en) 1997-07-10 1997-07-10 Method and device for plotting polygon

Publications (1)

Publication Number Publication Date
JPH1131232A true JPH1131232A (en) 1999-02-02

Family

ID=16173471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18559097A Pending JPH1131232A (en) 1997-07-10 1997-07-10 Method and device for plotting polygon

Country Status (1)

Country Link
JP (1) JPH1131232A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113720337A (en) * 2021-08-20 2021-11-30 珠海格力电器股份有限公司 Map editing method and device for sweeping robot, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113720337A (en) * 2021-08-20 2021-11-30 珠海格力电器股份有限公司 Map editing method and device for sweeping robot, storage medium and electronic equipment
CN113720337B (en) * 2021-08-20 2024-06-07 珠海格力电器股份有限公司 Map editing method and device of sweeping robot, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US5544294A (en) Method for generating a subpixel mask for computer graphics system and apparatus thereof
JPH1186007A (en) How to determine the percentage of pixels covered by a primitive
JPH07302336A (en) Method and apparatus for making feature of image ambiguous
WO2015122062A1 (en) Image generation apparatus and operation assistance system
US5046165A (en) Controlling the combining of video signals
JPH0927039A (en) Method and apparatus for calculating texel values for displaying texture on an object
US6181347B1 (en) Selectable mode smoothing texture filter for computer graphics
US7142224B2 (en) Polygon drawing apparatus and method, and storage medium for implementing the same method
JP2738588B2 (en) 3D model drawing method
WO2015111262A1 (en) Image generation device and operation assistance system
JP2837584B2 (en) How to create terrain data
US7015930B2 (en) Method and apparatus for interpolating pixel parameters based on a plurality of vertex values
JP3161372B2 (en) Polygon drawing method and apparatus
JPH1131232A (en) Method and device for plotting polygon
JPH1063828A (en) Method for processing image and device therefor
JP3394551B2 (en) Image conversion processing method and image conversion processing device
JP3066596B2 (en) Address translation device
JPH0758510B2 (en) Three-dimensional graphic processor
JP3770840B2 (en) Method and system for generating and processing harmonized point networks
JP3090409B2 (en) Method and apparatus for designing three-dimensional shape using computer
JP3191739B2 (en) Polygon drawing method and apparatus
JP2002260003A (en) Video display device
JP4009289B2 (en) Method for determining a weighting factor for color-calculating a texel color value associated with a footprint
JPH06301792A (en) Texture mapping device
JP2000339486A (en) Picture processing method and volume rendering processor