JPS628275A - Vector drawing system - Google Patents

Vector drawing system

Info

Publication number
JPS628275A
JPS628275A JP14637085A JP14637085A JPS628275A JP S628275 A JPS628275 A JP S628275A JP 14637085 A JP14637085 A JP 14637085A JP 14637085 A JP14637085 A JP 14637085A JP S628275 A JPS628275 A JP S628275A
Authority
JP
Japan
Prior art keywords
vector
origin
coordinate system
point
algorithm
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
JP14637085A
Other languages
Japanese (ja)
Inventor
Kazuo Yokoyama
和夫 横山
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP14637085A priority Critical patent/JPS628275A/en
Publication of JPS628275A publication Critical patent/JPS628275A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To prevent a remainder for erasing and the generation of the abnormal color of the boundary of a color graphic form due to a harmful hysteresis appearing during the development of vector by developing the vector by a specific algorithm when a segment is developed to a two dimensional memory through the vector development by the algorithm of a digital differential analyzer (DDA). CONSTITUTION:A comparison circuit 15 consists of an OR gate 17, a selector 18 and a comparator 16. A picture drawing direction by writing a segment AB to a two dimensional memory, namely the direction of a vector development can be judged including the operation of a parallel moving conversion of a coordinate system to an origin coordinate system, since before the start of an algorithm of a DDA, the parallel movement conversion of the coordinate system to the origin coordinate system is previously carried out. As the origin, a point A or B can be optionally selected and by taking the selected origin for an origin of the origin coordinate system, the direction from the origin directed to other point, namely an end point is the direction of the vector development in the origin coordinate system O.

Description

【発明の詳細な説明】 〔概要〕 ディジタル微分解析器(DDA )の手法によるアルゴ
リズムで(以下DDAのアルゴリズムと略記)、メモリ
上にベクトル展開することにより線分を描く場合、同一
線分の展開でも、展開の向きにより書込み座標(アドレ
ス)が不一致となることがあるが、本発明はこの不一致
の発生を防止する方式。
[Detailed Description of the Invention] [Summary] When a line segment is drawn by vector expansion on memory using an algorithm using a digital differential analyzer (DDA) method (hereinafter abbreviated as DDA algorithm), the expansion of the same line segment is However, the writing coordinates (addresses) may not match depending on the direction of expansion, but the present invention is a method to prevent this mismatch from occurring.

〔産業上の利用分野〕[Industrial application field]

X軸、Y軸を持つ2次元メモリを備えたベクトル描画装
置は、プリンタ、表示装置等に広く用いられており、特
にカラープリンタ、カラー表示装置に於いては2次元メ
モリは複数枚となる。
A vector drawing device equipped with a two-dimensional memory having an X-axis and a Y-axis is widely used in printers, display devices, etc. In particular, color printers and color display devices have a plurality of two-dimensional memories.

1例として、第2図(a)に、X軸、Y軸を持つ2次元
メモリを3枚備えた、カラー用ベクトル描画装置の構成
のブロック図を示す。同図に於いて、1は、線分の両端
の座標、書込みメモリの指定等の指示を外部(例えば中
央処理装置)から受けて、その線分を各メモリに描くた
めのアドレスを発生するベクトル発生回路(以下VGと
略記)、2は読み書き回路(以下R/Wと略記)、3.
 4. 5は夫々赤、緑、青の2次元メモリ(以下MB
、 MG、MRと略記)である。
As an example, FIG. 2(a) shows a block diagram of the configuration of a color vector drawing device including three two-dimensional memories each having an X axis and a Y axis. In the figure, 1 is a vector that receives instructions such as the coordinates of both ends of a line segment, designation of a write memory, etc. from an external device (for example, a central processing unit) and generates an address for drawing the line segment in each memory. 2 is a generation circuit (hereinafter abbreviated as VG); 2 is a read/write circuit (hereinafter abbreviated as R/W); 3.
4. 5 are red, green, and blue two-dimensional memories (hereinafter referred to as MB).
, MG, MR).

DDAのアルゴリズムは、各色成分の線分のベクトル展
開(描画)を行うためベクトル発生回路VCで使用され
ている。本発明は、この例のようなベクトル発生回路V
GIで使用されるDDAのアルゴリズムに関するもので
ある。
The DDA algorithm is used in the vector generation circuit VC to perform vector expansion (drawing) of line segments of each color component. The present invention provides a vector generation circuit V as shown in this example.
This relates to the DDA algorithm used in GI.

ODAのアルゴリズムは簡易な回路で高速なベクトル展
開が可能なため、上記の例のみならず一般の線分発生に
広く使用されている。
Since the ODA algorithm is capable of high-speed vector expansion with a simple circuit, it is widely used not only for the above example but also for general line segment generation.

〔従来の技術〕[Conventional technology]

