JPH09245180A - Polygon paint out method - Google Patents

Polygon paint out method

Info

Publication number
JPH09245180A
JPH09245180A JP4881096A JP4881096A JPH09245180A JP H09245180 A JPH09245180 A JP H09245180A JP 4881096 A JP4881096 A JP 4881096A JP 4881096 A JP4881096 A JP 4881096A JP H09245180 A JPH09245180 A JP H09245180A
Authority
JP
Japan
Prior art keywords
polygon
triangle
triangles
filling
memory
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
JP4881096A
Other languages
Japanese (ja)
Inventor
Masaki Arima
正木 有馬
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4881096A priority Critical patent/JPH09245180A/en
Publication of JPH09245180A publication Critical patent/JPH09245180A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce processing time by reducing the overlapped painting of the same area and the paint out of the outside of a polygonal area as far as possible in a polygon paint out method. SOLUTION: A polygon 1 is decomposed into a triangles 2 and 3 in advance and stored in a data buffer 100 as paint out patterns 201. In the paint out processing of the triangle 2 at first, data (null data) is already read out from a dot memory 400 dot information of the paint out pattern 201 corresponding to the triangle 2 is read out from the data buffer 100 to exclusively OR both of them to write in the dot memory 400 again. In the paint out processing of the triangle 3 continually, dot information corresponding to the triangle 2 already written in the dot memory 400 is read out and dot information corresponding to the paint out pattern 201 corresponding to the triangle 3 is read out from the data buffer 100 to exclusively OR both of them to write into the dot memory 400.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明はグラフィックス処理
装置等における多角形塗り潰し方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a polygon filling method in a graphics processing device or the like.

【0002】[0002]

【従来の技術】従来、この種の多角形塗り潰し方法とし
て、特開平3−108081号公報に記載されたものが
知られている。
2. Description of the Related Art Heretofore, as a polygonal filling method of this kind, a method described in Japanese Patent Laid-Open No. 3-108081 has been known.

【0003】図2に塗り潰し対象の多角形を、図9にそ
の塗り潰し処理の過程を示している。図2において、
A,B,C,Dはそれぞれ座標(0,2),(1,
0),(2,2),(3,0)の多角形頂点であり、1
はそれらの頂点を有する多角形である。
FIG. 2 shows a polygon to be filled, and FIG. 9 shows the filling process. In FIG.
A, B, C and D are coordinates (0, 2), (1,
0), (2,2), (3,0) polygon vertices,
Is a polygon with those vertices.

【0004】図9において4は多角形1の最大x,y座
標と最小x,y座標を対角とする矩形領域、5は多角形
1の辺ABを含み右端が矩形領域4の右端と一致する上
底=3、下底=2、高さ=2の台形、6は多角形1の辺
BCを含み右端が矩形領域4の右端と一致する上底=
1、下底=2、高さ=2の台形、7は多角形1の辺CD
を含み右端が矩形領域4の右端と一致する底辺=1、高
さ=2の三角形、8は多角形1の辺DAを含み右端が矩
形領域4の右端と一致する底辺=3、高さ=2の三角形
である。この従来例においては、塗り潰しの基本を台形
および三角形としている。
In FIG. 9, 4 is a rectangular area having the maximum x and y coordinates and the minimum x and y coordinates of polygon 1 as diagonals, and 5 includes the side AB of polygon 1 and the right end coincides with the right end of rectangular area 4. Top base = 3, bottom base = 2, height = 2 trapezoid, 6 includes the side BC of polygon 1 and the right end matches the right end of the rectangular region 4 =
1, trapezoid with bottom = 2 and height = 2, 7 is side CD of polygon 1
And a right edge of the rectangle 1 whose height matches the right edge of the rectangular area 4 = 1, and a height of 2; a reference numeral 8 includes a side DA of the polygon 1; the right edge of which matches the right edge of the rectangular area 4; It is a triangle of 2. In this conventional example, the basics of filling are trapezoidal and triangular.

