JPH0215384A - Interpolation and digital differential analysis - Google Patents

Interpolation and digital differential analysis

Info

Publication number
JPH0215384A
JPH0215384A JP7160589A JP7160589A JPH0215384A JP H0215384 A JPH0215384 A JP H0215384A JP 7160589 A JP7160589 A JP 7160589A JP 7160589 A JP7160589 A JP 7160589A JP H0215384 A JPH0215384 A JP H0215384A
Authority
JP
Japan
Prior art keywords
line
value
output
length
register
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
JP7160589A
Other languages
Japanese (ja)
Inventor
Neil F Trevett
ネイル フランシス トレヴェット
Malcolm E Wilson
マルコム エリック ウィルソン
Sarah E Lloyd
サラ ジェイン ロイド
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.)
3DLabs Ltd
Original Assignee
DuPont Pixel Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from GB8806879A external-priority patent/GB2215960A/en
Priority claimed from GB8806880A external-priority patent/GB2215961A/en
Application filed by DuPont Pixel Systems Ltd filed Critical DuPont Pixel Systems Ltd
Publication of JPH0215384A publication Critical patent/JPH0215384A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/17Function evaluation by approximation methods, e.g. inter- or extrapolation, smoothing, least mean square method
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/80Shading
    • G06T15/87Gouraud shading
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/20Function-generator circuits, e.g. circle generators line or curve smoothing circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Image Generation (AREA)
  • Complex Calculations (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE: To easily execute a digital differential analysis(DDA) with a simple constitution by performing the DDA by using a hardware multiplier accumulator. CONSTITUTION: The output registers 410 to 414 of a multiplier accumulator are initialized via a CPU, etc. As for the incremental change value of the output value over the line of a prescribed length to be interpolated in a first input register 102, the value which is equal to the reciprocal of the line length is loaded into a second input register 104. The contents of the registers 102 and 104 is multiplied by a multiplication accumulator 408, the cumulative results of the addition of the accumulation of a fraction part, the overflow part and the integer part of the multiplication result and an overflow part via an adder 408 are stored in the registers 410 to 414, respectively, and the interpolation by the DDA is performed. By the execution of the DDA for which this hardware is used, a constitution is simplified and the execution of the DDA can be exactly performed without performing a division operation, etc.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、乗算器アキュムレータ(MAC)を用いた補
間(interpolation )およびデジタル微
分解析(digital differential 
analysis)の方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to interpolation using a multiplier accumulator (MAC) and digital differential analysis.
This relates to a method of analysis.

[従来の技術] i)補間の重要性 コンピュータの分野においては、値を補間することが、
しばしば必要とされる。例えば、ビットマツプされた表
示モニタの上に1本の線を引くためには、始点と終点の
間に表示された幾つかのビクセルの間に目的の線を書き
入れなければならないことがある。その場合、線を形成
するピクセルを輝かせることにより、その線が書き込ま
れる。
[Prior Art] i) Importance of Interpolation In the field of computers, interpolating values is
often required. For example, to draw a line on a bitmapped display monitor, the desired line may have to be drawn between several pixels displayed between the start and end points. In that case, the line is written by lighting up the pixels that form the line.

もう一つの例は、表示された画像の与えられた領域に、
徐々に影をつけたい場合である。この操作のための従来
の方法は、与えられたビクセルの上の影の始点シエイド
(statingshade)と終点シエイド(end
ing 5hade)の間に、影の値(shasdin
gvalue)を挿入することであった。
Another example is that for a given area of the displayed image,
This is a case where you want to gradually add shadows. The conventional method for this operation is to determine the starting and ending shades of the shadow above a given pixel.
ing 5hade), the shadow value (shasdin
gvalue).

これらの方法は決して面倒ではない。また、実際、可能
なアプリケーションの表面を補間アルゴリズムのために
引っかくだけのものである。
These methods are by no means tedious. It also really only scratches the surface of possible applications for interpolation algorithms.

−数的な問題は次のようなものである。-Numerical problems are as follows.

与えられたステップの数(N)にわたって、初期値(V
)があるm (DALTA V)ずつ徐々に変化してい
くか、ということである。
Over a given number of steps (N), the initial value (V
) gradually changes by a certain m (DALTAV).

補間を行うための従来の方法のひとつは、デジタル微分
アナライザ(以下、 DDAという)の使用である。1
つのよく知られた例は、線を引くためのDDAである。
One conventional method for performing interpolation is the use of a digital differential analyzer (hereinafter referred to as DDA). 1
One well-known example is DDA for drawing lines.

典型的なシンプルなラインDDAは、ラインのX、X要
素を整数部と分数部に分ける!llきをする。それから
、DDへはX、X要素を分数単位で増加させる。分数部
が一杯になったときには、整数部が増加される。上記D
DAは整数要素を、その出力を形成するために使用する
。コンピュータの分野で使用されているように、要素の
ひとつは堅実に一つずつ増加し、他の要素は条件付きで
増加する。
A typical simple line DDA divides the X, X elements of the line into an integer part and a fractional part! I'm going to have a good time. Then, to DD, increase the X and X elements in fractional units. When the fractional part is full, the integer part is incremented. D above
DA uses integer elements to form its output. As used in the computer field, one of the elements increases steadily by one, while the other increases conditionally.