従来から使用されている線分のベクトル展開用のDDA
のアルゴリズムの1例のフロー図と、その実現のための
ベクトル発生回路VC,1の要部(DDAのアルゴリズ
ムに関係する部分)のブロック図を夫々第3図、第4図
に示し、同図により説明する。描画すべき線分ABは、
第5図(alに示すように、2次元メモリの座標系(原
点Om、以下メモリ座標系Omと略記)に於ける、A点
の座標とB点の座標を(夫々整数で)与えることでベク
トル発生回路VGに指示される。
Traditionally used DDA for vector expansion of line segments
A flow diagram of an example of the algorithm and a block diagram of the main part of the vector generation circuit VC,1 (part related to the DDA algorithm) for realizing the algorithm are shown in FIGS. 3 and 4, respectively. This is explained by: The line segment AB to be drawn is
As shown in Figure 5 (al), by giving the coordinates of point A and point B (each as an integer) in the two-dimensional memory coordinate system (origin Om, hereinafter abbreviated as memory coordinate system Om), The vector generation circuit VG is instructed.

ベクトル展開(描画)をA点からB点に向けて、即ち、
起点をA点として描く場合は、第5図(b)に示すよう
に、座標系OmをA点に並行移動により変換した座標系
(原点Oa、以下起点座標系Oaと略記)によりベクト
ル展開を行う。この並行移動は、ベクトル発生回路VC
内で、DDAのアルゴリズムの実行に先立って予め行っ
ておき、並行移動変換による補正はベクトル展開の出力
を補正することで行われる。
Direct the vector expansion (drawing) from point A to point B, that is,
When drawing the starting point as point A, vector expansion is performed using a coordinate system (origin Oa, hereinafter abbreviated as origin coordinate system Oa) obtained by converting the coordinate system Om to point A by parallel movement, as shown in Figure 5(b). conduct. This parallel movement is performed by the vector generation circuit VC
The correction by parallel movement transformation is performed by correcting the output of vector expansion, which is performed in advance prior to execution of the DDA algorithm.

起点座標系Oaに於けるA点の座標は0.0であり、B
点の座標を△X、△Yとすると、以下の関係がある、 Xb−Xa=△X Yb−Ya=△Y ここで、(Xa、Ya )、(Xb、Y、b )は、夫
々メモリ座標系Omに於けるA、B点の座標である。
The coordinates of point A in the origin coordinate system Oa are 0.0, and the coordinates of point B
If the coordinates of the points are △X and △Y, then the following relationship exists: Xb - Xa = △ These are the coordinates of points A and B in the coordinate system Om.

第5図(b)に示すように、B点は起点座標系Oaの第
1象限にあり、従って、△x〉0.△Y>0であり、且
つ、△X≧△Yであり、即ち、第1の178象限にある
場合を、基本的な場合として説明する。
As shown in FIG. 5(b), point B is in the first quadrant of the origin coordinate system Oa, and therefore Δx>0. A case in which ΔY>0 and ΔX≧ΔY, that is, in the first 178 quadrants, will be described as a basic case.

第4図に於いて、6,7は夫々△X、ΔYを保持するレ
ジスタ(以下YR,XRと略記)であり、8はインバー
タ(以下INと略記)、9は後述するnを後述のクロッ
クによりカウントすると共にカウント数を△Xと比較す
る機能を持つカウンタ(以下CNTと略記)である。1
0はクロックの周期により、インバータIN8の出力(
レジスタXR6の反転出力)とレジスタYR7の出力を
交互に選択出力するマルチプレクサ(以下MPXと略記
)、11は累算レジスタ(以下ARと略記)。
In FIG. 4, 6 and 7 are registers (hereinafter abbreviated as YR and XR) that hold ΔX and ΔY, respectively, 8 is an inverter (hereinafter abbreviated as IN), and 9 is a clock (n will be described later). This is a counter (hereinafter abbreviated as CNT) that has the function of counting by ΔX and comparing the counted number with ΔX. 1
0 is the output of inverter IN8 (
A multiplexer (hereinafter abbreviated as MPX) that alternately selects and outputs the inverted output of register XR6) and the output of register YR7, and 11 is an accumulation register (hereinafter abbreviated as AR).

12はマルチプレクサMPXIOの出力と累算レジスタ
ARIIの内容Aを加算する加算器(以下ADと略記)
、13は△Xに定数(1/2 ’)を乗算する乗算器(
以下MUと略記)であり、14は累算レジスタARII
の内容Aと乗算器MU13の出力Cを比較する比較器(
以下CMと略記)である。同図ではクロック関係の回路
は省略しである。
12 is an adder (hereinafter abbreviated as AD) that adds the output of the multiplexer MPXIO and the content A of the accumulation register ARII.
, 13 is a multiplier (
(hereinafter abbreviated as MU), and 14 is an accumulation register ARII
A comparator (
(hereinafter abbreviated as CM). In the figure, clock-related circuits are omitted.

MU13の出力はC=(1/2 ”)△Xであり、比較
器の出力条件はA>Cとする。整数n、mは、起点座標
系Oaに於ける原点OaからのX、Y座標の偏位(2次
元メモリのアドレスの1ステツプを単位とする)を夫々
表すものである。
The output of MU13 is C=(1/2 ”)△X, and the output condition of the comparator is A>C. Integers n and m are the X and Y coordinates from the origin Oa in the origin coordinate system Oa. (in units of one step of the two-dimensional memory address).

初期設定として、△X、△YをレジスタXR6゜YR7
に与え、n=0.m=0.A=O(起点は原点Oaであ
るから)とする。
As an initial setting, △X and △Y are set to registers XR6゜YR7.
and n=0. m=0. Let A=O (because the starting point is the origin Oa).

クロックはAの周期とBの周期を交互に繰り返しており
、A、Bの一対でクロックの1周期が構成されて繰り返
しているとする。
It is assumed that the clock alternately repeats the period A and the period B, and the pair of A and B constitutes one period of the clock and is repeated.

A周期では、マルチプレクサMPXIOはレジスタYR
7の出力を選択しており、第3図のDDAのアルゴリズ
ムのフローの第1段を、加算器AD12を介してA+△
Yを行い、累算レジスタAR11の内容Aを A+△Y→A とすることにより実施する。
In period A, multiplexer MPXIO registers YR
7 is selected, and the first stage of the DDA algorithm flow in FIG.
This is carried out by performing Y and setting the content A of the accumulation register AR11 to A+ΔY→A.

B周期では、マルチプレクサMPXIOはインバータI
N8の出力を選択しており、フローの第2段の比較器C
M14によるAとCの比較を行い、A>Cならば、フロ
ーの第3段であるmの値の1ステツプの歩道を指示する
出力を出すと共に、加算器ADに指示して、フローの第
4段であるA−△Xを行い、累算レジスタADの内容A
をA−△X−A とする。A>Cでない時は、フローの第3段、第4段の
動作はパスされる。一方、カウンタCNT9はクロック
をこの周期でカウントしており、フローの第5段でカウ
ント数をnをn−1−n−)−1とする。フローの第6
段では、このnと第3段で得られるmの歩進を指示する
出力の累算結果であるmとにより2次元メモリえの書込
みが行われる(累算回路は図示せず)。
In period B, multiplexer MPXIO connects inverter I
The output of N8 is selected, and the comparator C in the second stage of the flow
A and C are compared by M14, and if A>C, an output is output instructing one step of the value of m, which is the third stage of the flow, and an instruction is given to the adder AD to start the third step of the flow. Perform A-△X which is 4 stages, and the content A of the accumulation register AD
Let be A-ΔX-A. When A>C is not satisfied, the operations in the third and fourth stages of the flow are passed. On the other hand, the counter CNT9 counts the clock at this period, and in the fifth stage of the flow, the count number is set to n-1-n-)-1. 6th flow
In the second stage, writing into the two-dimensional memory is performed using this n and m, which is the accumulation result of the output instructing the increment of m obtained in the third stage (the accumulation circuit is not shown).

次にフローの第7段では、カウンタCNT9がnがn=
△Xに達したかどうかの比較を行い、達していなければ
、フローの第1段から繰り返すループ動作を続行するが
、n=△Xに達するとカウンタCNT9は完了信号Eを
出し終了となる。以上の7段のフローを、n 7’)<
 n =△Xになるまで繰り返すことにより、線分AB
