JPS6314286A - Circle depiction system - Google Patents

Circle depiction system

Info

Publication number
JPS6314286A
JPS6314286A JP15659586A JP15659586A JPS6314286A JP S6314286 A JPS6314286 A JP S6314286A JP 15659586 A JP15659586 A JP 15659586A JP 15659586 A JP15659586 A JP 15659586A JP S6314286 A JPS6314286 A JP S6314286A
Authority
JP
Japan
Prior art keywords
circle
arc
thick line
pixels
center
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
JP15659586A
Other languages
Japanese (ja)
Inventor
Shigeo Takahashi
重夫 高橋
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP15659586A priority Critical patent/JPS6314286A/en
Publication of JPS6314286A publication Critical patent/JPS6314286A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To depict a natural circle with a thick line without striping the thick line by using an algorithm where the center of the circle is successively shifted inward to describe arcs having the same radius and this operation is repeated to depict the circle with the thick line. CONSTITUTION:A CPU 1 outputs an arc description instruction, which has coordinates of the center of an arc, coordinates of the depiction start point, the number of clockwise traversed picture elements, and the number of picture elements to be depicted as parameters, to a picture processor. The processor 3 obtains the number of picture elements to be depicted or an outside circle in accordance with these parameters to depict this circle, and the center is shifted inward to describe an arc with the same radius. The number of picture elements of the following arc is obtained for the purpose of synchronizing depiction with error correction of the processor 3 to depict an arc having the same radius. In this system, stripes which appear for depiction of a thick line are eliminated and the circle is depicted in a two-dimensional picture memory space with the thick line of a single picture element. As the result, the circle which looks natural is depicted with the thick line.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野ン 本発明はグラフィック人力システムに用いて好適な円描
画方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to a circle drawing method suitable for use in a graphic manual system.

(従来の技術) ラスク走査型CRTディスプレイを用いたグラフィック
装置で円弧を描画することは、少くとも1画面分の容i
kを持つビットマツプメモリに対して、ビット単位でデ
ータ修正を加えることを意味する。元来、円弧は連続的
に値が変化するアナログ賛なので、それを格子の叉点上
のドツトとして近似し、量子化するため、描画装置は何
等かの処理を行なう必要がある。
(Prior art) It is difficult to draw an arc with a graphics device using a rask scanning type CRT display.
This means that data is modified bit by bit for the bitmap memory with k. Originally, arcs are analog objects whose values change continuously, so the drawing device must perform some processing to approximate and quantize them as dots on the crosspoints of a grid.

通常、記憶装置の一次元アドレス空間内に二次元の画像
空間を開設し、その空間に円の中心座標と半径の人力・
母うメータから円弧の座標を求め描画することが行なわ
れる。
Normally, a two-dimensional image space is created within the one-dimensional address space of the storage device, and the center coordinates of the circle and the radius are manually input to that space.
The coordinates of the arc are determined from the main meter and drawn.

(発明が解決しようとする問題点) ところで、上述した描画装置において、太線で示される
円を描画する場合、1個の円を描画した後、同心で、且
つ半径が1画素小さい円を更て描画することで対応して
いt、この様子を第7図に示す。しかし、これでは図中
、b1〜b6点で示す様に、太線中に白い画素が人シ込
み、これが太線に縞模様となって現われ視党上好ましく
ない・本発明は上述した欠点に鑑みてなされたものであ
り、太線円描画に新規な描画アルゴリズムを採用するこ
とにより、二次元画像メモリ全開に自然な太線円描画を
行なう円描画方式を提供することを目的とする。
(Problem to be Solved by the Invention) By the way, in the above-described drawing device, when drawing a circle indicated by a thick line, after drawing one circle, draw another circle that is concentric and has a radius one pixel smaller. This is handled by drawing, and this situation is shown in FIG. However, in this case, as shown by points b1 to b6 in the figure, white pixels are crowded into the thick line, and this appears as a striped pattern on the thick line, which is undesirable from a visual perspective. The purpose of this paper is to provide a circle drawing method that draws natural thick-line circles using a full two-dimensional image memory by adopting a new drawing algorithm for thick-line circle drawing.