【0005】塗り潰し処理は、まず図9(a)に示す台
形5の塗り潰し処理を行う。この塗り潰し処理で既にメ
モリに書き込まれているデータを読み出し、図9(a)
のパターンと排他的論理和をとり、再びメモリに書き込
む操作を行う。図9(b)はこの塗り潰し処理結果であ
り、これがメモリに書き込まれる。続いて図9(c)に
示す台形6の塗り潰し処理を行う。この塗り潰し処理で
既にメモリに書き込まれている図9(b)のデータを読
み出し、図9(c)のパターンと排他的論理和をとり、
再びメモリに書き込む操作を行う。このとき既に塗り潰
された部分と重なる領域は、塗り潰される以前のデータ
に戻る(排他的論理和で1+1=0)。
In the filling process, first, the trapezoid 5 shown in FIG. 9A is filled. By this filling processing, the data already written in the memory is read out, and the data shown in FIG.
The exclusive OR with the pattern of and is written again in the memory. FIG. 9B shows the result of this filling processing, which is written in the memory. Subsequently, the trapezoid 6 filling process shown in FIG. 9C is performed. The data of FIG. 9B already written in the memory is read by this filling processing, and the exclusive OR is taken with the pattern of FIG. 9C,
Perform the operation to write to the memory again. At this time, the area that overlaps with the already filled portion returns to the data before being filled (exclusive OR 1 + 1 = 0).

【0006】図9(d)はこの塗り潰し処理結果であ
る。続いて図9(e)に示す三角形7の塗り潰し処理を
行う。この塗り潰し処理で既にメモリに書き込まれてい
る図9(d)のデータを読み出し、図9(e)のパター
ンと排他的論理和をとり、再びメモリに書き込む操作を
行う。このときは既に塗り潰された部分と重なる領域は
ない。図9(f)はこの塗り潰し処理結果である。続い
て図9(g)に示す三角形8の塗り潰し処理を行う。こ
の塗り潰し処理では既にメモリに書き込まれている図9
(f)のデータを読み出し、図9(g)のパターンと排
他的論理和をとり、再びメモリに書き込む操作を行う。
このとき既に塗り潰された部分と重なる領域は、塗り潰
される以前のデータに戻る(排他的論理和で1+1=
0)。こうして最終的に図9(h)のような塗り潰し多
角形が完成する。
FIG. 9D shows the result of this filling processing. Subsequently, the filling process of the triangle 7 shown in FIG. 9E is performed. In this filling processing, the data of FIG. 9D already written in the memory is read, the exclusive OR is taken with the pattern of FIG. 9E, and the operation of writing again in the memory is performed. At this time, there is no area that overlaps the already-painted portion. FIG. 9F shows the result of this filling processing. Then, the filling process of the triangle 8 shown in FIG.9 (g) is performed. In this filling processing, the data already written in the memory in FIG.
The data of (f) is read, the exclusive OR is obtained with the pattern of FIG. 9 (g), and the operation of writing again in the memory is performed.
At this time, the area that overlaps with the already filled area returns to the data before being filled (1 + 1 = exclusive OR).
0). In this way, finally, the filled polygon as shown in FIG. 9 (h) is completed.

【0007】上記の場合に、塗り潰し処理を行った総面
積は、第9図(a),(c),(e),(g)の図形面
積の総和であり、12となるが、最終的に塗り潰されて
いる面積は2である。塗り潰し処理回数は4回である。
In the above case, the total area subjected to the filling processing is the total of the graphic areas shown in FIGS. 9 (a), (c), (e), and (g), which is 12, but is the final value. The area filled in is 2. The number of filling processes is four.

【0008】[0008]

【発明が解決しようとする課題】上記従来の方法では同
じ領域を何度も重ね塗したり、本来塗り潰す必要のない
多角形領域外を塗り潰さなくてはならず、そのために余
計な処理時間が生じるという問題がある。
In the above-mentioned conventional method, the same area must be repeatedly overpainted, or the area outside the polygonal area which should not be originally filled must be filled up. Therefore, extra processing time is required. There is a problem that it will occur.

【0009】本発明は同じ領域の重ね塗りや多角形領域
外の塗り潰しをできるだけ削減し、処理時間を短縮する
ことを目的とする。
An object of the present invention is to reduce over-painting of the same area and painting outside the polygonal area as much as possible to shorten the processing time.

【0010】[0010]

【課題を解決するための手段】この課題を解決するため
に本発明は、塗り潰しパターンの基本を台形と三角形で
はなく、三角形のみにしたものである。
In order to solve this problem, the present invention provides a basic filling pattern, not a trapezoid and a triangle, but only a triangle.

【0011】これにより、多角形領域外の塗り潰しを削
減することができ、処理時間の短縮が図れる。
As a result, the filling outside the polygonal area can be reduced, and the processing time can be shortened.

【0012】[0012]

