JPH0223884B2 - - Google Patents
Info
- Publication number
- JPH0223884B2 JPH0223884B2 JP57049616A JP4961682A JPH0223884B2 JP H0223884 B2 JPH0223884 B2 JP H0223884B2 JP 57049616 A JP57049616 A JP 57049616A JP 4961682 A JP4961682 A JP 4961682A JP H0223884 B2 JPH0223884 B2 JP H0223884B2
- Authority
- JP
- Japan
- Prior art keywords
- axis direction
- signal
- circuit
- calculation means
- arithmetic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/02—Digital function generators
- G06F1/03—Digital function generators working, at least partly, by table look-up
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
- Image Processing (AREA)
- Image Generation (AREA)
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、2次曲線を高速に発生できるノンパ
ラメトリツク方式による図形発生装置に関する。
本発明は、このノンパラメトリツク方式の図形発
生装置において、現在の座標点から次に進む点
を、X軸方向およびY軸方向をを含み相互に45度
ずつ異なる8方向のいずれかの一つの方向へ所定
の1ステツプ進めて発生する8画素連結方式と、
X軸方向およびY軸方向の4方向のいずれかの一
つの方向へ所定の1ステツプ進めて発生する4画
素連結方式とを兼用するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a nonparametric graphic generation device that can generate quadratic curves at high speed.
In this non-parametric figure generator, the present invention allows the next point to proceed from the current coordinate point to one of eight directions that differ by 45 degrees from each other, including the X-axis direction and the Y-axis direction. An 8-pixel concatenation method that occurs by advancing one predetermined step in the direction,
This method is also used as a four-pixel concatenation method in which pixels are generated by advancing one predetermined step in one of the four directions of the X-axis direction and the Y-axis direction.
従来、高速に2次曲線を発生する装置として、
JORDANの方式を利用するもの(「IEEE
TRAN−SACTION ON COMPUTERS DEC、
1973.P.1052〜1060“An Improved Algorithm
for the Generation of Nonparametric
Curves”BERNARD W.JORDAN et al.」に詳
しい。)や本願と同一出願人による(「二次曲線信
号発生方法および装置」特願昭56−65795号、特
開昭57−182232号)を利用するものが知られてい
る。これらは、次に選ぶXY座標上の点の候補点
を8方向の点から第一段階で3点あるいは2点に
選択し、第二段階でこの候補点から絶対値が最小
となる1点を選択し、この点を次の点とするもの
である。
Conventionally, as a device that generates quadratic curves at high speed,
Those that use the JORDAN method (“IEEE
TRAN−SACTION ON COMPUTERS DEC,
1973.P.1052~1060 “An Improved Algorithm
for the Generation of Nonparametric
Curves"BERNARD W.JORDAN et al." ) and (Japanese Patent Application No. 56-65795, Japanese Patent Application Laid-Open No. 57-182232) by the same applicant as the present application ("Quadratic Curve Signal Generating Method and Apparatus") are known. In the first step, 3 or 2 points are selected as the next candidate points on the XY coordinates from the points in 8 directions, and in the second step, one point with the minimum absolute value is selected from these candidate points. Select this point and make this point the next point.
ここで図形発生の原理について説明する。 Here, the principle of figure generation will be explained.
二次曲線を f(X、Y)=0 と表現する。またこの曲線の一次微係数を fX=δf/δx、fY=δf/δy と表し、二次微係数を fXX=δ2f/δx2、fYY=δ2f/δy2 fXY=δ2f/δyx、 とする。 A quadratic curve is expressed as f(X, Y)=0. In addition , the first- order differential coefficient of this curve is expressed as f = δ 2 f/δyx,
いま、z=f(X、Y)とするとき、二次曲線
では幾つかの候補点からzの絶対値が最も最小と
なる点を選択していけば、f(X、Y)=0を近似
する図形を表示することができる。 Now, when z = f (X, Y), if we select the point where the absolute value of z is the smallest from several candidate points on the quadratic curve, we can make f (X, Y) = 0. Approximate figures can be displayed.
そして、X軸、Y軸方向の変位量をΔx、Δy
(このときΔx、Δyは0、+1、−1のいずれかを
とる)とし、現在座標位置をP0(x0、y0)とする
と、次の3式によつてその位置を決めることがで
きる。 Then, the displacement amounts in the X-axis and Y-axis directions are Δx and Δy
(At this time, Δx and Δy take either 0, +1, or -1) and the current coordinate position is P 0 (x 0 , y 0 ), then the position can be determined by the following three equations. can.
(1) Δx≠0、Δy=0のとき、
f(x0+Δx、Δy0)=f(x0、y0
+fx0・Δx+1/2fxx0・(Δx)2
(2) Δx=0、Δy≠0のとき、
f(x0、y0+Δy)=f(x0、y0)
+fy0・Δy+1/2fyy0・(Δy)2
(3) Δx≠0、Δy≠0のとき、
f(x0+Δx、y0+Δy)
=f(x0、y0)+fx0・Δx+fy0・Δy
+1/2(fxx0・(Δx)2+2fxy0・Δx・Δy
+fyy0・(Δy)2)
ここで、二次微係数は定数であるため、各変位
は加減演算だけで計算することができ、上述の(1)
〜(3)式を演算し、これらの絶対値を比較してその
最小の位置の座標位置を選択して次の座標位置と
し、順次更新していくことにより、二次曲線を描
くことができる。(1) When Δx≠0, Δy=0, f(x 0 +Δx, Δy 0 )=f(x 0 , y 0 +f x0・Δx+1/2f xx0・(Δx) 2 (2) Δx=0, Δy When ≠0, f(x 0 , y 0 +Δy)=f(x 0 , y 0 ) +f y0・Δy+1/2f yy0・(Δy) 2 (3) When Δx≠0, Δy≠0, f( x 0 + Δx, y 0 + Δy) = f (x 0 , y 0 ) + f x0・Δx+f y0・Δy +1/2 (f xx0・(Δx) 2 +2f xy0・Δx・Δy +f yy0・(Δy) 2 ) here Since the second-order differential coefficient is a constant, each displacement can be calculated only by addition and subtraction operations, and the above (1)
A quadratic curve can be drawn by calculating equation (3), comparing these absolute values, selecting the coordinate position of the minimum position and using it as the next coordinate position, and updating it sequentially. .
次に、第1図および第2図に従来例の構成を示
す。第2図は特願昭56−65795号に示される図形
発生装置の要部のブロツク構成図を示し、第1図
はこの第2図の出力回路16の構成を示してい
る。すなわち、マイクロプログラムが格納されて
いるプログラムメモリ10の出力は制御回路11
に導かれている。この制御回路11の制御出力は
レジスタ12、13および演算回路14にそれぞ
れ導かれている。この演算回路14の出力レジス
タ15に導かれるとともに、その最上位桁
(MSB)は上記制御回路11の符号レジスタに導
かれている。このレジスタ15の出力は上記レジ
スタ12および13にそれぞれ導かれている。 Next, FIGS. 1 and 2 show the configuration of a conventional example. FIG. 2 shows a block diagram of the essential parts of the graphic generator disclosed in Japanese Patent Application No. 56-65795, and FIG. 1 shows the configuration of the output circuit 16 shown in FIG. That is, the output of the program memory 10 in which the microprogram is stored is sent to the control circuit 11.
guided by. The control output of this control circuit 11 is led to registers 12, 13 and an arithmetic circuit 14, respectively. The signal is led to the output register 15 of the arithmetic circuit 14, and its most significant digit (MSB) is led to the sign register of the control circuit 11. The output of this register 15 is led to the registers 12 and 13, respectively.
この制御回路11の出力回路16から、X座標
値を保持するアツプダウンカウンタ18およびY
座標値を保持するアツプダウンカウンタ19の入
力端子にΔX信号およびΔY信号をそれぞれ導き、
加減端子には、sign〔X〕信号およびsign〔Y〕信
号をそれぞれ導く。そして、このアツプダウンカ
ウンタ18および19の値がCRTやプロツタ等
の表示装置に取り出されて二次曲線が描かれる。 From the output circuit 16 of this control circuit 11, an up/down counter 18 that holds the X coordinate value and a Y
The ΔX signal and ΔY signal are respectively guided to the input terminals of the up-down counter 19 that holds the coordinate values.
A sign [X] signal and a sign [Y] signal are respectively led to the adjustment terminal. Then, the values of the up-down counters 18 and 19 are taken out to a display device such as a CRT or a plotter, and a quadratic curve is drawn.
この二次函数曲線表示装置は、二次函数f(X、
Y)=0をXY座標上に表示する場合に、点(X、
Y)におけるX方向、Y方向の一次微係数をfX、
fYとしたとき、つぎの三段階の演算判断過程を行
う。 This quadratic function curve display device displays the quadratic function f(X,
When displaying the point (X,
The first-order differential coefficients in the X and Y directions in
When f Y , the following three steps of calculation and judgment process are performed.
まず一次微係数fX、fYの符号の正負を判断する
ことによつて、次にすすむ候補点が8点から3点
に制限される。すなわち、二次函数では一次微係
数によりその接線方向が求められる。したがつて
一次微係数の符号の正負を判断すれば次に進むべ
き点が4象限のうちどの象限に属するかが決定さ
れるためである。 First, by determining whether the signs of the first-order differential coefficients f X and f Y are positive or negative, the number of candidate points to proceed to next is limited from eight to three. That is, in the case of a quadratic function, its tangential direction is determined by the first-order differential coefficient. Therefore, by determining whether the sign of the first-order differential coefficient is positive or negative, it is determined to which of the four quadrants the next point belongs.
次に一次微係数fX、fYの絶対値の大小を比較す
ることによつて次に選ぶべき候補点を2点に制限
する。すなわち、一次微係数fX、fYの絶対値を比
較することにより、次に選ぶべき点をX軸方向の
点と、これと正または負方向に45度の方向をもつ
点との2点あるいはY方向の点とこれと正または
負方向に45度の方向をもつ点との2点に制限す
る。 Next, the candidate points to be selected next are limited to two points by comparing the absolute values of the first-order differential coefficients f X and f Y . In other words, by comparing the absolute values of the first-order differential coefficients f Alternatively, limit it to two points: a point in the Y direction and a point with a direction of 45 degrees in the positive or negative direction.
そしてこの制限された2点について、その一次
微係数fX、fYを座標X、Yに入れてf(X、Y)
の値を演算し、この新しいf(X、Y)の値G0、
G1の絶対値を比較し、そのG0、G1が小さい値を
与える方の座標X、Yを次のすすむべき点として
選択する。 Then, for these two restricted points, put their first-order differential coefficients f X and f Y into the coordinates
calculate the value of this new f(X, Y) value G 0 ,
The absolute values of G 1 are compared, and the coordinates X and Y for which G 0 and G 1 give smaller values are selected as the next point to proceed to.
そしてこの点を次の演算過程の初期値として用
いて順次演算を繰り返すことにより、f(X、Y)
=0の二次函数図形信号を発生する。 Then, by using this point as the initial value for the next calculation process and repeating the calculation in sequence, f(X, Y)
A quadratic function graphic signal of =0 is generated.
第1図に示される出力回路は、上述の第2図に
示される出力回路16の構成を示しており、以下
のとおり動作する。次の点が決定されると入力端
子1に図形信号送出出力が論理「1」信号として
入力し、アンド回路2および3を開く。この決定
された次の点が45度方向の点であれば入力端子4
に論理「1」が与えられオア回路5,6、アンド
回路2,3を通つてX軸座標用のアツプダウンカ
ウンタ7、Y軸座標用のアツプダウンカウンタ8
に入力を与える。これにより、アツプダウンカウ
ンタ7,8はsign〔X〕信号、sign〔Y〕信号に従
つてそれぞれ加算あるいは減算され45度方向の図
形信号を発生する。 The output circuit shown in FIG. 1 has the configuration of the output circuit 16 shown in FIG. 2 described above, and operates as follows. When the next point is determined, the graphic signal sending output is inputted to input terminal 1 as a logic "1" signal, and AND circuits 2 and 3 are opened. If this determined next point is a point in the 45 degree direction, input terminal 4
Logic "1" is given to the circuits 5 and 6, and the AND circuits 2 and 3 are applied to the up-down counter 7 for the X-axis coordinate and the up-down counter 8 for the Y-axis coordinate.
give input to . As a result, the up-down counters 7 and 8 add or subtract, respectively, in accordance with the sign [X] signal and the sign [Y] signal to generate graphic signals in the 45-degree direction.
また、この決定された次の点がX方向の点であ
れば、入力端子9に論理「1」が与えられ、オア
回路5、アンド回路2を通つてアツプダウンカウ
ンタ7を加算あるいは減算してX方向の図形信号
を発生する。 Furthermore, if this determined next point is a point in the X direction, logic "1" is given to the input terminal 9, and the up-down counter 7 is added or subtracted through the OR circuit 5 and the AND circuit 2. Generates a graphic signal in the X direction.
また、この決定された次の点がY方向の点であ
れば、入力端子9に論理「0」が与えられ、イン
バータで論理「1」が反転され、オア回路6、ア
ンド回路3を通つてアツプダウンカウンタ8を加
算あるいは減算してY方向の図形信号を発生す
る。 Furthermore, if this determined next point is a point in the Y direction, logic "0" is given to the input terminal 9, logic "1" is inverted by the inverter, and the logic is passed through the OR circuit 6 and the AND circuit 3. The up-down counter 8 is added or subtracted to generate a graphic signal in the Y direction.
しかし、このような従来装置では、制御方式が
8画素連結方式に固定されており、斜め方向に直
接ステツプできない4画素連結方式には使用でき
ない。これを解決するものとして、再方式を兼用
する図形発生装置も知られている。しかし、内部
の演算式や制御プログラムをその都度変更する必
要があり、装置が複雑化し装置も高価となる。
However, in such conventional devices, the control method is fixed to the 8-pixel connection method, and cannot be used in the 4-pixel connection method, which cannot directly step in diagonal directions. As a solution to this problem, a graphic generation device that also uses a reprocessing method is also known. However, it is necessary to change internal arithmetic expressions and control programs each time, making the device complex and expensive.
本発明はこのような問題を解決するもので、8
画素連結方式あるいは4画素連結方式のいずれで
も表示を行うことができ、しかもこのための付加
回路も複雑とならず、装置も安価に構成すること
ができる図形発生装置を提供することを目的とす
る。 The present invention solves these problems and has 8
It is an object of the present invention to provide a graphic generation device that can perform display using either a pixel connection method or a four-pixel connection method, does not require complicated additional circuits, and can be constructed at low cost. .
本発明は、各係数、各パラメタを格納する少な
くとも二個のレジスタと、このレジスタからの信
号を加減演算するとともにその演算結果を上記レ
ジスタに格納する演算回路と、この演算回路から
の演算結果により所定の演算シーケンスにより、
上記演算回路に演算指示信号を与える制御回路
と、X座標、Y座標の座標位置信号を保持し、上
記制御回路から座標位置の増減信号が与えられる
二個のアツプダウンカウンタとを備え、現在の座
標点からXY平面上でX軸およびY軸を含み互い
に45度ずつ異なる8方向のいずれかの方向へ所定
の1ステツプを進めることにより、与えられた二
次函数の図形信号をX軸方向の増減分またはY軸
方向の増減分として発生する装置であつて、上記
制御回路と演算回路とが構成する演算手段は、上
記与えられた二次函数のXの一次微係数fXおよび
Yの一次微係数fYの正負の符号を判断することに
より、次のすすむべき点がX軸方向から正方向ま
たは負方向およびY軸方向から正方向または負方
向にある上記8方向のうちの3点を選択する第一
の演算手段と、上記Xの一次微係数の絶対値|fX
|および上記Yの一次微係数の絶対値|fY|の大
小を比較してつぎにすすむべき点を上記8方向の
うち、X軸方向およびこれと45度異なる方向また
はY軸方向およびこれと45度異なる方向である2
点を選択する第二の演算手段と、この第二の演算
手段で得られた2点についてその座標値を上記二
次函数に代入してその函数値を求め、この函数値
の絶対値を比較して小さい方を選択することによ
つて次にすすむべき点がX軸方向またはこれと45
度異なる方向あるいはY軸方向またはこれと45度
異なる方向かを決定する第三の演算手段とを含
み、上記制御回路は、この第一ないし第三の演算
手段の演算結果により、次にすすむべきX座標、
Y座標の増減信号を送出する出力回路を備えた図
形発生装置において、
この出力回路に、8画素連結か4画素連結かを
選択させる選択手段を備え、この選択手段で4画
素連結が選択された場合には、上記第二の演算手
段の演算が終了した段階で2点に共通するX軸方
向またはY軸方向の増減信号を出力する手段と、
上記第三の演算手段の演算が終了した段階でX軸
方向あるいはY軸方向と45度異なる方向の点が決
定された場合上記出力されたX軸方向またはY軸
方向の増減信号に加えて、上記第三の演算手段で
決定された点のY軸方向またはX軸方向の増減信
号を出力する手段とを備えたことを特徴とする。
The present invention includes at least two registers that store each coefficient and each parameter, an arithmetic circuit that adds and subtracts signals from these registers and stores the arithmetic results in the register, and an arithmetic result from this arithmetic circuit. With a predetermined sequence of operations,
It is equipped with a control circuit that provides an operation instruction signal to the above-mentioned arithmetic circuit, and two up-down counters that hold coordinate position signals of X and Y coordinates and to which an increase/decrease signal of the coordinate position is given from the control circuit. By taking a predetermined step in one of eight directions that differ by 45 degrees from each other on the XY plane, including the It is a device that generates an increment/decrement or an increment/decrement in the Y-axis direction, and the arithmetic means constituted by the control circuit and the arithmetic circuit calculates the first-order differential coefficient f X of the given quadratic function and the first-order Y By determining the sign of the differential coefficient f The first calculation means to be selected and the absolute value of the first-order differential coefficient of the above X | f X
| and the absolute value of the first-order differential coefficient of Y above |f Y 2 which are 45 degrees different directions
A second calculation means for selecting a point, and the coordinate values of the two points obtained by this second calculation means are substituted into the quadratic function to obtain the function value, and the absolute value of the function value is compared. By selecting the smaller one, the next point to proceed to is in the X-axis direction or 45
and a third calculation means for determining whether the direction is different by 45 degrees, the Y-axis direction, or a direction different from this by 45 degrees, and the control circuit determines which direction to proceed next based on the calculation results of the first to third calculation means. X coordinate,
In a graphic generator equipped with an output circuit that sends out Y-coordinate increase/decrease signals, the output circuit is provided with selection means for selecting between 8-pixel connection and 4-pixel connection, and the selection means selects 4-pixel connection. In this case, means for outputting an increase/decrease signal in the X-axis direction or Y-axis direction common to the two points when the calculation by the second calculation means is completed;
When a point in a direction 45 degrees different from the X-axis direction or Y-axis direction is determined at the stage where the calculation of the third calculation means is completed, in addition to the increase/decrease signal in the X-axis direction or Y-axis direction outputted above, It is characterized by comprising means for outputting an increase/decrease signal in the Y-axis direction or the X-axis direction of the point determined by the third calculation means.
以下図面を参照して本発明実施例を説明する。 Embodiments of the present invention will be described below with reference to the drawings.
第3図は本発明の一実施例の出力回路の回路構
成図である。これは第2図に示す出力回路16の
構成であり、本発明の特徴ある構成を示してい
る。 FIG. 3 is a circuit diagram of an output circuit according to an embodiment of the present invention. This is the configuration of the output circuit 16 shown in FIG. 2, and shows a characteristic configuration of the present invention.
この出力回路は、マイクロプログラムのステツ
プ信号が入力する入力端子20および21を選択
回路22の切替端子a1、a2にそれぞれ接続し、選
択回路22の共通接点をアンド回路23および2
4の一方の入力端子にそれぞれ接続する。このア
ンド回路23の他の入力端子にXまたはY方向を
示す方向指示信号が入力する入力端子25を接続
する。また、アンド回路24の他の入力端子に上
記入力端子25をインバータ26を介して接続す
る。 This output circuit connects the input terminals 20 and 21 into which the step signal of the microprogram is input to the switching terminals a 1 and a 2 of the selection circuit 22, respectively, and connects the common contact of the selection circuit 22 to the AND circuits 23 and 2.
Connect to one input terminal of 4. The other input terminal of this AND circuit 23 is connected to an input terminal 25 into which a direction indicating signal indicating the X or Y direction is input. Further, the input terminal 25 is connected to another input terminal of the AND circuit 24 via an inverter 26 .
45度成分の方向指示信号が入力する入力端子2
7をアンド回路28の一方の入力端子に接続し、
このアンド回路28の他方の入力端子に上記入力
端子21を接続する。このアンド回路28の出力
をアンド回路29および30の一方の入力端子に
それぞれ導く。このアンド回路29の他方の入力
端子に上記インバータ26の出力を導き、アンド
回路30の他方の入力端子に上記入力端子25を
接続する。このアンド回路29および30の出力
を上記選択回路22と連動する選択回路31の切
替端子b1、b3にそれぞれ導き、アンド回路28の
出力を切替端子b2、b4にそれぞれ導く。 Input terminal 2 into which the 45 degree component direction signal is input
7 to one input terminal of the AND circuit 28,
The input terminal 21 is connected to the other input terminal of the AND circuit 28. The output of AND circuit 28 is led to one input terminal of AND circuits 29 and 30, respectively. The output of the inverter 26 is led to the other input terminal of the AND circuit 29, and the input terminal 25 is connected to the other input terminal of the AND circuit 30. The outputs of the AND circuits 29 and 30 are respectively guided to switching terminals b 1 and b 3 of a selection circuit 31 which is interlocked with the selection circuit 22, and the output of the AND circuit 28 is guided to switching terminals b 2 and b 4 , respectively.
この選択回路31の2組の共通接点をオア回路
32および33の一方の入力端子にそれぞれ導
き、オア回路32の他方の入力端子に上記アンド
回路23の出力を導くとともにオア回路33の他
方の入力端子に上記アンド回路24の出力を導
く。このオア回路32の出力をアツプダウンカウ
ンタ18の入力端子に導き、オア回路33の出力
をアツプダウンカウンタ19の入力端子に導く。 The two sets of common contacts of the selection circuit 31 are led to one input terminal of the OR circuits 32 and 33, and the output of the AND circuit 23 is led to the other input terminal of the OR circuit 32. The output of the AND circuit 24 is led to the terminal. The output of this OR circuit 32 is led to the input terminal of the up-down counter 18, and the output of the OR circuit 33 is led to the input terminal of the up-down counter 19.
第4図は、第3図に示した本実施例装置で円を
描く場合のフローチヤートである。 FIG. 4 is a flowchart when drawing a circle using the apparatus of this embodiment shown in FIG.
このような回路構成で、まず、本装置を8画素
表示で用いるか4画素表示で用いるかを選択す
る。いま、4画素表示で用いる場合を説明する。
4画素表示選択信号を選択回路22および31に
与える。これにより、選択回路22は切替端子a1
側に接続され、選択回路31は切替端子b1側、b3
側にそれぞれ選択される。この選択は操作卓から
の操作によつても、あるいは別の装置からの信号
によつてもよい。 With such a circuit configuration, first, it is selected whether the present device is used for 8-pixel display or 4-pixel display. Now, the case where it is used in a 4-pixel display will be explained.
A 4-pixel display selection signal is applied to selection circuits 22 and 31. As a result, the selection circuit 22 selects the switching terminal a 1
The selection circuit 31 is connected to the switching terminal b 1 side, b 3 side
Each side is selected. This selection may be made by operation from the console or by a signal from another device.
この状態で、はじめにレジスタ12および13
に描こうとする2次曲線f(X、Y)=0に関する
種々のデータ(具体的には一次微係数fX、fYおよ
び二次微係数fXX、fYY、fXY、但し
fX=δf/δx、fY=δf/δy、
fXX=δ2f/δx2、fXY=δ2f/δyδx、fYY=δ2f/
δy2
が与えられる。演算シーケンスは、プログラムメ
モリ10にマイクロプログラムとして格納されて
いる。このマイクロプログラムの演算指令と、符
号レジスタの内容との組合せにより制御回路11
は、演算回路14に対してレジスタ12のどのア
ドレスの内容と、レジスタ13のどのアドレスの
内容とを加算あるいは減算し、その演算結果をレ
ジスタ15に格納することを指示する。 In this state, first registers 12 and 13
Various data regarding the quadratic curve f (X, Y) = 0 to be drawn (specifically, the first-order differential coefficients f X , f Y and the second-order differential coefficients f XX , f YY , f XY , where f X = δf/δx, f Y = δf/δy, f XX = δ 2 f/δx 2 , f XY = δ 2 f/δyδx, f YY = δ 2 f/
δy 2 is given. The calculation sequence is stored in the program memory 10 as a microprogram. The control circuit 11 uses a combination of the operation command of this microprogram and the contents of the code register.
instructs the arithmetic circuit 14 to add or subtract the contents of any address in the register 12 and the contents of any address in the register 13, and to store the result of the operation in the register 15.
すなわち、第4図に示すように、一次微係数の
符号が判断され、fYが負ならばsign〔X〕信号は
加算、fYが正ならば、sign〔X〕信号は減算、fXが
負ならばsign〔Y〕信号は減算、fXが正ならば、
sign〔Y〕信号は加算をそれぞれ示す信号として、
アツプダウンカウンタ18,19にそれぞれ与え
られる。この動作はステツプ〜ステツプで行
われる。 That is, as shown in Figure 4, the sign of the first-order differential coefficient is determined, and if f Y is negative, the sign [X] signal is added; if f Y is positive, the sign [X] signal is subtracted, and f If is negative, the sign [Y] signal is subtracted, and if f X is positive,
The sign [Y] signal is a signal indicating addition,
The signals are applied to up-down counters 18 and 19, respectively. This operation is performed in steps.
次に、fXの絶対値|fX|とfYの絶対値|fY|と
の大小が比較され、この結果と上記ステツプ〜
ステツプとの結果から次に描く点の候補点が8
方向から2方向の点に制限される。 Next, the magnitude of the absolute value of f X |f X | and the absolute value of f Y |f Y | is compared, and this result is compared with the
Based on the results with the step, there are 8 candidate points for the next point to draw.
Restricted to points in two directions from the direction.
すなわち、|fX|<|fY|であれば1点がX方
向の点(X)、他の1点が45度方向の点(XY)
の2点に候補点が制限される。また、|fX|>|
fY|であれば1点がY方向の点(Y)、他の1点
が45度方向の点(XY)の2点に候補点が制限さ
れる。この判断はステツプで行われる。 In other words, if | f
Candidate points are limited to two points. Also, |f X |>|
If f Y |, the candidate points are limited to two points: one point in the Y direction (Y) and the other point in the 45 degree direction (XY). This judgment is made in steps.
このステツプで本発明の特徴である動作が行
われる。すなわち4画素連結表示の場合には、2
点に制限された候補点でこの2点に共通する方向
であるX方向(候補点がX、XYのとき)、ある
いはY方向(候補点がY、XYのとき)の方向指
示信号が外部の表示装置に送出される。 In this step, the operation that is a feature of the present invention is performed. In other words, in the case of 4-pixel connected display, 2
When a direction indicating signal in the X direction (when the candidate point is X, XY) or the Y direction (when the candidate point is Y, XY), which is the direction common to these two points at a candidate point limited to Sent to a display device.
このX方向の点を示す方向指示信号XまたはY
方向の点を示す方向指示信号Yは、第3図の入力
端子25に与えられる。すなわち、方向指示信号
Xであれば論理「1」信号として、方向指示信号
Yであれば、その補数信号の論理「0」として
入力端子25に与えられる。このとき入力端子2
0にはステツプを実行中であることを示す論理
「1」のT5信号が与えられる。したがつて、アン
ド回路23,24が開かれ、方向指示信号Xが送
出されればオア回路32を介してX軸座標を示す
アツプダウンカウンタ18に入力が与えられ、ク
ロツク信号に同期して前記sign〔X〕信号に従つ
て加算あるいは減算される。また、方向指示信号
Yが送出されればその補数信号がインバータ2
6で反転され、アンド回路24を通り、オア回路
33を介してY軸座標を示すアツプダウンカウン
タ19に入力が与えられ、クロツク信号に同期し
て前記sign〔Y〕信号に従つて加算あるいは減算
される。このアツプダウンカウンタ18あるいは
19の出力が外部の表示装置に図形信号として送
出される。 Direction signal X or Y indicating the point in this X direction
A direction indicating signal Y indicating a point in the direction is applied to an input terminal 25 in FIG. That is, if the direction indication signal is X, it is applied to the input terminal 25 as a logic "1" signal, and if it is the direction instruction signal Y, it is applied to the input terminal 25 as a logic "0" of its complement signal. At this time, input terminal 2
0 is given a T5 signal of logic ``1'' indicating that the step is being executed. Therefore, when the AND circuits 23 and 24 are opened and the direction indicating signal It is added or subtracted according to the sign [X] signal. Moreover, if the direction indication signal Y is sent out, its complement signal is sent to the inverter 2.
6, the signal is inverted at step 6, passed through an AND circuit 24, and inputted to an up-down counter 19 indicating the Y-axis coordinate via an OR circuit 33, where it is added or subtracted in accordance with the sign [Y] signal in synchronization with the clock signal. be done. The output of this up-down counter 18 or 19 is sent to an external display device as a graphic signal.
次に、上述のステツプにより決定された候補
点の2点についての函数の絶対値が演算され、こ
の大小を比較して小さい方の候補点が次の点と判
断される。すなわち、ステツプでX方向あるい
はY方向の候補点の絶対値|G0|が演算され、
ステツプで45度方向の候補点の絶対値|G1|
が演算される。この候補点2点の絶対値|G0|
と|G1|との大小がステツプで比較される。 Next, the absolute values of the functions for the two candidate points determined in the above steps are calculated, and the magnitudes of these are compared and the smaller candidate point is determined to be the next point. That is, in the step, the absolute value |G 0 | of the candidate point in the X direction or Y direction is calculated,
Absolute value of candidate point in 45 degree direction |G 1 |
is calculated. Absolute value of these two candidate points |G 0 |
The magnitude of and |G 1 | is compared in steps.
この結果、|G0|≧|G1|と判断されれば、2
点の候補点のうち次の点は45度方向の点と判断さ
れて、この選択された点のGを次の演算用の値と
する(ステツプ)。そして、ステツプで、上
述のステツプで決定されなかつたΔxまたはΔyを
決定して加算または減算信号として出力し、外部
の表示装置に出力する。また、この決定された値
から次のステツプで用いる微係数fx、fyなど決定
してレジスタに格納しておく。 As a result, if it is determined that |G 0 |≧|G 1 |, 2
The next point among the candidate points is determined to be a point in the 45 degree direction, and the G of this selected point is used as the value for the next calculation (step). Then, in a step, Δx or Δy that was not determined in the above step is determined and outputted as an addition or subtraction signal, and outputted to an external display device. Also, from this determined value, the differential coefficients f x , f y , etc. to be used in the next step are determined and stored in a register.
これを第3図の出力回路の動作で説明する。 This will be explained using the operation of the output circuit shown in FIG.
すなわち、第3図の入力端子27に方向指示信
号XYが論理「1」信号として送出される。この
とき、入力端子21にはステツプを実行中であ
ること示す論理「1」のT10信号が与えられる。
したがつてアンド回路28が開かれ方向指示信号
XYがアンド回路28から出力される。ここで、
上記方向指示信号Xあるいは方向指示信号Yは、
このステツプまで保持されているため、入力端
子25に方向指示信号Xがステツプで出力され
ていればアンド回路30が開かれ、オア回路33
を介してアツプダウンカウンタ19に入力が与え
られる。これにより、クロツク信号に同期して前
記sign〔Y〕信号に従つてアツプダウンカウンタ
19が加算あるいは減算され、等価的に45度方向
の図形信号が表示装置に送出される。 That is, the direction instruction signal XY is sent to the input terminal 27 in FIG. 3 as a logic "1" signal. At this time, a T10 signal of logic "1" indicating that the step is being executed is applied to the input terminal 21.
Therefore, the AND circuit 28 is opened and a direction indication signal is generated.
XY is output from the AND circuit 28. here,
The direction indication signal X or the direction indication signal Y is
Since it is held up to this step, if the direction instruction signal
An input is given to the up-down counter 19 via the up-down counter 19. As a result, the up-down counter 19 adds or subtracts in accordance with the sign [Y] signal in synchronization with the clock signal, and equivalently, a graphic signal in the 45-degree direction is sent to the display device.
また、逆にステツプで方向指示信号Yが送出
されていれば、アンド回路29、オア回路32を
介してアツプダウンカウンタ18が加算あるいは
減算され、等価的に45度方向の図形信号が表示装
置に送出される。 Conversely, if the direction instruction signal Y is sent out in the step, the up-down counter 18 is added or subtracted via the AND circuit 29 and the OR circuit 32, and equivalently, a graphic signal in the 45-degree direction is sent to the display device. Sent out.
また、ステツプで|G0|<|G1|と判断さ
れれば、候補点がY、XYの2点である場合には
次の点はY方向の点と判断され、候補点がX、
XY方向の2点である場合には次の点はX方向の
点と判断される。この判断はステツプで行われ
る。このときには、ステツプはすでにX方向あ
るいはY方向の方向指示信号を表示装置に送出済
であるため、ステツプでは図形信号の送出は行
わない。 Also, if it is determined that |G 0 |
If there are two points in the X and Y directions, the next point is determined to be a point in the X direction. This judgment is made in steps. At this time, since the step has already sent the direction instruction signal in the X direction or the Y direction to the display device, the step does not send out the graphic signal.
次に、8画素連結表示の場合の第3図の出力回
路の動作を説明する。 Next, the operation of the output circuit shown in FIG. 3 in the case of 8-pixel connected display will be explained.
この場合には、8画素表示選択信号を選択回路
22および31に与える。これにより選択回路2
2は切替端子a2側に接続され、選択回路31は切
替端子b2側、b4側にそれぞれ接続される。この状
態では、ステツプにおいてはT5信号は選択回
路22で遮断されているため、入力端子25に方
向指示信号Xあるいは方向指示信号Yが与えられ
ても、アンド回路23または24で遮断され、外
部には送出されない。ステツプで入力端子21
にT10信号が与えられると、アンド回路23,2
4,28が開かれる。この状態でステツプで次
の点が45度方向に決定されると、入力端子27に
方向指示信号XYが与えられ、選択回路31、オ
ア回路32および33を通つてアツプダウンカウ
ンタ18および19にそれぞれ入力が与えられ、
上述の場合と同様の動作で加算あるいは減算が行
われる。 In this case, an 8-pixel display selection signal is applied to selection circuits 22 and 31. As a result, selection circuit 2
2 is connected to the switching terminal a 2 side, and the selection circuit 31 is connected to the switching terminals b 2 side and b 4 side, respectively. In this state, the T5 signal is blocked by the selection circuit 22 in the step, so even if the direction instruction signal is not sent. Step input terminal 21
When the T10 signal is given to the AND circuit 23, 2
4.28 will be held. When the next point is determined in the 45-degree direction in this state, the direction instruction signal Given the input,
Addition or subtraction is performed in the same manner as in the case described above.
またステツプで、45度方向の点が次の点とし
て決定されなければ、ステツプで入力端子25
に与えられた方向指示信号Xあるいは方向指示信
号Yがアンド回路23または24、オア回路32
または33を通つてアツプダウンカウンタ18ま
たは19に入力を与え、上述の場合に同様の動作
で加算あるいは減算が行われる。 In addition, if the point in the 45 degree direction is not determined as the next point in the step, the input terminal 25 is selected in the step.
The direction instruction signal X or the direction instruction signal Y given to the AND circuit 23 or 24 and the OR circuit 32
or 33 to the up-down counter 18 or 19, and addition or subtraction is performed in the same manner as in the case described above.
なお、ステツプでは、上述の判断によつて選
ばれた点を現在の点として更新し、次の点を決定
するステツプ以降の動作のためにあらかじめ演
算しておく。 In this step, the point selected based on the above judgment is updated as the current point, and calculations are performed in advance for the operation after the step of determining the next point.
以上説明したように、本発明によれば出力回路
に選択回路を設け、8画素連結表示における45度
方向の点を4画素連結表示では選択回路を切替え
ることにより、時間的に2段階にずらして表示さ
せることとした。
As explained above, according to the present invention, a selection circuit is provided in the output circuit, and a point in a 45 degree direction in an 8-pixel connected display is temporally shifted in two steps by switching the selection circuit in a 4-pixel connected display. I decided to display it.
したがつて、図形発生装置を8画素連結表示と
しても、4画素連結表示としても使用することが
でき、8画素連結方式のグラフイツクスデイスプ
レイ、NC工作あるいは4画素連結方式のXYプ
ロツタにも適用させることができ、装置の汎用性
を著しく向上させることができる。またこのため
の付加回路は簡単な構成であり、装置を安価に構
成することができる。 Therefore, the figure generator can be used as an 8-pixel connected display or a 4-pixel connected display, and is also applicable to 8-pixel connected graphics displays, NC work, or 4-pixel connected XY plotters. The versatility of the device can be significantly improved. Further, the additional circuit for this purpose has a simple structure, and the device can be constructed at low cost.
第1図は従来例出力回路の要部ブロツク構成
図。第2図は従来例装置の要部ブロツク構成図。
第3図は本発明実施例の出力回路のブロツク図。
第4図は本実施例で円を描く場合のフローチヤー
ト。
1,4,9,20,25,27……入力端子、
2,3,23,24,28,29,30……アン
ド回路、5,6,32,33……オア回路、7,
8,18,19……アツプダウンカウンタ、10
……プログラムメモリ、11……制御回路、1
2,13,15……レジスタ、14……演算回
路、16……出力回路、22,31……選択回
路。
FIG. 1 is a block diagram of a main part of a conventional output circuit. FIG. 2 is a block diagram of the main parts of a conventional device.
FIG. 3 is a block diagram of an output circuit according to an embodiment of the present invention.
FIG. 4 is a flowchart for drawing a circle in this embodiment. 1, 4, 9, 20, 25, 27...input terminals,
2, 3, 23, 24, 28, 29, 30...AND circuit, 5, 6, 32, 33...OR circuit, 7,
8, 18, 19...Up-down counter, 10
...Program memory, 11...Control circuit, 1
2, 13, 15...Register, 14...Arithmetic circuit, 16...Output circuit, 22, 31...Selection circuit.
Claims (1)
個のレジスタと、 このレジスタからの信号を加減演算するととも
にその演算結果を上記レジスタに格納する演算回
路と、 この演算回路からの演算結果により所定の演算
シーケンスにより、上記演算回路に演算指示信号
を与える制御回路と、 X座標、Y座標の座標位置信号を保持し、上記
制御回路から座標位置の増減信号が与えられる二
個のアツプダウンカウンタと を備え、 現在の座標点からXY平面上でX軸およびY軸
を含み互いに45度ずつ異なる8方向のいずれかの
方向へ所定の1ステツプを進めることにより、与
えられた二次函数の図形信号をX軸方向の増減分
またはY軸方向の増減分として発生する装置であ
つて、 上記制御回路と演算回路とが構成する演算手段
は、 上記与えられた二次函数のXの一次微係数fXお
よびYの一次微係数fYの正負の符号を判断するこ
とにより、次のすすむべき点がX軸方向から正方
向または負方向およびY軸方向から正方向または
負方向にある上記8方向のうちの3点を選択する
第一の演算手段と、 上記Xの一次微係数の絶対値|fX|および上記
Yの一次微係数の絶対値|fY|の大小を比較して
つぎにすすむべき点を上記8方向のうち、X軸方
向およびこれと45度異なる方向またはY軸方向お
よびこれと45度異なる方向である2点を選択する
第二の演算手段と、 この第二の演算手段で得られた2点についてそ
の座標値を上記二次函数に代入してその函数値を
求め、この函数値の絶対値を比較して小さい方を
選択することによつて次にすすむべき点がX軸方
向またはこれと45度異なる方向あるいはY軸方向
またはこれと45度異なる方向かを決定する第三の
演算手段と を含み、 上記制御回路は、この第一ないし第三の演算手
段の演算結果により、次にすすむべきX座標、Y
座標の増減信号を送出する出力回路を備えた 図形発生装置において、 この出力回路に、 8画素連結か4画素連結かを選択させる選択手
段を備え、 この選択手段で4画素連結が選択された場合に
は、上記第二の演算手段の演算が終了した段階で
2点に共通するX軸方向またはY軸方向の増減信
号を出力する手段と、上記第三の演算手段の演算
が終了した段階でX軸方向あるいはY軸方向と45
度異なる方向の点が決定された場合上記出力され
たX軸方向またはY軸方向の増減信号に加えて、
上記第三の演算手段で決定された点のY軸方向ま
たはX軸方向の増減信号を出力する手段と を備えたことを特徴とする図形発生装置。[Scope of Claims] 1. At least two registers that store each coefficient and each parameter, an arithmetic circuit that adds and subtracts signals from these registers and stores the results of the arithmetic operations in the registers; a control circuit that provides an operation instruction signal to the arithmetic circuit according to a predetermined arithmetic sequence based on the arithmetic results; and two control circuits that hold coordinate position signals of the X and Y coordinates and to which the control circuit provides an increase/decrease signal for the coordinate position. A given quadratic It is a device that generates a graphical signal of a function as an increment/decrement in the X-axis direction or an increment/decrement in the Y-axis direction, and the arithmetic means constituted by the control circuit and the arithmetic circuit is configured to generate a graphical signal of the given quadratic function X. By determining the positive and negative signs of the first-order differential coefficient f A first calculation means that selects three points from the eight directions above, and compares the magnitude of the absolute value of the first-order differential coefficient of the above-mentioned X |f X | and the absolute value of the first-order differential coefficient of the above-mentioned Y |f Y | a second calculation means for selecting two points from among the eight directions to proceed next, which are the X-axis direction and a direction 45 degrees different from this, or the Y-axis direction and a direction 45 degrees different from this; By substituting the coordinate values of the two points obtained by the second calculation means into the above-mentioned quadratic function to obtain the function value, comparing the absolute values of the function values and selecting the smaller one, next a third calculation means for determining whether the point to proceed is in the X-axis direction or in a direction 45 degrees different from this, or in the Y-axis direction or in a direction 45 degrees different from this; Based on the calculation result of the calculation means, the X coordinate and Y coordinate to proceed next
In a figure generator equipped with an output circuit that sends out coordinate increase/decrease signals, the output circuit is provided with selection means for selecting between 8-pixel connection and 4-pixel connection, and when 4-pixel connection is selected by the selection means. means for outputting an increase/decrease signal in the X-axis direction or Y-axis direction common to the two points at the stage when the calculation by the second calculation means is completed, and at the stage when the calculation by the third calculation means is completed. X-axis direction or Y-axis direction and 45
When points in different directions are determined, in addition to the output increase/decrease signal in the X-axis direction or Y-axis direction,
A figure generator comprising means for outputting an increase/decrease signal in the Y-axis direction or the X-axis direction of the point determined by the third calculation means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57049616A JPS58166417A (en) | 1982-03-26 | 1982-03-26 | Pattern generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57049616A JPS58166417A (en) | 1982-03-26 | 1982-03-26 | Pattern generator |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58166417A JPS58166417A (en) | 1983-10-01 |
| JPH0223884B2 true JPH0223884B2 (en) | 1990-05-25 |
Family
ID=12836160
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57049616A Granted JPS58166417A (en) | 1982-03-26 | 1982-03-26 | Pattern generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS58166417A (en) |
-
1982
- 1982-03-26 JP JP57049616A patent/JPS58166417A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS58166417A (en) | 1983-10-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS6131489B2 (en) | ||
| EP0137856B1 (en) | Method of displaying image | |
| JPH0223884B2 (en) | ||
| JPH04291685A (en) | Clip tester circuit and clip testing method | |
| JP2005071147A (en) | Graph display control device and program | |
| JPH04102182A (en) | Graphic microcomputer | |
| JPH0368086A (en) | Linear interpolating circuit | |
| JP4811177B2 (en) | Graph display device and graph display processing program | |
| JPH0133851B2 (en) | ||
| JPH0124654Y2 (en) | ||
| JPS62126479A (en) | Image forming signal processing device | |
| KR0160623B1 (en) | How to Display Arcs in Wire Graphics | |
| JPH0113114B2 (en) | ||
| JPH03202916A (en) | Coordinate input device | |
| JPS599754A (en) | Figure generating device | |
| JPS63308639A (en) | Digital differential analyzer | |
| JPS59197972A (en) | Coordinate arithmetic circuit | |
| JPH04289983A (en) | Digital line segment generating circuit | |
| CN118425844A (en) | Magnetic field measurement method, device, equipment and storage medium | |
| CN118485804A (en) | Vector pattern distortion drawing method and device, electronic equipment and medium | |
| JPS6394378A (en) | Straight line generating circuit | |
| JPH03123984A (en) | Thick line generation device | |
| JPH04235675A (en) | Drafting device | |
| JPS6410873B2 (en) | ||
| JPS61240380A (en) | Graphic display device |