JPS6232519B2 - - Google Patents

Info

Publication number
JPS6232519B2
JPS6232519B2 JP52000361A JP36177A JPS6232519B2 JP S6232519 B2 JPS6232519 B2 JP S6232519B2 JP 52000361 A JP52000361 A JP 52000361A JP 36177 A JP36177 A JP 36177A JP S6232519 B2 JPS6232519 B2 JP S6232519B2
Authority
JP
Japan
Prior art keywords
register
value
point
arc
contents
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
Application number
JP52000361A
Other languages
Japanese (ja)
Other versions
JPS5386122A (en
Inventor
Yasuhito Suenaga
Naohiko Kamae
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP36177A priority Critical patent/JPS5386122A/en
Publication of JPS5386122A publication Critical patent/JPS5386122A/en
Publication of JPS6232519B2 publication Critical patent/JPS6232519B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Digital Computer Display Output (AREA)
  • Image Generation (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

〔産業上の利用分野〕 本発明は、離散的に配置された多数の画素によ
つて図形を表示あるいは記録する図形表示装置も
しくは図形記録装置上に対して、図形を出力する
ための図形信号を発生させる装置に関するもので
ある。 〔従来の技術および発明が解決しようとする問題
点〕 従来、この種の装置は、一般のグラフイツクデ
イスプレイ装置に見られるようにソフトウエアに
かなり依存し、円弧を直線近似で行うか、または
正弦波を組み合わせ、リサージユ図形により行う
か、いずれかであつた。しかしいずれの場合も任
意の円弧を高精度で、しかもソフトウエアの負担
を軽くして描かせることは困難であつた。 また、本質的に明か暗かの二つの状態のみを取
り得る画素から構成されるドツト表示素子や、デ
イジタルICメモリをビデオバツフアとして使用
するラスタ走査式デイスプレイ、あるいはXYプ
ロツタなどのデイジタル式図形表示装置では、前
記リサージユ図形による方法をとることはできな
い。 〔発明の目的および概要〕 本発明はこれらの欠点にかんがみなされたもの
で、その目的は、離散的に配置された画素によつ
て構成される表示装置や記録装置に対してソフト
ウエアに負担を掛けることなく、可成り高精度の
ものでも、また白黒の2値表示でも表示可能な図
形信号を発生する装置を提供することにある。 離散的に多数の画素が並んだデイジタル式の図
形表示装置上に図形を表示するには、まず本発明
によつて図形の形状を出来る限り精度良く近似す
る点列のx、y座標値を求め、その後そのような
本発明によつて求めた点列に対応する表示画面上
の全ての点の輝度を上げるか、あるいは点列の位
置にペンを次々と移動させる等の方法により、す
きまのない、なめらかにつながつて見える図形を
出力して行けばよい。 〔実施例〕 以下、本発明の内容を円弧を発生する場合の動
作原理、装置構成列を例にとつて説明するが、直
線や他の図形に対しても本発明によつてそれらの
図形を発生させる装置を構成することは円弧の場
合と同様に容易である。 まず本発明で用いている動作原理について説明
する。この発明では出力すべき円弧の始点および
終点をその円弧を含む円の中心からの相対座標と
して与え、さらに円弧を描く方向を与えることに
より、円弧に沿つた画素を次々とたどり得るよう
にする。すなわち、たとえば格子状の画素で構成
された表示部、X−Yプロツタなどにおいて、第
1図A,Bに示すようにXY座標の原点(0、
0)を中心とする円を時計方向もしくは反時計方
向に発生する場合、その取るべき増分の方向は矢
印にて示すように第1オクタントから第8オクタ
ントまでの八つのオクタントごとにそれぞれ異な
る。 本発明はこの二つの画素の方向を適当に次から
次への選択して円弧信号を発生することを基本動
作とする。 まず現在点P0を始点上におく。現在点P0に隣接
するP1もしくはP2の内のいずれかひとつを次の点
として選ぶ。次にその選ばれた点に現在点を移動
されたうえで同様にさらに次の点の選択を行う。
これを終点付近に到達するまでくり返すことによ
り円弧を近似する点列(すなわち図形信号)を発
生して行く。 この隣接する画素の選択の原理は次の通りであ
る。原点を中心とする円の方程式は x2+y2=r2 ……(1) ただしrは半径、で表わすことができる。 なお、点(x0、y0)を中心とする一般の円(x
−x02+(y−y02=r2については、以下の結果え
られるx、y座標値にそれぞれx0、y0を加えれば
よい。 いま、(1)式を次の(2)式のように変更し、右辺に
適当な点の座標を代入して、左辺すなわちf
(x、y)が0になれば、その点は(1)式で示され
た円上にあり、0でなければ円上にない。そして
左辺の絶対値が大きい程(1)式で示された円上より
その点は離れていることになる。 f(x、y)=x2+y2−r2 ……(2) したがつて、始点に隣接する格子点により決定
される(2)式の左辺、すなわちf(x、y)の絶対
値の最小のものを選択すれば最適な格子点すなわ
ち増分の方向を決定できる。 いま、第2図のように、第1オクタント内での
円弧発生を例にとつて考える(他のオクタントに
おいても、第1図のように点の選択方向を変える
だけで同じ議論が適用される)。 現在点P(x、y)の次に選択すべき点P1
(x、y+1)または点P2(x−1、y+1)に
おける式(2)のfの値はそれぞれ次式で与えられ
る。 f1=f(x、y+1)=f(x、y)+2y+1 …(3) f2=f(x−1、y+1)=f(x、y)+2y−2x +2=f1−2x+1 ……(4) ところで、このとき釜江らが発明した円弧信号
発生装置(特願昭46−69035、特開昭48−34437)
および文献(釜江他:“図形のドツト表示”、電
子通信学会論文試、Vol.56−A、No.7、1973)で
示されている変位比較法によれば、次の規則A
[Industrial Field of Application] The present invention provides a graphic signal for outputting a graphic to a graphic display device or a graphic recording device that displays or records a graphic using a large number of discretely arranged pixels. This relates to a device that generates electricity. [Prior Art and Problems to be Solved by the Invention] Conventionally, this type of device has relied heavily on software, as seen in general graphic display devices, and has used linear approximations to approximate circular arcs or sine approximations. It was either done by combining waves or using Lissage shapes. However, in either case, it has been difficult to draw an arbitrary arc with high precision while reducing the burden on the software. In addition, digital graphic display devices such as dot display elements consisting of pixels that can essentially take only two states, bright and dark, raster scanning displays that use digital IC memory as a video buffer, and XY plotters, , it is not possible to use the method using the Lissage figure. [Objective and Summary of the Invention] The present invention has been made in view of these drawbacks, and its purpose is to reduce the burden on software for display devices and recording devices configured with discretely arranged pixels. It is an object of the present invention to provide a device that generates a graphic signal that can be displayed with fairly high precision or in black and white binary display without any multiplication. In order to display a figure on a digital figure display device in which a large number of discrete pixels are arranged, first, according to the present invention, the x and y coordinate values of a sequence of points that approximate the shape of the figure as accurately as possible are determined. Then, by increasing the brightness of all points on the display screen that correspond to the dot sequence obtained by the present invention, or by moving the pen one after another to the position of the dot sequence, , just output shapes that appear to be smoothly connected. [Example] The content of the present invention will be explained below by taking as an example the operating principle and device configuration sequence for generating circular arcs, but the present invention can also be used to generate straight lines and other figures. Constructing the generating device is as easy as for circular arcs. First, the operating principle used in the present invention will be explained. In this invention, the start and end points of the arc to be output are given as relative coordinates from the center of the circle containing the arc, and the direction in which the arc is drawn is given, so that pixels along the arc can be traced one after another. That is, for example, in a display unit, an X-Y plotter, etc. that is composed of grid-like pixels, the origin of the XY coordinates (0, 0,
0) in the clockwise or counterclockwise direction, the direction of the increment to be taken differs for each of the eight octants from the first octant to the eighth octant, as shown by the arrows. The basic operation of the present invention is to appropriately select the directions of these two pixels one after another to generate an arc signal. First, place the current point P 0 on the starting point. Select one of P 1 or P 2 adjacent to the current point P 0 as the next point. Next, the current point is moved to the selected point, and the next point is selected in the same manner.
By repeating this process until reaching near the end point, a sequence of points (ie, a graphic signal) that approximates a circular arc is generated. The principle of selecting adjacent pixels is as follows. The equation of a circle centered at the origin is x 2 + y 2 = r 2 ... (1) where r is the radius. Note that a general circle ( x
For -x 0 ) 2 + (y-y 0 ) 2 = r 2 , x 0 and y 0 may be added to the x and y coordinate values obtained as the following results, respectively. Now, change equation (1) to the following equation (2), substitute the coordinates of an appropriate point to the right-hand side, and calculate the left-hand side, that is, f
If (x, y) is 0, the point is on the circle shown by equation (1), and if it is not 0, it is not on the circle. The larger the absolute value of the left side, the further away the point is from the circle shown by equation (1). f (x, y) = x 2 + y 2 − r 2 ... (2) Therefore, the left side of equation (2) determined by the grid points adjacent to the starting point, that is, the absolute value of f (x, y) By selecting the smallest one, the optimal grid point, that is, the direction of the increment can be determined. Now, as shown in Figure 2, consider the generation of an arc within the first octant as an example (the same argument can be applied to other octants by simply changing the selection direction of the points as shown in Figure 1). ). Point P 1 to be selected next to current point P (x, y)
The value of f in equation (2) at (x, y+1) or point P 2 (x-1, y+1) is given by the following equations. f 1 = f (x, y + 1) = f (x, y) + 2y + 1 ... (3) f 2 = f (x - 1, y + 1) = f (x, y) + 2y - 2x + 2 = f 1 - 2x + 1 ... (4) By the way, at this time, the arc signal generator invented by Kamae et al.
According to the displacement comparison method shown in the literature (Kamae et al.: “Dot representation of figures”, Institute of Electronics and Communication Engineers Paper Examination, Vol. 56-A, No. 7, 1973), the following rule A is given.

【表】 によつて点を選択し、これを繰り返すことによつ
て円弧を発生する技術が従来から知られていた。 一方、本発明装置では、前記の従来技術をさら
に次のように改良する。すなわち、発生させる図
形に対応させてあらかじめ定められた定数(しき
い値)Tを設定しておき、次の規則B
[Table] A technique has been known for generating an arc by selecting points according to the table and repeating this process. On the other hand, in the apparatus of the present invention, the above-mentioned conventional technique is further improved as follows. That is, a predetermined constant (threshold value) T is set corresponding to the figure to be generated, and the following rule B is applied.

【表】 に従つて点を選択し、これを繰り返すことによつ
て円弧を出力するための図形信号を発生する。な
お円弧の場合、T=r(円の半径)に設定すれば
よいことが後述するように証明される。 さて、次に第1オクタントにおける円弧発生を
行うための本発明による装置構成例を第3図に示
す。第3図において、1はXカウンタ、2はYカ
ウンタ、3および4はそれぞれXカウンタ1、Y
カウンタ2の内容をただちに2倍して出力するた
めの1ビツトシフタ、5は式(2)のfの値を格納す
るためのFレジスタ、6および7は加算器を組み
合わせた演算ユニツト、8は規則Bのしきい値T
を格納するTレジスタ、9は比較器、10はfの
値の途中計算結果を格納するバツフアレジスタ、
11はX増分発生回路、12はY増分発生回路、
13は終点検出回路である。 本装置を動作させるには、まず円弧の始点Pの
X、Y座標値(Xs=r、Ys=0)をそれぞれX
カウンタ1およびYカウンタ2にセツトし、また
f(Xs、Ys)の値(この場合、点Xs、Ys)が
円の上にあるのでこの値は0)をFレジスタ5に
セツトし、さらにTレジスタ8には円の半径rの
値をセツトする。次にクロツク信号Cを演算ユニ
ツト6に加えることにより動作を開始する。 まずFレジスタ5の内容(f)と1ビツトシフタ4
の出力(2y)とを用いて、演算ユニツト6によ
りf1=f+2y+1の値を計算し、演算結果を比較
器9およびバツフアレジスタ10に送る。続いて
f1を比較器9によりTレジスタ8の内容T(=
r)と比較し、|f1|<rならばY増分発生回路
12に信号を送つてYレジスタ2の内容を1増加
させるとともに、バツフアレジスタ10に信号を
送つて10の内容(f1)をFレジスタ5に格納し
て新しいfの値としたのち、演算ユニツト6に、
次のクロツク信号Cを加える。なお、このとき演
算ユニツト7には何も送られず、Xカウンタ1、
1ビツトシフタ3、X増分発生回路11は保持さ
れたままである。 一方、|f1|≧rならばバツフアレジスタ10
およびY増分発生回路12には信号を送らずに、
そのまま値f1を演算ユニツト7に送り、1ビツト
シフタ3の出力(2x)と組み合わせて演算ユニ
ツト7によりf2=f1−2x+1の値を計算し、これ
をそのままFレジスタ5に格納して新しいfの値
とするとともに、X増分発生回路11に信号を送
つて、Xカウンタ1の内容を1だけ減らしたの
ち、演算ユニツト6に次のクロツク信号Cを加え
る。 前記の動作を繰り返すことにより、第1オクタ
ントにおける左まわりの円弧が発生され、その信
号はX、Yの座標値またはX、Yの増分として各
タイミングごとにXカウンタ1、Yカウンタ2も
しくはX増分発生回路11、Y増分発生回路12
からとり出される。終点はXカウンタ1とYカウ
ンタ2の内容が等しくなつた状態(x=y)を終
点検出回路13により検出すればよい。 同様のことを第1オクタントから第8オクタン
トの各々について行うことにより、全円を発生さ
せることができる。さらに第4図のように終点検
出条件を工夫することにより、始点(Xs、Ys
から終点(XE、YE)に至るまでの左まわりの任
意の円弧を描くことができる(右まわり円弧につ
いても同様)。 なお、第4図において、たとえば第1オクタン
トにおける円弧発生を終了する条件はx=yまた
はx=xEである。他のオクタントについても第
4図に円弧発生を終了する条件を示した。 以上、本発明を円弧発生を例にとつて説明した
が、直線または他の図形を発生する場合も、同様
に規則Bを適用すればよい。たとえば原点を通る
第1オクタント内の直線の場合、式(2)、(3)、(4)は
それぞれ f(x、y)=ay−bx=0(ただしa≧b>0)
……(2)′ f1=f(x、y+1)=f(x、y)+a ……(3)′ f2=f(x−1、y+1)=f(x、y)+a+b
……(4)′ でおきかえられ、規則Bのしきい値Tはa/2に
設定すれば良いことが後述するように証明され
る。 同様に、一般の直線f(x、y)=ay+bx+c
=0についても原点を通るように座標系を変換し
たのち、各オクタントごとに同様な方法が適用で
き、規則Bのしきい値Tは|a|≧|b|のとき
は|a|/2と設定し、|a|<|b|のときは
|b|/2と設定すれば良い。 以上円弧および直線の発生を例にとつて述べた
が、前記のしきい値Tの設定の仕方によつて正し
い円弧および直線を発生できることを以下に説明
する。 () 円弧発生の場合 T(しきい値)をr(円の半径)に設定すれ
ばよいことを説明する。 まず、第5図のように(2)式、 f(x、y)=x2+y2−r2 ……(2) で表される回転放物面を考える。 x軸上でx=rをはさんで両側に(5)、(6)式を
満たす点r1、r2(ただしr1>r、r>r2>0、
r≧1)を想定する。 r −r2=r(=f(r1、0)) ……(5) r −r2=−r(=f(r2、0)) ……(6) (5)、(6)式を変形して(7)、(8)式を得る。 r1=√2+ ……(7) r2=√2− ……(8) (7)、(8)式より(9)式を得る。 (√2+−√2−)=2r2−2√42
……(9) ところで (2r2−1)−(2√42=1>0
……(10) ゆえ(11)式の関係が導かれる。 2r2−1>2√42 ……(11) (11)式からさらに(12)式が導かれる。 2r2−2√42>1 ……(12) (12)式から(13)を得る。 (√2+−√2−)>1(=12
……(13) (7)、(8)、(13)式から(14)式で表わされる
結果を得る。 r1−r2>1 ……(14) (14)式から、(2)式で表わされるf(x、
y)の変位の絶対値|f(x、y)|がr以下
となるようなリング状領域Rの半径方向の幅は
1より大きいことがわかる。 第1オクタント内の左回り円弧発生におい
て、現在点をP0=(X、Y)とすればP0は本発
明の規則そのものによつて選ばれたのであるか
らすでに|f(X、Y)|<rの条件を満足し
ている。すなわちP0は領域Rの内部にあるはず
である。さて、次に選択される点はP1=(X、
Y+1)かP2=(X−1、Y+1)のいずれか
であるが、XとY−1の幅は1であり、Xが領
域R内にあり、かつ領域Rの幅が1以上である
ので、XとX−1の両者が領域R外に存在する
ことにあり得ない。 すなわち|f1(X、Y+1)|、|f2(X−
1、Y+1)|の両者が、r以上になることは
あり得ない(両者がまれに共に<rになること
はあり得る。その場合は最初に<rを満足する
と判定された隣接する点を次に選択すべき点と
する)。このようにして、必ずリング状領域R
の内部にある点が次々と選択されるため、円を
近似する点列、即ち円を発生できる。 なお、円の半径をrとする時、領域Rの幅w
は(5)、(6)式より w=r1−r2=√2+−√2− である。このwを色々なrの値について計算す
ると表1が得られる。
By selecting points according to [Table] and repeating this process, a graphic signal for outputting an arc is generated. In the case of a circular arc, it will be proven later that it is sufficient to set T=r (radius of the circle). Next, FIG. 3 shows an example of the configuration of an apparatus according to the present invention for generating arcs in the first octant. In Fig. 3, 1 is the X counter, 2 is the Y counter, and 3 and 4 are the X counter 1 and Y counter, respectively.
A 1-bit shifter for immediately doubling the contents of counter 2 and outputting it; 5 is an F register for storing the value of f in equation (2); 6 and 7 are arithmetic units that combine adders; 8 is a rule B threshold T
9 is a comparator, 10 is a buffer register that stores the intermediate calculation result of the value of f,
11 is an X increment generation circuit, 12 is a Y increment generation circuit,
13 is an end point detection circuit. To operate this device, first set the X and Y coordinate values (X s = r, Y s = 0) of the starting point P of the circular arc to
Set the value of f(X s , Y s ) (in this case, the point X s , Y s ) is on the circle, so this value is 0) to the F register 5. Furthermore, the value of the radius r of the circle is set in the T register 8. Next, the operation is started by applying the clock signal C to the arithmetic unit 6. First, the contents of F register 5 (f) and 1-bit shifter 4
The arithmetic unit 6 calculates the value f 1 =f+2y+1 using the output (2y), and sends the arithmetic result to the comparator 9 and buffer register 10. continue
The content T (=
r), and if | f 1 | ) is stored in the F register 5 as the new value of f, and then sent to the arithmetic unit 6 as follows.
Add next clock signal C. Note that at this time, nothing is sent to the arithmetic unit 7, and the X counter 1,
The 1-bit shifter 3 and the X increment generation circuit 11 remain retained. On the other hand, if |f 1 |≧r, buffer register 10
and without sending a signal to the Y increment generation circuit 12,
The value f 1 is sent as it is to the arithmetic unit 7, and by combining it with the output (2x) of the 1-bit shifter 3, the arithmetic unit 7 calculates the value f 2 = f 1 - 2x + 1. This is stored as is in the F register 5 and a new value is generated. f, and sends a signal to the X increment generating circuit 11 to reduce the contents of the X counter 1 by 1, and then applies the next clock signal C to the arithmetic unit 6. By repeating the above operation, a counterclockwise circular arc in the first octant is generated, and the signal is sent to the X counter 1, Y counter 2, or X increment at each timing as the X, Y coordinate value or the X, Y increment. Generation circuit 11, Y increment generation circuit 12
taken out from The end point may be detected by the end point detection circuit 13 when the contents of the X counter 1 and the Y counter 2 become equal (x=y). By doing the same thing for each of the first to eighth octants, a complete circle can be generated. Furthermore, by devising the end point detection conditions as shown in Figure 4, the starting point (X s , Y s )
Any counterclockwise arc can be drawn from to the end point (X E , Y E ) (the same applies to clockwise arcs). In FIG. 4, for example, the condition for terminating the arc generation in the first octant is x=y or x= xE . For other octants, conditions for terminating arc generation are shown in FIG. The present invention has been described above using the generation of circular arcs as an example, but Rule B may be similarly applied when generating straight lines or other figures. For example, in the case of a straight line in the first octant passing through the origin, equations (2), (3), and (4) are f(x, y) = ay - bx = 0 (where a≧b>0), respectively.
...(2)' f 1 = f (x, y + 1) = f (x, y) + a ... (3)' f 2 = f (x-1, y + 1) = f (x, y) + a + b
...(4)' is replaced, and it is proved as described later that the threshold T of rule B should be set to a/2. Similarly, the general straight line f (x, y) = ay + bx + c
After converting the coordinate system so that =0 passes through the origin, a similar method can be applied to each octant, and the threshold T of rule B is |a|/2 when |a|≧|b| When |a|<|b|, it is sufficient to set |b|/2. Although the generation of circular arcs and straight lines has been described above as an example, it will be explained below that correct circular arcs and straight lines can be generated by setting the threshold value T described above. () In the case of circular arc occurrence It will be explained that T (threshold value) should be set to r (radius of circle). First, consider a paraboloid of revolution expressed by equation (2), f(x, y)=x 2 +y 2 -r 2 . . . (2) as shown in FIG. Points r 1 and r 2 that satisfy equations (5) and (6) on both sides of x=r on the x-axis (however, r 1 > r, r > r 2 > 0,
r≧1). r 2 1 −r 2 = r (= f (r 1 , 0)) ……(5) r 2 2 − r 2 = −r (= f (r 2 , 0)) ……(6) (5) , transform equation (6) to obtain equations (7) and (8). r 1 =√ 2 + ...(7) r 2 =√ 2 − ...(8) From equations (7) and (8), equation (9) is obtained. (√ 2 +−√ 2 −) 2 = 2r 2 −2√ 42
...(9) By the way, (2r 2 -1) 2 - (2√ 4 - 2 ) 2 =1>0
...(10) Therefore, the relationship of equation (11) is derived. 2r 2 −1>2√ 42 ...(11) Equation (12) is further derived from equation (11). 2r 2 −2√ 42 > 1 ...(12) Obtain (13) from equation (12). (√ 2 +−√ 2 −) 2 > 1 (= 1 2 )
...(13) From equations (7), (8), and (13), we obtain the result expressed by equation (14). r 1r 2 > 1 ...(14) From equation (14), f(x,
It can be seen that the width in the radial direction of the ring-shaped region R such that the absolute value of the displacement of y) |f(x,y)| is equal to or less than r is greater than 1. In the generation of a counterclockwise circular arc in the first octant, if the current point is P 0 = (X, Y), then P 0 is selected according to the rules of the present invention, so it is already |f(X, Y) The condition |<r is satisfied. That is, P 0 must be inside region R. Now, the next point to be selected is P 1 = (X,
Either Y+1) or P 2 = (X-1, Y+1), but the width of X and Y-1 is 1, X is within region R, and the width of region R is greater than or equal to 1. Therefore, it is impossible for both X and X-1 to exist outside region R. That is, |f 1 (X, Y+1)|, |f 2 (X-
1, Y+1) | cannot be greater than or equal to r (it is possible for both to be <r in rare cases. In that case, first select adjacent points that are determined to satisfy <r. (This is the next point to be selected.) In this way, the ring-shaped region R is always
Since points within the circle are selected one after another, a sequence of points that approximate a circle, that is, a circle, can be generated. Furthermore, when the radius of the circle is r, the width of the region R is w
From equations (5) and (6), w=r 1 −r 2 =√ 2 +−√ 2 −. Table 1 is obtained by calculating this w for various values of r.

【表】【table】

〔T1に証明〕[Proved to T1]

第7図において、Q0が領域B内の長さ1の線
分上のいずれかの位置に存在するとき(Q0
直前に本発則によつて選ばれた点であるから当然
領域B内にある)、Q1は長さ1の線分上に、
またQ2の長さ1の線分上にあるはずである。
一方、仮定|a|≧|b|より、直線Lの勾配は
1より小さいので、領域Bの上側境界線Ltは線
分上の一点Gを通り、また領域Bの下側境界
線Lbは線分上の一点Fを通る。このとき線分
は長さ1であり、またQ1とQ2の間の線分も長
さ1であるから、Q1もしくはQ2のうち少なくと
も一ケは必ず線分上に、すなわち領域B内に
存在する。 なお、点Q1と点Q2が同時に領域B内に存在す
るのは、点Q1が点F(すなわち、直線Lb)上
に、また点Q2が点G(すなわち、直線Lt)上に
それぞれ重なつて存在する場合に限られる。 また、同様に|a|<|b|のときには、しき
いちTをT=|b|/2と設定すればよいことは明らか である。 〔発明の効果〕 以上説明したように、本発明の図形信号発生装
置は加算器、比較器、レジスタ等の安価でかつ簡
単な回路の組合わせにより、高精度の図形信号を
高速で発生できるという利点がある。
In Fig. 7, when Q 0 exists at any position on a line segment of length 1 in area B (this is the point selected by the present rule just before Q 0 , so naturally it is in area B). ), Q 1 is on a line segment of length 1,
It should also be on the line segment of length 1 of Q2 .
On the other hand, according to the assumption |a|≧|b|, the slope of the straight line L is less than 1, so the upper boundary line L t of the region B passes through a point G on the line segment, and the lower boundary line L b of the region B passes through point F on the line segment. At this time, the line segment has a length of 1, and the line segment between Q 1 and Q 2 also has a length of 1, so at least one of Q 1 or Q 2 is always on the line segment, that is, in area B. exists within. Note that point Q 1 and point Q 2 exist in area B at the same time because point Q 1 is on point F (i.e., straight line L b ) and point Q 2 is on point G (i.e., on straight line L t ). Limited to cases where each exists on top of the other. Similarly, when |a|<|b|, it is clear that the threshold T should be set to T=|b|/2. [Effects of the Invention] As explained above, the graphic signal generation device of the present invention can generate high-precision graphic signals at high speed by combining inexpensive and simple circuits such as adders, comparators, registers, etc. There are advantages.

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

第1図は本発明による円弧発生における点の選
択方向を各オクタントごとに示した図、第2図は
第1オクタントにおける左まわり円弧の発生を示
す図、第3図は第2図の円弧を発生するように構
成された本発明装置の構成例図、第4図は第3図
の装置を組み合わせて任意の円弧を描く際に必要
となる各オクタントにおける終点検出条件を示す
図である。第5図は本発明による円弧発生の場
合、しきい値Tを円の半径rに設定すればよいこ
とを説明するための図である。第6図及び第7図
は本発明による直線発生の場合、しきい値Tを
|a|/2に設定すればよいことを説明するための図で ある。 1……Xレジスタ、2……Yレジスタ、3,4
……1ビツトシフタ、5……Fレジスタ、6,7
……演算ユニツト、8……Tレジスタ、9……比
較器、10……バツフアレジスタ、11……X増
分発生回路、12……Y増分発生回路、13……
終点検出回路。
Fig. 1 is a diagram showing the selection direction of points in each octant in arc generation according to the present invention, Fig. 2 is a diagram showing the generation of a counterclockwise circular arc in the first octant, and Fig. 3 is a diagram showing the arc of Fig. 2. FIG. 4 is a diagram illustrating an example of the configuration of an apparatus of the present invention configured to generate a circular arc, and is a diagram showing end point detection conditions in each octant that are necessary when drawing an arbitrary arc by combining the apparatuses shown in FIG. 3. FIG. 5 is a diagram for explaining that in the case of arc generation according to the present invention, the threshold value T may be set to the radius r of the circle. FIGS. 6 and 7 are diagrams for explaining that in the case of straight line generation according to the present invention, the threshold value T may be set to |a|/2. 1...X register, 2...Y register, 3, 4
...1 bit shifter, 5...F register, 6,7
... Arithmetic unit, 8 ... T register, 9 ... Comparator, 10 ... Buffer register, 11 ... X increment generation circuit, 12 ... Y increment generation circuit, 13 ...
End point detection circuit.

Claims (1)

【特許請求の範囲】 1 離散的なx座標及びy座標を指定して図形を
出力する装置に対して、関数f(x、y)=0の
形で表現される図形を出力させるための信号を発
生させる図形信号発生装置において、 発生すべき図形のx座標値(X)およびy座
標値(Y)をそれぞれ格納するXレジスタ、お
よびYレジスタと、 点(X、Y)における変位、すなわちf1=f
(X、Y)の値を格納するFレジスタと、 発生させる図形に対応して予め定まるしきい
値Tを格納するTレジスタと、 前記Fレジスタの内容の絶対値すなわち|f
(X、Y)|を求め、さらに前記絶対値|f
(X、Y)|と前記Tレジスタの内容Tとの差
をとることによつて比較を行う比較器と、 前記比較器からの出力にもとづいて前記X、
Yの増分を発生させるX増分発生回路およびY
増分発生回路と、 前記Fレジスタ内のf1=f(X、Y)の値を
更新するための演算ユニツトと、 前記Xレジスタおよび前記Yレジスタの内容
を調べ、該Xレジスタの内容および/あるいは
該Yレジスタの内容が予め設定しておいた条件
を満たした時に終点と判定して図形の発生動作
を終了することを指示する信号を出力する終点
検出回路、 とを具備したことを特徴とする図形信号発生装
置。 2 f(x、y)=x2+y2−r2=0で表現される
半径rの円あるいは円弧を出力するための図形信
号を発生する時には、前記Tレジスタに格納する
しきい値Tを、T=rと設定することを特徴とす
る特許請求の範囲第1項記載の図形信号発生装
置。 3 f(x、y)=ay−bx=0で表現される直線
を出力するための図形信号を発生する時には、前
記Tレジスタに格納するしきい値Tを、|a|>
|b|の場合にはT=|a|/2と設定し、|a|<| b|の場合にはT=|b|/2と設定することを特徴と する特許請求の範囲第1項記載の図形信号発生装
置。
[Claims] 1. A signal for causing a device that outputs a figure by specifying discrete x and y coordinates to output a figure expressed in the form of a function f(x, y) = 0. In a figure signal generator that generates 1 = f
An F register that stores the value of (X, Y), a T register that stores a predetermined threshold T corresponding to the figure to be generated, and the absolute value of the contents of the F register, that is, |f
(X, Y)|, and further the absolute value |f
a comparator that performs a comparison by taking the difference between (X, Y)| and the content T of the T register;
X increment generation circuit that generates Y increments and Y
an increment generating circuit; an arithmetic unit for updating the value of f 1 =f(X, Y) in the F register; and checking the contents of the X register and the Y register, and determining the contents of the X register and/or An end point detection circuit that determines the end point when the contents of the Y register satisfy a preset condition and outputs a signal instructing to end the figure generation operation. Graphic signal generator. 2 When generating a graphic signal to output a circle or arc of radius r expressed by f(x, y) = x 2 + y 2 - r 2 = 0, the threshold value T stored in the T register is , T=r. 3. When generating a graphic signal for outputting a straight line expressed by f(x, y) = ay - bx = 0, the threshold value T stored in the T register is set as |a|>
In the case of |b|, T=|a|/2 is set, and in the case of |a|<|b|, T=|b|/2 is set. The graphic signal generator described in Section 1.
JP36177A 1977-01-07 1977-01-07 Pattern signal generator Granted JPS5386122A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP36177A JPS5386122A (en) 1977-01-07 1977-01-07 Pattern signal generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP36177A JPS5386122A (en) 1977-01-07 1977-01-07 Pattern signal generator

Publications (2)

Publication Number Publication Date
JPS5386122A JPS5386122A (en) 1978-07-29
JPS6232519B2 true JPS6232519B2 (en) 1987-07-15

Family

ID=11471657

Family Applications (1)

Application Number Title Priority Date Filing Date
JP36177A Granted JPS5386122A (en) 1977-01-07 1977-01-07 Pattern signal generator

Country Status (1)

Country Link
JP (1) JPS5386122A (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS578584A (en) * 1980-06-18 1982-01-16 Nippon Electric Co Video controller
JPS5741688A (en) * 1980-08-26 1982-03-08 Mitsubishi Electric Corp Circular-arc generating method
JPS61261779A (en) * 1985-05-14 1986-11-19 インタ−ナショナル ビジネス マシ−ンズ・コ−ポレ−ション Generation of curve of second order signal
JPH04363772A (en) * 1991-01-29 1992-12-16 Nec Corp System for plotting circle
JP6617463B2 (en) * 2015-07-31 2019-12-11 大日本印刷株式会社 Pattern editing program, pattern editing apparatus, pattern editing method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4834437A (en) * 1971-09-06 1973-05-18

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4834437A (en) * 1971-09-06 1973-05-18

Also Published As

Publication number Publication date
JPS5386122A (en) 1978-07-29

Similar Documents

Publication Publication Date Title
US4272808A (en) Digital graphics generation system
US5638095A (en) Graphic pattern processing apparatus having a parallel to serial conversion unit
US5570463A (en) Bresenham/DDA line draw circuitry
JPH03127282A (en) Radon transforming method of digital image
JPH0927039A (en) Method and apparatus for computation of texel value for display of texture on object
GB2150797A (en) Graphic display system
JPS6232519B2 (en)
US4945497A (en) Method and apparatus for translating rectilinear information into scan line information for display by a computer system
JPH0523439B2 (en)
JPH03144782A (en) Three-dimensional processor
JP3094906B2 (en) Trend graph display
SU807362A1 (en) Device for shaping vectors on crt screen
SU1005171A1 (en) Information displaying device
SU463997A1 (en) Device for displaying information
EP0247711A2 (en) Line display apparatus and method
JPH0255800B2 (en)
JPH0315193B2 (en)
JP2006201331A (en) Digital image display method, digital image display apparatus, digital image display program and recording medium in which digital image display program is recorded
JPS62145482A (en) Picture processor
JP3004993B2 (en) Image processing device
SU723622A1 (en) Information display
JPS60200371A (en) Graphic generator
JPH03123984A (en) Thick line generation device
JPS6370387A (en) Circular arc drawing system
JPH03147190A (en) Straight line drawing method