【発明の実施の形態】本発明に係る請求項1の多角形塗
り潰し方法は、塗り潰しパターンで内部を塗り潰した多
角形をメモリ上に形成する多角形塗り潰し方法であっ
て、前記多角形を複数の三角形のみに分解してこれらを
塗り潰しパターンとなし、メモリ上に複数の三角形を順
次展開するとき、各三角形の塗り潰しパターンとメモリ
上のデータの排他的論理和をとりながら各三角形の塗り
潰しを行うことを特徴とするものであり、塗り潰しパタ
ーンの基本を台形と三角形とではなく、三角形のみとし
たので、同じ領域の重ね塗りや本来塗り潰さなくとも良
い多角形領域外の塗り潰しを削減できるという作用を有
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A polygon filling method according to claim 1 of the present invention is a polygon filling method for forming a polygon whose inside is filled with a filling pattern on a memory. When disassembling only into triangles and forming these as fill patterns, and when sequentially expanding a plurality of triangles in memory, fill each triangle while taking the exclusive OR of the fill pattern of each triangle and the data in memory. Since the basic filling pattern is not a trapezoid and a triangle but only a triangle, there is an effect that it is possible to reduce overpainting of the same area and filling outside the polygonal area that does not need to be filled. .

【0013】本発明に係る請求項2の多角形塗り潰し方
法は、上記請求項1において、多角形を複数の三角形に
分解するに際して、(1) 三角形は重ならなくても多
重に重なっても構わないが、多角形の内部に何れの三角
形にも属さない領域があってはならない、(2) 多角
形の全頂点が何れかの三角形の頂点に含まれている。た
だし多角形の1つの頂点が複数の三角形の頂点に含まれ
ていてもよい、(3) 三角形群が構成する図形の最外
周から形成される図形が元の多角形を内包する、(4)
多角形のある辺を含む三角形が奇数個である、(5)
多角形が有しない辺を三角形が有している場合、その
辺を含む三角形が偶数個である、という条件のもとに分
解することを特徴としており、多角形内部の塗り残し
や、多角形外部の塗り間違いが生じないよう多角形を三
角形に分解できるという作用を有する。
The polygon filling method according to a second aspect of the present invention is the method according to the first aspect, wherein when the polygon is decomposed into a plurality of triangles, (1) the triangles may overlap or may not overlap. There is no area inside the polygon that does not belong to any triangle. (2) All vertices of the polygon are included in the vertices of any triangle. However, one vertex of a polygon may be included in the vertices of a plurality of triangles. (3) A figure formed from the outermost periphery of a figure formed by a triangle group includes the original polygon, (4)
There is an odd number of triangles that include a polygonal side, (5)
The feature is that when a triangle has a side that a polygon does not have, the number of triangles that include that side is an even number. It has the effect that a polygon can be decomposed into triangles so that external painting errors do not occur.

【0014】以下、本発明に係る多角形塗り潰し方法の
実施の形態について、図面を用いて説明する。
An embodiment of a polygon filling method according to the present invention will be described below with reference to the drawings.

【0015】図1は多角形塗り潰し方法を実施するため
に必要な機能を示すブロック図である。図1において、
100は外部から各種の方法で取り込まれた任意の多角
形の各頂点の座標データを多角形情報101として格納
するデータバッファ、200は多角形情報101に基づ
いてその多角形情報101に係る多角形を下記の条件
(1)〜(5)に従って所要の複数の三角形に分解し、
各三角形の各頂点の座標を算出する多角形分解手段、2
01は上記のようにして求められた各三角形の各頂点の
座標データである三角形情報であり、この三角形情報は
塗り潰しパターン201としてデータバッファ100に
格納される。300は与えられた任意形状の多角形に対
して所定の手順に従って塗り潰し処理を実行する塗り潰
し処理手段、400は塗り潰し処理結果のドット情報を
記憶するドットメモリである。塗り潰し処理手段300
は、ドットメモリ400から塗り潰し処理途中のドット
情報を読み出すとともにデータバッファ100から塗り
潰しパターン201のドット情報を読み出して両者の排
他的論理和をとり、その塗り潰し処理結果のドット情報
をドットメモリ400に記憶させるという処理を何回か
繰り返す。
FIG. 1 is a block diagram showing the functions required to implement the polygonal fill method. In FIG.
Reference numeral 100 is a data buffer that stores coordinate data of each vertex of an arbitrary polygon that is fetched from the outside by various methods as polygon information 101, and reference numeral 200 is a polygon related to the polygon information 101 based on the polygon information 101. Is decomposed into a plurality of required triangles according to the following conditions (1) to (5),
Polygon decomposition means for calculating the coordinates of each vertex of each triangle, 2
Reference numeral 01 is triangle information which is coordinate data of each vertex of each triangle obtained as described above, and this triangle information is stored in the data buffer 100 as a fill pattern 201. Reference numeral 300 is a fill processing means for performing a fill processing on a given polygon having an arbitrary shape in accordance with a predetermined procedure, and 400 is a dot memory for storing dot information of the result of the fill processing. Filling processing means 300
Reads the dot information in the middle of the filling process from the dot memory 400, reads the dot information of the filling pattern 201 from the data buffer 100, takes the exclusive OR of both, and stores the dot information of the filling process result in the dot memory 400. The process of allowing is repeated several times.