が点Aから点Bまでベクトル展開されて2次元メモリに
描かれることになる。
Next, in the seventh stage of the flow, counter CNT9 indicates that n=n=
A comparison is made to see if ΔX has been reached, and if not, the loop operation repeating from the first stage of the flow is continued, but when n=ΔX is reached, the counter CNT9 issues a completion signal E and ends the process. The above 7-stage flow is expressed as n 7')<
By repeating until n = △X, line segment AB
is expanded into a vector from point A to point B and drawn in a two-dimensional memory.

第6図は△X=6.△Y=3の場合に就いて、上例のD
DAのアルゴリズムによる計算を行った結果であって、
同図(alは各ループ動作毎の数値例であり、フローの
第2段の判定結果の欄に於ける○、×印は夫々YES、
NOを示し、mは、mの歩進信号を累算したものである
。同図(blは原点をA点として起点座標系Oaにベク
トル展開されて描かれた線分ABを示し、座標点はO印
で示されており、各ループ動作毎に実線でしめす順序で
移動しながら描画される。
Figure 6 shows △X=6. In the case of △Y=3, D in the above example
This is the result of calculation using the DA algorithm,
In the same figure (al is a numerical example for each loop operation, ○ and × marks are YES, respectively in the judgment result column of the second stage of the flow)
Indicates NO, and m is the sum of m step signals. In the same figure (bl shows the line segment AB drawn by vector expansion in the origin coordinate system Oa with the origin as the point A, the coordinate points are indicated by O marks, and move in the order shown by the solid line for each loop operation. It is drawn while

尚、第7図は、上例に於ける、フローの第2段の判定条
件、即ち、比較器CMの出力条件をA≧C−(1/2 
)△X に換えた場合を示し、図中の各標記、記号は第6図と同
じである。
In addition, FIG. 7 shows the determination condition of the second stage of the flow in the above example, that is, the output condition of the comparator CM, such that A≧C−(1/2
) ΔX, and each label and symbol in the figure is the same as in Figure 6.

以上では、第5図(b)に示すように、B点は起点座標
系Oaの第1象限にあり、従って、△X〉0゜ΔY〉0
であり、且つ、ΔX≧△Yであり、即ち、第1の1/8
象限にある場合を、基本的な場合として説明した。この
場合が基本となる理由は公知であるが、以降の説明を容
易にするために、以下に説明して置く。
In the above, as shown in FIG. 5(b), point B is in the first quadrant of the origin coordinate system Oa, and therefore, △X〉0゜ΔY〉0
and ΔX≧ΔY, that is, the first 1/8
The case in the quadrant was explained as the basic case. The reason why this case is basic is well known, but will be explained below to facilitate the subsequent explanation.

まず、起点座標系Oで、ΔY≧△Xの場合、即ち、第2
の1/8象限にある場合は、予め、ΔY。
First, in the origin coordinate system O, if ΔY≧△X, that is, the second
If it is in the 1/8 quadrant of , then ΔY.

△Xを交換しておき、2次元メモリの書込みも補正して
行うようにしておくことにより、上述のDDAのアルゴ
リズムを実行することで解決できる。
This problem can be solved by exchanging ΔX and correcting the writing to the two-dimensional memory and executing the above-mentioned DDA algorithm.

従って、第1象限の場合は同じアルゴリズムで全てのベ
クトル展開が可能である。
Therefore, in the case of the first quadrant, all vectors can be expanded using the same algorithm.

起点座標系Oで、第1象限以外に線分がある場合は△X
、△Yの符号は、第8図(a)に示すようになるが、第
2象限の場合はへXの符号を反転、第3象限の場合は△
X、△Y双方の符号を反転、第4象限の場合は△Yの符
号を反転することにより第1象限に移すことが可能であ
り、予め、これらの処理を行い、2次元メモリの書込み
も補正して行うようにしておくことにより、実質的には
の上述のDDAのアルゴリズムでベクトル展開が出来る
In the origin coordinate system O, if there is a line segment outside the first quadrant, △X
, △Y are as shown in Fig. 8(a), but in the case of the second quadrant, the sign of △
It is possible to move to the first quadrant by inverting the signs of both X and △Y, and in the case of the fourth quadrant, by inverting the sign of △Y. Perform these processes in advance and write to the two-dimensional memory. By performing the correction, vector expansion can be substantially performed using the above-mentioned DDA algorithm.

第5図(C1は、前記の例に於ける線分ABをB点を起
点としてBからAの方向にベクトル展開して描画する場
合を示し、同図に示すように、起点座標系obの原点は
B点にとる。A点は第3象限にあるのでΔX、ΔY双方
の符号を反転して前述の処置をしておくことによりベク
トル展開することが出来る。こうして実行した結果を示
すと、夫々前記のA点からB点へのベクトル展開の場合
に対応して、第6図(b)、第7図中)に於いて、×印
9点線で示すように展開されてメモリに書込むことによ
り描かれる。
Figure 5 (C1 shows the case where the line segment AB in the above example is drawn by vector expansion in the direction from B to A with point B as the starting point, and as shown in the figure, the starting point coordinate system ob is The origin is set at point B. Since point A is in the third quadrant, vector expansion can be performed by inverting the signs of both ΔX and ΔY and performing the procedure described above.The result of this execution is shown below. Corresponding to the case of vector expansion from point A to point B, respectively, in FIGS. 6(b) and 7), the vectors are expanded as indicated by the 9 dotted lines marked with an x, and written into the memory. Depicted by

°ン 〔発明が解決塘 とする問題点〕 第6図(b)、第7図中)に示す例では、同一の線分A
Bを同一のDDAのアルゴリズムによりベクトル展開し
たにも関わらず、展開方向の違いにより展開描画された
各点は、一致しない点が現れる。
[Problem to be solved by the invention] In the example shown in FIGS. 6(b) and 7), the same line segment A
Even though B is vector-expanded using the same DDA algorithm, some points do not match due to the difference in the expansion direction.

即ち、0点と×点の不一致がみられる。In other words, there is a discrepancy between the 0 points and the x points.

この不一致は、点A、Bの座標は整数で与えられており
、その間を結ぶ線分上の点に関する、X座標の整数値に
対するY座標の計算値が、qを任意の整数とする時、q
+0.5となることがある場合に、0.5に関する切り
上げ、切り捨ての取捨選択により現れるもので、第3図
のフローの第2段目の判定に於ける等号の取捨選択に対
応する。一般に、ΔYが奇数、△Xが偶数の組合せの時
のみに現れ、第6図、第7図はその例である。近似計算
を行うDDAのアルゴリズムでは、この選択はどちらか
一方のみをとるので避けることが出来ない。
This discrepancy is because the coordinates of points A and B are given as integers, and the calculated value of the Y coordinate for the integer value of the X coordinate regarding a point on the line segment connecting them is, when q is an arbitrary integer. q
When the value is +0.5, this occurs by rounding up or rounding down regarding 0.5, and corresponds to the selection of equal signs in the second step of the judgment in the flow shown in FIG. Generally, it appears only when ΔY is an odd number and ΔX is an even number, and FIGS. 6 and 7 are examples of this. In the DDA algorithm that performs approximate calculations, this selection cannot be avoided because only one of them is selected.

このことは、線分ABをA点からB点に辿った後8点か
らA点に辿るベクトル展開を行って描画するとヒシテリ
シスを生ずることを示しており、2次元メモリ上で一度
描いた線分を消去しようとして、前記ベクトル発生回路
VG1の出力を消去にして逆方向に辿って書込みを行う
とき、消去出来ないで残る点があることを意味する。従
って、消去については、常に過去の書込み時の方向を記
憶しておく等の配慮がa;要になる欠点がある。
This shows that hysteresis will occur if line segment AB is drawn from point A to point B and then vector expanded from point 8 to point A. This means that when the output of the vector generating circuit VG1 is erased and writing is performed in the reverse direction, there are points that cannot be erased and remain. Therefore, for erasing, there is a drawback that considerations such as always remembering the direction of past writing are required.

又、例として第2図(b)に示すようなカラー図形、即
ち、赤のΔEAC,緑のΔABC,青のΔDBAは、夫
々色により分離されて、第2図(a)に示すように、赤
、緑、前妻用のメモリ(この場合は原色)MR3,MG
4.MB#に書込まれるが、辺AB、BCのような境界
線では、展開方向が、これらの境界を挟む各図形の辺を
なす線分のベクトル展開方向が第2図(a)のように異
なる時は、ずれた点を生じるので、各色の図形を全部、
同時に合成表示又はプリントした時、境界をなす辺AB
Further, as an example, color figures as shown in FIG. 2(b), that is, red ΔEAC, green ΔABC, and blue ΔDBA, are separated by color, and as shown in FIG. 2(a), Red, green, memory for ex-wife (primary colors in this case) MR3, MG
4. It is written to MB#, but for boundary lines such as sides AB and BC, the direction of expansion is the vector expansion direction of the line segments forming the sides of each figure that sandwich these boundaries, as shown in Figure 2 (a). When they are different, the points will be shifted, so all the shapes of each color are
When composite display or printing is performed at the same time, bordering side AB
.

ACの近傍では意図しない色を示す場合が発生して(特
に塗り潰し図形では)極めて不都合であると言う欠点が
ある。
There is a drawback that an unintended color may be displayed in the vicinity of AC (particularly in a filled figure), which is extremely inconvenient.

本発明は、以上のような、有害なヒシテリシスやカラー
の場合に於ける図形境界の異常色彩の発生等を排除する
簡単で有効な方式を提供することを目的とする。
It is an object of the present invention to provide a simple and effective method for eliminating harmful hysteresis and the occurrence of abnormal colors at figure boundaries in the case of color, as described above.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的を達成するため、ベクトル発生回路VG1に描
画方向判定機能を設け、その結果により第4図に示した
従来回路の比較器CM14に於ける判定条件を切り換え
可能なものにすることによりDDAのアルゴリズムをベ
クトル展開方向により切り換えるようにする。
In order to achieve the above object, the vector generation circuit VG1 is provided with a drawing direction determination function, and the determination condition in the comparator CM14 of the conventional circuit shown in FIG. 4 can be changed based on the result. The algorithm is switched depending on the direction of vector expansion.

〔作用〕[Effect]

このように、判定条件を切り換えてベクトル展開した場
合を、上述の第6図、第7図の例で結果を示すと、点A
から点B向けの場合、判定条件をA>(△X72)とし
てベクトル展開を行った第6図中)の0点と、逆に点B
から点A向けの場合、判定条件をA≧(△X/2)に切
り換えてベクトル展開を行った第7図(b)の×点は一
致していることがわかる。又、点Aから点B向けの場合
、判定条件をA≧(△X/2 )(=C)としてベクト
ル展開を行った第7図中)の0点と、逆に点Bから点A
向けの場合、判定条件をA>(△X/2 )(=C)に
切り換えてベクトル展開を行った第6図中)の×点は一
致していることがわかる。
In this way, when the judgment conditions are changed and the vector expansion is performed, the results are shown in the examples of FIGS. 6 and 7 mentioned above.
In the case of point B from
In the case of point A from , it can be seen that the x points in FIG. 7(b), which are obtained by switching the judgment condition to A≧(ΔX/2) and performing vector expansion, match. In addition, in the case of direction from point A to point B, the 0 point in Figure 7 in which vector expansion was performed with the judgment condition A≧(△X/2) (=C), and conversely, the direction from point B to point A
In the case of the direction, it can be seen that the x points in FIG. 6 (in which vector expansion was performed by switching the judgment condition to A>(ΔX/2) (=C)) match.