ii)単純なりI)八 単純なりDAアルゴリズムは、第1図を参照してよりよ
く理解されるであろう。例えば、表示モニタ上において
、ライン102を始点104と終点106の間に描く場
合を仮定する。そして、点は格子の線が交差する場所(
モニタ上のピクセルに対応している)にのみプロットす
ることができると仮定する。線の初期値(v)はゼロ(
X要素の始点値)である。期待された変化(DALTA
 V)は5(X要素の終点値)であり、その値が変化(
N)するステップの数は7(X軸の方向での線の全長)
である。
ii) Simple I) Eight Simple The DA algorithm will be better understood with reference to FIG. For example, assume that a line 102 is drawn between a starting point 104 and an ending point 106 on a display monitor. And the points are where the grid lines intersect (
Assume that you can only plot (corresponding to pixels on your monitor). The initial value (v) of the line is zero (
(starting point value of the X element). Expected changes (DALTA
V) is 5 (the end point value of the X element), and its value changes (
N) The number of steps to do is 7 (total length of the line in the direction of the X axis)
It is.

次に示す例1−1に示した単純ベーシック言語DDAは
、このようなプロットをするために使用される。
The simple basic language DDA shown in Example 1-1 below is used to make such plots.

例1−1 DDAプログラム X−0:Y−0:N−7:DELTA V−5Y−V+
、5 FOR1−I To N PLOT(TRUNC(X)、’TRUNC(Y)Y−
Y+DELTAV/N X−X+1 EXTX Pl、OT (TRtlNC(X) 、 TRUNC(
Y)ND 上の例から次のことが理解される。[lDAプログラム
はY値を単純に初期化し、そのラインのYスタート座標
値プラスまるめファクタ(roundingfacto
r) 0.5とする。そしてN回の反復サイクルにおい
て、XとY値の整数要素における点にプロットし、Y!
NIの座標をラインのスロープだけ増加させ(DELT
八V/へ) 、ラインのX要素を1だけ増加させる。最
後のプロットコマンドは、ラインの最後の点をプロット
するためのものである。
Example 1-1 DDA program X-0:Y-0:N-7:DELTA V-5Y-V+
, 5 FOR1-I To N PLOT(TRUNC(X),'TRUNC(Y)Y-
Y+DELTAV/N X-X+1 EXTX Pl, OT (TRtlNC(X), TRUNC(
Y) ND The following is understood from the above example. [The IDA program simply initializes the Y value to the Y start coordinate value of the line plus the rounding factor.
r) Set to 0.5. Then, in N iteration cycles, plot the X and Y values at points in integer elements and Y!
Increase the NI coordinate by the slope of the line (DELT
8V/to), increases the X element of the line by 1. The last plot command is for plotting the last point of the line.

上記のプログラムによく似たプログラムとしてゴラウド
ーシェイディング(Goraud shading) 
に使用されるものがある。2つのプログラムの相違は、
X軸座標とY軸座標を変えるのと違い、シェイディング
の値(shading value)が与えられたステ
ップ数にわたって変わることである。同様に、シエイデ
ィング・プログラム(shadiB program)
では、最後のプロットコマンドは必要ない。
Goraud shading is a program similar to the above program.
There are some things used in The difference between the two programs is
The difference between changing the X-axis and Y-axis coordinates is that the shading value changes over a given number of steps. Similarly, the shading program (shadiB program)
Now, we don't need the last plot command.

1ii)  プレセンハムのアルゴリズム(Brese
nham’ sAIgorithm) 上記のような単純[IDA操作(operration
)での問題点は、分割操作(division ope
ration)を必要とすることである。これにはCP
Uタイムの点で費用がかかる過ぎるため、従来は、単純
DDAはハードウェアの実現にふされしくないとみなさ
れていた。分割を避けるための従来の一般的な方法の1
つは、プレセンハムのアルゴリズムとして知られる、別
の種類の補間方法である。
1ii) Breseham's algorithm
nham'sAIgorithm) A simple [IDA operation (operation
The problem with ) is that the division operation
ration). This includes CP
Traditionally, simple DDA was considered unsuitable for hardware implementation because it is too expensive in terms of U-time. One of the traditional common methods to avoid splitting
Another type of interpolation method is known as Presenham's algorithm.

プレセンハムのアルゴリズムは、おのおのの反復毎に、
座標値をプラス1またはマイナス1するよう設計されて
いる。残りの座標値が増加されるかどうかは、アルゴリ
ズムによって保持されているエラーターム(すなわち、
プレセンハムのエラーターム)の値による。理論的に完
全なラインの正確なパスと、アドレスされて書き込まれ
た(すなわち、点として輝いている)実際のピクセルと
の間の距離を記憶させるために、このエラータームが使
用される。プレセンハムのアルゴリズム・ラインブロッ
ティング・プログラムの一例、および、ODAの他の例
は、ウィリアム、M、ニュウマン、ロバート、F、スプ
ロール、マグロ−ヒルによる°°ゼインラクチイブ・コ
ンピュータ・グラフィクスの原理パ(第2版)にみるこ
とができる。
At each iteration, Presenham's algorithm
It is designed to add 1 or minus 1 to the coordinate value. Whether the remaining coordinate values are incremented depends on the error term maintained by the algorithm (i.e.
According to the value of Presenham's error term). This error term is used to remember the distance between the exact path of a theoretically complete line and the actual pixel that was addressed and written (i.e. shining as a dot). An example of Presenham's algorithmic lineblotting program, and other examples of ODA, can be found in Principles of Ractive Computer Graphics (2nd Edition) by William, M., Newman, Robert, F., Sproul, and McGraw-Hill. ).

この文献は、本明細書の一部として引用される。This document is incorporated herein by reference.

プレセンハムのアルゴリズムは、分割の問題を解決して
いるにもかかわらず、多くの従来のDD八へ間技術と同
じく、他の幾つかの問題にぶちあたる。
Although Presenham's algorithm solves the partitioning problem, it suffers from several other problems, as do many conventional DD8 techniques.

iv)非分数的スロープの問題 多くの従来から知られているDD八へログラミング技術
では(プレセンハムのアルゴリズムプログラムを含めて
)、補間された値が制限付きで1つずつ増加することの
み許されている。この問題は、X軸から45度より大き
なスロープをもつラインを考える時、よりはっきり理解
できる。これらの場合には、N(ステップの数)は、常
にDEL丁^V(値の意図された変化)より小さい。
iv) The problem of non-fractional slopes Many conventionally known DD8 hexagramming techniques (including Presenham's algorithm program) only allow the interpolated value to increment by one with restrictions. There is. This problem is more clearly understood when considering lines with slopes greater than 45 degrees from the X-axis. In these cases, N (number of steps) is always smaller than DELD^V (intended change in value).

この状況を伴った問題が第2図に示されている。The problem with this situation is illustrated in FIG.

第2図は、X軸、Y軸の原点にあるスタート点から描か
れたライン202 と、X、Y座m4.7にある終点2
06を示す。この場合、Nは4に等しく(すナワチ、4
−7−(f−ス0 ’) 、DELTA Vは7(すな
わち、7マイナス0)に等しい。
Figure 2 shows a line 202 drawn from the starting point at the origin of the X and Y axes, and an ending point 2 at the X and Y positions m4.7.
06 is shown. In this case, N is equal to 4 (Sunawachi, 4
-7-(f-s0'), DELTA V is equal to 7 (i.e., 7 minus 0).

当業者であれば、このような環境のもとでは、プレセン
ハムのアルゴリズムルーチンにおいては、Xとyとは常
に増加するということを理解するであろう。結果は、第
2図で点に示したように、45度のプロットである。こ
れは勿論、期待された結果ではない。
Those skilled in the art will understand that under such circumstances, in Presenham's algorithm routine, X and y will always increase. The result is a 45 degree plot, as indicated by the dot in FIG. This is, of course, not the expected result.

このような条件に適応するために、Y方向のDELTA
 Vステップにわたって、Xの値を補間するために、別
のコードが加えられなければならない。換言すれば、ス
ロープ方向が1以下の場合には、それに対応するために
プログラムを書キ換えなければならない。ラインの角度
に応じて、プレセンハムのアルゴリズムや他の従来のD
DAプログラムを使用しているプログラムは、1セツト
のコードもしくは他のコードを入力しなければならない
。プログラマ−やプログラムは、どのセクションが実行
されているか見守らなければならない。
To adapt to such conditions, DELTA in the Y direction
Another code must be added to interpolate the value of X over V steps. In other words, if the slope direction is less than or equal to 1, the program must be rewritten to accommodate it. Depending on the angle of the line, Presenham's algorithm or other conventional D
Programs using the DA program must enter one set of codes or another. Programmers and programs must keep track of which sections are being executed.

不運なことに、上記の方法で線描の問題は解決するが、
ボウラウド・シエイディング(Gouraudshad
ing)のような−次元の問題は解決しない。例えば、
表示スクリーンの左手端から始まる8ビクセルにわたり
、60と155によって表される2つのシェイド(5a
de)の間を補間することを考えてみる。可変DELT
A Vは195 (255−Go) ニ等しく、Nは8
に等しい。Xは最初1に等しく、Yは最初6oに等しい
Unfortunately, although the above method solves the line drawing problem,
Gouraudshad
-dimensional problems such as ing) are not solved. for example,
Two shades represented by 60 and 155 (5a
Consider interpolating between de). variable DELT
A V is equal to 195 (255-Go) and N is 8
be equivalent to. X is initially equal to 1 and Y is initially equal to 6o.

DELTA VをNで分割した結果は7.5であり、プ
レセンハムのアルゴリズム型のプログラムは各ビクセル
(すなわち、60,8L62,83,84,65,66
.67)に対して、各々のシエイド値を星゛にまたり増
加するのみである。この場合のスロープを反対にすると
、無意味な結果が得られる。このことは、NとXはビク
セルで定義され、これに対してYとDELTA Vはシ
ェイディング・コード(shadingcode)で定
義されることを考えれば理解しやすい。
The result of dividing DELTA V by N is 7.5, and Presenham's algorithm-type program divides each pixel (i.e., 60, 8L62, 83, 84, 65, 66
.. 67), we only increase each shade value across the stars. Reversing the slope in this case would give meaningless results. This can be easily understood by considering that N and X are defined in pixels, whereas Y and DELTA V are defined in shading codes.

■) ライン・クリッピング(Line C1C11p
pinおよびサブセット・ライン(Subset Li
ne)の問題プレセンハムのアルゴリズムと他の多くの
補間方法に関するもうひとつの問題点は、サブセットラ
インの問題であると言われている。簡単に言えば、2次
元ラスフグラフイックにおいて、ラインを消したり繰返
したりするに際して、ラインの正しいプロット位置を決
めることが困難なことである。例えば、ラインLlをス
クリーン上の始点ビクセルPIと終点ビクセルP2の間
に描くとする。そして、選ばれた補間アルゴリズムはビ
クセルグループGlをプロットすることにより(例えば
、最初の色を輝かせることにより)、ラインを描くもの
とする。ラインの一部を消したり、上書きすることが必
要であれば、ラインLの一部分をもう1度たどることが
必要となる(例えば、第2の色を輝かせて)。
■) Line clipping (Line C1C11p
pin and subset line (Subset Li
ne) Problem Another problem with Presenham's algorithm and many other interpolation methods is said to be the subset line problem. Simply put, in two-dimensional sketch graphics, it is difficult to determine the correct plotting position of a line when erasing or repeating the line. For example, assume that a line Ll is drawn between a starting point pixel PI and an ending point pixel P2 on the screen. The chosen interpolation algorithm shall then draw the line by plotting the pixel groups Gl (eg, by brightening the first color). If it is necessary to erase or overwrite part of the line, it will be necessary to retraverse part of the line L (for example, by shining a second color).

この操作のためには、最初のビクセルグループP4の内
で始点ビクセルP4と終点ビクセルP5を選ぶことによ
り、新しいラインL2を描かなければならない。新しい
ラインL2はラインLlの一部分を消すために使用され
るのであるから、ラインL2を描くときにプロットされ
たビクセルのグループ(グループG2と呼ぶ)はG1の
なかのサブセットであることが重要である。
For this operation, a new line L2 must be drawn by selecting a starting pixel P4 and an ending pixel P5 within the first pixel group P4. Since the new line L2 is used to erase a portion of line Ll, it is important that the group of pixels plotted when drawing line L2 (referred to as group G2) is a subset of G1. .

サブセットラインの問題はとるに足らない問題ではない
。もし上記の条件が満たされなければ、ラインは完全に
消されることができないし、余分なビクセルがプロット
され、その結果としてスクリーンを乱すことになる。一
般のプレセンハムのアルゴリズムは上記の条件を満足し
ていないことが理解される。著者らによフてこの問題を
迂回するためのある示唆が提示されている。1つの例は
、そこに記憶されているスクリーン上の可能なラインの
デジタイゼイションを行なうルックアップテーブルの使
用をすすめている。このような示唆は一般に非現実的で
あると考えられている。サブセットラインの問題は“ラ
スタ・グラフィックスのためのデータ・ストラクチュア
°°という本の中に詳細に述べられている。その木はり
、R,A、ケセナー、 F、J、ベータース、 M、L
、P、ライン リーロツクによって編集され、スプリン
グアー バーログによって出版されたものである。その
内容はそフくりそのまま、本明細書の引用文献として参
照するものとする。
The problem of subset lines is not a trivial problem. If the above conditions are not met, the line cannot be completely erased and extra pixels will be plotted, thus cluttering the screen. It is understood that the general Presenham algorithm does not satisfy the above conditions. Some suggestions are provided by the authors to circumvent this problem. One example recommends the use of a look-up table that performs the digitization of possible lines on the screen stored therein. Such suggestions are generally considered unrealistic. The problem of subset lines is described in detail in the book ``Data Structures for Raster Graphics''.
, edited by Line Lierock, P., and published by Spring Arbor Log. The content thereof shall be referred to in its entirety as a cited document in this specification.

この木はヨーログラフィックス セミナーズシリーズ(
Eurographics Sem1nars 5er
ies)の−部である。
This tree is from the Eurographics Seminars Series (
Eurographics Sem1nars 5er
ies).

サブセットラインの問題に関し、この木には゛準備的な
結果がでているにもかかわらず、これはやはり解決され
なければならない問題である。
Despite the preliminary results of this tree regarding the subset line problem, this is still a problem that must be solved.

良いアルゴリズムが存在するかどうかすら分かりではい
ない。勿論それが複雑であるからである。  (ベージ
7、バラグラフ1)と述べられている。
I don't even know if a good algorithm exists. Of course, that's because it's complicated. (Bage 7, Baragraph 1).

サブセットラインの問題は重要になっている。The issue of subset lines has become important.

特に、表示されたウィンドウの境界でラインを切る場合
、その場所が重要である。この問題を第3図に図示する
。スクリーンやウィンドウに表示されたラインをそのス
クリーンやウィンドウの外側の点から計算する場合、ラ
インは切り取られなければならない。
In particular, when cutting a line at the border of a displayed window, its location is important. This problem is illustrated in FIG. If a line displayed on a screen or window is computed from a point outside the screen or window, the line must be clipped.

第3図において、ライン302はウィンドウ306の外
側にある点304から出発している。ライン302の一
部は、残りの部分が隠されている間、ウィンドウに表示
されなければならない。この問題を解決するために、従
来から2つの方法がとられている。
In FIG. 3, line 302 starts at point 304 outside window 306. In FIG. A portion of line 302 must be displayed in the window while the remaining portion is hidden. In order to solve this problem, two methods have been conventionally used.

クリッピングの1つの方法は、クリップされていないサ
プラインの始点を計算し、プレセンハム型の補間を行う
ことである。この場合、補間はラインの実際の原点以外
の点から出発し、サブセットラインの問題に遭遇する。
One method of clipping is to calculate the starting point of the unclipped supline and perform a Presenham-type interpolation. In this case, the interpolation starts from a point other than the actual origin of the line and encounters the problem of subset lines.

このことは、元のラインに描かれたのとは少し違ったビ
クセルが、クリップされたラインに含まれる結果となる
。もし、クリップされないラインをたどることが必要な
場合、あるいはラインが別のウィンドウでクリップされ
た場合、プログラマ−は少しばかり違ったビクセルのセ
ットが選ばれているのを発見することになるだろう。
This results in the clipped line containing slightly different pixels than those drawn in the original line. If it is necessary to follow a line that is not clipped, or if the line is clipped in another window, the programmer will find that a slightly different set of pixels has been selected.

第2の従来の方法はサブセットラインの問題を迂回する
にあたり、ラインの始点からプレセンハム型の補間を行
ない、ウィンドウが出発する点を追跡しながら、非ウィ
ンドウ領域には書き込みを行わないで解決しようとする
ものである。この方法は正しい。しかし、ラインが非ウ
ィンドウ領域に書込まれていないことを確認するために
、余分なソフトウェアの経費と、計算時間を必要とする
。その上、ODAの総てを見えないビクセルのためにま
で行うために時間を費やす。
A second conventional method circumvents the problem of subset lines by performing Plessenham-type interpolation from the start of the line, tracking the point where the window starts, but attempting to solve the problem by not writing to non-window areas. It is something to do. This method is correct. However, it requires extra software expense and computation time to ensure that lines are not written to non-window areas. Moreover, they spend their time doing all the ODA even for invisible Bixel.

クリッピングと補間の技術、プレセンハムのアルゴリズ
ムを含めて、DDAとボウラウド・シエイディングにつ
いては、ウィリアム・エム・ニューマンおよびロバート
・エフ・スブロウル マワグロウヒル(第10版 19
84)による“°インテラクチイブ・コンピュータ・グ
ラフィックス” (第2版)に述べられている。
Clipping and interpolation techniques, DDA and bowloud shading, including Presenham's algorithm, are discussed in William M. Newman and Robert F. Subroull (10th ed. 19
84) in “°Interactive Computer Graphics” (2nd edition).

vi) プログラマ−のジレンマ プログラマ−は伝統的にジレンマに直面している。プロ
グラマ−は−n9的に単純なりDA型の方法の中から選
はなけれはならない。その方法は、費用のかかる分割を
必要とするほか、サブセットライン問題を生じ、Xとy
の増分のサイズを1に制限するプレセンハムのアルゴリ
ズムやそれに似た技術が必要とされる。
vi) Programmer's Dilemma Programmers traditionally face a dilemma. The programmer must choose between the simpler and DA-type methods. In addition to requiring expensive partitioning, that method creates a subset line problem and
Presenham's algorithm or similar technique is needed to limit the size of the increments to 1.

いかなる数のステップにもわたって、全ての範囲の値を
補間できる補間方法が望ましい。あらゆる範囲の値また
はあらゆる数のステップにわたり、DDA型方決方法い
て、ボウラウド・シェイディング演算(Gourad 
shading operation)を行ない得るこ
とが望ましい。補間された値を、各々のステップにおい
て、1よりも大きな数で増加させ得ることが望ましい。
An interpolation method that can interpolate the entire range of values over any number of steps is desirable. Over any range of values or any number of steps, DDA-type methods can be used to
It is desirable to be able to perform a shading operation. It would be desirable to be able to increase the interpolated value by a number greater than 1 at each step.

ソフトウェアの分割を避けることか望ましい。その上、
別め°クリッピング境界でクリップされたラインに対し
て、選ばれたビクセルの正確な繰り返しを保証するため
に、速く、正確なラインクリッピングができることが特
に望ましい。
It is desirable to avoid software partitioning. On top of that,
For lines clipped at separate clipping boundaries, it is particularly desirable to be able to perform fast and accurate line clipping to ensure accurate repetition of selected pixels.

[発明の概要コ 本発明は、デジタル微分解析をハードウェア乗算器アキ
ュムレータ(MAC)を使用して行う方法を含むもので
ある。
SUMMARY OF THE INVENTION The present invention includes a method for performing digital differential analysis using a hardware multiplier accumulator (MAC).

[実施例] 以下、実施例に基いて本発明の詳細な説明する。[Example] Hereinafter, the present invention will be explained in detail based on Examples.

本発明は、ハードウェアー乗算器アキュムレータ(MA
G::ll1ultiplier accumulat
or)を使用して、デジタル微分解析を行う方法を含む
。この方法は、増加ステップの数が、ステップの存在す
る値の範囲よりも小さい時のプログラミングを可能にす
る。この方法はプレセンハムのアルゴリズムを使用した
クリッピングの方法と、他の従来の1)DA技術に以前
からあったいくつかの固有の問題を解決するものである
The present invention utilizes a hardware multiplier accumulator (MA
G::ll1ultiplier accumulat
or) to perform digital differential analysis. This method allows programming when the number of incremental steps is smaller than the range of values in which the steps exist. This method solves some inherent problems that existed previously in clipping methods using Presenham's algorithm and other conventional 1) DA techniques.

本発明の好適な実施例による基本ハードウェアーを第4
図と第5図に示す。第4図と第5図は乗算器アキュムレ
ータ(MAC)のブロック図を示す。
The basic hardware according to the preferred embodiment of the present invention is
As shown in Fig. and Fig. 5. 4 and 5 show block diagrams of a multiplier accumulator (MAC).

MAC400は2個の入力レジスタ402,404 、
乗算器アレイ406、加算器408 、3個の出力レジ
スタ410゜412、414を含んでいる。1.5P(
least 51gn1ficantproduct)
レジスタは、乗算の結果の分数部を記憶し累積する。M
SP(most 51gn1fic ant prod
uct)レジスタは、結果の整数部を記憶し累積するた
めに使用される。XTP(extended prod
uct)  レジスタは、オーバーフローしたものを記
憶し累積するために使用される。
The MAC 400 has two input registers 402, 404,
It includes a multiplier array 406, an adder 408, and three output registers 410, 412, 414. 1.5P (
least 51gn1ficantproduct)
The register stores and accumulates the fractional part of the multiplication result. M
SP (most 51gn1fic ant prod
uct) register is used to store and accumulate the integer part of the result. XTP (extended prod
uct) register is used to store and accumulate overflows.

MAC400は、出力レジスタ410,412,414
 をプリロードする機能をもち、少なくとも乗算モード
および乗算・累積モードで動作可能なことが好ましい。
The MAC 400 has output registers 410, 412, 414
Preferably, it has a function of preloading and can operate in at least multiplication mode and multiplication/accumulation mode.

好適な乗算器アキュムレータ(MAC)は、IDT72
1016x 16並列乗算器アキュムレータであり、カ
リフォルニア サンタモニカ インテグl/イテド デ
バイス テクノロジー 社から人手できる。TDT72
10の構造と動作は、同社の“旧GHPERFORMA
NCE CMO5DATA HΔND[1OOK ”に
書かれている。
A preferred multiplier accumulator (MAC) is the IDT72
1016x 16 parallel multiplier accumulator available from Integr/Ited Device Technology, Santa Monica, California. TDT72
The structure and operation of 10 are based on the company's “old GHPER FORMA
NCE CMO5DATA HΔND[1OOK”.

第5図は、本発明の他の実施例を示す。本実施例は64
kXI69−ドオンリーメそり(ROM)ルックアップ
テーブル502を含んだハードウェアーである。ルック
アップテーブル502は、そのアドレス入力に現われる
全ての値の逆数を求めるために使用される。
FIG. 5 shows another embodiment of the invention. In this example, 64
kXI69 - Hardware that includes a read-only memory (ROM) lookup table 502. Lookup table 502 is used to find the reciprocal of all values appearing at its address input.

次に、第6図を参照して本実施例の動作を説明する。ま
ず、MACの出力レジスタが最初にプリロードされる。
Next, the operation of this embodiment will be explained with reference to FIG. First, the MAC's output register is preloaded first.

−木のラインを描く場合を考えてみよう。LSPレジス
タにはまず、初期まるめ値(例えば0.5)がロードさ
れる。一つの座標i+h (例えは、Y Itll )
の最初の値Vは、初め、MSPにロードされる。MAG
は入力がロードされる時には“乗算アキュムレートモー
ドに設定されなければならない。
-Let's consider drawing the lines of a tree. The LSP register is first loaded with an initial rounding value (eg, 0.5). One coordinate i+h (for example, Y Itll )
The initial value of V is initially loaded into the MSP. M.A.G.
must be set to multiply-accumulate mode when the input is loaded.

次に、DELT八Vのへは、第1入力レジスタ402の
アドレス入力で記憶される。同時に、Nの値は、ROM
ルックアップテーブル502のアドレス入力で記憶され
、l/Nが現れ、第1入力レジスタ402.404で安
定するまで保持される。それらは、クロックに同期して
第1および第2入力レジスタ402.404にそれぞれ
入力される。
Next, DELT8V is stored by the address input of the first input register 402. At the same time, the value of N is
It is stored at the address input of lookup table 502 and held until l/N appears and stabilizes at first input register 402.404. They are input to the first and second input registers 402 and 404, respectively, in synchronization with the clock.

また、DELTA Vの値は、それが、MAG入力で安
定するとすぐに、クロックに同期して第1入力レジスタ
に入力される。そして、N値の逆数は、それが安定した
時、クロックに同期して第2入力レジスタに入力される
。MへG入力でのデータの安定性は、ROMアクセス時
間を考慮にいれた適切なりロッキング機構の採用により
容易に確保される。
The value of DELTA V is also clocked into the first input register as soon as it is stable at the MAG input. Then, when the reciprocal of the N value becomes stable, it is input to the second input register in synchronization with the clock. Data stability at the M to G input is easily ensured by employing an appropriate locking mechanism that takes into account ROM access time.

乗算−アキュムレートモードに設定されているため、M
ACは1/NにDEL丁E Vを乗する。この結果は出
力レジスタ410,412,414の最初の内容に加え
られる。累積された値は、クロックに同期して出力レジ
スタ410.412.41.4に入力される。つぎに、
乗算の結果は再クロックされ、出力レジスタ値と共に累
積される。このプロセスは、補間がなされるべきステッ
プの総数だけ繰り返し続けられる。
Since it is set to multiply-accumulate mode, M
AC multiplies 1/N by DEL DEV. This result is added to the initial contents of output registers 410, 412, 414. The accumulated value is input to the output register 410.412.41.4 in synchronization with the clock. next,
The result of the multiplication is reclocked and accumulated with the output register value. This process continues to repeat for the total number of steps for which interpolation is to be done.

このことは、単に、MAC出力レジスタ410,412
゜414をDELTA V値を変化させるべきステップ
の数に等しい回数だけクロックキングさせることが必要
になる。
This simply means that the MAC output registers 410, 412
414 a number of times equal to the number of steps in which the DELTA V value is to be changed.

X、Yの値を正しくプロットするために、ある値をプロ
ットするYが各クロックサイクル毎にMSP レジスタ
412に格納されいる間、Xは各クロックサイクル毎に
1ずつ増加する。Yが零以外の初期値を持つ時、初期設
定の間、MSPレジスタ412はその値(YO)にプリ
ロードされる。初期Y値をロードする機能は、ラインク
リッピング操作において、大きな意味がある。
In order to correctly plot the values of X, Y, X is incremented by 1 each clock cycle while the value of Y to be plotted is stored in the MSP register 412 each clock cycle. When Y has an initial value other than zero, the MSP register 412 is preloaded to that value (YO) during initialization. The ability to load initial Y values has great significance in line clipping operations.

ラインクリッピングを行う場合には、MACはラインの
生成と同様なプログラムが施される。初期の乗算・アキ
ュムレート動作において、第1入力レジスタ402につ
いては、ラインの見え得る部分に達するステップ数がロ
ードされていることを除いて(すなわちn*DELTA
 V) 、木質的な初期設定は同じである。
When line clipping is performed, the MAC is programmed in the same way as for line generation. In the initial multiply-accumulate operation, the first input register 402 is loaded with the number of steps to reach the visible portion of the line (i.e., n*DELTA
V), the woody initial settings are the same.

最初の乗算・アキュムレート動作は、あたかもnステッ
プが、16ビツトの小数のエラータームを含めて、この
設定を達成するために取入れられているかのように(す
なわち、その結果はn◆DELTAV/N)、出力レジ
スタをセットアツプする。かくして、最初の点がプロッ
トされる。
The first multiply-accumulate operation is as if n steps were taken to achieve this configuration, including a 16-bit fractional error term (i.e., the result is n◆DELTAV/N ), set up the output registers. Thus, the first point is plotted.

次に、標準のライン・トロウィング・ルーチーンとして
、第1入力レジスタにはDELTA Vがロードされる
。そして、通常ラインの終りに達するまで、或いは、ラ
インがウィンドウと交差するまで、そのアルゴリズヌは
進行する。MACはn*DELTA Vの初期計算に使
用される。
The first input register is then loaded with DELTA V as a standard line trowing routine. The algorithm then proceeds until the end of the line is normally reached or the line intersects the window. MAC is used for the initial calculation of n*DELTA V.

本発明方法の好適な実施例において、NとDELTA 
Vは16ビツト2進数として表される。ROMルックア
ップテーブル502は、各々のアドレス領域における各
々のアドレスの逆数で、できれば、無記号の分数表示で
プログラムされる。
In a preferred embodiment of the method of the invention, N and DELTA
V is expressed as a 16-bit binary number. ROM lookup table 502 is programmed with the reciprocal of each address in each address area, preferably in unsigned fractional representation.

言い替えれば、2は16進数8000をもたねばならな
い。アドレス4は、4000もたなければならない。ア
ドレス1と0は特別なケースであって、MACプログラ
ミング・アルゴリズム(第5図参照)が零の場合を考え
なければならない。MへC動作はただ一つの点、をプロ
ットする場合には必要とされない。それはソフトウェア
−で十分処理出来るからである。
In other words, 2 must have the hexadecimal value 8000. Address 4 must have 4000. Addresses 1 and 0 are special cases, and the MAC programming algorithm (see Figure 5) must consider the zero case. The M to C operation is not required when plotting only a single point. This is because it can be fully processed by software.

都合の良い事に、マイナスのスロープの値は必要でない
。ゴウラウト・シェイディングにおいて、DDAは常に
数字的に低位のシェイドから出発し、上位にあがってゆ
く。ラインを描く場合、DDAは常に終点が結果的に正
のスロープになるようなところから進行する。−たびプ
ログラムされると、ルックアップテーブルRf)Mの出
力からは、アドレス入力で保持されているN値の逆数が
当然に生じる。
Conveniently, negative slope values are not required. In Golaut shading, DDA always starts from the numerically lowest shade and works its way up. When drawing a line, DDA always proceeds from a point where the end point results in a positive slope. - Once programmed, the output of the look-up table Rf)M naturally yields the reciprocal of the N value held at the address input.

都合の良い事に、MACへの各入力は分離されたバス上
にあり、従って、二つの入力は一緒にまたは別個にロー
ドされる。同様に、出力レジスタは、入力レジスタとは
別個にクロックされる。そのため、ラインを描いたりラ
インをシエイト(5hade)するために、−度だけク
ロックされればよく、また、与えられた領域に対してク
リップするために、入力レジスタは二度だけクロックさ
れればよい。
Conveniently, each input to the MAC is on a separate bus, so the two inputs can be loaded together or separately. Similarly, output registers are clocked separately from input registers. Therefore, to draw a line or shade a line (5hades), the input register only needs to be clocked - degrees, and to clip to a given region, the input register only needs to be clocked twice. .

結 論 本発明を実施することにより、当業者は多くの改良をな
しとげることができる。例えば、より大きな(つまり、
16ビツト以上) MACは、正確さを改良するために
使用されることができる。マルチプレクサは、出力レジ
スタのどの部分が使用されるかを選択するために、出力
側に置くことができる。このことは、様々なアプリケー
ションに対して、整数および分数サイズの様々な混合を
可能にする。
Conclusion Many improvements can be made by those skilled in the art by practicing the present invention. For example, larger (i.e.
(16 bits or more) MAC can be used to improve accuracy. A multiplexer can be placed on the output side to select which part of the output register is used. This allows different mixes of integer and fractional sizes for different applications.

本発明によるシステムおよび方法は、アルゴリズムの最
初においてアキュムレータと共にNIDELTA Vを
ひとたび計算するために、内部計算ループのみで加算器
を使用するよう変更することができる。このことは、高
度の正確性が求められるならば、特に有用である。
The system and method according to the invention can be modified to use the adder only in the inner calculation loop to calculate NIDELTAV once with the accumulator at the beginning of the algorithm. This is particularly useful if a high degree of accuracy is required.

本発明による方法は、ODAの設定されたステップの数
を変えるために、同じハードウェアを使用して容易に変
更することができる。このことは並列プロセッサを使用
する時、非常に有用である。
The method according to the invention can be easily modified using the same hardware to vary the number of configured steps of the ODA. This is very useful when using parallel processors.

すなわち、あるラインに沿ってビクセルのシェイディン
グを計算するプロセッサが一つ以上ある場合に、有用で
ある。例えば、あるグラフィック・システムがX方向に
5つのプロセッサを持っている場合(各々が5つのグル
ープの中の一つのピクセルを担当する)、−ステップで
5つのシェイディング値を計算する必要がある。本発明
のシステムおよび方法は、各サイクル毎に5つのステッ
プを実行するよう各プロセッサのMACをセットアツプ
することにより、このことを容易に行うことができる。
That is, it is useful when there is more than one processor computing the shading of pixels along a line. For example, if a graphics system has 5 processors in the X direction (each responsible for one pixel in a group of 5), then 5 shading values need to be calculated in -steps. The system and method of the present invention facilitates this by setting up each processor's MAC to perform five steps every cycle.

従りて、上述した好適な実施例は本発明の典型的な一例
として記述されたものであり、本発明の要旨を逸脱しな
い範囲の変更・修正が可能である。
Therefore, the preferred embodiment described above has been described as a typical example of the present invention, and changes and modifications can be made without departing from the gist of the present invention.

[発明の効果] 本発明の方法によれば、プログラマ−は線形補間の最良
の方法を得ることができる。MACハードウェアは、単
純DDAに固有な分割なしで、プレセンハムのアルゴリ
ズムに関連したサブセットラインの問題なしで、ざらに
増加ステップの数がステップの見いだされる値の範囲よ
りも小さい場合を扱うためにしばしば要求される付加コ
ードを要求することなく、DDAが迅速に実行されるこ
とが可能になる。
[Effects of the Invention] According to the method of the present invention, the programmer can obtain the best method of linear interpolation. MAC hardware is often used to handle cases where the number of coarsely increasing steps is smaller than the range of values found for the steps, without the partitioning inherent in simple DDA, and without the subset line problems associated with Presenham's algorithm. DDA can be executed quickly without requiring any additional code required.

ハードウェアを使用してDDAを実行することにより、
線形補間に関する多くの問題は解決される。例えばひと
つの実施例として、ラインクリッピングが′簡単かつ正
確に行えることである。 MACを適当に初期化するこ
とにより、いかなるピッチのラインもウィンドウの境界
線ですばやくクリップされる。MAC入力の1つに、ハ
ードウェア・ルックアップ・テーブルを加えることによ
り、システムのオペレーションを分割する必要がなくな
り、従ってプレセンハム型アルゴリズムの必要がなくな
る。このシステムと方法は、サブセットラインに関して
長い間解決されなかった問題を解決する。
By performing DDA using hardware,
Many problems with linear interpolation are solved. For example, in one embodiment, line clipping can be done easily and accurately. By properly initializing the MAC, lines of any pitch will be quickly clipped at the window borders. By adding a hardware lookup table to one of the MAC inputs, there is no need to partition the operation of the system, thus eliminating the need for a Presenham-type algorithm. This system and method solves a long unsolved problem with subset lines.

その上、木発明の方法はいかなる値の範囲、または、い
かなるステップ数を補間する場合にも使用できる。Nと
DELT八Vのへの相対的なサイズは、この方法に少し
も影晋を与えるものではない。本発明によれは余分なコ
ードの必要をなくす。また、本発明によれは、補間が行
われるチップにわたり、ステップの数より値の範囲が大
きいという1次元的問題を解決するために、ODAを実
行させることができる。
Moreover, the tree method can be used to interpolate any range of values or any number of steps. The relative sizes of N and DELT8V do not affect this method in any way. The present invention eliminates the need for extra code. The present invention also allows ODA to be performed to solve one-dimensional problems where the range of values is larger than the number of steps across the chips on which the interpolation is performed.

ある実施例において、この方法はラインのボウラウド・
シェイデイングに使用される。MMC入力の1つは、デ
ルタ色(色の量はラインに沿って変わる)でロードされ
、他の入力はラインの長さの逆数によってロードされる
。MへG結果レジスタの高位の部分(MSC)は、スタ
タート色で前もってロードされている。ItOMルック
アップテーブルを使用することにより、ラインの長さの
逆数はプログラムを使って計算する必要がない。プログ
ラムはルックアップテーブルの入力の時に、実際のライ
ンの長さを単純に把握している。そして、その逆数は自
動的に生成され、ソフトウェアの計算は必要とされない
。ピクセルが描かれる時はいつもMACの2つの入力は
乗算され、最初の結果に加えられる。結果の高位の部分
は、各々のピクセルの色として使用される。そして、結
果の累積された低位の部分がオーバーフローを起こした
時、自動的に変化する。
In some embodiments, the method includes a bow-loud line
Used for shading. One of the MMC inputs is loaded with the delta color (the amount of color varies along the line) and the other input is loaded with the inverse of the line length. The high part of the M to G result register (MSC) is preloaded with the starter color. By using the ItOM lookup table, the reciprocal of the line length does not need to be calculated programmatically. The program simply knows the actual line length when entering the lookup table. The reciprocal is then automatically generated and no software calculations are required. Whenever a pixel is drawn, the two inputs of the MAC are multiplied and added to the first result. The high part of the result is used as the color of each pixel. Then, when the accumulated lower part of the result overflows, it changes automatically.

本発明の方法により、各々のピクセルの変化のユは、ラ
インの長さによって分割されたデルタの色となる。それ
故、最後の色は、最初の色プラスデルタの色である。
With the method of the invention, each pixel change is a delta color divided by the length of the line. Therefore, the last color is the first color plus delta color.

都合の良いことに、この方法は、ビット・スライス・プ
ロセッサとマイクロプロセッサを実装した多くのCPU
ですでに使用可能な、単純なMACハードウェアを使用
することがてきる。MAC集積回路は、それをまだ使用
していないシステムに、安価で実装することができる。
Conveniently, this method is compatible with many CPUs implementing bit slice processors and microprocessors.
It is possible to use simple MAC hardware that is already available. MAC integrated circuits can be inexpensively implemented into systems that do not already use them.

本発明による方法の一つの実施例では、MACによる処
理のためにデータが提供されている時、自動的に逆数演
算を行うルックアップテーブルを使用することかできる
。このルックアップテーブルを使用すれば、時間のかか
る分割操作(divide operation)の必
要がなくなり、CPUの費用を軽減することができる。
In one embodiment of the method according to the invention, a look-up table can be used to perform automatic reciprocal operations when data is provided for processing by the MAC. Using this lookup table eliminates the need for time-consuming divide operations, reducing CPU costs.

それ故、本発明の方法は、分割操作を行うアルゴリズム
を避けるために、従来必要とされたものを必要としない
Therefore, the method of the present invention does not require algorithms that perform partitioning operations as previously required.

本発明の方法は多くの補間の問題を解決するために使用
されることができる。そして、多くの場合費用がかから
ない。
The method of the invention can be used to solve many interpolation problems. And in many cases it costs nothing.

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

第1図は典型的なライン補間問題を示す図、第2図はX
釉から45度以上で描かれたラインの補間の問題を示す
図、 第3図はクリッピングに関する問題を示す図、第4図は
本発明の一実施例による乗算器アキュムレータを示すブ
ロック図、 第5図は木発明のその他の実施例による乗算器アキュム
レータおよびルックアップ・テーブル・メモリを示すブ
ロック図、 第6図は本発明の一実施例によるODAの処理手順を示
すフローチャートである。 Y卸 Figure 1 Y軸 Figure 2
Figure 1 shows a typical line interpolation problem, Figure 2 shows the
FIG. 3 is a diagram illustrating a problem with clipping; FIG. 4 is a block diagram illustrating a multiplier accumulator according to an embodiment of the present invention; FIG. FIG. 6 is a block diagram showing a multiplier accumulator and lookup table memory according to another embodiment of the tree invention, and FIG. 6 is a flowchart showing the ODA processing procedure according to one embodiment of the invention. Y-axis Figure 1 Y-axis Figure 2

Claims (1)

【特許請求の範囲】 1)所定長さのラインにわたって線型補間を行う方法で
あって、 (a)乗算器アキュムレータの出力レジスタのいずれを
も予め定めた初期値で初期化するステップと、 (b)前記乗算器アキュムレータの第1入力レジスタを
前記ラインの前記長さにわたる出力値の増分変化に等し
い値でロードするステップと、 (c)前記乗算器アキュムレータの第2入力レジスタを
前記ラインの長さの逆数に等しい値でロードするステッ
プと、 (d)前記乗算器アキュムレータによりその第1および
第2入力の値を乗算するステップと、 (e)ステップ(d)の結果の分数部分を第1出力レジ
スタに累積するステップと、 (f)ステップ(d)の結果の整数部分を前記第1出力
レジスタのオーバーフローと加算して第2出力レジスタ
に累積して累積された結果を形成するステップと を備えたことを特徴とする線型補間法。 2)ゴウラウド・シェーディングを生成するために、前
記第2出力レジスタを初期化するのに用いられる予め定
めた値は出発シェードを表わし、前記増分変化は前記ラ
インの長さにわたってのシェードの変化を表わし、累算
された結果は所定ディスプレイ区域に対するシェード値
を表わすことを特徴とする方法。 3)メモリにストアされたルックアップ・テーブルを使
用して前記ラインの長さの逆数を決定するステップをさ
らに備えたことを特徴とする請求項1に記載の方法。 4)前記ルックアップ・テーブルの出力を前記第2入力
レジスタに直接にロードすることを特徴とする請求項3
に記載の方法。 5)前記ステップ(d)、(e)および(f)を、色の
変化が起こるはずのディスプレイ区域の個数に等しい予
め定めた回数だけ繰返すステップをさらに備えたことを
特徴とする請求項2に記載の方法。 6)前記ディスプレイ区域の各々はピクセルであること
を特徴とする請求項5に記載の方法。 7)前記ディスプレイ区域の各々はパッチであることを
特徴とする請求項5に記載の方法。 8)2つの方向性成分をもち、所定の長さをもつライン
をクリップして、そのラインのうちの予め定めたセグメ
ントのみを表示する方法であって、 (a)乗算器アキュムレータの出力レジスタのいず れ
をも予め定めた初期値で初期化するステップと、 (b)前記乗算器アキュムレータの第1入力レジスタを
前記ラインの一方の方向性成分の長さに等しい値でロー
ドするステップと、 (c)前記乗算器アキュムレータの第2入力レジスタを
前記ラインの長さの他方の方向性成分の長さの逆数に等
しい値でロードするステップと、 (d)前記乗算器アキュムレータによりその第1および
第2入力レジスタにおける値を乗算するステップと、 (e)ステップ(d)の結果の分数部分を第1出力レジ
スタに累積するステップと、 (f)第2出力レジスタにおける前記第1出力レジスタ
のオーバーフローを累積するステップと、 (g)ステップ(d)の結果の整数部分を前記第2出力
レジスタに累積するステップと、(h)第2出力レジス
タにおける値が変化する度毎に、点をディスプレイ装置
のピクセル上に描かせ、ピクセルは前記第2出力レジス
タにストアされている値に応じて決定される少なくとも
ひとつの座標値を有するステップと を備えたことを特徴とする方法。 9)前記第2出力レジスタを初期化するのに用いられる
予め定めた値は前記ラインの予め定めたセグメントのス
タート点を表わすことを特徴とする請求項8に記載の方
法。 10)メモリにストアされたルックアップ・テーブルを
使用して前記ラインの長さの逆数を決定するステップを
さらに具えたことを特徴とする請求項8に記載の方法。 11)前記ルックアップ・テーブルの出力を前記第2入
力レジスタに直接にロードするステップをさらに備えた
ことを特徴とする請求項10に記載の方法。 12)前記ステップ (d)、(e)、(f)、(g)
および(h)を、ライン長の変化が起こるはずの点の個
数に等しい予め定めた回数だけ繰り返すステップをさら
に備えたことを特徴とする請求項8〜11のいずれかの
項に記載の方法。 13)前記点の各々はピクセルであることを特徴とする
請求項12に記載の方法。 14)前記点の各々はパッチであることを特徴とする請
求項12に記載の方法。
[Claims] 1) A method of performing linear interpolation over a line of predetermined length, comprising the steps of: (a) initializing any of the output registers of a multiplier accumulator with a predetermined initial value; ) loading a first input register of the multiplier accumulator with a value equal to the incremental change in output value over the length of the line; and (c) loading a second input register of the multiplier accumulator with a value equal to the incremental change in output value over the length of the line. (d) multiplying the values of its first and second inputs by said multiplier accumulator; and (e) loading the fractional part of the result of step (d) to a first output. (f) adding an integer portion of the result of step (d) with the overflow of the first output register and accumulating it in a second output register to form an accumulated result. A linear interpolation method characterized by 2) to generate Gouraud shading, the predetermined value used to initialize the second output register represents a starting shade, and the incremental change represents a change in shade over the length of the line; , wherein the accumulated result represents a shade value for a predetermined display area. 3. The method of claim 1, further comprising the step of: 3) determining the reciprocal of the line length using a lookup table stored in memory. 4) Loading the output of the lookup table directly into the second input register.
The method described in. 3. The method of claim 2, further comprising the step of: 5) repeating steps (d), (e) and (f) a predetermined number of times equal to the number of display areas in which the color change is to occur. Method described. 6) The method of claim 5, wherein each of the display areas is a pixel. 7) The method of claim 5, wherein each of the display areas is a patch. 8) A method for displaying only a predetermined segment of the line by clipping a line having two directional components and a predetermined length, the method comprising: (b) loading a first input register of the multiplier accumulator with a value equal to the length of one directional component of the line; (c) loading a second input register of said multiplier accumulator with a value equal to the reciprocal of the length of the other directional component of said line length; (e) accumulating a fractional portion of the result of step (d) in a first output register; and (f) overflowing the first output register in a second output register. (g) accumulating an integer portion of the result of step (d) in said second output register; and (h) displaying a point on a display device each time the value in the second output register changes. the pixel having at least one coordinate value determined in response to a value stored in the second output register. 9) The method of claim 8, wherein the predetermined value used to initialize the second output register represents the starting point of a predetermined segment of the line. 9. The method of claim 8, further comprising: 10) determining the reciprocal of the line length using a lookup table stored in memory. 11. The method of claim 10, further comprising: 11) directly loading the output of the lookup table into the second input register. 12) Steps (d), (e), (f), (g)
12. A method according to any one of claims 8 to 11, further comprising repeating (h) a predetermined number of times equal to the number of points at which the change in line length is to occur. 13) The method of claim 12, wherein each of the points is a pixel. 14) The method of claim 12, wherein each of the points is a patch.
JP7160589A 1988-03-23 1989-03-23 Interpolation and digital differential analysis Pending JPH0215384A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
GB8806880 1988-03-23
GB8806879A GB2215960A (en) 1988-03-23 1988-03-23 Linear interpolation method
GB8806879 1988-03-23
GB8806880A GB2215961A (en) 1988-03-23 1988-03-23 Line clipping for a viewport display