【0016】図3は図2の多角形1を2つの三角形に分
解したものを示す。図3において、2は多角形1の頂点
A,B,Cを含む三角形(ABC)、3は多角形の頂点
C,D,Aを含む三角形(CDA)である。この分解に
際し、以下の条件が必要である。
FIG. 3 shows the polygon 1 of FIG. 2 decomposed into two triangles. In FIG. 3, reference numeral 2 is a triangle (ABC) including the vertices A, B and C of the polygon 1, and 3 is a triangle (CDA) including the vertices C, D and A of the polygon. The following conditions are required for this decomposition.

【0017】(1) 三角形は重ならなくても多重に重
なっても構わないが、多角形の内部に何れの三角形にも
属さない領域があってはならない。
(1) The triangles may be non-overlapping or multi-overlapping, but there must be no region inside the polygon that does not belong to any triangle.

【0018】(2) 多角形の全頂点が何れかの三角形
の頂点に含まれている。ただし多角形の1つの頂点が複
数の三角形の頂点に含まれていてもよい。
(2) All the vertices of a polygon are included in the vertices of any triangle. However, one vertex of a polygon may be included in the vertices of a plurality of triangles.

【0019】(3) 三角形群が構成する図形の最外周
から形成される図形が元の多角形を内包する。
(3) The figure formed from the outermost periphery of the figure formed by the triangle group includes the original polygon.

【0020】(4) 多角形のある辺を含む三角形が奇
数個である。
(4) The number of triangles including a polygonal side is odd.

【0021】(5) 多角形が有しない辺を三角形が有
している場合、その辺を含む三角形が偶数個である。
(5) When a triangle has a side that a polygon does not have, the number of triangles including that side is even.

【0022】このような条件のもとでの多角形の三角形
分解は多角形分解手段200によって行われ、得られた
三角形は塗り潰しパターン201としてデータバッファ
100に記憶される。条件(1)〜(5)を満たすこと
により、多角形内部の塗り残しや、多角形外部の塗り間
違いが生じないよう多角形を三角形に分解できる。
Under the above conditions, the polygonal triangle decomposition is performed by the polygon decomposition means 200, and the obtained triangles are stored in the data buffer 100 as the filling pattern 201. By satisfying the conditions (1) to (5), the polygon can be decomposed into triangles so as to prevent unpainted portions inside the polygon and incorrect coating outside the polygon.

【0023】三角形2と三角形3が構成する図形は上記
条件をすべて満足している。三角形2と三角形3は重な
り合ってはいるが多角形1の内部に隙間はない。多角形
1の頂点Bは三角形2に含まれ、頂点Dは三角形3に含
まれ、頂点AとCはそれぞれ三角形2と三角形3に含ま
れているため、多角形1の全頂点が何れかの三角形に含
まれている。三角形2と三角形3が重なり合った図形の
最外周は多角形1を内包している。多角形1の辺ABと
辺BCは三角形2の辺に含まれ、辺CDと辺DAは三角
形3の辺に含まれている。すなわち多角形1の各辺は1
個(一般的には奇数個)の三角形の辺に含まれている。
多角形1が含まない辺ACは三角形2と三角形3の何れ
の辺にも含まれている。すなわちこの辺は2個(一般的
には偶数個)の三角形の辺に含まれている。なお、条件
の(1),(5)についてはあとに補足説明がある。
The graphic formed by the triangles 2 and 3 satisfies all the above conditions. Although the triangles 2 and 3 overlap, there is no gap inside the polygon 1. Since vertex B of polygon 1 is included in triangle 2, vertex D is included in triangle 3, and vertices A and C are included in triangle 2 and triangle 3, respectively, all vertices of polygon 1 are It is included in the triangle. The outermost periphery of the figure in which the triangle 2 and the triangle 3 overlap each other includes the polygon 1. The sides AB and BC of the polygon 1 are included in the sides of the triangle 2, and the sides CD and DA are included in the sides of the triangle 3. That is, each side of polygon 1 is 1
(Generally an odd number) of triangles.
The side AC not including the polygon 1 is included in both sides of the triangle 2 and the triangle 3. That is, this side is included in the sides of two (generally even) triangles. Note that the conditions (1) and (5) will be supplemented later.