以上、例示した通り、判定条件に於ける等号を展開方°
向により、取捨選択することによりベクトル展開した結
果の展開方向による不一致を排除することができる。
As shown above, how to expand the equal sign in the judgment condition
By making a selection based on the direction, it is possible to eliminate inconsistencies in the vector expansion results due to the direction of expansion.

〔実施例〕〔Example〕

第1図に、1例として本発明を実施するベクトル発生回
路例の要部ブロック図を示す。同図では前述の第4図と
同じものは同じ記号で示してあり、15のみが第4図の
場合と異っており、Aと(△X/2 )(−C”)を比
較するもので後述の選択信号Sにより判定条件を切り換
え可能な比較器(以下CMSと略記)である。比較器C
MS 15の内容は、1例として第8図(b)に示され
ており、16は比較回路(以下COMと略記)、17は
ORゲート(以下ORと略記)、18は選択信号Sで入
力を選択するセレクタ(以下SELと略記)である。
FIG. 1 shows a block diagram of essential parts of an example of a vector generation circuit embodying the present invention as an example. In this figure, the same parts as in the above-mentioned figure 4 are indicated by the same symbols, and only 15 is different from the case in figure 4, which compares A and (△X/2)(-C''). This is a comparator (hereinafter abbreviated as CMS) whose judgment conditions can be switched by a selection signal S, which will be described later.Comparator C
The contents of the MS 15 are shown in FIG. 8(b) as an example, where 16 is a comparison circuit (hereinafter abbreviated as COM), 17 is an OR gate (hereinafter abbreviated as OR), and 18 is an input with a selection signal S. This is a selector (hereinafter abbreviated as SEL) for selecting.

