JPH04373086A - Straight line drawing system - Google Patents
Straight line drawing systemInfo
- Publication number
- JPH04373086A JPH04373086A JP3150515A JP15051591A JPH04373086A JP H04373086 A JPH04373086 A JP H04373086A JP 3150515 A JP3150515 A JP 3150515A JP 15051591 A JP15051591 A JP 15051591A JP H04373086 A JPH04373086 A JP H04373086A
- Authority
- JP
- Japan
- Prior art keywords
- straight line
- coordinate data
- line drawing
- frame memory
- data
- 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
Links
- 238000000034 method Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
Landscapes
- Controls And Circuits For Display Device (AREA)
- Digital Computer Display Output (AREA)
- Image Generation (AREA)
Abstract
Description
【0001】0001
【産業上の利用分野】本発明は、直線描画を高速に行う
ことを可能とした直線描画方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a straight line drawing method that makes it possible to draw straight lines at high speed.
【0002】0002
【従来の技術】従来、CAD装置等で直線を描画する方
法として、例えば、ブレゼンハム(Bresenham
)のアルゴリズムが知られている。2. Description of the Related Art Conventionally, as a method for drawing a straight line using a CAD device or the like, for example, the Bresenham (Bresenham)
) algorithm is known.
【0003】このブレゼンハムのアルゴリズムによる直
線描画方法では、始点と終点が与えられた場合に途中の
点がどの座標に属するかの計算を行いつつ画像メモリに
記憶させる処理を繰り返し行って所望の直線を得ている
。In the straight line drawing method using Bresenham's algorithm, when a starting point and an ending point are given, a desired straight line is drawn by repeatedly calculating which coordinates intermediate points belong to and storing them in the image memory. It has gained.
【0004】0004
【発明が解決しようとする課題】しかしながら、上記従
来方式では、描画速度の遅いフレームメモリ(画像メモ
リ)に対して座標の計算と描画を一点一点に付き繰り返
して行っているので、描画速度を高めることが出来ない
という問題点があった。[Problems to be Solved by the Invention] However, in the conventional method described above, coordinate calculation and drawing are repeatedly performed for each point in the frame memory (image memory), which has a slow drawing speed. There was a problem in that it was not possible to increase the
【0005】本発明は上記の事情に鑑みてなされたもの
であり、その目的は、直線描画を高速に行うことのでき
る直線描画方式を提供することにある。The present invention has been made in view of the above circumstances, and its object is to provide a straight line drawing method that can perform straight line drawing at high speed.
【0006】[0006]
【課題を解決するための手段】上記の目的を達成するた
めに本発明は、それぞれがX−Y座標データで与えられ
る2点間を結ぶ点を一点一点求めてこれを直線描画デー
タとしてフレームメモリに書き込む直線描画方式におい
て、前記求められた点のY座標データを監視し、Y座標
データが同一の区間の座標データを一時蓄積しておき、
Y座標が変化した時点でそれまで一時蓄積された座標デ
ータを一括して前記フレームメモリに書き込むことを特
徴とする。[Means for Solving the Problems] In order to achieve the above object, the present invention finds points connecting two points, each of which is given by X-Y coordinate data, one by one, and uses this as straight line drawing data. In the straight line drawing method of writing to the frame memory, the Y coordinate data of the obtained point is monitored, and the coordinate data of the section where the Y coordinate data is the same is temporarily stored,
The present invention is characterized in that when the Y coordinate changes, the coordinate data that has been temporarily accumulated up to that point is written all at once into the frame memory.
【0007】[0007]
【作用】一般的に画像メモリ(フレームメモリ)は、ド
ット単位のみならず、Y座標が同一(水平線)であれば
一度に数ドットまとめて描画できる。したがって、本発
明では、Y座標データが変化しない場合、すなわち、X
軸方向にデータが並ぶ区間ではそのデータをキャッシュ
メモリなどに一時蓄積しておき、Y座標データが変化し
た時、それまで蓄積されたデータをフレームメモリに書
き込む。これにより、フレームメモリのアクセス回数を
大幅に減らすことができ、直線描画を高速に行うことが
可能となる。[Operation] In general, an image memory (frame memory) can draw not only dots but also several dots at a time if the Y coordinates are the same (horizontal line). Therefore, in the present invention, when the Y coordinate data does not change, that is,
In sections where data is lined up in the axial direction, the data is temporarily stored in a cache memory or the like, and when the Y coordinate data changes, the data stored up to that point is written to the frame memory. As a result, the number of accesses to the frame memory can be significantly reduced, and straight line drawing can be performed at high speed.
【0008】[0008]
【実施例】図1は本発明方式が適用された直線描画装置
の一実施例を示す構成図である。DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing an embodiment of a linear drawing apparatus to which the method of the present invention is applied.
【0009】同図に示す装置は、装置全体を制御する制
御部1と、直線を構成する点の近似座標を一点一点計算
する直線発生器2と、直線発生器2で求められた点の座
標データを直線描画データとして記憶するフレームメモ
リ3と、直線発生器2とフレームメモリ3との間に設け
られ、直線発生器2で求められた点の座標データの内で
Y座標データが同一の区間のデータを一時蓄積するキャ
ッシュメモリ4とを備えて構成されている。The device shown in the figure includes a control unit 1 that controls the entire device, a line generator 2 that calculates approximate coordinates of points forming a straight line point by point, and a line generator 2 that calculates approximate coordinates of points forming a straight line. A frame memory 3 that stores the coordinate data of as straight line drawing data is provided between the straight line generator 2 and the frame memory 3, and is arranged between the straight line generator 2 and the frame memory 3 to store the coordinate data of The cache memory 4 temporarily stores data for the section.
【0010】次に本実施例の作用を図2のフローチャー
トを参照して説明する。Next, the operation of this embodiment will be explained with reference to the flowchart of FIG.
【0011】外部から直線描画指令が入力され始点座標
データおよび終点座標データが供給されると、直線発生
器2は、直線の近似座標を計算する(ステップST1)
。この計算は、前述したブレゼンハムのアルゴリズムな
どにより実行される。すなわち、前記始点と終点を結ぶ
直線を求めるために、始点から一点一点その近似座標デ
ータをその直線が完成するまで求めていく(ステップS
T2)。When a straight line drawing command is input from the outside and starting point coordinate data and ending point coordinate data are supplied, the straight line generator 2 calculates approximate coordinates of the straight line (step ST1).
. This calculation is performed using the Bresenham algorithm described above. That is, in order to find a straight line connecting the starting point and the ending point, approximate coordinate data for each point from the starting point is found until the straight line is completed (step S
T2).
【0012】この時、制御部1は、求められた点のY座
標データを監視し、Y座標データが同一であるデータが
続く場合には、その区間の座標データをキャッシュメモ
リ4に一時蓄積する(ステップST3)。描画条件が成
立すると、すなわちY座標データが変化するか若しくは
キャッシュメモリ4が満杯になる(ステップST4YE
S)と、その時点で、それまでキャッシュメモリ4に蓄
積されたデータを一括して直線描画データとしてフレー
ムメモリ3に書き込む(ステップST5)。以上の処理
を直線描画が終了するまで実行する(ステップST2Y
ES)。At this time, the control unit 1 monitors the Y coordinate data of the obtained point, and if data with the same Y coordinate data continues, the control unit 1 temporarily stores the coordinate data of that section in the cache memory 4. (Step ST3). When the drawing condition is satisfied, that is, the Y coordinate data changes or the cache memory 4 becomes full (step ST4YE).
S), and at that point, the data accumulated in the cache memory 4 up to that point is collectively written into the frame memory 3 as straight line drawing data (step ST5). The above process is executed until straight line drawing is completed (step ST2Y
ES).
【0013】このように本実施例によれば、求められた
点のY座標データを監視し、Y座標データが同一の区間
の座標データをキャッシュメモリに一時蓄積しておき、
Y座標が変化した時点でそれまで一時蓄積された座標デ
ータを一括して前記フレームメモリに書き込むようにし
たので、一点一点計算してはフレームメモリをアクセス
して直線描画データを書き込む従来方式に比べて、フレ
ームメモリへのアクセス回数を大幅に削減でき、直線描
画速度を早くすることができる。As described above, according to this embodiment, the Y coordinate data of the determined point is monitored, and the coordinate data of the section where the Y coordinate data is the same is temporarily stored in the cache memory.
When the Y coordinate changes, all the temporarily stored coordinate data is written to the frame memory all at once, so the conventional method calculates each point one by one and then accesses the frame memory to write straight line drawing data. Compared to this, the number of accesses to the frame memory can be significantly reduced, and the straight line drawing speed can be increased.
【0014】なお、本発明は、ブレゼンハムのアルゴリ
ズムによる直線描画方式に限らず、一点一点計算しては
フレームメモリに描画する従来方式の全てに適用可能で
ある。The present invention is not limited to the straight line drawing method using Bresenham's algorithm, but is applicable to all conventional methods in which calculation is performed point by point and drawn in a frame memory.
【0015】[0015]
【発明の効果】以上説明したように本発明によれば、フ
レームメモリへのアクセス回数を削減することができる
ので、直線描画を高速に行うことが可能となる。As described above, according to the present invention, the number of accesses to the frame memory can be reduced, so that straight line drawing can be performed at high speed.
【図1】本発明方式が適用された一実施例を示す構成図
である。FIG. 1 is a configuration diagram showing an embodiment to which the system of the present invention is applied.
【図2】図1に示す一実施例の作用を説明するフローチ
ャートである。FIG. 2 is a flowchart illustrating the operation of the embodiment shown in FIG. 1;
1 制御部 2 直線発生器 3 フレームメモリ 4 キャッシュメモリ 1 Control section 2 Linear generator 3 Frame memory 4 Cache memory
Claims (1)
れる2点間を結ぶ点を一点一点求めてこれを直線描画デ
ータとしてフレームメモリに書き込む直線描画方式にお
いて、前記求められた点のY座標データを監視し、Y座
標データが同一の区間の座標データを一時蓄積しておき
、Y座標が変化した時点でそれまで一時蓄積された座標
データを一括して前記フレームメモリに書き込むことを
特徴とする直線描画方式。1. In a straight-line drawing method in which a point connecting two points each given by X-Y coordinate data is found one by one and written into a frame memory as straight-line drawing data, the Y of the found point is The present invention is characterized in that the coordinate data is monitored, the coordinate data of the same interval of Y coordinate data is temporarily stored, and when the Y coordinate changes, the coordinate data that has been temporarily stored up to that point is written all at once to the frame memory. A straight line drawing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3150515A JPH04373086A (en) | 1991-06-21 | 1991-06-21 | Straight line drawing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3150515A JPH04373086A (en) | 1991-06-21 | 1991-06-21 | Straight line drawing system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04373086A true JPH04373086A (en) | 1992-12-25 |
Family
ID=15498549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3150515A Pending JPH04373086A (en) | 1991-06-21 | 1991-06-21 | Straight line drawing system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04373086A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09218960A (en) * | 1996-02-13 | 1997-08-19 | Nec Corp | Printer |
-
1991
- 1991-06-21 JP JP3150515A patent/JPH04373086A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09218960A (en) * | 1996-02-13 | 1997-08-19 | Nec Corp | Printer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR0136591B1 (en) | Pattern drawing system having a processor for drawing the profile pattern and a processor for painting the drawn profile | |
KR910000203B1 (en) | Picture processing apparatus | |
JPH04373086A (en) | Straight line drawing system | |
JPH04291684A (en) | Thick line plotter | |
JPS5991576A (en) | Method for controlling picture displaying information | |
JPS6283790A (en) | Image processor | |
JPH0659664A (en) | Pattern picture drawing processing method using cash image | |
JPS6147984A (en) | Image display unit | |
JP3051818B2 (en) | Segment drawing method and output device using the method | |
JPS62180481A (en) | Pattern continous shifting method | |
JPS6324475A (en) | Frame memory control system | |
JPH08138040A (en) | Method and device for plotting picture | |
JPH01314329A (en) | Image data processor | |
JPH0212382A (en) | Air-brush picture drawing system | |
JPH0322183A (en) | Linear drawing control method | |
JPH01175087A (en) | Image display device | |
JPH10143676A (en) | Picture processor and method for processing the same and recording medium | |
JPH0423179A (en) | Method and device for plotting thick line | |
JPH04217077A (en) | Graphic generating device and thick line generating method thereby | |
JPH0536794B2 (en) | ||
JPH0348928A (en) | Display control system | |
JPH01184584A (en) | System for controlling travel of display pattern | |
JPH04278652A (en) | Graphic drawing device and its memory access system | |
JPH0612053A (en) | Display device for computer | |
JP2002342763A (en) | Line segment plotting device |