[発明の構成] (問題点を解決するための手段) 本発明は、上述した目的を実現するために、円の内側に
円の中心をずらしながら同一半径の円弧を描画させ、こ
れを繰返すことにより太線円を描画するアルゴリズムを
採用し1円弧描画の出来る画1求グロセッサを用い、本
アルゴリズムをCPU制御の下で実現する構成とした。
[Structure of the Invention] (Means for Solving the Problems) In order to achieve the above-mentioned object, the present invention involves drawing an arc of the same radius inside a circle while shifting the center of the circle, and repeating this process. An algorithm for drawing a thick line circle is adopted, and a stroke 1-grain processor capable of drawing a single arc is used, and this algorithm is realized under CPU control.

(作用) まず、CPUは、画像プロセッサに対し、円弧中心座像
、描画始点座標9時計廻υ移動liT+素数。
(Function) First, the CPU sends the image processor an arc-centered image, drawing start point coordinates 9 clockwise υ movement liT + prime number.

描画画素数を・ヤラメータとする円弧描画命令を出力す
る。画像プロセッサは上記パラメータに従がい外周円の
描画画素数を求めてその円を描画し、この円の内側に中
心をずらしながら同一半径にて円弧を描画する。そして
画像プロセッサの誤差補正と同期をとるため久の円弧の
画素数を求め同一半径の円弧を描画していく。
Outputs an arc drawing command with the number of pixels to be drawn as a parameter. The image processor calculates the number of pixels to draw the outer circumferential circle according to the above parameters, draws the circle, and draws an arc with the same radius while shifting the center inside this circle. Then, in order to synchronize with the image processor's error correction, the number of pixels in the arc is calculated and arcs with the same radius are drawn.

このことによ)太線に縞模様が入ることはなくなり、見
た目に自然な太線円描画が可能となる。
This eliminates the appearance of striped patterns on the thick lines, making it possible to draw circles with thick lines that look natural.

(実施例) 以下、図面を使用して本発明実施例につき詳細に説明す
る。第1La−は本発明の実施例全示すブロック図であ
る。図において、1は後述する画像プロセッサ3に描画
命令全出力するCPUで、2はそのプログラムを格納す
る主メモリである。3は、画像メモリ4へ円弧を描画す
る画像プロセッサである。4は画像メモリである。5は
CrLTモニメ、6は画像メモリ4に格納された画像デ
ータを5へ表示するに際し、その制御を司どる表示コン
トローラ(CRTC)である。上述したCPU 1.主
メモリ2゜画像プロセッサ31画像メモリ4.表示コン
トローラ6はシステムバス7に共通に接続される。
(Example) Hereinafter, examples of the present invention will be described in detail using the drawings. 1. La- is a block diagram showing all embodiments of the present invention. In the figure, 1 is a CPU that outputs all drawing instructions to an image processor 3, which will be described later, and 2 is a main memory that stores the program. 3 is an image processor that draws an arc into the image memory 4; 4 is an image memory. 5 is a CrLT monitor, and 6 is a display controller (CRTC) that controls when image data stored in the image memory 4 is displayed on 5. CPU mentioned above 1. Main memory 2° Image processor 31 Image memory 4. Display controller 6 is commonly connected to system bus 7.