線分ABの2次元メモリへの書込みによる描画方向、即
ち、ベクトル展開の方向の判定は、第1図のベクトル発
生回路の要部の動作の開始のため、初期設定を行う以前
に行う必要があるが、前述のように、DDAのアルゴリ
ズムの開始に先立って、予め、座標系の起点座標系への
並行移動変換が行われるので、その動作に含めてベクト
ル展開の方向を判定することが出来る。
The drawing direction of the line segment AB by writing it into the two-dimensional memory, that is, the direction of vector expansion, must be determined before initial settings are made in order to start the operation of the main parts of the vector generation circuit shown in FIG. However, as mentioned above, before the start of the DDA algorithm, a translation transformation of the coordinate system to the origin coordinate system is performed in advance, so the direction of vector expansion can be determined by including it in the operation. .

起点としては、点A又は点Bを任意に選ぶことが出来、
選んだ起点に起点座標系の原点をとることにより、その
原点から他の点即ち終点に向かう方向が起点座標系0に
於けるベクトル展開方向(線分は原点Oを起点とするベ
クトルになっているので)と言うことになる。
As the starting point, point A or point B can be arbitrarily selected,
By setting the origin of the origin coordinate system at the selected origin point, the direction from the origin to another point, that is, the end point, is the vector expansion direction in the origin coordinate system 0 (the line segment becomes a vector starting from the origin O). ).

