JPS63219087A - Surface painting out device for polygon - Google Patents
Surface painting out device for polygonInfo
- Publication number
- JPS63219087A JPS63219087A JP31350986A JP31350986A JPS63219087A JP S63219087 A JPS63219087 A JP S63219087A JP 31350986 A JP31350986 A JP 31350986A JP 31350986 A JP31350986 A JP 31350986A JP S63219087 A JPS63219087 A JP S63219087A
- Authority
- JP
- Japan
- Prior art keywords
- polygon
- point
- work table
- vertex
- 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
- 238000010422 painting Methods 0.000 title claims abstract description 13
- 239000011248 coating agent Substances 0.000 claims abstract description 8
- 238000000576 coating method Methods 0.000 claims abstract description 8
- 239000000284 extract Substances 0.000 claims description 8
- 238000000605 extraction Methods 0.000 claims description 2
- 238000000034 method Methods 0.000 description 43
- 238000010586 diagram Methods 0.000 description 13
- 239000003795 chemical substances by application Substances 0.000 description 3
- 238000004898 kneading Methods 0.000 description 2
- 239000003973 paint Substances 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 230000004397 blinking Effects 0.000 description 1
- 238000004040 coloring Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000002788 crimping Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 210000003127 knee Anatomy 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
Landscapes
- Image Generation (AREA)
Abstract
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、多角形の面塗り装置に関し、更に詳しくは、
多角形の内部を塗りつぶすだめの装置に関する。特に、
プリンタ装置やVDT装置において有用である。DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a polygonal surface coating device, and more specifically,
This invention relates to a device for filling the inside of a polygon. especially,
It is useful in printer devices and VDT devices.
従来技術
第17図に示すように、ΔABCが与えられ、その内面
を塗りたいものとする。Prior Art As shown in FIG. 17, it is assumed that ΔABC is given and the inner surface thereof is to be painted.
この場合に、まず、y=1として、2点A−B間を練塗
りし、次に、y=2とし、線分ACの方程式から点P、
を算出し、また、線分BCの方程式から点P、を算出し
、点p、−p2間を練塗りし、これをL=3.4,5.
6について繰り返してΔABCの内部を面塗りする技術
が従来公知である。In this case, first, set y=1 and paint between the two points A and B, then set y=2, and from the equation of line segment AC, point P,
, and also calculate the point P from the equation of the line segment BC, and paint between the points p and -p2, and make this L=3.4, 5.
A technique is conventionally known in which the interior of ΔABC is painted repeatedly for 6.
この従来技術では、多角形が、第18図で示すように、
複雑な多角形ABCDEFの場合には、第19図に示す
ように、2つの比較的簡単な多角形A1BCD、とA、
02EFとに分解し、それぞれの多角形について別々に
面塗りを行っている。In this prior art, the polygon is as shown in FIG.
In the case of a complex polygon ABCDEF, as shown in FIG. 19, two relatively simple polygons A1BCD and A,
02EF and surface painting is performed separately for each polygon.
かかる従来技術としては、例えば特開昭61−873号
公報に開示のものがある。Such a conventional technique is disclosed, for example, in Japanese Unexamined Patent Publication No. 61-873.
従来技術の問題点
上記従来技術では、複雑な多角形を面塗りする場合に、
それをいくつかの簡単な多角形に分解し、それぞれにつ
いて面塗りを行う必要があり、処理が煩雑となり、所要
時間を要する問題点がある。Problems with the conventional technology In the above-mentioned conventional technology, when painting a complex polygon,
It is necessary to break it down into several simple polygons and apply surface coloring to each of them, which poses a problem that the process is complicated and takes a long time.
しかし、複雑な多角形を簡単な多角形に分解しないで面
塗りしようとすると、例えば第18図に示すように、y
=3のときに3点B−D−F間を練塗りする例外的処理
や、F=5の場合に2点C−E間を練塗りしない例外的
処理がある等、却って処理が煩雑となり、所要時間を要
することになる問題点がある。However, if you try to fill a complex polygon without breaking it down into simple polygons, for example, as shown in Figure 18, y
On the contrary, the process becomes complicated, such as when there is an exceptional process of painting between 3 points B-D-F when = 3, and an exceptional process of not painting between 2 points C-E when F = 5. However, there is a problem in that it takes a long time.
発明の目的
本発明の目的とするところは、複雑な形状の多角形でも
、簡単な処理で、且つ、高速で面塗りすることができる
多角形の面塗り装置を提供することにある。OBJECTS OF THE INVENTION An object of the present invention is to provide a polygon surface coating device that can coat even complex-shaped polygons with simple processing and at high speed.
発明の構成
本発明の多角形の面塗り装置は、多角形の各頂点のy座
標値の中から最小値りと最大値Tとを抽出する最大最小
値抽出手段、多角形の1つの頂点をQn、前方向に隣接
する頂点をQn+、、後方向に隣接する頂点をQn−1
とするとき、頂点Qnが前後の頂点と比較して極大又は
極小となる極点か否かを判定する極点判定手段、頂点Q
nが極点であるときは辺Qn−I Qnについて、頂点
Qが極点でないときは辺Qn−+ Qn ’ (ただ
し点Qn′は頂点Qnよりy方向に1だけ頂点Qn−1
に近付いた点)について、y方向の最小値ys、、、y
方向の最大値3’m、)’方向の最小値ymiをもつ点
のX座標値”1m およびその辺のΔx/Δyを算出
し、この1組のデータ(V w 、Y l+IX +
x7 ma+ + Δx/Δy)を得ることを全頂点
について行って辺テーブルを作成する辺テーブル作成手
段、辺テーブルからymax=Lの組データを抽出して
ワークテーブルを作成するワークテーブル作成手段、ワ
ークテーブルの組データをXyl、、の順に2組づつ対
として、y座標がL、x座標が各対のX7+nである2
点間を塗りつぶす練塗り手段、ワークテーブルの中から
y−a−=Lの組データを消去する組データ消去手段、
ワークテーブルの各組データについて”rmにΔx/Δ
yを加算した和を新たにXYmとする更新手段、Lをイ
ンクリメントし、辺テーブルからymax=Lの組デー
タを抽出してワークテーブルに付加する組データ付加手
段、および上記練塗り手段から組データ付加手段を、L
≦Tの範囲で反復させる反復作動手段を具備してなるこ
とを構成上の特徴とするものである。Structure of the Invention The polygon surface coating device of the present invention includes a maximum/minimum value extracting means for extracting a minimum value and a maximum value T from the y-coordinate values of each vertex of a polygon; Qn, the vertices adjacent to the front are Qn+, and the vertices adjacent to the back are Qn-1.
When , the vertex Q is a polar point determining means for determining whether the vertex Qn is a maximum or minimum in comparison with the preceding and succeeding vertices;
When n is a pole, the side Qn-I Qn, and when the vertex Q is not a pole, the side Qn-+ Qn' (however, the point Qn' is 1 in the y direction from the vertex Qn, and the vertex Qn-1
), the minimum value in the y direction ys, , y
The X coordinate value "1m" of the point with the maximum value 3'm in the direction, and the minimum value ymi in the )' direction and Δx/Δy of that side are calculated, and this set of data (V w , Y l + IX +
x7 ma+ + Δx/Δy) for all vertices to create an edge table; a work table creation unit that extracts the set data of ymax=L from the edge table to create a work table; and a workpiece. The set data in the table is made into pairs of two sets in the order of Xyl, , and the y coordinate is L and the x coordinate is X7+n of each pair.2
a painting means for filling in between points, a set data erasing means for erasing the set data of y-a-=L from the work table;
For each set of data in the work table, Δx/Δ
An updating means that newly adds the sum of y to XYm, a set data adding means that increments L, extracts set data of ymax=L from the side table, and adds it to the work table, and sets data from the above-mentioned kneading means. Adding means, L
A structural feature is that it is provided with a repeating operation means for repeating the operation within the range of ≦T.
実方缶fタリ
以下、図に示す実施例に基づいて、本発明を更に詳しく
説明する。ここに第1図は本発明の一実施例の多角形の
面塗り装置を含むレーザブリンク装置の構成概念図、第
2図は与えられた多角形と境界領域の例示図、第3図は
境界領域でクリッピングされた新たな多角形の例示図、
第4図は新たな多角形を面塗りした状態を示す例示図、
第5図は第1図に示すレーザプリンタ装置における画像
処理の作動の一例のフローチャート、第6図は第1図に
示すレーザプリンタ装置の多角形クリッピング処理の作
動の一例のフローチャート、第7図は新しい辺を求める
処理の作動の一例のフローチャート、第8図は線分と境
界線の関係を示す例示図、第9図は辺クリッピング処理
の作動の一例のフローチャート、第10図は境界点出力
処理の作動の一例のフローチャート、第11図〜第14
図は多角形を境界線でクリッピングすることによりでき
る新たな多角形の例示図、第15図は辺テーブル作成処
理の作動の一例のフローチャート、第16図は辺テーブ
ルの一例の例示図である。なお、図に示す実施例により
、本発明が限定されるものではない。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be explained in more detail below based on embodiments shown in the figures. Here, FIG. 1 is a conceptual diagram of a laser blinking device including a polygonal surface coating device according to an embodiment of the present invention, FIG. 2 is an illustrative diagram of a given polygon and a boundary area, and FIG. 3 is a diagram of a boundary area. An illustration of the new polygon clipped by the region,
FIG. 4 is an exemplary diagram showing a state in which a new polygon is filled,
FIG. 5 is a flowchart of an example of the operation of image processing in the laser printer shown in FIG. 1, FIG. 6 is a flowchart of an example of the operation of polygon clipping processing of the laser printer shown in FIG. 1, and FIG. A flowchart of an example of the operation of the process to find a new edge, FIG. 8 is an example diagram showing the relationship between line segments and boundary lines, FIG. 9 is a flowchart of an example of the operation of the edge clipping process, and FIG. 10 is the boundary point output process. Flowchart of an example of the operation of FIGS. 11 to 14
The figure shows an example of a new polygon created by clipping a polygon with a boundary line, FIG. 15 is a flowchart of an example of the operation of side table creation processing, and FIG. 16 is an example of an example of a side table. Note that the present invention is not limited to the embodiments shown in the figures.
第1図に示すレーザプリンタ装置1において、コンピュ
ータから多角形の頂点の座標データと境界領域が与えら
れると、コントローラ2は、与えられた多角形を境界領
域でクリンピングして新たな多角形を生成し、次いで、
その新たな多角形の内部を塗りつぶした画像のデータを
生成し、これをピントマツプメモリ3にストレージする
。In the laser printer device 1 shown in FIG. 1, when the coordinate data of the vertices and the boundary area of a polygon are given from the computer, the controller 2 generates a new polygon by crimping the given polygon with the boundary area. Then,
Data of an image in which the inside of the new polygon is filled is generated and stored in the focus map memory 3.
そして、コントローラ2は、ビットマツプメモリ3にス
トレージした画像データを順に読み出し、レーザダイオ
ードドライバ4に出力する。Then, the controller 2 sequentially reads out the image data stored in the bitmap memory 3 and outputs it to the laser diode driver 4.
レーザダイオードドライバ4は、レーザダイオード5を
発光させ、画像をプリントアウトする。The laser diode driver 4 causes the laser diode 5 to emit light and prints out an image.
具体例を示すと、第2図に示すように、多角形A G
CD E Hが与えられると共に、境界領域としてx、
1.≦X≦” laX I V III≦y≦y−が
与えられると、第3図に示すように、多角形A G C
D E Hを境界領域でクリッピングして新たな多角形
ABCDEFを生成し、この多角形ABCDEFの内部
を、第4図に示すように、面塗りした画像をプリントア
ウトする。To give a concrete example, as shown in Fig. 2, polygon A G
CD E H is given and the boundary region is x,
1. ≦X≦” laX I V III≦y≦y− is given, as shown in Fig. 3, polygon A G C
A new polygon ABCDEF is generated by clipping D E H at the boundary area, and an image with the inside of this polygon ABCDEF filled in is printed out as shown in FIG.
以下、第5図〜第16図を参照してこのレーザプリンタ
装置1における画像処理の作動を詳細に説明する。Hereinafter, the operation of image processing in this laser printer device 1 will be explained in detail with reference to FIGS. 5 to 16.
まず、コントローラ2は、第5図に示すように、コンピ
ュータから多角形の頂点の座標と境界領域を入力される
(LJI)、説明の都合上、第2図に示す如き多角形A
GCDEHと、境界領域X、、。First, as shown in FIG. 5, the controller 2 receives the coordinates of the vertices and the boundary area of a polygon from the computer (LJI).
GCDEH and boundary region X.
≦xSx1.y、l5y5y1がコンピュータから与え
られたものとする。≦xSx1. Assume that y, l5y5y1 are given by the computer.
次に、コントローラ2は、多角形クリッピング処理を行
う(tJ2)。Next, the controller 2 performs polygon clipping processing (tJ2).
多角形クリッピング処理では、第6図に示すように、境
界線として、x”” X IIIを選択する(Gl)。In the polygon clipping process, as shown in FIG. 6, x"" X III is selected as the boundary line (Gl).
次に、その選択した境界線x” X allで、与えら
れた多角形をクリッピングして出来る新しい多角形の新
しい辺を求める処理を行う(G2)。Next, a process is performed to find new sides of a new polygon created by clipping the given polygon using the selected boundary line x''X all (G2).
新しい辺を求める処理では、第7図に示すように、多角
形の各辺の内から一辺を取り出し、その両端点の座標を
得る(Hl)。例えば、多角形ACCDEHの一辺AC
を取り出し、その端点A。In the process of finding a new side, as shown in FIG. 7, one side is extracted from each side of the polygon and the coordinates of its both end points are obtained (Hl). For example, one side AC of polygon ACCDEH
Take out its end point A.
Gの座標(x++ 、ya、)、 (Xg 、Vg
)を得る。Coordinates of G (x++, ya,), (Xg, Vg
).
次いで、辺りリフピング処理を行う(H2)。Next, an area riffing process is performed (H2).
辺タリンビング処理とは、第8図に示すように、2点α
、βを結ぶ線分αβを境界線X=X3でクリッピングし
て、新たな線分子βを得る処理である。As shown in Fig. 8, the edge talimbing process is performed by
, β is clipped at the boundary line X=X3 to obtain a new line molecule β.
境界線x−x3としては、前記ステップGlで境界線X
” X Inが与えられており、点αには前記端点G
が対応し、点βには前記端点Aが対応する。As the boundary line x-x3, the boundary line
” X In is given, and the point α has the end point G
corresponds to the point β, and the end point A corresponds to the point β.
なお、辺AGに関する点γを点Bと名付ける。Note that point γ on side AG is named point B.
第9図に示すように、コントローラ2は、まずX工<X
、であるか否かをチェックする(Sl)。As shown in FIG. 9, the controller 2 first
, is checked (Sl).
第8図に示す関係の場合は、xcL<X3だから、ステ
ップS2に移行する。In the case of the relationship shown in FIG. 8, since xcL<X3, the process moves to step S2.
ステップS2では、XB<X3であるか否かをチェック
する。第8図に示す条件の場合は、XB<X3でないか
らステップS3に移行する。In step S2, it is checked whether XB<X3. In the case of the conditions shown in FIG. 8, since XB<X3 is not satisfied, the process moves to step S3.
ステップS3では、XB−X3か否かをチェックする。In step S3, it is checked whether it is XB-X3.
第8図に示す例では、xBはX、でないから、ステップ
S4に移行する。In the example shown in FIG. 8, since xB is not X, the process moves to step S4.
ステップS4では、α点を23点と置き、かつ、β点を
22点と置く、すなわち、XニーX I ry、−yI
と置き、XB =X2.YB →V2と置く。In step S4, the α point is set at 23 points, and the β point is set at 22 points, that is, X knee X I ry, -yI
Then, XB =X2. Place YB → V2.
次いで、境界点出力処理を行うが(S5)、この境界点
出力処理は第1O図に詳細に示すものであまず、X座標
値同志を加算して加算値X、を求めると共に、y座標同
志を加算して加算値y、を算出する(R1)。Next, boundary point output processing is performed (S5). This boundary point output processing is shown in detail in FIG. are added to calculate the additional value y (R1).
次に、加算値X、をLSB方向へ1ビツトシフトしてシ
フト値Xfとする(R2)。これは、加算(a X 、
を2で除算することに相当するが、シフト処理であるか
ら、除算処理に比べて格段に高速に行うことができる。Next, the added value X is shifted by 1 bit in the LSB direction to obtain a shifted value Xf (R2). This is an addition (a X ,
This corresponds to dividing by 2, but since it is a shift process, it can be performed much faster than a division process.
次に、加算値y、をLSB方向へ1ビツトシフトしてシ
フト値y1とする(R3)、これも加算(直y、を2で
除算することに相当するが、格段に高速に処理できる。Next, the added value y is shifted by 1 bit in the LSB direction to obtain a shifted value y1 (R3). This also corresponds to addition (directly dividing y by 2), but it can be processed much faster.
上記ステップR1〜R3は、点PH(X++ YI)
と点P2 (X21 y2)の区分点を算出する処
理に外ならないので、第8図における点αとβの2分点
が得られることになる。The above steps R1 to R3 are performed at the point PH (X++ YI)
Since this is nothing but a process of calculating the dividing point of point P2 (X21 y2), the bisecting point of points α and β in FIG. 8 is obtained.
次に、シフト値X(と境界線のX座標値x3の差の絶対
値が1より小であるか否かをチェックする(R’4)。Next, it is checked whether the absolute value of the difference between the shift value X (and the X coordinate value x3 of the boundary line) is smaller than 1 (R'4).
シフト値XIがxaより1以上小ならば(R4、R6)
、算出した1分点は境界線X−X3より左にあるので、
xf−X+ 、3’f−3’+とおいて(R7)、前記
ステップR1に戻る。これは、2点α、βを結ぶ線分を
、区分点とβを結ぶ線分に置き換えたことに相当する。If shift value XI is smaller than xa by 1 or more (R4, R6)
, the calculated 1-minute point is to the left of the boundary line X-X3, so
xf-X+, 3'f-3'+ (R7), and return to step R1. This corresponds to replacing the line segment connecting the two points α and β with a line segment connecting the dividing point and β.
一方、Xiがxaより1以上大ならば(R4゜R6)%
Xf−+3(2,yfmy2と置き(R8)、前記ス
テップR1に戻る。これは、2点α、βを結ぶ線分を、
αと区分点を結ぶ線分に置き換えたことに相当する。On the other hand, if Xi is greater than xa by 1 or more, (R4°R6)%
Set Xf-+3 (2, yfmy2 (R8) and return to step R1. This means that the line segment connecting the two points α and β is
This corresponds to replacing α with a line segment connecting the segment point.
このようにして線分の区分点を次々に求めて行き、xa
に実質的に一致するまで繰り返す。In this way, the dividing points of the line segment are found one after another, and xa
Repeat until substantially equal to .
X、に実質的に一致すると、シフト値xIと境界線のX
座標値x3の差の絶対値が1より小となるので、シフト
値y4を境界点P3のy座標値y3として設定する(R
5)。X, substantially coincides with the shift value xI and the boundary line X
Since the absolute value of the difference between the coordinate values x3 is smaller than 1, the shift value y4 is set as the y-coordinate value y3 of the boundary point P3 (R
5).
ステップR1〜R8によって、境界点P3のy座標値y
、が求まるが、この処理は乗算、除算を含んでいないの
で、高速かつ高精度にy3を得ることができる。By steps R1 to R8, the y coordinate value y of the boundary point P3 is
, but since this processing does not include multiplication or division, y3 can be obtained quickly and with high precision.
境界点出力処理(S5)によって、境界点P。By the boundary point output process (S5), the boundary point P.
の座標ON、)’3)が得られると、その境界点P3を
1点と置き(S6)、プリントアウトすべき線分として
線分子βをセットする(S7)。When the coordinates ON, )'3) are obtained, the boundary point P3 is set as one point (S6), and the line molecule β is set as the line segment to be printed out (S7).
かくして、第8図に示すように、境界線!””X3より
右側の線分子βが得られるが、これは新たな辺ABが得
られたことを意味する。Thus, as shown in Figure 8, the border! ""A line molecule β on the right side of X3 is obtained, which means that a new side AB has been obtained.
さて、第8図に示す例では、X、t<xa <XBであ
ったが、その他の場合でも同様にして新たな辺が得られ
る。Now, in the example shown in FIG. 8, X, t<xa<XB, but new sides can be obtained in the same manner in other cases.
例えば、x、>xa >xBならば、第9図のα点とβ
点とを入れ換えた処理(82′〜37′)によって新た
な辺を得られる。For example, if x, > xa > xB, then α point and β in Figure 9
A new edge can be obtained by exchanging the points (82' to 37').
また、)’c+j8がX、に一致する場合は、境界点出
力処理を行うまでもなく、新たな辺を得られる(S8,
8’ )。Also, if )'c+j8 matches X, a new edge can be obtained without performing boundary point output processing (S8,
8').
また、2点α、β共に領域内にあれば、元の辺αβがそ
のまま新たな辺となる。(310)。Furthermore, if the two points α and β are both within the area, the original side αβ becomes the new side as it is. (310).
さらに、2点α、βのいずれの点も領域内になければ、
元の辺から新たな辺を生じないこととなる(311)。Furthermore, if neither of the two points α and β is within the area,
No new edge is generated from the original edge (311).
さて、第7図に戻り、上記□辺りリフピング処理(R2
)によって、新しい辺が得られると、その辺をメモリに
ストアする(R3)、例えば第8図の場合は、元の辺A
Gが新たな辺ABに置き換えられてストアされる。Now, returning to Figure 7, the riffing process (R2
), when a new edge is obtained, that edge is stored in memory (R3). For example, in the case of Figure 8, the original edge A
G is replaced with a new side AB and stored.
次に、上記処理を行った辺が最後の辺でなければ(84
)、次の辺を取り出して、その端点の座 ・標を得(
R5)、前記辺りリフピング処理H2に戻る1例えば、
多角形AGCDEHの場合、辺AGが終われば、次の辺
GCについて再び辺クリッピング処理(R2)が行われ
るわけである。また、それが終われば、辺CD、辺DE
、辺EH,辺HAについて各々辺クリッピング処理が行
われることになる。Next, if the edge subjected to the above processing is not the last edge (84
), take the next side and get the coordinates of its endpoints (
R5), return to the above-mentioned area riffing process H2 1 For example,
In the case of polygon AGCDEH, when side AG is finished, side clipping processing (R2) is performed again on the next side GC. Also, when that is finished, side CD, side DE
, side EH, and side HA are subjected to side clipping processing.
そこで、第11図に示すように、辺AGからは新たな辺
ABが得られ、辺GCからは新たな辺を生じず、辺CD
、DE、EH,HAからは元の辺がそのまま新しい辺と
して得られる。Therefore, as shown in FIG. 11, a new side AB is obtained from the side AG, no new side is generated from the side GC, and the side CD
, DE, EH, and HA, the original edges are obtained as new edges.
すべての辺について処理を終了すると(H4)、新たな
辺で形成される多角形の頂点テーブルが作成される(H
6)。第11図に示す例の場合は、新たに得られた辺が
、AB、CD、DE、EH。When processing is completed for all sides (H4), a vertex table of the polygon formed by the new sides is created (H
6). In the example shown in FIG. 11, the newly obtained sides are AB, CD, DE, and EH.
EAであるから、その頂点はA、B、C,D、 E、
Hとなり、多角形であることが分かる。そして、その多
角形の新たな辺は、AB、BC,CD。Since it is EA, its vertices are A, B, C, D, E,
H, indicating that it is a polygon. The new sides of that polygon are AB, BC, and CD.
DB、EH,HAであることが分かる。It can be seen that they are DB, EH, and HA.
第6図に戻り、ステップG2によって、境界線x” X
IImでクリッピングした多角形の新しい辺が求まる
と、次には、境界線をy=y−としくG3)、その境界
線で、先に得た新たな多角形をクリッピングして、新し
い辺を求める処理を行う(G4)。Returning to FIG. 6, by step G2, the boundary line x”
After finding the new side of the polygon clipped in IIm, next set the boundary line to y = y- (G3), clip the new polygon obtained earlier at that boundary line, and create a new side. Perform the required processing (G4).
第12図はその結果を示すもので、多角形ABCDEH
の元の辺はそのまま新しい辺となり、変更を生じない。Figure 12 shows the result, and the polygon ABCDEH
The original edge of becomes the new edge without any change.
次に、ステップG5. G6によって、第13図に示す
ように、頂点A、B、C,D、E、Fが得られ、新しい
多角形が得られる。Next, step G5. By G6, as shown in FIG. 13, vertices A, B, C, D, E, and F are obtained, and a new polygon is obtained.
同様に、ステップG7.G8によって、第14図に示す
ように、新たな多角形へBCDEFが得られ′るが、第
3図を参照すれば理解されるように、これは結局のとこ
ろ、元の多角形を境界領域X1.。Similarly, step G7. G8 yields the BCDEF to the new polygon as shown in Figure 14, but as will be understood with reference to Figure 3, this ultimately converts the original polygon into a bounding region. X1. .
≦X≦x、、、y、1゜SV SV−Lmでクリッピン
グした新たな多角形である。≦X≦x, , y, 1° SV This is a new polygon clipped by SV-Lm.
さて、第5図に戻り、上記多角形クリッピング処理(U
2)を行うことによって新しい多角形ABCDEFが得
られると、次に、辺テーブル作成処理(U3)を行う。Now, returning to FIG. 5, the above polygon clipping process (U
When a new polygon ABCDEF is obtained by performing 2), next, side table creation processing (U3) is performed.
辺テーブル作成処理は、第15図に示すように、まず、
連続する3つの頂点の座標値(X+、)’+) 、
(X2 、)’2 > 、 (X3 、 y3 )
を取り出す(Wl)、例えば、3点A、B、Cを取り出
すと、各座標値は、(3,1)、 (1,3)、
(1゜5)となる。In the edge table creation process, as shown in FIG.
Coordinate values of three consecutive vertices (X+,)'+),
(X2,)'2>, (X3, y3)
(Wl). For example, if you take out three points A, B, and C, their coordinate values are (3, 1), (1, 3),
(1°5).
次に、3’1=312であるか否かをチェックする(W
2)、Y+ =3’2であれば、後述するステップWl
lへ移行するが、3’l=3’2でなければ、次のステ
ップW3に移行する。例えば、点Aと点Bとでは、YI
=1+ 312−3であるから、ステップW3に移行
する。Next, check whether 3'1=312 (W
2), if Y+ = 3'2, step Wl described later
The process moves to step W3, but if 3'l=3'2 does not hold, the process moves to the next step W3. For example, at points A and B, YI
Since =1+312-3, the process moves to step W3.
ステップW3では、Δx/Δyを算出する0例えば、点
Aと点Bとでは、(1−3)/ (3−1)−一1とな
る。In step W3, Δx/Δy is calculated as 0. For example, between point A and point B, it becomes (1-3)/(3-1)-1.
次に、中心点(X2.72)が前後の点と比較して極大
または極小となる極点か否かをチェックする(W4)、
もし、yl−’!zであるなら、点(Xi−yz)より
更に前の点(x4174)を読み出し、そのV+とyl
とを比較して極大、極小を判断する。極点なら後述する
ステップWtOに移行し、極点てないなら次のステップ
W5に移行する。例えば、点Bは、点A、Cと比較する
と、極大でも極小でもないので、極点ではないと判定さ
れる。Next, it is checked whether the center point (X2.72) is a maximum or minimum point when compared with the previous and subsequent points (W4).
If yl-'! z, read the point (x4174) further before the point (Xi-yz) and calculate its V+ and yl
Compare with to determine local maximum and minimum. If it is a pole, the process moves to step WtO, which will be described later, and if it is not a pole, the process moves to the next step W5. For example, since point B is neither the maximum nor the minimum when compared with points A and C, it is determined that it is not a maximum point.
中心点(12,312)が極点でないと判定されると、
ylとy3の大小がチェックされる(W5)、そして、
yl〉y3でなければ、ステップW6に移行し、3’l
>FtであればステップW6゛に移行する0例えば点
Aと点Cとでは、yl >y3でないから、ステップW
6に移行する。When it is determined that the center point (12,312) is not a pole,
The size of yl and y3 is checked (W5), and
If yl>y3, the process moves to step W6 and 3'l
> Ft, proceed to step W6''0 For example, at points A and C, yl > y3, so step W
Move to 6.
ステップW6では、y、をデクリメントする。In step W6, y is decremented.
一方、ステップW6′では、y、をインクリメントする
。これは、中心点をy方向に1だけ後ろの点に近づける
ことを意味している。例えば、点Bの場合は、点Aに近
づけられ、y2=3−1=2となる。On the other hand, in step W6', y is incremented. This means moving the center point closer to the point behind by 1 in the y direction. For example, in the case of point B, it is brought closer to point A, and y2=3-1=2.
次に、Y+−12か否かがチェックされ(Wl)、等し
いならば後述するステップwttに移行し、等しくない
ならば、次のステップW8に移行する1例えば、点Aと
Bとでは、)’I=y2でないから、ステップW8に移
行する。Next, it is checked whether Y+-12 or not (Wl), and if they are equal, the process moves to step wtt, which will be described later; if they are not equal, the process moves to the next step W8.1For example, at points A and B, 'Since I=y2, the process moves to step W8.
ステップW8では、Fl >ylであるか否かがチェッ
クされる*)’+ 〉)’zならばステップW9に移行
し、そうでないならばステップW9をスキップする0例
えば、点Aと点Bの場合、yl >ylでないから、ス
テップW9をスキップし、ステップWIOに移行する。In step W8, it is checked whether Fl > yl. In this case, since yl > yl, step W9 is skipped and the process moves to step WIO.
ステップWIOでは、辺テーブルに組データ(3’ v
s + Y 1* X Y m 、Δx/Δy)を
ストアする。In step WIO, set data (3' v
s + Y 1 * X Y m , Δx/Δy).
ここで、y、、、、y−とは、ylとy2のうち小なる
値がymiであり、大なる値がy−である、また、xy
miとは、X皿とx2のうち前記y11.に対応する方
の値である0例えば、点Aと点Bの場合、V m =
1.11= 2 (スフ y )W 6 テ3’2 ヲ
テクリメントしているので) 、xY m 73+ Δ
x/Δy=−1となり、これらが1組として辺テーブル
にストアされる。Here, y, ..., y- means that the smaller value of yl and y2 is ymi, and the larger value is y-, and xy
mi means the above-mentioned y11. of the X plate and x2. For example, in the case of point A and point B, V m =
1.11= 2 (Suf y )W 6 te3'2 wotechrement), xY m 73+ Δ
x/Δy=-1, and these are stored as one set in the edge table.
上記では点(X+、)’+)と点(X2’、y2)とに
点Aと点Bとを対応させたが、以下同様に多角形の各辺
の両端の頂点について全て対応させるように上記ステッ
プW1〜WIOを繰り返しくWll、W12)、全ての
辺について処理が終わると辺テーブルの作成を終了する
。In the above, the points (X+, )'+) and (X2', y2) are made to correspond to the points A and B, but in the following, all the vertices at both ends of each side of the polygon are made to correspond in the same way. The above steps W1 to WIO are repeated (Wll, W12), and when the processing is completed for all sides, the creation of the side table is finished.
辺テーブル作成処理(U3)を終了することによって、
例えば第3図に示す多角形ABCDP:Fの場合は、第
16図に示す如き辺テーブルが得られる。By ending the edge table creation process (U3),
For example, in the case of polygon ABCDP:F shown in FIG. 3, a side table as shown in FIG. 16 is obtained.
第5図に戻り、次に、組データ列を作成する(U4)。Returning to FIG. 5, next, a set data string is created (U4).
これはI&tするワークテーブルを作成する前処理とし
て行うものである。This is performed as preprocessing for creating a work table for I&T.
組データ列の作成は、辺テーブルからymiの小さいも
の順に組データを取り出して、1列に並べるものである
、ymiは省略し、代わりに異なるy、1゜の組データ
の間には、ymiの差と同数の区切コードを挿入する0
例えば、第16図に示す辺テーブルからは次のような組
データ列が生成される。To create a set data string, set data are extracted from the side table in order of decreasing ymi and arranged in one column. ymi is omitted, and instead, between set data of different y and 1°, ymi Insert as many delimiter codes as the difference between 0
For example, the following set data string is generated from the edge table shown in FIG.
r2,3.−1.3,3.IJJ 5,1,0゜5.3
.−1.5,3.IJ 5,5.0」次に、コントロー
ラ2は、多角形の各頂点のy座標値の中から、最少値り
を抽出し、走査線をその最少値しにセットする(U5)
、例えば、第3図に示す多角形ABCDEFの場合は、
L=1となるので、走査線を1にセットする。r2,3. -1.3,3. IJJ 5,1,0°5.3
.. -1.5,3. IJ 5, 5.0'' Next, the controller 2 extracts the minimum value from the y-coordinate values of each vertex of the polygon, and sets the scanning line to the minimum value (U5).
For example, in the case of polygon ABCDEF shown in FIG.
Since L=1, the scanning line is set to 1.
次に、組データ列の中から)’ m = Lの組データ
を抽出してワークテーブルを作成する(U6)。Next, a work table is created by extracting the set data of )' m = L from the set data string (U6).
例えば、L=1ならば、y、、、= 1である組データ
を抽出するが、これは、[2,3,−1,1と(3,3
,11があるから、ワークテーブルは、〔2,3,−1
,3,3,l)
となる。For example, if L=1, we will extract the set data of y, , = 1, which is [2, 3, -1, 1 and (3, 3
, 11, the work table is [2, 3, -1
, 3, 3, l).
次に、得られたワークテーブルの組データをX7wY
@Isの小さいもの順に並べ替える(U7)、例えばワ
ークテーブル(2,3,−1,3,3,1)の場合は、
xYenが等しいから、そのままの順序となる。Next, set the obtained work table set data to X7wY
Sort in descending order of @Is (U7), for example, in the case of work table (2, 3, -1, 3, 3, 1),
Since xYen are equal, the order remains the same.
次に、ワークテーブルの組データを”Y*+mの順に2
組づつ対となし、y座標がL、x座標が各対の”1wで
ある2点間を塗りつぶす(U8)、例えば、上記ワーク
テーブルからは”ymとして3だけが得られるので、L
=1だから、(3,1)の点だけを塗ることになる。す
なわち、第18図のA点が塗られることになる。Next, set data in the work table 2 in the order of “Y*+m”.
Fill in the space between the two points where the y coordinate is L and the x coordinate is "1w" of each pair (U8).For example, from the work table above, only 3 is obtained as "ym", so L
= 1, so only the point (3, 1) will be painted. That is, point A in FIG. 18 will be painted.
次に、ワークテーブルの組データの中から、y。Next, select y from the set of data in the work table.
の値が走査線の値すなわちLに一致するものを消去する
(U9)。例えば、ワークテーブルが〔2,3,−1,
3,3,1)の場合で、L=1ならば、取り除かれる組
データはないことになる。Those whose value matches the scanning line value, that is, L are erased (U9). For example, if the work table is [2, 3, -1,
3, 3, 1), if L=1, there is no set of data to be removed.
次に、ワークテーブルの組データのx7mIIにΔx/
Δyの値を加算し、それを新たなxymiと置<(UI
O)、例えば、上記ワークテーブル[2,3,−1,3
,3,1]は、(2,2,−1゜3.4.1)になる。Next, Δx/
Add the value of Δy and set it as new xymi <(UI
O), for example, the work table [2, 3, -1, 3
, 3, 1] becomes (2, 2, -1° 3.4.1).
次に、多角形の各頂点のy座標値の中で最大の値Tを抽
出し、その最大値Tと走査線の値りとが一致するか否か
をチェックする(Ull)、例えば、第3図に示す多角
形ABCDEFの場合は、T=5である。Next, extract the maximum value T among the y-coordinate values of each vertex of the polygon, and check whether the maximum value T matches the value of the scanning line (Ull). In the case of polygon ABCDEF shown in FIG. 3, T=5.
Tと走査線の値りとが一致しなければ、走査線の値りを
インクリメントしくU12)、前記ステップU6に戻る
。If T and the value of the scanning line do not match, the value of the scanning line is incremented (U12) and the process returns to step U6.
インクリメントされて、L=2となってステップU6に
戻ると、再びymax=Lの組データが組データ列から
抽出され、ワークテーブルに加えられる0例えば、L=
2では、これに等しいy、5.を持つ組データがないの
で、ワークテーブルには新たな組データが付は加えられ
ない。When the process is incremented and L=2 and the process returns to step U6, the set data of ymax=L is extracted from the set data string again and added to the work table 0. For example, L=
2, this is equal to y, 5. Since there is no set of data with this, no new set of data is added to the work table.
次に、ステップυ7とU8とが行われ、インクリメント
された走査線で線塗りが行われる0例えば、点(2,2
)と点(4,2)の間が塗られることになる、すなわち
、第18図のP、−P2間である。Next, steps υ7 and U8 are performed, and line painting is performed with incremented scanning lines. For example, point (2, 2
) and the point (4, 2), that is, between P and -P2 in FIG.
次に、ステップU9では、例えば、前記ワークテーブル
(2,2,−1,3,4,1)で、L=2を考えると、
この中から組データ+2.2.−1)が消去されるので
、ワークテーブルは〔3゜4.1〕だけが残る。Next, in step U9, for example, considering L=2 on the work table (2, 2, -1, 3, 4, 1),
From this group data +2.2. -1) is deleted, so only [3°4.1] remains on the work table.
次に、ステップUIOでは、例えば、ワークテーブル(
3,4,1)は(3,5,1)となる。Next, in step UIO, for example, the work table (
3,4,1) becomes (3,5,1).
次に、L=3となってステップU6に戻ると、y−=L
=3の組データがワークテーブルに追加され、ワークテ
ーブルは、例えば、(3,5,1,5,1,0,5,3
,−1,5,3,1)となる。Next, when L=3 and the process returns to step U6, y-=L
=3 set data is added to the work table, and the work table is, for example, (3, 5, 1, 5, 1, 0, 5, 3
, -1, 5, 3, 1).
このワークテーブルは、ステップU7でxyl、。This work table is created as xyl, in step U7.
の小さいもの順に並べ替えられ、(5,1,0゜5.3
.−1.5,3,1.3,5.1)となる。Sorted in descending order of (5, 1, 0° 5.3
.. -1.5, 3, 1.3, 5.1).
そして、ステップU8において、点(1,3)と点(3
,3)の間が塗られ、また、点(3,3)と点(5,3
)の間が塗られる。すなわち、第18図のB−D間、D
−F間である。Then, in step U8, point (1, 3) and point (3
, 3) is filled in, and also between the points (3, 3) and (5, 3).
) is painted. That is, between B and D in FIG.
-F.
次いで、ステップU9において、y−= L = 3の
組データが消去されるので、ワークテーブルは、(5,
1,0,5,3,−1,5,3,l)となる。Next, in step U9, the set data of y-=L=3 is deleted, so the work table becomes (5,
1,0,5,3,-1,5,3,l).
次に、ステップUIOで、ワークテーブルは、(5,1
,0,5,2,−1,5,4,1)となる。Next, in step UIO, the work table is (5, 1
, 0, 5, 2, -1, 5, 4, 1).
次に、L−4となってステップU6に戻ると、ワークテ
ーブルは、(5,1,0,5,2,−1,5,4,1,
5,5,O)となる。Next, when it becomes L-4 and returns to step U6, the work table is (5, 1, 0, 5, 2, -1, 5, 4, 1,
5,5,O).
このワークテーブルは、xyw++の小さい順に並んで
いる。従って、ステップU7を経過しても同じワークテ
ーブルである。This work table is arranged in ascending order of xyw++. Therefore, the work table remains the same even after step U7.
ステップU8では、点(1,4>と点(2,4)の間及
び点(4,4)と点(5,4)の間が塗られる。すなわ
ち、第18図のP3−P4間、P5−PG間である。In step U8, the area between the point (1, 4> and the point (2, 4) and between the point (4, 4) and the point (5, 4) is painted. That is, between P3 and P4 in FIG. It is between P5 and PG.
ステップU9では消去する組データはなく、ステップU
IOではワークテーブルは、(5,1゜0、5.1.−
1.5.5.1.5.5. O)となる。In step U9, there is no group data to be deleted, and in step U
In IO, the work table is (5,1゜0,5.1.-
1.5.5.1.5.5. O).
次に、L=5となってステップU6に戻ると、ワークテ
ーブルは変化がなく、ステップU7でも変化がなく、ス
テップU8において、点(1,5)が塗られ、かつ、点
(5,5)が塗られる。すなわち、第18図の点Cと点
Eとが塗られる。Next, when L=5 and the process returns to step U6, there is no change in the work table, there is no change in step U7, and in step U8, the point (1,5) is painted and the point (5,5 ) is painted. That is, points C and E in FIG. 18 are painted.
ステップU9では、組データが全て消去される。In step U9, all set data are erased.
従ってステップUIOでは何も行われない。Therefore, nothing is done in step UIO.
ステップLlllでは、Lの値が最大値Tに一致したの
で、全ての処理が終了される。In step Lllll, the value of L matches the maximum value T, so all processing is terminated.
かくして、第4図に示すように、多角形ABCDEFの
内部が面塗りされたこととなる。In this way, as shown in FIG. 4, the inside of polygon ABCDEF has been painted.
以上の説明から理解されるように、このレーザプリンタ
装置1では、与えられた多角形を与えられた境界領域で
クリッピングして新たな多角形を生成し、その内部を面
塗りした画像をプリントアウトすることができる。As can be understood from the above explanation, this laser printer device 1 generates a new polygon by clipping a given polygon in a given boundary area, and prints out an image with the inside of the polygon filled in. can do.
発明の効果
本発明によれば、多角形の各頂点のy座標値の中から最
小値りと最大値Tとを抽出する最大最小値抽出手段、多
角形の1つの頂点をQn、前方向に隣接する頂点をQn
+1.後方向に隣接する頂点をQn−1とするとき、頂
点Qnが前後の頂点と比較して極大又は極小となる極点
か否かを判定する極点判定手段、頂点Qnが極点である
ときは辺Qn−10nについて、頂点Qが極点でないと
きは辺Qn−5Qn′ (ただし点Qn′は頂点Qnよ
りy方向に1だけ頂点QTl−1に近付いた点)につい
て、y方向の最小値Y II。、y方向の最大値y、、
y方向の最小値ymiをもつ点のX座標値xy@n
およびその辺のΔx/Δyを算出し、この1組のデータ
(V vs + 3’ sur + X Y vs
+ Δx/Δy)を得ることを全頂点について行っ
て辺テーブルを作成する辺テーブル作成手段、辺テーブ
ルからy、1、=Lの組データを抽出してワークテーブ
ルを作成するワークテーブル作成手段、ワークテーブル
の組データをXFm++の順に2組づつ対として、y座
標がり、 x座標が各対のxr、nである2点間を塗
りつぶす線塗り手段、ワークテーブルの中からY、=L
の組データを消去する組データ消去手段、ワークテーブ
ルの各組データについて、X1m1+にΔx/Δyを加
算した和を新たにxrunとする更新手段、Lをインク
リメントし、辺テーブルから3’ w = Lの組デー
タを抽出してワークテーブルに付加する組データ付加手
段、および上記練塗り手段から組データ付加手段を、L
≦Tの範囲で反復させる反復作動手段を具備してなるこ
とを特徴とする多角形の面塗り装置が提供され、これに
より多角形の内部を簡単な処理で且つ高速に面塗りする
ことが出来るようになる。Effects of the Invention According to the present invention, maximum/minimum value extraction means extracts the minimum value and maximum value T from the y-coordinate values of each vertex of a polygon, Adjacent vertices are Qn
+1. When the vertex adjacent in the backward direction is Qn-1, a pole determining means determines whether the vertex Qn is the maximum or minimum in comparison with the preceding and succeeding vertices, and when the vertex Qn is a pole, the side Qn -10n, when the vertex Q is not a pole, the minimum value Y II in the y direction for the side Qn-5Qn' (where the point Qn' is closer to the vertex QTl-1 by 1 in the y direction than the vertex Qn). , maximum value y in the y direction,
X coordinate value xy@n of the point with the minimum value ymi in the y direction
and Δx/Δy of that side, and calculate this set of data (V vs + 3' sur + X Y vs
+ Δx/Δy) for all vertices to create an edge table; a work table creation unit that extracts the set data of y, 1, = L from the edge table to create a work table; A line painting means that divides the set data of the work table into two pairs in the order of XFm++ and fills in between two points whose y coordinates are xr and n of each pair, and Y, = L from the work table.
A group data erasing means for erasing the set data of , an updating means for newly setting xrun as the sum of X1m1+ and Δx/Δy for each set of data in the work table, an updating means for incrementing L and calculating 3' w = L from the side table. a set data adding means for extracting set data of and adding it to the work table, and a set data adding means from the above-mentioned kneading means;
Provided is a polygonal surface coating device characterized by comprising a repetitive operation means for repeating the operation within the range of ≦T, whereby the interior of the polygon can be surface coated with simple processing and at high speed. It becomes like this.
第1図は本発明の一実施例の多角形の面塗り装置を含む
レーザプリンタ装置の構成概念図、第2図は与えられた
多角形と境界領域の例示図、第3図は境界領域でクリッ
ピングされた新たな多角形の例示図、第4図は新たな多
角形を面塗りした状態を示す例示図、第5図は第1図に
示すレーザプリンタ装置における画像処理の作動の一例
のフローチャート、第6図は°第1図に示すレーザプリ
ンタ装置の多角形クリッピング処理の作動の一例のフロ
ーチャート、第7図は新しい辺を求める処理の作動の一
例のフローチャート、第8図は線分と境界線の関係を示
す例示図、第9図は辺りリフピング処理の作動の一例の
フローチャート、第10図は境界点出力処理の作動の一
例のフローチャート、第11図〜第14図は多角形を境
界線でクリッピングすることによりできる新たな多角形
の例示図、第15図は辺テーブル作成処理の作動の一例
のフローチャート、第16図は辺テーブルの一例の例示
図、第17図は面塗りの基本を示す例示図、第18図は
複雑な多角形の面塗りを示す例示図、第19図は従来例
による複雑な多角形の面塗りを示す例示図である。
(符号の説明)
1・・・レーザプリンタ装置
2・・・コントローラ
3・・・ビットマツプメモリ
4・・・レーザダイオードドライバ。
0123456X
012345X
01234’:+ x
第1図
プC
第7図
第6図
第13図 例1図第14図
第し図第10図
第18図
第19図
012345 X
゛第16図
辺テーブル
第17図
012345 XFIG. 1 is a conceptual diagram of a laser printer including a polygon surface coating device according to an embodiment of the present invention, FIG. 2 is an illustrative diagram of a given polygon and a boundary area, and FIG. 3 is an illustration of a boundary area. FIG. 4 is an example diagram showing a new polygon that has been clipped; FIG. 4 is an example diagram showing a state in which the new polygon has been painted; FIG. 5 is a flowchart of an example of the operation of image processing in the laser printer shown in FIG. 1. , Fig. 6 is a flowchart of an example of the operation of the polygon clipping process of the laser printer shown in Fig. 1, Fig. 7 is a flowchart of an example of the operation of the process of finding new sides, and Fig. 8 is a flowchart of an example of the operation of the process of calculating new sides. FIG. 9 is a flowchart of an example of the operation of edge rifting processing, FIG. 10 is a flowchart of an example of the operation of boundary point output processing, and FIGS. 11 to 14 are diagrams showing the relationship between polygons and boundaries. Figure 15 is a flowchart of an example of the operation of side table creation processing, Figure 16 is an example diagram of an example of a side table, and Figure 17 is an illustration of the basics of surface painting. FIG. 18 is an example diagram showing surface painting of a complex polygon, and FIG. 19 is an example diagram showing surface painting of a complex polygon according to a conventional example. (Explanation of symbols) 1...Laser printer device 2...Controller 3...Bitmap memory 4...Laser diode driver. 0123456X 012345X 01234':+ x Fig. 1 P C Fig. 7 Fig. 6 Fig. 13 Example 1 Fig. 14
Figure 10 Figure 18 Figure 19 Figure 19 012345 X Figure 16 Side table Figure 17 Figure 17 012345
Claims (1)
大値Tとを抽出する最大最小値抽出手段、(b)多角形
の1つの頂点をQ_n、前方向に隣接する頂点をQ_n
_+_1、後方向に隣接する頂点をQ_n_−_1とす
るとき、頂点Q_nが前後の頂点と比較して極大又は極
小となる極点か否かを判定する極点判定手段、 (c)頂点Q_nが極点であるときは辺Q_n_−_1
Q_nについて、頂点Qが極点でないときは辺Q_n_
−_1Q_n′(ただし点Q_n′は頂点Q_nよりy
方向に1だけ頂点Q_n_−_1に近付いた点)につい
て、y方向の最小値y_m_i_n、y方向の最大値y
_m_a_x、y方向の最小値y_m_i_をもつ点の
x座標値xy_m_i_n及びその辺のΔx/Δyを算
出し、この1組のデータ{y_m_i_n、y_m_a
_x、xy_m_i_n、Δx/Δy}を得ることを全
頂点について行って辺テーブルを作成する辺テーブル作
成手段、 (d)辺テーブルからy_m_i_n=Lの組データを
抽出してワークテーブルを作成するワークテーブル作成
手段、 (e)ワークテーブルの組データをxy_m_i_nの
順に2組づつ対として、y座標がL、x座標が各対のx
y_m_i_nである2点間を塗りつぶす線塗り手段、
(f)ワークテーブルの中からy_m_a_x=Lの組
データを消去する組データ消去手段、 (g)ワークテーブルの各組データについて、xy_m
_i_nにΔx/Δyを加算した和を新たにXy_m_
i_nとする更新手段、 (h)Lをインクリメントし、辺テーブルからy_m_
i_n=Lの組データを抽出してワークテーブルに付加
する組データ付加手段、および (i)上記(e)から(h)を、L≦Tの範囲で反復さ
せる反復手段 を具備してなることを特徴とする多角形の面塗り装置。[Claims] 1. (a) maximum/minimum value extraction means for extracting the minimum value L and maximum value T from the y-coordinate values of each vertex of the polygon; (b) a means for extracting one vertex of the polygon; Q_n, adjacent vertices in the forward direction are Q_n
_+_1, when the backwardly adjacent vertices are Q_n_-_1, a pole determining means for determining whether the vertex Q_n is a maximum or minimum in comparison with the preceding and following vertices; (c) the vertex Q_n is a pole; Sometimes the side Q_n_−_1
For Q_n, when vertex Q is not a pole, edge Q_n_
−_1Q_n' (However, point Q_n' is y from vertex Q_n
(a point approaching the vertex Q_n_−_1 by 1 in the direction), the minimum value y_m_i_n in the y direction, the maximum value y in the y direction
_m_a_x, the x coordinate value xy_m_i_n of the point with the minimum value y_m_i_ in the y direction and Δx/Δy of that side are calculated, and this set of data {y_m_i_n, y_m_a
_x, xy_m_i_n, Δx/Δy} for all vertices to create an edge table; (d) a work table that extracts data set y_m_i_n=L from the edge table to create a work table; Creation means, (e) Make the set data of the work table into two pairs in the order of xy_m_i_n, and set the y coordinate to L and the x coordinate to x of each pair.
line painting means for filling in between two points y_m_i_n;
(f) set data erasing means for erasing set data of y_m_a_x=L from the work table; (g) for each set of data xy_m in the work table;
The sum of Δx/Δy added to _i_n is newly calculated as Xy_m_
Updating means to i_n, (h) increment L and y_m_ from the side table;
A set data adding means for extracting set data of i_n=L and adding it to a work table; and (i) a repeating means for repeating the above (e) to (h) within the range of L≦T. A polygonal surface coating device featuring:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP31350986A JPS63219087A (en) | 1986-12-26 | 1986-12-26 | Surface painting out device for polygon |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP31350986A JPS63219087A (en) | 1986-12-26 | 1986-12-26 | Surface painting out device for polygon |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPS63219087A true JPS63219087A (en) | 1988-09-12 |
Family
ID=18042165
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP31350986A Pending JPS63219087A (en) | 1986-12-26 | 1986-12-26 | Surface painting out device for polygon |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS63219087A (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS60219087A (en) * | 1984-04-16 | 1985-11-01 | Kanzaki Paper Mfg Co Ltd | Thermal recording material |
-
1986
- 1986-12-26 JP JP31350986A patent/JPS63219087A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS60219087A (en) * | 1984-04-16 | 1985-11-01 | Kanzaki Paper Mfg Co Ltd | Thermal recording material |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH07282276A (en) | Device and method for graphic data generation | |
| JPS63219087A (en) | Surface painting out device for polygon | |
| US7197714B2 (en) | Optimizing graphical data synchronization between a graphical client and a stateless server | |
| CN115330974B (en) | Three-dimensional font real-time modeling rendering method, system, equipment and medium | |
| JP3524380B2 (en) | Broken line drawing device, broken line drawing method, and storage medium | |
| JPH08194816A (en) | Segment approximation method and its system | |
| JPH0332111B2 (en) | ||
| JPH06274308A (en) | Bezier curve uniform flesh creation processing method | |
| JP2002056395A (en) | Graphic drawing device | |
| JPH1021367A (en) | Graphic processing apparatus and graphic processing method | |
| JP3267364B2 (en) | Graphic processing apparatus and method | |
| JP2001209821A (en) | Three-dimensional graphics processing apparatus and method | |
| JPS63163985A (en) | Polygonal clipping device | |
| JPH09305778A (en) | Polygon duplex device | |
| CN116205981A (en) | Method, device, equipment and medium for generating road map | |
| JP2606176B2 (en) | Graphic processing unit | |
| JP2003006663A (en) | Rectangle drawing apparatus and rectangle drawing method | |
| JPH03280095A (en) | Image processing method | |
| JPS61241880A (en) | Paint-out device for closed graphic form | |
| KR20020095262A (en) | Character processing method based on outline font information, and computer soft-ware program product for allowing computer system to execute the method | |
| JPH03271799A (en) | Character pattern similarity converting system | |
| JPS625291A (en) | Italic character generation method | |
| JPH0245889A (en) | Area painting out method | |
| JPH07334695A (en) | Plotter and line width determination method | |
| JPH05108051A (en) | Character transformation method |