Publications (1)

Publication Number Publication Date
JPH0215384A true JPH0215384A (en) 1990-01-19

Family

ID=26293677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7160589A Pending JPH0215384A (en) 1988-03-23 1989-03-23 Interpolation and digital differential analysis

Country Status (3)

Country Link
EP (1) EP0334600A3 (en)
JP (1) JPH0215384A (en)
CA (1) CA1304507C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9312747D0 (en) * 1993-06-21 1993-08-04 Questech Ltd A device for use in digital processing of a graphic image containing a straight line

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4667306A (en) * 1983-07-20 1987-05-19 Ramtek Corporation Method and apparatus for generating surface-fill vectors
DE3376594D1 (en) * 1983-12-22 1988-06-16 Ibm Area filling hardware for a colour graphics frame buffer

Also Published As

Publication number Publication date
EP0334600A2 (en) 1989-09-27
CA1304507C (en) 1992-06-30
EP0334600A3 (en) 1991-07-03

Similar Documents

Publication Publication Date Title
US5973705A (en) Geometry pipeline implemented on a SIMD machine
JP2501580B2 (en) Curved image visual display generator
US5088054A (en) Computer graphics hidden surface removal system
EP0551543A1 (en) Method of modifying a geometric object and computer aided design system
US4855935A (en) Method and apparatus for rendering vectors using bresenham parameters
US5214754A (en) Method and apparatus for approximating polygonal line to curve
US5528738A (en) Method and apparatus for antialiasing raster scanned, polygonal shaped images
US5303321A (en) Integrated hardware generator for area fill, conics and vectors in a graphics rendering processor
EP0718797B1 (en) Perspective correction of texture in graphics by adaptive approximation
US5604852A (en) Method and apparatus for displaying a parametric curve on a video display
EP0314289B1 (en) Multiple pixel generator
US6181355B1 (en) Graphics processing with transcendental function generator
US6865301B1 (en) Reducing aliasing artifacts when shaping a digital image
EP0349182B1 (en) Method and apparatus for approximating polygonal line to curve
US6061066A (en) Method and apparatus for creating perspective correct graphical images
US7015930B2 (en) Method and apparatus for interpolating pixel parameters based on a plurality of vertex values
JPH0215384A (en) Interpolation and digital differential analysis
US5627956A (en) Run slice line draw engine with stretching capabilities
JPH0758510B2 (en) Three-dimensional graphic processor
US5167018A (en) Polygon-filling apparatus
US5617524A (en) Run slice line draw engine with shading capabilities
EP0389890A2 (en) Method and apparatus for generating figures with three degrees of freedom
GB2215961A (en) Line clipping for a viewport display
GB2215960A (en) Linear interpolation method
US5611029A (en) Run slice line draw engine with non-linear shading capabilities