第5図に於いて説明したように、起点座標系0に於ける
△X、△Yをとり、その符号を調べることにより、前記
線分の存在する象限を知ることが出来、その対応は第8
図(a)に示す通りである。
As explained in Fig. 5, by taking △X and △Y in the origin coordinate system 0 and checking their signs, it is possible to know the quadrant in which the line segment exists, and the correspondence is 8
As shown in Figure (a).

ベクトル展開即ち描画の方向が互いに逆方向ということ
は、第1象限に対して第3象限、第2象限に対して第4
象限が夫々対向する象限であり、夫々に第3図のフロー
にの第2段目の判定条件に於ける等号の取捨選択が逆に
なるような与え方は第8図(a)の0MS制御の欄に示
すa、b、c、dの4種類が可能となる。この等号の取
捨選択判定の回路は、前述のように、起点座標系への変
換に含めて容易に実現可能である。
The direction of vector expansion, that is, the direction of drawing, is opposite to each other, which means that the first quadrant is the third quadrant, and the second quadrant is the fourth quadrant.
The quadrants are opposite quadrants, and the method of giving them in which the selection of the equal sign in the second stage judgment condition of the flow in Figure 3 is reversed is 0MS in Figure 8 (a). Four types, a, b, c, and d shown in the control column are possible. As described above, this circuit for determining the selection of equal signs can be easily realized by being included in the conversion to the origin coordinate system.

