JPH0423305B2 - - Google Patents

Info

Publication number
JPH0423305B2
JPH0423305B2 JP61019374A JP1937486A JPH0423305B2 JP H0423305 B2 JPH0423305 B2 JP H0423305B2 JP 61019374 A JP61019374 A JP 61019374A JP 1937486 A JP1937486 A JP 1937486A JP H0423305 B2 JPH0423305 B2 JP H0423305B2
Authority
JP
Japan
Prior art keywords
polygon
pixels
input
pixel
section
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 - Lifetime
Application number
JP61019374A
Other languages
Japanese (ja)
Other versions
JPS62202278A (en
Inventor
Yasuhiro Abe
Tooru Kanamori
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 JP61019374A priority Critical patent/JPS62202278A/en
Publication of JPS62202278A publication Critical patent/JPS62202278A/en
Publication of JPH0423305B2 publication Critical patent/JPH0423305B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【発明の詳細な説明】 [概要] コンピユータグラフイクス等の情報処理装置に
よりデイジタル画像を描画する装置において、太
い線等による帯状に輪郭線により描画される多角
形の内面を塗り潰そうとする場合、該多角形の内
部と外部との識別が困難であるため、従来は、一
旦メモリ上に当該図形を作画した上解析する等の
方法を採つていたから多くの処理時間を必要とす
るという問題点があつた。本発明はこのような従
来の問題点を解決するため、内面を塗り潰すべき
多角形の輪郭線をその軌跡として生成する一群の
複数画素(ドツト)の内の特定の1ドツトの軌跡
である多角形と水平走査線との交点により該多角
形の内部を識別して塗り潰しを行なうと共に、前
記複数ドツトを用いて輪郭線を上書きすることに
より、簡潔な論理により高速度で処理することの
可能な描画装置を開示している。
[Detailed Description of the Invention] [Summary] In a device that draws a digital image using an information processing device such as a computer graphics device, when attempting to fill in the inner surface of a polygon drawn by an outline line in a strip of thick lines, etc. Since it is difficult to distinguish between the inside and outside of the polygon, conventional methods have been to draw the shape in memory and then analyze it, which requires a lot of processing time. It was hot. In order to solve these conventional problems, the present invention uses a polygon, which is the locus of a specific dot among a group of multiple pixels (dots), to generate the outline of a polygon whose inner surface is to be filled. The interior of the polygon is identified and filled by the intersection of the polygon and the horizontal scanning line, and the outline is overwritten using the plurality of dots, making it possible to process at high speed using simple logic. A drawing device is disclosed.

[産業上の利用分野] 本発明はコンピユータグラフイクス等の情報処
理装置によりデイジタル画像を描画する装置の制
御に関するもので、特に輪郭線が太い線等で帯状
に描かれる多角形の内面の塗り潰しを行なう場合
の制御に係る。
[Industrial Application Field] The present invention relates to the control of a device that draws digital images using an information processing device such as a computer graphics device, and in particular, the present invention relates to the control of a device that draws digital images using an information processing device such as a computer graphics device. This relates to the control when carrying out such operations.

[従来の技術] 第4図は面塗り多角形の描画方法の原理を説明
する図であつて、50は面塗りをすき多角形、5
1,52はそれぞれ水平走査を示しており、1〜
4の数字は走査に際して水平走査線が多角形50
の輪郭線と交差する順番を表している。
[Prior Art] FIG. 4 is a diagram explaining the principle of a drawing method for a painted polygon, in which 50 is a polygon with a painted surface;
1 and 52 respectively indicate horizontal scanning, and 1 to 52 indicate horizontal scanning.
The number 4 means that the horizontal scanning line is a polygon 50 when scanning.
represents the order in which they intersect with the contour line.

第4図において、水平走査線が多角形の輪郭線
と交差する点に着目すると、水平走査線51にお
いては交点1から交点2までの区間が多角形50
の内部であり、水平走査線52においては交点1
から交点2までの区間および交点3から交点4ま
での区間がそれぞれ多角形の内部であることが分
かる。すなわち、水平走査線と多角形の輪郭線と
の奇数番目の交点から偶数番目の交点までの間は
該多角形の内部と見なしてよい。
In FIG. 4, if we pay attention to the point where the horizontal scanning line intersects the outline of the polygon, we can see that in the horizontal scanning line 51, the section from intersection point 1 to intersection point 2 is polygon 50.
, and in the horizontal scanning line 52, the intersection 1
It can be seen that the section from to intersection 2 and the section from intersection 3 to intersection 4 are inside the polygon. In other words, the area between the odd-numbered intersections and the even-numbered intersections between the horizontal scanning line and the outline of the polygon may be considered to be inside the polygon.

従つて、それぞれの水平走査線について、多角
形の輪郭線との奇数番目の交点から偶数番目の交
点までの区間に線分を描画することにより多角形
50の内部を塗り潰すことができる。
Therefore, for each horizontal scanning line, the inside of the polygon 50 can be filled in by drawing a line segment in the section from the odd-numbered intersection to the even-numbered intersection with the outline of the polygon.

近年コンピユータグラフイクス等の進歩に伴い
画像の描画もより複雑で多様、多彩なものを表現
することが要求されるようになつてきている。
In recent years, with advances in computer graphics, etc., it has become necessary to draw images that are more complex, diverse, and expressive.

その中で、多角形をある太さを持つた線で描く
ような場合がある。これは、複数の画素(例えば
2×2ドツト)を同時に移動させてその軌跡によ
つて該多角形の輪郭線を形成させることにより描
画することができる。
Among these, there are cases where polygons are drawn using lines of a certain thickness. This can be drawn by moving a plurality of pixels (for example, 2×2 dots) at the same time and forming the outline of the polygon based on their loci.

このようにして描かれた多角形の内部を塗り潰
そうとすると、それは、先に、第4図を用いて説
明したような方法では不可能である。例えば第5
図に示すように、多角形の輪郭線に幅があると
き、内面と外面をそれぞれ輪郭線とすると多角形
53と水平走査線54においては2番目の交点と
3番目の交点との間の区間が多角形53の内部と
なるが、水平走査線55においては2番目の交点
と3番目の交点との間の区間はは多角形の外部と
なる。すなわち、水平走査線と多角形の輪郭線と
の交点の順番についての奇数・偶数の関係を用い
て単純に処理することができない。
If an attempt is made to fill in the interior of a polygon drawn in this manner, it is impossible to do so using the method described above with reference to FIG. For example, the fifth
As shown in the figure, when the contour line of a polygon has a width, and if the inner and outer surfaces are respectively contour lines, then in the polygon 53 and the horizontal scanning line 54, the section between the second and third intersection points is inside the polygon 53, but in the horizontal scanning line 55, the section between the second and third intersections is outside the polygon. That is, processing cannot be performed simply using the odd/even relationship regarding the order of intersections between the horizontal scanning line and the contour line of the polygon.

[発明が解決しようとする問題点] 上述したように、輪郭線がある幅を持つた太い
線で描かれる多角形においては、各辺の幅のため
辺と辺との重なる部分ができる等、辺の形状が複
雑になるので、論理的に辺の境界を推定すること
が困難である。そのため、従来はこのような多角
形の塗り潰しのため内部を識別する場合、例えば
メモリ上に当該多角形を作画した上で解析を行な
い内部を判定する等の方法に依らざるを得なかつ
たから、その処理に多くの時間を要するという問
題点があつた。
[Problems to be Solved by the Invention] As mentioned above, in a polygon whose outline is drawn by thick lines with a certain width, the width of each side causes overlaps between the sides, etc. Since the shape of the sides becomes complicated, it is difficult to logically estimate the boundaries of the sides. Therefore, in the past, when identifying the interior of such a polygon by filling it in, one had to rely on methods such as drawing the polygon in memory and then analyzing it to determine the interior. There was a problem that processing took a lot of time.

本発明はこのような従来の問題点に鑑み、輪郭
線が幅を有する多角形の塗り潰しを簡潔な論理で
迅速に行なうことのできる描画装置を提供するこ
とを目的としている。
SUMMARY OF THE INVENTION In view of these conventional problems, it is an object of the present invention to provide a drawing device that can quickly fill in a polygon whose outline has a width using simple logic.

[問題点を解決するための手段] 本発明はよれば上記目的は前記特許請求の範囲
に記載した手段により達成される。すなわち、本
発明は、画像の座標情報を発生する入力装置と、
入力された上記座情報を読み取り、図形の生成に
関する制御を行なう制御部と、前記入力装置から
入力された図形が複数画素の集合による大画素の
軌跡によつて描画される帯状の輪郭線を有する多
角形であるとき該複数画素の内の特定の一画素の
軌跡が作る多角形についての座標を検出し出力す
る座標入力部と、該座標入力部の出力と走査線の
交点を求める境界点検出部と、上記走査線上の交
点が奇数番目であるか偶数番目であるかを識別
し、これによつて該当する部分が多角形の内部で
あるか外部であるかを判定する内部領域判定部
と、多角形の内部であると判定された領域内の全
域に水平線分を描画する塗り潰し部と、前記入力
装置から入力された座標情報に基づいて複数の画
素の集合である大画素を該複数の画素の中の前記
特定の一画素の軌跡に沿つて該特定の一画素の位
置が一致するように移動させることによつて多角
形を描画する図形発生部と、表示に必要な図形を
保持する画像メモリとを具備する面塗り多角形の
描画装置である。
[Means for Solving the Problems] According to the present invention, the above object is achieved by the means described in the claims. That is, the present invention includes an input device that generates coordinate information of an image;
A control unit reads the input locus information and controls generation of a figure, and the figure input from the input device has a band-shaped outline drawn by a locus of large pixels formed by a collection of a plurality of pixels. A coordinate input unit that detects and outputs the coordinates of the polygon formed by the locus of a specific pixel among the plurality of pixels when the polygon is a polygon, and a boundary point detection unit that determines the intersection of the output of the coordinate input unit and the scanning line. and an internal area determination unit that identifies whether the intersection on the scanning line is an odd number or an even number, and thereby determines whether the corresponding part is inside or outside the polygon. , a filling unit that draws a horizontal line segment in the entire area within the area determined to be inside the polygon, and a large pixel that is a set of a plurality of pixels based on the coordinate information input from the input device. a figure generator that draws a polygon by moving the specific one pixel along the locus of the pixels so that the position of the specific one pixel coincides with the position of the specific one pixel; and a figure generator that holds the figures necessary for display. This is a drawing device for drawing a filled polygon, which is equipped with an image memory.

[実施例] 第1図は本発明の一実施例を示すブロツク図で
あつて、1は入力装置、2は制御部、3は座標入
力部、4は境界点検出部、5は内部領域判定部、
6は塗り潰し部、7は図形発生部、8は画像メモ
リ、9は表示制御部、10は表示部を表してい
る。
[Embodiment] FIG. 1 is a block diagram showing an embodiment of the present invention, in which 1 is an input device, 2 is a control section, 3 is a coordinate input section, 4 is a boundary point detection section, and 5 is an internal region determination section. Department,
Reference numeral 6 represents a filling section, 7 a graphic generation section, 8 an image memory, 9 a display control section, and 10 a display section.

第1図において、入力装置1は通常、タブレツ
ト、マウス、あるいはトラツクボール等が用いら
れる。そして、これらの入力装置を操作すること
により発生した座標情報は制御部2によつて読み
取られる。
In FIG. 1, an input device 1 is typically a tablet, mouse, trackball, or the like. Coordinate information generated by operating these input devices is read by the control unit 2.

太い輪郭線を持つため、複数画素の軌跡として
描画される多角形の場合については、該複数の画
素の内の特定の1画素の軌跡として描き出される
多角形の座標を座標入力部3が検出し、これと水
平走査線の交点を境界点検出部4が検出する。そ
して、内部領域判定部5が該交点が奇数番目であ
るか偶数番目であるかを識別することにより多角
形の内部を判定し、塗り潰し部6が該当する区間
について水平線分を描画することにより塗り潰し
を行なう。これによつて、特定の1画素の軌跡と
して描かれる多角形の内部が塗り潰される。そし
て、その後、図形発生部7が、元の多角形を形成
する太い輪郭線の複数画素を前記特定の一画素の
軌跡として描かれた多角形に沿つて該特定の一画
素の軌跡が一致するように移動させて当該多角形
の輪郭線を描画することにより多角形全体の面塗
りが完成する。
In the case of a polygon that has a thick outline and is drawn as a locus of multiple pixels, the coordinate input unit 3 detects the coordinates of the polygon that is drawn as a locus of one specific pixel among the multiple pixels. , and the intersection of this and the horizontal scanning line is detected by the boundary point detection unit 4. Then, the interior region determination unit 5 determines the interior of the polygon by identifying whether the intersection is an odd number or an even number, and a filling unit 6 fills the corresponding section by drawing a horizontal line segment. Do this. As a result, the inside of the polygon drawn as a locus of one specific pixel is filled. Thereafter, the figure generation unit 7 matches the trajectory of the specific pixel along the polygon drawn by using the plurality of pixels of the thick outline forming the original polygon as the trajectory of the specific one pixel. By moving the polygon in this manner and drawing the outline of the polygon, the surface painting of the entire polygon is completed.

これらの処理は第2図に示す流れ図のように制
御することにより、内部を塗り潰すべき多角形の
輪郭線が1画素の軌跡であつても複数画素の軌跡
であつても同一の制御の流れの中で処理すること
ができる。
By controlling these processes as shown in the flow chart shown in Figure 2, the same control flow can be achieved regardless of whether the outline of the polygon whose interior is to be filled is a trajectory of one pixel or a trajectory of multiple pixels. It can be processed within.

第3図は本発明による太い輪郭線を有する多角
形の面塗りを説明する図である。すなわち、(a)に
示すような複数の画素(大きさがdx×dyドツト
の画素)の軌跡として描画される多角形は例えば
(b)の実線に示すようになるが、このとき(a)に示す
A点の画素の軌跡は(b)に点線で示すような関係に
なる。これを抽出すれば(c)に示すような単純な多
角形が得られるから、この多角形について各水平
走査線との交点を求めて、奇数番目の交点と偶数
番目の交点との間の区間をそれぞれ直線で埋め
る。これによつて(d)の右下がりの粗い間隔の斜線
を施した部分の塗り潰しが行なわれる。次に(a)に
示した複数の画素を移動させて当該多角形の輪郭
線を描くことにより、(d)の左下がの細かい間隔の
斜線を施した部分の塗り潰しが行なわれる。
FIG. 3 is a diagram illustrating the filling of a polygon having a thick outline according to the present invention. In other words, a polygon drawn as a locus of multiple pixels (pixels of size dx x dy dots) as shown in (a) is, for example,
At this time, the locus of the pixel at point A shown in (a) becomes as shown in the solid line in (b), but the relationship is as shown in the dotted line in (b). If we extract this, we will obtain a simple polygon as shown in (c), so we will find the intersection points of this polygon with each horizontal scanning line, and calculate the interval between the odd-numbered intersection and the even-numbered intersection. Fill in each with a straight line. As a result, the diagonal lined area with coarse spacing downward to the right in (d) is filled in. Next, by moving the plurality of pixels shown in (a) to draw the outline of the polygon, the portion shown in (d) with diagonal lines at small intervals is filled in.

[発明の効果] 以上説明したような本発明によれば、デイジタ
ル画像を描画する場合において、輪郭線を複数ド
ツトで表現するような多角形の面塗りが簡潔な論
理により、迅速に処理できる利点がある。また、
該多角形が複雑な形状のものであつても容易に処
理できると共に塗り残し等を生ずることもないか
ら効果は大きい。
[Effects of the Invention] According to the present invention as described above, when drawing a digital image, there is an advantage that filling of a polygon whose contour line is expressed by a plurality of dots can be quickly processed using simple logic. There is. Also,
Even if the polygon has a complicated shape, it can be easily processed and there will be no unpainted areas, so the effect is great.

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

第1図は本発明を実施する装置の1例を示すブ
ロツク図、第2図は面塗り処理の例を示す流れ
図、第3図は本発明による太い輪郭線を有する多
角形の面塗りを説明する図、第4図は面塗り多角
形の描画方法の原理を説明する図、第5図は輪郭
線が幅を持つ多角形の内部判定について説明する
図である。 1……入力装置、2……制御部、3……座標入
力部、4……境界点検出部、5……内部領域判定
部、6……塗り潰し部、7……図形発生部、8…
…画像メモリ、9……表示制御部、10……表示
部、50,53……面塗りをすべき多角形、5
1,52,54,55……水平走査線。
Fig. 1 is a block diagram showing an example of an apparatus for carrying out the present invention, Fig. 2 is a flowchart showing an example of surface painting processing, and Fig. 3 explains the surface painting of a polygon with a thick outline according to the present invention. FIG. 4 is a diagram for explaining the principle of a drawing method for a filled polygon, and FIG. 5 is a diagram for explaining internal determination of a polygon whose outline has a width. DESCRIPTION OF SYMBOLS 1... Input device, 2... Control unit, 3... Coordinate input unit, 4... Boundary point detection unit, 5... Internal area determination unit, 6... Filling unit, 7... Figure generation unit, 8...
...Image memory, 9...Display control section, 10...Display section, 50, 53...Polygon to be painted, 5
1, 52, 54, 55...horizontal scanning lines.

Claims (1)

【特許請求の範囲】 1 画像の座標情報を発生する入力装置1と、入
力された上記座標情報を読み取り、図形の生成に
関する制御を行なう制御部2と、 前記入力装置から入力された図形が複数画素の
集合による大画素の軌跡によつて描画される帯状
の輪郭線を有する多角形であるとき該複数画素の
内の特定の一画素の軌跡が作る多角形についての
座標を検出し出力する座標入力部3と、 該座標入力部の出力と走査線の交点を求める境
界点検出部4と、 上記走査線上の交点が奇数番目であるか偶数番
目であるかを識別し、これによつて該当する部分
が多角形の内部であるか外部であるかを判定する
内部領域判定部5と、 多角形の内部であると判定された領域内の全域
に水平線分を描画する塗り潰し部6と、 前記入力装置から入力された座標情報に基づい
て複数の画素の集合である大画素を、該複数の画
素の中の前記特定の一画素の軌跡に沿つて該特定
の一画素の位置が一致するように移動させること
によつて多角形を描画する図形発生部7と、 表示に必要な図形を保持する画像メモリ8とを
具備することを特徴とする面塗り多角形の描画装
置。
[Scope of Claims] 1. An input device 1 that generates coordinate information of an image; a control unit 2 that reads the input coordinate information and controls generation of figures; and a plurality of figures input from the input device. Coordinates for detecting and outputting the coordinates of a polygon formed by the trajectory of a specific pixel among the plurality of pixels when the polygon has a band-like outline drawn by the locus of large pixels from a collection of pixels. an input section 3; a boundary point detection section 4 for determining the intersection of the output of the coordinate input section and the scanning line; an internal area determining unit 5 that determines whether the portion to be processed is inside or outside the polygon; a filling unit 6 that draws a horizontal line segment throughout the area that is determined to be inside the polygon; Based on the coordinate information input from the input device, a large pixel which is a set of a plurality of pixels is arranged so that the position of the particular one pixel among the plurality of pixels coincides with the locus of the particular one pixel. 1. A drawing device for a covered polygon, comprising: a figure generation unit 7 which draws a polygon by moving the polygon; and an image memory 8 which holds figures necessary for display.
JP61019374A 1986-01-31 1986-01-31 Depicting system for surface coating polygon Granted JPS62202278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61019374A JPS62202278A (en) 1986-01-31 1986-01-31 Depicting system for surface coating polygon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61019374A JPS62202278A (en) 1986-01-31 1986-01-31 Depicting system for surface coating polygon

Publications (2)

Publication Number Publication Date
JPS62202278A JPS62202278A (en) 1987-09-05
JPH0423305B2 true JPH0423305B2 (en) 1992-04-21

Family

ID=11997549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61019374A Granted JPS62202278A (en) 1986-01-31 1986-01-31 Depicting system for surface coating polygon

Country Status (1)

Country Link
JP (1) JPS62202278A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3200055B2 (en) * 1989-05-10 2001-08-20 キヤノン株式会社 Image processing apparatus and method
JP2002159769A (en) * 2000-11-24 2002-06-04 Janome Sewing Mach Co Ltd Sewing machine provided with presser bar pressure regulator and sewing machine provided with presser bar lifter

Also Published As

Publication number Publication date
JPS62202278A (en) 1987-09-05

Similar Documents

Publication Publication Date Title
JP3993259B2 (en) Image processing device
JPH0423305B2 (en)
US4656468A (en) Pattern data processing apparatus
JP3632312B2 (en) Lane detection method and apparatus on road surface
JP2625612B2 (en) Image processing method and image processing apparatus
JP2003317111A5 (en)
JPH08272971A (en) Object recognition method
EP0380090B1 (en) Image processing system
JPS60157681A (en) Image shape unevenness detection method
JP2714114B2 (en) Graphic processing method and graphic system
JP2925195B2 (en) Image processing method and apparatus
JPS646508B2 (en)
JP4320604B2 (en) Image processing method and image processing apparatus
JP2647911B2 (en) Character / graphic area extraction method
US7667714B2 (en) Patterned polygon rendering apparatus
JP2904994B2 (en) Coordinate connection display method
JP3566363B2 (en) Image processing apparatus and method
JP3211591B2 (en) Image processing device
JPH0319991B2 (en)
JPH07104137B2 (en) Method of detecting the rotation angle of the target pattern
JP2000090286A (en) Drawing processing device and recording medium
JP3033750B1 (en) Polygon deformation drawing apparatus and polygon deformation drawing method
JP2620094B2 (en) How to measure figure patterns
JPH11203470A (en) Surface condition setting method and image recognition method
JPS63204378A (en) Graphic generator