【0024】図4は塗り潰し処理手段300による塗り
潰し処理の過程を示している。塗り潰し処理は、まず三
角形2の塗り潰し処理を行う。この三角形は底辺=2、
高さ=2である。この塗り潰し処理では既にドットメモ
リ400に書き込まれているドット情報(全空状態)を
読み出すとともに、データバッファ100から図4
(a)に示す三角形2を表す塗り潰しパターン201の
ドット情報を読み出して、両者の排他的論理和をとり、
その塗り潰し処理結果のドット情報を図4(b)のよう
に再びドットメモリ400に書き込む操作を行う。
FIG. 4 shows the process of the filling processing by the painting processing means 300. In the filling process, first, the filling process of the triangle 2 is performed. This triangle has a base = 2,
Height = 2. In this filling process, the dot information (full sky state) already written in the dot memory 400 is read out, and the data buffer 100 shown in FIG.
The dot information of the filled pattern 201 representing the triangle 2 shown in (a) is read out, the exclusive OR of the two is taken,
As shown in FIG. 4B, the operation of writing the dot information as the result of the filling processing into the dot memory 400 again is performed.

【0025】続いて三角形3の塗り潰し処理を行う。こ
の三角形3は底辺=2、高さ=2である。この塗り潰し
処理では既にドットメモリ400に書き込まれている図
4(b)に示すドットメモリ400を読み出すととも
に、データバッファ100から図4(c)に示す三角形
3を示す塗り潰しパターン201のドット情報を読み出
して、両者の排他的論理和をとり(このとき既に塗り潰
された部分と重なる領域は塗り潰される以前のデータに
戻る(排他的論理和で1+1=0))、その塗り潰し処
理結果のドット情報を図4(d)のように再びドットメ
モリ400に書き込む操作を行う。
Subsequently, the triangle 3 is filled. The triangle 3 has a base = 2 and a height = 2. In this filling processing, the dot memory 400 shown in FIG. 4B which has already been written in the dot memory 400 is read out, and the dot information of the filling pattern 201 shown by the triangle 3 shown in FIG. 4C is read out from the data buffer 100. Then, the exclusive OR of both is taken (at this time, the area that overlaps with the already filled portion returns to the data before being filled (exclusive OR 1 + 1 = 0)), and the dot information of the filling processing result is displayed. The operation of writing to the dot memory 400 again is performed as in 4 (d).

【0026】こうして最終的に図4(d)のような塗り
潰し多角形が完成する。この場合に、塗り潰し処理を行
った総面積は図4(a),(c)の図形面積の総和であ
り、4となるが、最終的に塗り潰されている面積は2で
ある。また、塗り潰し処理回数は2回である。このよう
に本実施の形態によれば、従来例に比べて、同じ領域を
重ね塗りする回数やその面積、および本来塗り潰す必要
のない多角形領域外の面積が削減され、処理時間が短縮
される 以下に、多角形を複数の三角形に分解するときの条件
(4)について補足しておく。条件(4)は「多角形の
ある辺を含む三角形が奇数個である」ということであ
る。
In this way, finally, a filled polygon as shown in FIG. 4D is completed. In this case, the total area subjected to the filling processing is the sum of the graphic areas in FIGS. 4A and 4C, which is 4, but the final filled area is 2. Further, the number of times of filling processing is two. As described above, according to this embodiment, the number of times the same region is overpainted and the area thereof, and the area outside the polygonal area that originally does not need to be filled are reduced and the processing time is shortened, as compared with the conventional example. The condition (4) when the polygon is decomposed into a plurality of triangles will be supplemented below. The condition (4) is that “the number of triangles including a polygonal side is an odd number”.