この内の一つを選び、常にその組合せを使用し    
 ゛て、選択信号Sに対応させるようにすることで、比
較器CMSの判定条件をベクトル展開の方向により切り
換えることが出来る。
Choose one of these and always use that combination.
By making it correspond to the selection signal S, the judgment condition of the comparator CMS can be switched depending on the direction of vector expansion.

比較器CMS 15はA、Cを比較する比較回路C0M
16のA>Cの出力と、ORゲート0R17によりAr
c、A=Cの出力のORをとった出力を前記選択信号S
により選択するようにしたちのである。
Comparator CMS 15 is a comparison circuit C0M that compares A and C.
16 A>C output and OR gate 0R17
The output obtained by ORing the outputs of c and A=C is the selection signal S.
The choice is made based on the following.

以上説明したように、DDAのアルゴリズムの第3図の
フローに於ける第2段目の判定条件をベクトル展開の方
向により比較器CMS15で切り換えることにより、ア
ルゴリズムを切り換えて展開点の展開方向による不一致
を排除することが出来る。
As explained above, by switching the judgment condition of the second stage in the flow of the DDA algorithm shown in FIG. can be excluded.

尚、上述の第6図、第7図の例で示すと、点Aから点B
向けの場合、判定条件をA>(△X/2)としてベクト
ル展開を行った第6図(b)の0点と、逆に点Bから点
A向けの場合、判定条件をA≧(△X/2)に切り換え
てベクトル展開を行った第7図(blのX点は一致して
いることを説明したが、この場合が方向による判定条件
としてbを選んだ場合である。又、点Aから点B向けの
場合、判定条件をA≧(△X/2 )(=C)としてベ
クトル展開を行った第7図中)の0点と、逆に点Bから
点A向けの場合、判定条件をA>(ΔX/2 )(=C
)に切り換えてベクトル展開を行った第6図中)のX点
は一致していることを示したが、この場合が方向による
判定条件としてaを選んだ場合に相当する。
In addition, in the example of FIGS. 6 and 7 mentioned above, from point A to point B
In the case of direction, the judgment condition is A>(△ Figure 7 shows vector expansion performed by switching to X/2) (I explained that the X points of bl match, but this case is the case where b is selected as the judgment condition based on the direction. Also, the point In the case of going from A to point B, the judgment condition is A≧(△X/2) (=C) (in Figure 7) where vector expansion was performed), and vice versa, in the case of going from point B to point A, The judgment condition is A>(ΔX/2)(=C
) and vector expansion was performed, and it was shown that the X points in ) in FIG.

〔発明の効果〕〔Effect of the invention〕

本発明のベクトル描画方式は、以上説明したように、D
DAのアルゴリズムによるベクトル展開で線分を2次元
メモリに展開する場合に、ベクトル展開の展開方向によ
り現れる、有害なヒシテリシスによる消去残や、カラー
の場合に於ける図形境界の異常色彩の発生等を、簡単な
操作と回路により排除する効果がある。
As explained above, the vector drawing method of the present invention is based on the D
When a line segment is expanded into a two-dimensional memory using vector expansion using the DA algorithm, it is necessary to prevent deletion residue due to harmful hysteresis that appears depending on the direction of vector expansion, and occurrence of abnormal colors at figure boundaries in the case of color. , has the effect of eliminating with simple operation and circuit.

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

第1図は本発明を実施するベクトル発生回路例の要部ブ
ロック図、 主 第2図はベクトル発y回路からメモリへのベクトル展開
説明図、 第3図はベクトル展開アルボ1にズムの1例のフロー図
、 第4・図はベクトル発生回路側要部ブロック図、   
   間第5図は描画方向説明図、 第6図、第7図は従来アルゴリズムによる描画例、 第8図は本発明のベクトル描画方向によるアルゴリズム
の変更制御の説明図である。 第1図、第2図、第4図、第8図に於いて、1はベクト
ル発生回路VC 2は読み書き回路R/W 3.4.5は夫々赤、緑、青の2次元メモリMR開や 
Mら 、INI、 J!3%、ノY、 6はレジスタXR。 7はレジスタYR。 8はインバータIN、 9はカウンタCNT、 10はマルチプレクサMPX。 11は累算レジスタAR。 12は加算器AD。 13は乗算きMU、 14は比較器CM。 15は比較器CMS 16は比較回路COM。 17はORゲートOR。 18はセレクタSELである。 ノ参嘴1月と実力ヒq3Δフトlしも1ロ1fMの要嘩
ψ’7−[17)図亭  1  図 へ7トノし層間アル丁すズ乙の1列のフD−図♀ 3 
 足口 べ゛Zトル禿生回り、/FJの9唖ゆフ゛ロッフ囚茅 
4El 堵6通論方aつ玄でν月ffi 茅 5 圀 (I)) イσ−系アルコ゛ワス゛′ム1;I3訓乃還λΔゲJ)
ζ    乙    冴] (ごと) (’b) 疫承アlしコ゛ソス゛°乙(二よる請乃jシ4グJ茅 
7 図
Figure 1 is a block diagram of the main part of an example of a vector generation circuit that implements the present invention, Figure 2 is an explanatory diagram of vector expansion from the vector generation circuit to memory, and Figure 3 is an example of vector expansion algorithm 1. Figure 4 is a block diagram of the main parts of the vector generation circuit,
FIG. 5 is an explanatory diagram of the drawing direction, FIGS. 6 and 7 are examples of rendering by the conventional algorithm, and FIG. 8 is an explanatory diagram of algorithm change control according to the vector rendering direction of the present invention. 1, 2, 4, and 8, 1 is a vector generation circuit VC, 2 is a read/write circuit R/W, and 3.4.5 is a two-dimensional memory MR opener for red, green, and blue, respectively. or
M et al., INI, J! 3%, ノY, 6 is register XR. 7 is register YR. 8 is an inverter IN, 9 is a counter CNT, and 10 is a multiplexer MPX. 11 is an accumulation register AR. 12 is an adder AD. 13 is a multiplier MU, and 14 is a comparator CM. 15 is a comparator CMS, and 16 is a comparison circuit COM. 17 is an OR gate. 18 is a selector SEL. Nosan beak January and ability height 3Δft l Shimo 1ro 1fM required ψ'7-[17) Diagram 1 Figure 7 Tono and interlayer Al tin tin Otsu's 1 row FuD-Figure ♀ 3
Ashiguchi's 9-year-old bald body, /FJ's 9-year-old bald prisoner
4 El and 6 general theories atsugen de ν monthffi 茅 5 圀(I)) Iσ-based algorithm 1; I3 lesson return λΔ game J)
ζ Otsu Sae] (goto) ('b) Epidemic awareness is also a good thing.
7 Figure

Claims (1)

【特許請求の範囲】[Claims] X軸、Y軸を持つ2次元メモリを少なくとも1枚備えた
ベクトル描画装置に於いて、該メモリに対しベクトル展
開を行う場合、ベクトル展開の方向により異なるアルゴ
リズムによって、ベクトル展開を行うことを特徴とする
ベクトル描画方式。
In a vector drawing device equipped with at least one two-dimensional memory having an Vector drawing method.
JP14637085A 1985-07-03 1985-07-03 Vector drawing system Pending JPS628275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14637085A JPS628275A (en) 1985-07-03 1985-07-03 Vector drawing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14637085A JPS628275A (en) 1985-07-03 1985-07-03 Vector drawing system

Publications (1)

Publication Number Publication Date
JPS628275A true JPS628275A (en) 1987-01-16

Family

ID=15406182

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14637085A Pending JPS628275A (en) 1985-07-03 1985-07-03 Vector drawing system

Country Status (1)

Country Link
JP (1) JPS628275A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0417081A (en) * 1990-05-10 1992-01-21 Japan Radio Co Ltd Method fork generating segment approximation coordinate
JPH0561980A (en) * 1991-09-04 1993-03-12 Nec Corp Line segment plotter

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5528139A (en) * 1978-08-15 1980-02-28 Nec Corp Vector production circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5528139A (en) * 1978-08-15 1980-02-28 Nec Corp Vector production circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0417081A (en) * 1990-05-10 1992-01-21 Japan Radio Co Ltd Method fork generating segment approximation coordinate
JPH0561980A (en) * 1991-09-04 1993-03-12 Nec Corp Line segment plotter

Similar Documents

Publication Publication Date Title
JPH0419556B2 (en)
JPS60191293A (en) Fast linear interpolation circuit for crt display unit
JP2005077522A (en) Image processor and image processing method
JPS628275A (en) Vector drawing system
GB2226481A (en) Method and apparatus for decomposing a quadrilateral figure for display and manipulation by a computer system
EP0464601A2 (en) Arithmetic operation system
JPH02123470A (en) Graphic computer apparatus
JPH0256678B2 (en)
JPS6059386A (en) Pattern line drawing system and apparatus
JP2836617B2 (en) Rendering processor
JP4048731B2 (en) Image data transfer apparatus and image display processing system
JPH01166177A (en) Thick line drawing system for dda circuit
JP2627112B2 (en) Vector generator
JPS63118790A (en) End shape correction system for drawing segment with width
JPS63163981A (en) Graphic enlarging and reducing circuit
JPS6175386A (en) Data shifting circuit for bit map display unit
JPH04117583A (en) Thick line plotting circuit
JPH02257292A (en) Address generator for picture memory
JPS6214194A (en) Bit map mover
JPS6392993A (en) Painting circuit
JPH02228783A (en) Image processor
JPS6368985A (en) Face painting system
JPS63198094A (en) Lithography for bit map display system
JPH02183877A (en) Graphic display device
JPS63180997A (en) Fast lithography