第2図は、CPU 1が、画像プロセッサ3に対し出力
する円弧描画命令の・9ラメータ、ならびに画像プロセ
ッサ3が画像メモリ4に書込む描画円弧、そして画像プ
ロセッサ3がCPU 1に出力するパラメータをそれぞ
れ示したものである。図中、aは円弧の中心座標、bは
円弧描画の始点座標、Cは円弧描画後の終点座標、Nl
は時計廻りの移動画素数、N2は、Nlの後の描I[k
i画素数のそれぞれを示す。円弧描画命令のパラメータ
は’ e b aNIN2である。描画される円弧は、
6〜0間のN2に当る部分である。円弧描画命令の出力
パラメータはぐである。
FIG. 2 shows the parameters of the arc drawing command that the CPU 1 outputs to the image processor 3, the drawn arc that the image processor 3 writes to the image memory 4, and the parameters that the image processor 3 outputs to the CPU 1. They are shown below. In the figure, a is the center coordinate of the arc, b is the starting point coordinate of the arc drawing, C is the end point coordinate after the arc drawing, Nl
is the number of clockwise moving pixels, N2 is the number of pixels drawn after Nl
The number of i pixels is shown. The parameter of the arc drawing command is 'e b a NIN2. The arc drawn is
This is the part corresponding to N2 between 6 and 0. The output parameter of the arc drawing command is ``g''.

第3図は円の描画画素数を示したものであり、描画画素
数は、円弧が横切る座標の格子線(ラスタ)の本数によ
って定まることから、1と■の領域においては、水平方
向のラスタと円弧との交点数、■と■の領域においては
、垂直方向の格子線と円弧との交点数がそれぞれ描画画
素数となる。
Figure 3 shows the number of pixels drawn for a circle. Since the number of pixels drawn is determined by the number of coordinate grid lines (raster) that the arc crosses, in the areas 1 and ■, the number of pixels drawn in the horizontal direction is The number of intersections between the vertical grid line and the circular arc, and in the areas (■) and (■), the number of intersections between the vertical grid line and the circular arc is the number of pixels to be drawn.

従って円の描画画素数はr、n、tIIと■領域の能文
点数になる。
Therefore, the number of pixels for drawing a circle is r, n, tII, and the number of skill marks in the area.

第4図は円周の描1ihi画素数を得る方法を示したも
のであり、CPU 1が画像プロセッサ3に円弧中心座
標d (N2.Y、? )、描画始点座標s (N2゜
y2+r ) 1時計廻シ移動画素数0及び描画画素数
rの・ぞラメータに従がい円弧描画命令全出力したとき
の画像プロセッサ3の出力・9ラメータである描画終点
座標f(N3.Y、1)を示す。
FIG. 4 shows a method for obtaining the number of pixels of a circumference, in which the CPU 1 sends the image processor 3 the arc center coordinates d (N2.Y,?) and the drawing start point coordinates s (N2゜y2+r) 1 Indicates the drawing end point coordinate f(N3.Y, 1) which is the output of the image processor 3 when all the arc drawing commands are output according to the clockwise movement pixel number 0 and the drawing pixel number r. .

第5図は太線の円を描画する方法を承したものである。FIG. 5 shows a method for drawing thick circles.

■は、中心座標(x、y)、半径rの円である。Jは中
心座標(X、Y−1)、半径rの(l/8円−1画素)
の円弧である。Kば、中心座標(X+r、Y)、半径r
の(1/4−2i素)の円弧である。Lは中心座標(X
、Y−r)、半径rの(1/4円−21F!ili索)
の円弧である。■は、中心座標(X−r 、Y)、半径
rの(l/4円−2画素)の円弧である。Nは、中心座
標(X、Y+r)。
2 is a circle with center coordinates (x, y) and radius r. J is center coordinates (X, Y-1), radius r (l/8 circle-1 pixel)
It is an arc of . K, center coordinates (X+r, Y), radius r
It is a circular arc of (1/4-2i elements). L is the center coordinate (X
, Y-r), (1/4 circle-21F!ili chord) of radius r
It is an arc of . (2) is an arc of (1/4 circle - 2 pixels) with center coordinates (X-r, Y) and radius r. N is the center coordinate (X, Y+r).

半径rの(178円−1画素)の円弧である。It is an arc of radius r (178 circles - 1 pixel).

第6図は円描画を1制御する!ログラムフローを示す。Figure 6 shows one control of circle drawing! shows the program flow.

具体的にはこの動作手順が、第1図に示す主メモリ2ヘ
プログラム形式にて記憶されており、画1象プロセッサ
3がこのプログラムを続出し実行する。
Specifically, this operating procedure is stored in the main memory 2 shown in FIG. 1 in the form of a program, and the image processor 3 successively executes this program.

以下、本発明実施例の動作について詳細に説明する。Hereinafter, the operation of the embodiment of the present invention will be explained in detail.

壕ず、第3図、第4図を使用して円の描画画素数を得る
方法から述べる。第4図に示す・やラメータにてCPU
 1が1!Ii像プロセツサ3へ円弧描画命令を出力し
たものとする。この場合、画像プロセッサ、?の出力・
fラメータと第3図に示す関係から半径rの円の描画画
素数:tは((r+Y、y−Y2−1 )X4)となる
A method for obtaining the number of pixels to draw a circle using Figs. 3 and 4 will be described. CPU at the parameter shown in Figure 4
1 is 1! It is assumed that an arc drawing command is output to the II image processor 3. In this case, the image processor? The output of
From the relationship between the f parameter and the relationship shown in FIG. 3, the number of pixels drawn in a circle with radius r: t is ((r+Y, y-Y2-1)X4).

次に本発明の主旨である太線の描画方法につき。Next, we will discuss the method of drawing thick lines, which is the gist of the present invention.

第5図と第6図を使用して述べる。まず、画像プロセッ
サ3は以下に示すノ臂うメータに基づき円工を描画する
。パラメータは中心座標(X = Y ) e描画始点
座標(X、Y−)−r)、時計廻り移動画素数O1描画
画素数tである。そして次に以下に示す・ぞラメータで
円弧Jを描画する。パラメータは中心座標(X、Y−1
)、描画始点座標(X。
This will be explained using FIGS. 5 and 6. First, the image processor 3 draws a circle based on the following meters. The parameters are center coordinates (X = Y) e drawing start point coordinates (X, Y-) - r), number of clockwise moving pixels O1, number of drawing pixels t. Then, draw the arc J using the following parameters. The parameters are the center coordinates (X, Y-1
), drawing start point coordinates (X.

Y−1+r)、時計廻シ移動画素数O,描画画素数((
t/8)−1)である。そして画像プロセッサ3の誤差
補正と同期をとるため、円弧にの画素数:61ケ式A7
=((Y4−Y)X2−1 1にて求め、以下のノ?ラ
メータにて円弧Kを描1面する。・ぞラメータは中心座
標(X−1,Y)、描1画始点座標(X−1,Y+r)
、″¥f計廻り移動1画素数t/8゜描画画素数11で
ある。
Y-1+r), number of clockwise moving pixels O, number of drawing pixels ((
t/8)-1). In order to synchronize with the error correction of the image processor 3, the number of pixels in the arc: 61.
= ((Y4-Y) X-1, Y+r)
, ``\f Number of pixels per clockwise movement t/8° Number of pixels drawn 11.

次に以下の・せラメータにて円弧りを描画する。Next, draw the arc using the following serameter.

パラメータは、中心座標(X 、Y+1 ) 、描画始
点座標(x 、y+t+r ) 、時計廻シ移動画素数
(t/2−  C1/8−1)) 、描画画素数((乙
/4)−2)である。更に、以下の・!ラメータで円弧
Mを描画する。パラメータは中心座標(x−t、y)、
描画始点座標(X−1,Y+r)、時計廻り移動画素数
((t/2)+(/=+8 ) ) 、描画画素数61
である。
The parameters are center coordinates (X, Y+1), drawing start point coordinates (x, y+t+r), number of clockwise movement pixels (t/2-C1/8-1)), number of drawing pixels ((Otsu/4)-2 ). In addition, the following! Draw an arc M using a metric. The parameters are center coordinates (x-t, y),
Drawing start point coordinates (X-1, Y+r), number of clockwise moving pixels ((t/2)+(/=+8)), number of drawing pixels 61
It is.

そして以下のA’ラメータで円弧Mを描画する。・!ラ
メータは中心座標(X−1,Y)、描画始点座標(X−
1、Y+r ) 、時計廻り移動画素数((t/2) 
+ (t/8))、描画画素数11である。
Then, arc M is drawn using the following A' parameters.・! Lameter is the center coordinate (X-1, Y), the drawing start point coordinate (X-
1, Y+r), number of clockwise moving pixels ((t/2)
+ (t/8)), and the number of pixels to be drawn is 11.

そして、以下のパラメータで円弧Nを描画する。Then, arc N is drawn using the following parameters.