【0027】例えば図5(a)のような5つの頂点A,
B,C,D,Eをもつ多角形10が与えられたとする。
そして、この多角形10を図5(b)のように、頂点A
BEをもつ三角形11、頂点BCDをもつ三角形12、
頂点ACEをもつ三角形13、頂点ADEをもつ三角形
14、頂点ACDをもつ三角形15、頂点ECDをもつ
三角形16に分解する。この場合、辺AEと辺CDは複
数個の三角形に含まれているが、辺AEは三角形11,
13,14の3つすなわち奇数個の三角形に含まれてい
るのであり、辺CDも三角形12,15,16の3つす
なわち奇数個の三角形に含まれているのである。
For example, five vertices A as shown in FIG.
Given a polygon 10 with B, C, D and E.
Then, as shown in FIG.
Triangle 11 with BE, triangle 12 with vertex BCD,
It is decomposed into a triangle 13 having a vertex ACE, a triangle 14 having a vertex ADE, a triangle 15 having a vertex ACD, and a triangle 16 having a vertex ECD. In this case, the side AE and the side CD are included in a plurality of triangles, but the side AE is the triangle 11,
It is included in three, that is, an odd number of triangles 13 and 14, and the side CD is also included in three, that is, an odd number of triangles 12, 15, and 16.

【0028】分解によって得られた上記の6つの三角形
11〜16をそれぞれ塗り潰しパターンとして順次塗り
潰し処理していく過程を図6(a)〜(f)に示す。図
6(f)で最終的に得られた塗り潰し処理結果のドット
情報は図5(a)で与えられた多角形10を正確に塗り
潰し処理していることが分かる。
6 (a) to 6 (f) show a process in which the above six triangles 11 to 16 obtained by the decomposition are sequentially filled as a filling pattern. It can be seen that the dot information of the finally obtained filling processing result in FIG. 6F accurately fills the polygon 10 given in FIG. 5A.

【0029】もっとも、図5(a)の多角形10の場合
には、頂点ABEをもつ三角形11と頂点BCDをもつ
三角形12との2つの三角形に分解すれば充分である。
特許請求の範囲の表現は、冗長的なものもすべて含んだ
形で一般化して記載したものである。
In the case of the polygon 10 of FIG. 5A, however, it is sufficient to decompose it into two triangles, the triangle 11 having the vertex ABE and the triangle 12 having the vertex BCD.
The wording of the claims is generalized to include all the redundant ones.

【0030】次に、多角形を複数の三角形に分解すると
きの条件(5)について補足しておく。条件(5)は
「多角形が有しない辺を三角形が有している場合、その
辺を含む三角形が偶数個である」ということである。
Next, the condition (5) for decomposing a polygon into a plurality of triangles will be supplemented. The condition (5) is that "if a triangle has a side that a polygon does not have, the number of triangles including that side is an even number".

【0031】例えば図7(a)のような6つの頂点A,
B,C,D,E,Fをもつ中空きの多角形20が与えら
れたとする。そして、この多角形20を図7(b)のよ
うに、頂点ABDをもつ三角形21、頂点CBDをもつ
三角形22、頂点FBDをもつ三角形23、頂点EBE
をもつ三角形24に分解する。この場合、辺BDは多角
形20が有しない辺であるが、この辺BDは三角形2
1,22,23,24の4つすなわち偶数個の三角形に
含まれているのである。
For example, six vertices A as shown in FIG.
It is assumed that an empty polygon 20 having B, C, D, E and F is given. Then, as shown in FIG. 7B, a polygon 21 having a vertex ABD, a triangle 22 having a vertex CBD, a triangle 23 having a vertex FBD, and a vertex EBE are formed on the polygon 20.
To a triangle 24 with. In this case, the side BD is a side that the polygon 20 does not have, but this side BD is a triangle 2
It is included in four, that is, an even number of triangles 1, 22, 23, and 24.

【0032】分解によって得られた上記の4つの三角形
21〜24をそれぞれ塗り潰しパターンとして順次塗り
潰し処理していく過程を図8(a)〜(d)に示す。図
8(d)で最終的に得られた塗り潰し処理結果のドット
情報は図7(a)で与えられた多角形20を正確に塗り
潰し処理していることが分かる。
8 (a) to 8 (d) show a process in which the above four triangles 21 to 24 obtained by the decomposition are sequentially filled as a filling pattern. It can be seen that the dot information of the filling processing result finally obtained in FIG. 8D accurately fills the polygon 20 given in FIG. 7A.

