JP3089740B2 - Line drawing device - Google Patents

Line drawing device

Info

Publication number
JP3089740B2
JP3089740B2 JP25715291A JP25715291A JP3089740B2 JP 3089740 B2 JP3089740 B2 JP 3089740B2 JP 25715291 A JP25715291 A JP 25715291A JP 25715291 A JP25715291 A JP 25715291A JP 3089740 B2 JP3089740 B2 JP 3089740B2
Authority
JP
Japan
Prior art keywords
line segment
curved line
curve
drawn
points
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 - Fee Related
Application number
JP25715291A
Other languages
Japanese (ja)
Other versions
JPH0573689A (en
Inventor
健 大河原
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP25715291A priority Critical patent/JP3089740B2/en
Publication of JPH0573689A publication Critical patent/JPH0573689A/en
Application granted granted Critical
Publication of JP3089740B2 publication Critical patent/JP3089740B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、線を描画する線分描
画装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a line drawing apparatus for drawing a line.

【0002】[0002]

【従来の技術】従来、ワードプロセッサ等の図形処理に
おいて、カーソルキー等の入力手段を用いて任意の曲線
パターンをフリーハンド方式にしたがって描画するよう
にしているが、例えば、図6に示す如く既に描画されて
いる曲線PQに対して一定間隔aを保って平行する曲線
RSを新たに描画する際にもカーソルキー等を用いて新
たな曲線RSをフリーハンド方式にしたがって描画する
ようにしていた。
2. Description of the Related Art Conventionally, in graphic processing such as a word processor, an arbitrary curve pattern is drawn according to a freehand method using input means such as a cursor key. For example, as shown in FIG. Also, when a new curve RS parallel to the set curve PQ is kept at a constant interval a, a new curve RS is drawn in accordance with a freehand method using a cursor key or the like.

【0003】[0003]

【発明が解決しようとする課題】ところで、平行する2
本の直線等を描画する場合には一方の線分をフリーハン
ド方式にしたがって描画したのち、この線分を複写して
他方の線分を描画するようにすれば、平行する2本の直
線等を正確に得ることができるが、複写によって平行す
る2本の線分を描画する方法は直線等の様に比較的簡単
な線分に限られてしまう。この為、図6に示す如く複雑
な形状の曲線PQに対して一定間隔aを持って平行する
曲線RSを描画する場合にはフリーハンド方式にしたが
って描画するようにしているが、複雑な形状の線分をフ
リーハンド方式にしたがって描画することは、極めて困
難なものとなっていた。この発明の課題は、既に描画さ
れている夫々の位置においてカーブ度合いが異なる曲線
線分に対して、距離の間隔を一定に保った線分を自動的
に描画することができるようにすることである。
By the way, two parallel
When drawing two straight lines, one line segment is drawn according to the freehand method, and then this line segment is copied and the other line segment is drawn, so that two parallel straight lines, etc., are drawn. Can be obtained accurately, but the method of drawing two parallel line segments by copying is limited to relatively simple line segments such as straight lines. For this reason, as shown in FIG. 6, when drawing a curve RS parallel to a curve PQ having a complicated shape at a constant interval a, the curve PQ is drawn according to the freehand method. It has been extremely difficult to draw line segments according to the freehand method. An object of the present invention is to make it possible to automatically draw a line segment having a constant distance interval with respect to a curved line segment having a different degree of curve at each position already drawn. is there.

【0004】[0004]

【課題を解決するための手段】上記目的を達成するた
め、本願発明における線分描画装置は、夫々の位置にお
いてカーブ度合いが異なる曲線線分を表示する表示手段
と、前記曲線線分に対する平行曲線線分の描画を指示す
る指示手段と、前記指示手段による描画指示に基づい
て、前記曲線線分上における複数の点の各座標位置を通
る接線と直交し、前記曲線線分上における複数の点のう
ち隣り合う2つの点の間を通る法線を求め、その個々の
法線上にあって前記曲線線分から所定の距離にある点の
座標位置を、前記各法線毎に求める座標位置決定手段
と、前記座標位置決定手段で求められた各座標位置を結
合することにより、前記曲線線分に対して前記所定の距
離間隔を保った平行曲線線分を描画する描画手段と、を
具備したことを特徴とする。
In order to achieve the above object, a line segment drawing apparatus according to the present invention comprises a display means for displaying curved line segments having different degrees of curve at respective positions, and a parallel curve for the curved line segments. Instructing means for instructing the drawing of a line segment, and a plurality of points on the curved line segment which are orthogonal to a tangent passing through each coordinate position of the plurality of points on the curved line segment, based on the drawing instruction by the instructing means. Coordinate position determining means for determining, for each of the normals, the coordinate position of a point on each of the normals and at a predetermined distance from the curved line segment. And drawing means for drawing parallel curve line segments maintaining the predetermined distance interval with respect to the curve line segments by combining the coordinate positions obtained by the coordinate position determination means. Characterized by .

【0005】[0005]

【機能ブロック図の説明】図1は本発明の機能ブロック
図である。間隔指定手段1は、既に描画されている第1
の線分に対して平行する第2の線分を新たに描画する
際、既に描画されている第1の線分と新たに描画する第2
の線分との間隔を指定する。この場合、新たに描画する
線分の始点位置をカーソルキー等によってポイント指定
するようにしてもよい。線分解析手段2は既に描画され
ている第1の線分の形状を解析する。描画手段3は線分
解析手段2の解析結果と間隔指定手段1によって指定さ
れた間隔とに基づいて第1の線分に対して一定の間隔を
保ちながら第2の線分を描画する。
[Description of Functional Block Diagram] FIG. 1 is a functional block diagram of the present invention. The interval designating means 1 is used for the first drawing which has already been drawn.
When newly drawing a second line segment parallel to the line segment, the first line segment already drawn and the second
Specify the interval with the line segment. In this case, the start point of the line to be newly drawn may be point-designated by using a cursor key or the like. The line segment analyzing means 2 analyzes the shape of the first line segment already drawn. The drawing unit 3 draws a second line segment while keeping a constant interval with respect to the first line segment based on the analysis result of the line segment analyzing unit 2 and the interval specified by the interval specifying unit 1.

【0006】[0006]

【実施例】以下、図2〜図5を参照して一実施例を説明
する。図2は線分描画装置の構成を示したブロック図で
ある。CPU11は各種プログラムにしたがってこの線
分描画装置の全体動作を制御するもので、キー入力部1
2から入力された文書データや図形データはビデオRA
M(VRAM)13を介してCRT表示装置14から表
示出力されたり、入力バッファ15に書き込まれたのち
テキストメモリ16に格納される。ここで、テキストメ
モリ16の内容はキー入力部12上の登録キー(図示せ
ず)が操作されると、外部記憶装置17に登録保存され
る。
An embodiment will be described below with reference to FIGS. FIG. 2 is a block diagram showing the configuration of the line segment drawing apparatus. The CPU 11 controls the overall operation of the line drawing apparatus according to various programs.
Document data and graphic data input from
The data is output from the CRT display device 14 via the M (VRAM) 13 or written into the input buffer 15 and then stored in the text memory 16. Here, when a registration key (not shown) on the key input unit 12 is operated, the contents of the text memory 16 are registered and stored in the external storage device 17.

【0007】特に、本実施例においてはCPU11に距
離算出回路18、線分解析回路19、描画画素算出回路
20、描画回路21が接続されている。距離算出回路1
8は既に描画されている線分に対して平行する新たな線
分を描画する際、既に描画されている線分の始点と新た
に描画する線分の始点との距離を求める回路である。線
分解析回路19は既に描画されている線分の形状(画
素)を解析する回路、描画画素算出回路20は距離算出
回路18、線分解析回路19によって求められた内容か
ら新たな線分を描画する為の画素を求める回路、描画回
路21は描画画素算出回路20によって求められた画素
を描画点として描画すると共に、前回描画した描画点と
今回描画した描画点とを連結する線分を描画する回路で
ある。
Particularly, in this embodiment, the CPU 11 is connected to a distance calculating circuit 18, a line segment analyzing circuit 19, a drawing pixel calculating circuit 20, and a drawing circuit 21. Distance calculation circuit 1
Reference numeral 8 denotes a circuit for calculating the distance between the start point of the already drawn line segment and the start point of the newly drawn line segment when drawing a new line segment parallel to the already drawn line segment. The line segment analyzing circuit 19 analyzes a shape (pixel) of a line segment already drawn, and the drawing pixel calculating circuit 20 generates a new line segment from the contents obtained by the distance calculating circuit 18 and the line segment analyzing circuit 19. A circuit for obtaining a pixel for drawing, a drawing circuit 21 draws the pixel obtained by the drawing pixel calculation circuit 20 as a drawing point, and draws a line segment connecting the previously drawn point and the currently drawn point. Circuit.

【0008】次に、本実施例の動作を説明する。いま、
CRT表示装置14には図4に示す様な曲線PQが描画
されているものとする。ここで、曲線PQに対して平行
する新たな曲線を描画する場合にはキー入力部12上の
平行描画キー(図示せず)を操作する。すると、図3の
フローチャートにしたがった平行描画処理が実行され
る。先ず、新たに描画する曲線の開始点Rをカーソルキ
ー等によって指定すると(ステップS1)、距離算出回
路18は既に描画されている曲線PQの開始点Pと新た
に描画する曲線の開始点Rとの距離Aを求めると共に、
この距離Aから点Pを通る法線上の距離(描画距離)a
を求める(ステップS2)。
Next, the operation of this embodiment will be described. Now
It is assumed that a curve PQ as shown in FIG. 4 is drawn on the CRT display device 14. Here, when drawing a new curve parallel to the curve PQ, a parallel drawing key (not shown) on the key input unit 12 is operated. Then, the parallel drawing process is executed according to the flowchart of FIG. First, when the start point R of a newly drawn curve is designated by a cursor key or the like (step S1), the distance calculation circuit 18 determines the start point P of the already drawn curve PQ and the start point R of the newly drawn curve. And the distance A of
Distance from this distance A on the normal passing through point P (drawing distance) a
Is obtained (step S2).

【0009】次に、線分解析回路19は既に描画されて
いる曲線PQ上において、その開始点から終了点までの
主要点(画素)をP0、P1、P2……とすると、隣り合
う2つの点Pn、Pn+1(n=0、1、2……)を求める
(ステップS3)。最初は2つの点としてP0、P1が求
められる(図5参照)。そして、線分解析回路19はこ
の2つの点P0、P1を通る直線(接線)f1を求め(ス
テップS4)、この接線f1と直交し、2つの点P0、P
1の中心を通る法線g1を求める(ステップS5)。
Next, the line analysis circuit 19 sets the main points (pixels) from the start point to the end point on the already drawn curve PQ as P 0 , P 1 , P 2 ... Two matching points P n and P n + 1 (n = 0, 1, 2,...) Are obtained (step S3). At first, P 0 and P 1 are obtained as two points (see FIG. 5). The segment analysis circuit 19 obtains a straight line (tangent) f 1 through the P 0, P 1 the two points (step S4), and perpendicular to the tangent f 1, two points P 0, P
A normal g1 passing through the center of 1 is obtained (step S5).

【0010】このようにして求めた法線g1上におい
て、描画画素算出回路20は点P0、P1の中心から描画
距離aを隔てた位置座標を求め(ステップS6)、これ
が新たに描画すべき最初の画素R0となる。次に、描画
回路21はこのようにして求めた画素Rnと前回求めた
画素Rn-1とを直線で結合するが(ステップS7)、最
初の画素R0を求めた際、ステップS7はスキップさ
れ、ステップS8に進み、新たな線分をその終了点まで
全て描画し終ったか否かを調べ、終了していなければス
テップS3に戻る。
On the normal line g 1 thus obtained, the drawing pixel calculation circuit 20 obtains position coordinates at a drawing distance a from the center of the points P 0 and P 1 (step S 6), and this is newly drawn. This is the first pixel R0 to be performed. Next, the drawing circuit 21 connects the pixel R n obtained in this way and the pixel R n-1 obtained last time with a straight line (step S7). When the first pixel R 0 is obtained, step S7 is performed. Skipping is performed, the process proceeds to step S8, and it is determined whether or not all the new line segments have been drawn up to the end point.

【0011】その結果、今度は点P1、P2を通る接線f
2に直交し、点P1、P2の中心を通る法線g2を求め(ス
テップS5)、この法線g2上において距離aを隔てた
画素R1を求める(ステップS6)。次いで、今回求め
た画素R1と前回求めた画素R0とを直線で結合する(ス
テップS7)。
As a result, the tangent f passing through the points P 1 and P 2
Perpendicular to 2, normal g 2 a determined (step S5) passing through the center of the points P 1, P 2, obtains the pixel R 1 with a distance a on the normal line g 2 (step S6). Then, combine the pixel R 0 determined pixel R 1 and the previous obtained this time in a straight line (step S7).

【0012】以下、上述と同様の動作を繰り返すことに
よって点Pn、Pn+1を通る法線fnと直交し、点Pn、P
n+1の中心を通る法線gn上において距離aを隔てた画素
nを求めながら画素Rn、Rn-1を結合してゆく。この
結果、既に描画されている曲線PQに対して距離aを隔
てた曲線が新たに描画がされ、曲線PQに平行する曲線
が自動的に描画される。
[0012] Hereinafter, the point P n by repeating the same operation as described above, and perpendicular to the normal line f n through P n + 1, the point P n, P
Pixels R n and R n−1 are combined while obtaining a pixel R n separated by a distance a on a normal g n passing through the center of n + 1 . As a result, a new curve is drawn at a distance a from the already drawn curve PQ, and a curve parallel to the curve PQ is automatically drawn.

【0013】なお、既に描画されている曲線の種類(実
線、破線、太線、細線等)を判別し、その曲線の線種と
同様の線種を自動的に選択して新たな曲線を描画するよ
うにしてもよい。
The type of the already drawn curve (solid line, broken line, thick line, thin line, etc.) is determined, and a line type similar to the line type of the curve is automatically selected to draw a new curve. You may do so.

【0014】[0014]

【発明の効果】この発明によれば、描画指示に基づい
て、夫々の位置においてカーブ度合いが異なる曲線線分
上における複数の点の各座標位置を通る接線と直交し、
前記曲線線分上における複数の点のうち隣り合う2つの
点の間を通る法線を求め、その個々の法線上にあって前
記曲線線分から所定の距離にある点の座標位置を各法線
毎に求めて、この求められた各座標位置を結合すること
により、前記夫々の位置においてカーブ度合いが異なる
曲線線分に対して所定の距離間隔を保った平行曲線線分
を描画するようにしたので、複雑な形状をした曲線線分
であっても、その曲線線分に対して所定の距離間隔を保
った線分を自動的に描画することができる。特に、地図
上に多数の道路を描画する場合などに、一定幅を持った
多数のカーブ曲線を効率よく描画することができる。
According to the present invention, based on a drawing instruction, a plurality of points on a curved line segment having different degrees of curve at respective positions are orthogonal to tangents passing through respective coordinate positions,
A normal passing between two adjacent points among the plurality of points on the curved line segment is obtained, and the coordinate position of a point on the individual normal line and at a predetermined distance from the curved line segment is determined by each normal line. By calculating each coordinate position and combining the obtained coordinate positions, a parallel curved line segment that keeps a predetermined distance interval with respect to the curved line segment having a different curve degree at each position is drawn. Therefore, even for a curved line segment having a complicated shape, it is possible to automatically draw a line segment maintaining a predetermined distance interval from the curved line segment. In particular, when a large number of roads are drawn on a map, a large number of curve curves having a constant width can be efficiently drawn.

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

【図1】この発明の機能ブロック図。FIG. 1 is a functional block diagram of the present invention.

【図2】実施例を示した線分描画装置のブロック図。FIG. 2 is a block diagram of a line segment drawing apparatus showing an embodiment.

【図3】本実施例の動作を説明する為のフローチャー
ト。
FIG. 3 is a flowchart for explaining the operation of the embodiment.

【図4】既に描画されている線分に対して平行する新た
な線分を描画する際に、新たな線分の開始点Rを指定す
ることによって算出された描画距離aを示した図。
FIG. 4 is a diagram showing a drawing distance a calculated by designating a start point R of a new line segment when drawing a new line segment parallel to a line segment already drawn;

【図5】既に描画されている線分を解析することによっ
て新たな線分が描画される様子を示した図。
FIG. 5 is a diagram showing a state in which a new line segment is drawn by analyzing a line segment already drawn.

【図6】従来例を説明する為の図で、平行する曲線を示
した図である。
FIG. 6 is a diagram for explaining a conventional example, showing parallel curves.

【符号の説明】[Explanation of symbols]

11 CPU 12 キー入力部 13 VRAM 14 CRT表示装置 18 距離算出回路 19 線分解析回路 20 描画画素算出回路 21 描画回路 Reference Signs List 11 CPU 12 Key input unit 13 VRAM 14 CRT display device 18 Distance calculation circuit 19 Line segment analysis circuit 20 Drawing pixel calculation circuit 21 Drawing circuit

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 11/20 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) G06T 11/20

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】夫々の位置においてカーブ度合いが異なる
曲線線分を表示する表示手段と、 前記曲線線分に対する平行曲線線分の 描画を指示する指
示手段と、 前記指示手段による描画指示に基づいて、前記曲線線分
上における複数の点の各座標位置を通る接線と直交し、
前記曲線線分上における複数の点のうち隣り合う2つの
点の間を通る法線を求め、その個々の法線上にあって前
記曲線線分から所定の距離にある点の座標位置を、前記
各法線毎に求める座標位置決定手段と、 前記座標位置決定手段で求められた各座標位置を結合す
ることにより、前記曲線線分に対して前記所定の距離間
隔を保った平行曲線線分を描画する描画手段と、 を具備したことを特徴とする線分描画装置。
1. The degree of curve differs at each position.
Display means for displaying a curved line segment; instructing means for instructing drawing of a parallel curved line segment with respect to the curved line segment; and coordinates of a plurality of points on the curved line segment based on a drawing instruction by the instructing means. Perpendicular to the tangent passing through the position,
Two adjacent points among a plurality of points on the curved line segment
A coordinate position determining means for determining, for each of the normals, a coordinate position of a point which is located at a predetermined distance from the curved line segment on each of the normal lines and which determines a normal line passing between the points; By combining the coordinate positions obtained by the means, the distance between the curved line segment and the predetermined distance
Drawing means for drawing a parallel curved line segment keeping a distance, a line segment drawing device comprising:
JP25715291A 1991-09-10 1991-09-10 Line drawing device Expired - Fee Related JP3089740B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25715291A JP3089740B2 (en) 1991-09-10 1991-09-10 Line drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25715291A JP3089740B2 (en) 1991-09-10 1991-09-10 Line drawing device