パラメータは、中心座標(X、Y−1)、描1面始点座
標(X、Y−1+r)、時計廻り移動画素数(L −(
z、、’s −1))#描画画素数((t−8)−1)
である。
The parameters are the center coordinates (X, Y-1), the coordinates of the starting point of one drawing plane (X, Y-1+r), and the number of clockwise moving pixels (L - (
z,,'s -1)) #number of drawing pixels ((t-8)-1)
It is.

尚1円を更に太くする場合は、上述した方法により更に
中心をずらしながら内側に小さい円を描画すれば良いこ
とは言うまでもない。
It goes without saying that if you want to make one circle even thicker, you can draw a smaller circle inside while shifting the center further using the method described above.

[発明の効果コ 以上説明の様に本発明に従えば、太線を描画する際に田
現していた縞模様がなくなり、二次元画像メモリ空間へ
単一画素の太線で円描画が可能となり、見た目に自然な
太線円描画を期待出来る。
[Effects of the Invention] According to the present invention as explained above, the striped pattern that appears when drawing a thick line is eliminated, and it becomes possible to draw a circle with a single pixel thick line in the two-dimensional image memory space, which improves the appearance. You can expect natural thick circle drawing.

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

第1図は本発明の実施例を示すブロック図、第2図〜第
5図は本発明実施例の動作を説明するために引用した図
であシ、それぞれ本発明実施例にて使用されるパラメー
タの例、円の描画画素を示す図、円周の描画画素数を得
る方法を示す図、太線の円描画を得る方法を示す図でろ
る。第6図は本発明実施例の動作手順を示す図、第7図
は従来における太線円描画の例を示す図である。 1・・・CPU、2・・・メモリ、3・・・画像プロセ
ッサ、4・・・[1iili像メモリ。 出願人代理人  弁理士 鈴 江 武 彦第1図 第7図 第2図 第3図 第4図 第5図 第6図
Fig. 1 is a block diagram showing an embodiment of the present invention, and Figs. 2 to 5 are diagrams cited to explain the operation of the embodiment of the present invention, and each is used in the embodiment of the present invention. Examples of parameters, a diagram showing pixels to draw a circle, a diagram to show how to obtain the number of pixels to draw on the circumference, and a diagram to show how to obtain a thick-line circle drawing. FIG. 6 is a diagram showing the operating procedure of the embodiment of the present invention, and FIG. 7 is a diagram showing an example of conventional thick-line circle drawing. 1... CPU, 2... Memory, 3... Image processor, 4... [1iii Image memory. Applicant's Representative Patent Attorney Takehiko Suzue Figure 1 Figure 7 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6

Claims (1)

【特許請求の範囲】[Claims] CPUと、このCPUとはバスを介して接続され、前記
CPUから発せられる画像処理命令に基づき動作する画
像プロセッサと、円を描画し、この円の内側に中心をず
らしながら同一半径にて円弧を描画することにより太線
円描画を行なう様に処理手順がプログラムされたメモリ
と、画像メモリとを具備し、上記CPUにより太線円描
画命令が出力されたとき、画像プロセッサは上記メモリ
に格納された処理手順に従がい上記画像メモリへ太線円
を描画することを特徴とする円描画方式。
The CPU is connected to an image processor that operates based on image processing instructions issued from the CPU, and draws a circle, and draws an arc with the same radius while shifting the center inside the circle. The image processor includes a memory in which a processing procedure is programmed to draw a thick line circle by drawing, and an image memory, and when the CPU outputs a thick line circle drawing command, the image processor executes the process stored in the memory. A circle drawing method characterized in that a thick line circle is drawn in the image memory according to a procedure.
JP15659586A 1986-07-03 1986-07-03 Circle depiction system Pending JPS6314286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15659586A JPS6314286A (en) 1986-07-03 1986-07-03 Circle depiction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15659586A JPS6314286A (en) 1986-07-03 1986-07-03 Circle depiction system

Publications (1)

Publication Number Publication Date
JPS6314286A true JPS6314286A (en) 1988-01-21

Family

ID=15631191

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15659586A Pending JPS6314286A (en) 1986-07-03 1986-07-03 Circle depiction system

Country Status (1)

Country Link
JP (1) JPS6314286A (en)

Similar Documents

Publication Publication Date Title
JP2006209223A (en) Drawing method, image generation device and electronic information apparatus
JPS62125292U (en)
JPH09330423A (en) Three-dimensional shape data transforming device
JP3547250B2 (en) Drawing method
JPS6314286A (en) Circle depiction system
US7439980B2 (en) Image processing method and apparatus
JP3872056B2 (en) Drawing method
JP2604723B2 (en) Shape deformation method
JPH11195134A (en) Picture processor
JPH0554151B2 (en)
US20030071825A1 (en) Image rendering method
JP2611007B2 (en) Image processing device
KR100742155B1 (en) Method and apparatus for making scan line
JPH0391877A (en) Picture processing device
JP4320604B2 (en) Image processing method and image processing apparatus
JPH07118023B2 (en) Arbitrary polygon internal point calculator
JP3154343B2 (en) How to fill in polygonal shapes
JP3681240B2 (en) Three-dimensional shape display method and three-dimensional CAD system using the method
JPH01166126A (en) Display control method in multiwindow display device
JPH06301786A (en) Method and device for image display
JPH0260034B2 (en)
JP2001188912A (en) Method and device for drawing trapezoid
JP2002140704A (en) Method for overlapping pictures by computer
JPH07121723A (en) Method for correcting direction data of stripe patterns, information processor for executing the same, method for correcting pitch data of stripe patterns and information processor for executing the same
JPS61228583A (en) Processing system for variable density picture