【0033】[0033]

【発明の効果】以上のように本発明によれば、同じ領域
を重ね塗りする回数やその面積、および本来塗り潰す必
要のない多角形領域外の塗り潰しを削減でき、処理時間
を短縮することができるという効果が得られる。
As described above, according to the present invention, it is possible to reduce the number of times the same area is overpainted, the area thereof, and the painting outside the polygonal area which originally does not need to be filled, and to shorten the processing time. The effect of being able to be obtained is obtained.

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

【図1】本発明の実施の形態に係る多角形塗り潰し方法
を実施するために必要な機能を示すブロック図である。
FIG. 1 is a block diagram showing functions necessary for carrying out a polygon filling method according to an embodiment of the present invention.

【図2】塗り潰し対象の多角形の図を示す図である。FIG. 2 is a diagram showing a diagram of a polygon to be filled.

【図3】実施の形態において図2の多角形を2つの三角
形に分解した状態を示す図である。
FIG. 3 is a diagram showing a state in which the polygon of FIG. 2 is decomposed into two triangles in the embodiment.

【図4】実施の形態における多角形塗り潰し処理の過程
を示した説明図である。
FIG. 4 is an explanatory diagram showing a process of polygon filling processing according to the embodiment.

【図5】他の与えられた多角形およびその三角形分解の
状態を示す図である。
FIG. 5 is a diagram showing a state of another given polygon and its triangular decomposition.

【図6】図5の多角形の塗り潰し方法の過程を示した説
明図である。
FIG. 6 is an explanatory diagram showing a process of the polygon filling method of FIG.

【図7】さらに他の与えられた多角形およびその三角形
分解の状態を示す図である。
FIG. 7 is a diagram showing still another given polygon and its triangular decomposition state.

【図8】図7の多角形の塗り潰し方法の過程を示した説
明図である。
FIG. 8 is an explanatory diagram showing a process of the polygon filling method of FIG. 7.

【図9】従来の多角形塗り潰し方法の過程を示した説明
図である。
FIG. 9 is an explanatory diagram showing a process of a conventional polygon filling method.

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

1,10,20……多角形 2,3,11,12,13,14,15,16,21,
22,23,24……三角形 100……データバッファ 101……多角形情報 200……多角形分解手段 201……塗り潰しパターン 300……塗り潰し処理手段 400……ドットメモリ
1,10,20 ... Polygon 2,3,11,12,13,14,15,16,21,
22, 23, 24 ... Triangle 100 ... Data buffer 101 ... Polygon information 200 ... Polygon decomposition means 201 ... Fill pattern 300 ... Fill processing means 400 ... Dot memory

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 塗り潰しパターンで内部を塗り潰した多
角形をメモリ上に形成する多角形塗り潰し方法であっ
て、前記多角形を複数の三角形のみに分解してこれらを
塗り潰しパターンとなし、メモリ上に複数の三角形を順
次展開するとき、各三角形の塗り潰しパターンとメモリ
上のデータの排他的論理和をとりながら各三角形の塗り
潰しを行うことを特徴とする多角形塗り潰し方法。
1. A polygon filling method for forming a polygon whose inside is filled with a filling pattern on a memory, wherein the polygon is decomposed into only a plurality of triangles to form a filling pattern on a memory. A polygon filling method characterized in that when a plurality of triangles are sequentially expanded, each triangle is filled while taking the exclusive OR of the filling pattern of each triangle and the data on the memory.
【請求項2】 多角形を複数の三角形に分解するに際し
て、 (1) 三角形は重ならなくても多重に重なっても構わ
ないが、多角形の内部に何れの三角形にも属さない領域
があってはならない、 (2) 多角形の全頂点が何れかの三角形の頂点に含ま
れている。ただし多角形の1つの頂点が複数の三角形の
頂点に含まれていてもよい、 (3) 三角形群が構成する図形の最外周から形成され
る図形が元の多角形を内包する、 (4) 多角形のある辺を含む三角形が奇数個である、 (5) 多角形が有しない辺を三角形が有している場
合、その辺を含む三角形が偶数個である、 という条件のもとに分解することを特徴とする請求項1
に記載の多角形塗り潰し方法。
2. When decomposing a polygon into a plurality of triangles, (1) the triangles may or may not overlap, but there is a region inside the polygon that does not belong to any triangle. (2) All vertices of a polygon are included in the vertices of any triangle. However, one vertex of a polygon may be included in the vertices of a plurality of triangles. (3) A figure formed from the outermost circumference of a figure formed by a triangle group includes the original polygon. (4) Decompose under the condition that the number of triangles that include a side of a polygon is an odd number, (5) If a triangle has a side that a polygon does not have, the number of triangles that include that side is an even number. Claim 1 characterized by the above.
The polygon filling method described in.
JP4881096A 1996-03-06 1996-03-06 Polygon paint out method Pending JPH09245180A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4881096A JPH09245180A (en) 1996-03-06 1996-03-06 Polygon paint out method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4881096A JPH09245180A (en) 1996-03-06 1996-03-06 Polygon paint out method

Publications (1)

Publication Number Publication Date
JPH09245180A true JPH09245180A (en) 1997-09-19

Family

ID=12813572

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4881096A Pending JPH09245180A (en) 1996-03-06 1996-03-06 Polygon paint out method

Country Status (1)

Country Link
JP (1) JPH09245180A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012164959A1 (en) * 2011-06-02 2012-12-06 グリー株式会社 Vector data conversion output device, vector data conversion output method and vector data conversion output program
JP2012252520A (en) * 2011-06-02 2012-12-20 Gree Inc Vector data conversion output device, vector data conversion output method and vector data conversion output program
JP2012252518A (en) * 2011-06-02 2012-12-20 Gree Inc Vector data converting/outputting device, vector data converting/outputting method, and vector data converting/outputting program
JP2014139827A (en) * 2014-03-26 2014-07-31 Gree Inc Vector data conversion output device, vector data conversion output method, and vector data conversion output program
JP2014139826A (en) * 2014-03-26 2014-07-31 Gree Inc Vector data conversion output device, vector data conversion output method, and vector data conversion output program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012164959A1 (en) * 2011-06-02 2012-12-06 グリー株式会社 Vector data conversion output device, vector data conversion output method and vector data conversion output program
JP2012252520A (en) * 2011-06-02 2012-12-20 Gree Inc Vector data conversion output device, vector data conversion output method and vector data conversion output program
JP2012252518A (en) * 2011-06-02 2012-12-20 Gree Inc Vector data converting/outputting device, vector data converting/outputting method, and vector data converting/outputting program
US10104333B2 (en) 2011-06-02 2018-10-16 Gree, Inc. Vector data conversion output device, vector data conversion output method, and vector data conversion output program
JP2014139827A (en) * 2014-03-26 2014-07-31 Gree Inc Vector data conversion output device, vector data conversion output method, and vector data conversion output program
JP2014139826A (en) * 2014-03-26 2014-07-31 Gree Inc Vector data conversion output device, vector data conversion output method, and vector data conversion output program

Similar Documents

Publication Publication Date Title
JP5232358B2 (en) Rendering outline fonts
EP1705589B1 (en) Method for approximating and displaying three-dimensional cad data, and system for executing that method
JPH09245180A (en) Polygon paint out method
US6111587A (en) Method for converting non-zero winding to even-odd fill polygons
CN115828827A (en) Method and system for reconstructing integrated circuit design layout hierarchical structure and storage medium
JP3060761B2 (en) Drawing equipment
CN112788859B (en) Shielding frame steel mesh opening method and device, electronic equipment and storage medium
US6598185B1 (en) Pattern data inspection method and storage medium
JPH06100906B2 (en) Character processing method
JP2977155B2 (en) Ellipse filling method in graphics
CN114924821B (en) Method and device for displaying annular progress bar, electronic equipment and storage medium
JP3799164B2 (en) Image processing method and image processing apparatus
EP4362057A1 (en) Electron beam rendering device, electron beam rendering method, and recording medium
JPH0231393B2 (en)
JP2715453B2 (en) Drawing method
JP4320604B2 (en) Image processing method and image processing apparatus
JPH0496186A (en) Method for mapping basic pattern on free curved surface
JPS61267096A (en) Smear drawing display unit for polygonal graphic
JPH0350686A (en) Graphic processing system
JP3154343B2 (en) How to fill in polygonal shapes
JPH0496869A (en) Drawing data storing system
JPH0413182A (en) Method and device for generating character and pattern
JP3648090B2 (en) Drawing apparatus and recording medium
JP2799041B2 (en) Dot development method and dot development device
JPH06259507A (en) Graphic dividing device