Publications (2)

Publication Number Publication Date
JPH0573689A JPH0573689A (en) 1993-03-26
JP3089740B2 true JP3089740B2 (en) 2000-09-18

Family

ID=17302438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25715291A Expired - Fee Related JP3089740B2 (en) 1991-09-10 1991-09-10 Line drawing device

Country Status (1)

Country Link
JP (1) JP3089740B2 (en)

Also Published As

Publication number Publication date
JPH0573689A (en) 1993-03-26

Similar Documents

Publication Publication Date Title
US8339399B2 (en) Declustering point-of-interest icons
US5369741A (en) Method for pre-clipping a line lying within a clipping rectangular region which is a subset of a region of a display screen
JP3089740B2 (en) Line drawing device
JP2790837B2 (en) Icon display method
JP2000148126A (en) Image display device and method
JP3630811B2 (en) Image creating apparatus and method
JPH1049688A (en) Method for partial erasing method and partial detection method for picture data
JPH0855214A (en) Map display control system
JP2777628B2 (en) Graphic processing method and apparatus
JPH0736437A (en) Picture data processor
JPH0869525A (en) Method and device for converting vector data
JP2536619B2 (en) Graphic processing device
JPH02222079A (en) Broken line drawing method
CN116793371A (en) Logistics unmanned vehicle path planning method and device based on GIS map and storage medium
CN114265528A (en) Linux-based cursor drawing method, device and medium
JPH08297466A (en) Mapping device
JP2714114B2 (en) Graphic processing method and graphic system
JPH05257426A (en) Guide map generation processing system
JPH0291773A (en) Graphic display device
JPH06282618A (en) Graphic plotting device
JPH10171978A (en) Interpolating method of line group
JPH06342474A (en) Area plotting system
JPS61184624A (en) System for partial erasing drawn picture image
JP2001118051A (en) Map generating device
JP2000306082A (en) Method and device for plotting intersection

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees