JP2783090B2 - Drawing method - Google Patents

Drawing method

Info

Publication number
JP2783090B2
JP2783090B2 JP27584792A JP27584792A JP2783090B2 JP 2783090 B2 JP2783090 B2 JP 2783090B2 JP 27584792 A JP27584792 A JP 27584792A JP 27584792 A JP27584792 A JP 27584792A JP 2783090 B2 JP2783090 B2 JP 2783090B2
Authority
JP
Japan
Prior art keywords
vertex
graphic
attribute
processing
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.)
Expired - Fee Related
Application number
JP27584792A
Other languages
Japanese (ja)
Other versions
JPH06124350A (en
Inventor
剛 小島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP27584792A priority Critical patent/JP2783090B2/en
Publication of JPH06124350A publication Critical patent/JPH06124350A/en
Application granted granted Critical
Publication of JP2783090B2 publication Critical patent/JP2783090B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、計算機援用設計(CA
D)等に利用される図形描画装置の機能のうち、特に図
形のワイヤーフレームとして使われる線分を描画する図
形描画方法に関する。
The present invention relates to a computer assisted design (CA)
Among the functions of the graphic drawing apparatus used in D) and the like, the present invention particularly relates to a graphic drawing method for drawing a line segment used as a wire frame of a graphic.

【0002】[0002]

【従来の技術】図形を、ディスプレイ等の表示装置上に
描画するには、まず、表示装置上の図形描画領域である
クリップ枠と、描画される図形の輪郭を形成する線分の
種類及び幅といった線分情報とを設定する。更に、描画
する図形に遠近感を持たせる透視投影と遠近感を持たせ
ない平行投影とを選択する描画投影法の指定、線分に明
暗を付けるデプスキュー処理の有無、及び隠線隠面処理
の有無といった描画処理情報を設定する。
2. Description of the Related Art To draw a graphic on a display device such as a display, first, a clip frame, which is a graphic drawing area on the display device, and the type and width of a line segment forming the outline of the graphic to be drawn. Is set. Furthermore, the specification of a drawing projection method for selecting perspective projection for giving a perspective to a figure to be drawn and parallel projection for giving no perspective, presence / absence of depth skew processing for giving light and shade to a line segment, and hidden line hidden surface processing Set the drawing processing information such as the presence or absence of.

【0003】以上の三つの設定条件を図形の属性データ
として入力し、更に、図形データとして、描画される図
形の輪郭を形成する線分の端点である図形の頂点の座標
を入力する。図10は、表示装置上のクリップ枠を説明
する図であり、図11は、描画図形の頂点と線分との関
係を示す図である。
The above three setting conditions are input as attribute data of a graphic, and further, as graphic data, coordinates of a vertex of a graphic which is an end point of a line forming a contour of the graphic to be drawn are input. FIG. 10 is a diagram illustrating a clip frame on the display device, and FIG. 11 is a diagram illustrating a relationship between vertices of a drawing figure and line segments.

【0004】図12は、従来の図形描画処理の流れを示
すフロー図である。図12において、図形データとして
入力された頂点座標に対し、クリップ枠への座標変換を
行ない、座標変換によって位置を指定された頂点がクリ
ップ枠に対して内にあるか、或いは、外にあるかを判断
するクリップ枠内外判定を行なう。当該頂点がクリップ
枠の内にあると判定されると、表示装置上の位置座標に
対応する通常座標への座標変換である同次通常座標変換
が行なわれ、頂点がクリップ枠の外にあると判定される
と、図形描画領域外の頂点に対する処理であるクリップ
処理を施した後に、同次通常座標変換が行われる。
FIG. 12 is a flowchart showing the flow of a conventional graphic drawing process. In FIG. 12, coordinate conversion into a clip frame is performed on the vertex coordinates input as graphic data, and whether the vertex whose position is specified by the coordinate conversion is inside or outside the clip frame Is determined inside / outside the clip frame. When it is determined that the vertex is within the clip frame, a homogeneous normal coordinate transformation that is a coordinate transformation to normal coordinates corresponding to the position coordinates on the display device is performed, and when the vertex is outside the clip frame. If it is determined, the same normal coordinate transformation is performed after clip processing, which is processing for vertices outside the graphic drawing area, is performed.

【0005】ここで、クリップ処理について簡単に説明
する。図13は、クリップ処理を行なう場合のクリップ
枠と頂点との位置関係を示す図である。図13におい
て、図形データとして入力された第nの頂点がクリップ
枠内にあり、第n+1の頂点がクリップ枠外にある場合
(a)には、第nの頂点と第n+1の頂点とを結ぶ線分
とクリップ枠とが交差する点Aの位置座標をきめるのが
クリップ処理である。
Here, the clip processing will be briefly described. FIG. 13 is a diagram illustrating a positional relationship between a clip frame and a vertex when performing clip processing. In FIG. 13, when the n-th vertex input as graphic data is inside the clip frame and the (n + 1) -th vertex is outside the clip frame (a), a line connecting the n-th vertex and the (n + 1) -th vertex The clip processing determines the position coordinates of the point A where the minute and the clip frame intersect.

【0006】同様にして、第nの頂点と第n+1の頂点
とが共にクリップ枠外にある場合(b)には、クリップ
処理によって、交差点B1 とB2 の位置座標を、第nの
頂点がクリップ枠外にあり、第n+1の頂点がクリップ
枠内にある場合(c)には、クリップ処理によって、交
差点Cの位置座標が決まる。各頂点に対して同次通常座
標変換が行われると、次に、第nの頂点と第n+1の頂
点とを結ぶ線分を表示装置上に描画するために、図形描
画装置内に予め設定されている属性定義表を参照して、
表示装置上での当該線分の属性が設定され、入力された
属性データに、デプスキュー処理及び隠線隠面消去処理
が指定されている場合には、当該処理を行った上で、当
該線分の属性が設定される。
Similarly, when both the n-th vertex and the (n + 1) -th vertex are outside the clip frame (b), the position coordinates of the intersections B 1 and B 2 are determined by the clipping process. If it is outside the clip frame and the (n + 1) th vertex is inside the clip frame (c), the position coordinates of the intersection C are determined by the clip processing. When the homogeneous normal coordinate transformation is performed on each vertex, next, in order to draw a line segment connecting the n-th vertex and the (n + 1) -th vertex on the display device, the line segment is preset in the graphic drawing device. Refer to the attribute definition table
If the attribute of the line segment on the display device is set and depth skew processing and hidden line hidden surface erasing processing are specified in the input attribute data, the processing is performed, and then the line The minute attribute is set.

【0007】以上説明したように、描画する図形の属性
データと図形データを入力すると、図形の各頂点に対
し、座標変換処理、クリップ枠内外判定、必要に応じて
クリップ処理、及び同次通常座標変換処理を施し、各頂
点を結ぶ線分に対し、属性設定、及び必要に応じてデス
プキュー処理と隠線隠面消去処理を施して、図形を表示
装置上に描画する。
As described above, when attribute data and graphic data of a graphic to be drawn are input, coordinate conversion processing, determination of inside and outside of a clip frame, clip processing as necessary, and A conversion process is performed, and a line connecting the vertices is subjected to attribute setting, and if necessary, a descue process and a hidden line hidden surface erasing process, and a graphic is drawn on a display device.

【0008】[0008]

【発明が解決しようとする課題】ところで、図形を透視
投影法で描画する場合には、各頂点の同次通常座標変換
処理における変換値が各頂点ごとに異なるので、各頂点
に対して通常座標への変換処理を行なう必要があるが、
図形を平行投影法で描画する場合には、各頂点の同次通
常座標変換処理における変換値が全ての頂点について一
定なので、第1の頂点に対して同次通常座標変換を行え
ば、第2の頂点以降に対しては通常座標への変換処理を
行なう必要がない。
By the way, when a figure is drawn by the perspective projection method, since the transformation values of the respective vertices in the homogeneous ordinary coordinate transformation processing are different for each vertex, the normal coordinates for each vertex are used. Needs to be converted to
When a figure is drawn by the parallel projection method, since the transformation value of each vertex in the homogeneous normal coordinate transformation process is constant for all vertices, if the homogeneous regular coordinate transformation is performed on the first vertex, It is not necessary to perform the conversion process to the normal coordinates after the vertex of.

【0009】しかしながら従来の描画方法では、平行投
影法の場合でも、第2の頂点以降の各頂点に対して必要
のない同次通常座標変換処理を行うので、処理する量が
膨大になり、図形を描画する性能が低下してしまう。ま
た、同次通常座標変換された頂点ごとに属性定義表を参
照し、表示装置上での線分の属性を設定する処理を施す
上に、デプスキュー処理及び隠線隠面処理が指定されて
いる場合には、当該処理も行なう従来の描画方法では、
処理する量が多過ぎて、描画処理が遅くなってしまう。
However, in the conventional drawing method, even in the case of the parallel projection method, the unnecessary normal coordinate conversion processing is performed for each vertex after the second vertex, so that the amount of processing becomes enormous, The performance of drawing is degraded. In addition, referring to the attribute definition table for each vertex subjected to the same transformation, the process of setting the attribute of the line segment on the display device is performed, and the depth skew process and the hidden line hidden surface process are specified. If there is a conventional drawing method that also performs the processing,
The processing amount is too large, and the drawing process becomes slow.

【0010】そこで本発明は、平行投影法で図形を描画
する際に、クリップ枠内に連続して存在する頂点に対す
る処理を軽減し、線分の描画処理を高速化する方法を提
供することを目的とする。
Therefore, the present invention provides a method of reducing the processing for vertices that are continuously present in a clip frame and drawing the line at a high speed when drawing a figure by the parallel projection method. Aim.

【0011】[0011]

【課題を解決するための手段】本発明において、前記の
課題を解決する手段は、図1に示すように、表示装置上
に表示される図形の描画形式について、表示装置上に描
画される図形の位置を示す図形描画領域の指定情報と、
図形の輪郭を形成する線分情報と、前記図形描画領域か
ら通常座標への座標変換である同次通常座標変換を省略
する平行投影描画法の指定情報と、属性の設定を省略す
るという指定情報とがデータとして設定されたフラグ1
を描画装置内に設け、前記図形描画領域への座標変換、
及び前記図形描画領域の内か外かの判定を行ない、更
に、前記同次通常座標変換、及び図形の描画形式を示す
属性データによる図形の属性の設定を行なう描画処理が
施される図形の第1の頂点に対し、前記図形描画領域内
にあると判定され、且つ図形の第2の頂点に対し、前記
図形描画領域内にあると判定されると、前記フラグの参
照を行ない、当該図形の属性データが前記フラグのデー
タと一致している場合に、当該第2の頂点に対する前記
同次通常座標変換及び図形の属性の設定を省略するパス
2へ移行して描画処理を行ない、なお且つ図形の第3の
頂点に対し、前記図形描画領域内にあると判定された場
合には、前記パス2において描画処理を行なうようにす
ることである。
In the present invention, the means for solving the above-mentioned problems is, as shown in FIG. 1, a drawing format of a figure displayed on a display device. Designation information of the figure drawing area indicating the position of
Line segment information forming a contour of a figure, specification information of a parallel projection drawing method for omitting homogeneous normal coordinate conversion which is a coordinate conversion from the figure drawing area to normal coordinates, and specification information for omitting attribute setting Is a flag 1 in which is set as data
Provided in the drawing device, coordinate conversion to the figure drawing area,
And determining whether the figure is inside or outside the figure drawing area, and further performing the same normal coordinate transformation, and setting a figure attribute based on attribute data indicating the figure drawing format. If it is determined that the first vertex is in the graphic drawing area and the second vertex of the graphic is determined to be in the graphic drawing area, the flag is referred to, and If the attribute data matches the data of the flag, the process proceeds to pass 2 in which the same ordinary coordinate conversion and the setting of the attribute of the figure for the second vertex are omitted, and the drawing processing is performed. If it is determined that the third vertex is within the graphic drawing area, the drawing processing is performed in pass 2.

【0012】[0012]

【作用】本発明によれば、図形データとして入力され、
座標変換された図形の第1の頂点と第2の頂点が、連続
して図形描画領域であるクリップ枠内にある場合に、前
記フラグを参照し、属性データが前記フラグのデータと
一致すれば、平行投影描画であることが予め設定されて
いるので、第2の頂点に対し、同次通常座標変換及び図
形の属性の設定を省略するパスにおいて描画処理を行な
うので、従来より描画処理時間が短縮できる。
According to the present invention, graphic data is input,
If the first vertex and the second vertex of the coordinate-transformed graphic are consecutively within the clip frame that is the graphic drawing area, the flag is referred to, and if the attribute data matches the data of the flag, Since the parallel projection drawing is set in advance, the drawing process is performed on the second vertex in the path that omits the setting of the ordinary normal coordinate conversion and the attribute of the figure. Can be shortened.

【0013】そして、座標変換された第3の頂点に対
し、クリップ枠内外判定を行い、前記3頂点目がクリッ
プ枠内にあれば、前記パスにおいて描画処理が行われる
ので、処理する量が軽減し、描画処理能力が向上する。
また、一度本発明のパスへ移行すると、読み込まれた頂
点が前記クリップ枠内に連続する限り、当該頂点は前記
パスにおいて処理し、読み込まれた頂点が前記クリップ
枠外に出ると、従来の図形処理である汎用パスに戻り、
図形描画領域外処理であるクリップ処理を行う。
Then, the inside and outside of the clip frame is determined for the coordinate-transformed third vertex. If the third vertex is within the clip frame, the drawing process is performed in the pass, so that the amount of processing is reduced. Thus, the drawing processing ability is improved.
Further, once the process proceeds to the path of the present invention, as long as the read vertex continues in the clip frame, the vertex is processed in the pass, and when the read vertex goes out of the clip frame, the conventional graphic processing is performed. Back to the generic path
A clip process which is a process outside the graphic drawing area is performed.

【0014】一度高速パスから汎用パスに移行しても、
その後読み込まれた頂点がクリップ枠内に連続してある
場合には、本発明のパスに移行することができる。
[0014] Once a transition from the high-speed path to the general-purpose path,
If the subsequently read vertices are continuous in the clip frame, the process can proceed to the path of the present invention.

【0015】[0015]

【実施例】以下本発明の実施例について図面にもとづい
て説明する。図2は、図形の描画処理を行なう装置の構
成例を示すブロック図である。図2において、11はF
IFO型メモリで、図形要素データ及び当該図形の属性
データを蓄積している。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 2 is a block diagram illustrating a configuration example of an apparatus that performs a graphic drawing process. In FIG. 2, 11 is F
The IFO type memory stores graphic element data and attribute data of the graphic.

【0016】12はジオメトリ部で、FIFO型メモリ
11に蓄積されたデータを先入れ先出し方式で読み出
し、座標変換処理,色計算処理,クリップ処理等を行な
う。13はレンダリング部で、ジオメトリ部12におけ
る処理結果及び入力された属性データに基づいて、描画
属性を設定することより表示装置上に描画される図形の
表示内容を決定する。
Reference numeral 12 denotes a geometry unit which reads out data stored in the FIFO memory 11 by a first-in first-out method and performs coordinate conversion processing, color calculation processing, clip processing, and the like. Reference numeral 13 denotes a rendering unit which determines the display content of a figure to be drawn on the display device by setting a drawing attribute based on the processing result of the geometry unit 12 and the input attribute data.

【0017】14,15,16はフレームメモリで、一
つのフレームメモリにはレンダリング部13で決定され
た図形の表示内容が書き込まれ、表示装置上に表示され
る一画面分の表示内容を記憶しているが、図2では、一
例として、三つのフレームメモリを記載している。17
はZバッファで、複数の図形要素が、表示装置上の同一
の場所に表示されることになった場合に、どの図形要素
を表示するかを指定する。
Reference numerals 14, 15, and 16 denote frame memories. The display contents of the graphic determined by the rendering unit 13 are written in one frame memory, and the display contents for one screen displayed on the display device are stored. However, FIG. 2 shows three frame memories as an example. 17
Is a Z-buffer which specifies which graphic element is to be displayed when a plurality of graphic elements are to be displayed at the same location on the display device.

【0018】14はローカルストレージで、属性定義表
等を有すると共に、作業領域としても使用される。図3
は、図2におけるジオメトリ部12及びレンダリング部
13の構成例を示すブロック図である。図3において、
ジオメトリ部12及びレンダリング部13は、ファーム
ウェアで構成されているものとする。
Reference numeral 14 denotes a local storage which has an attribute definition table and the like and is also used as a work area. FIG.
FIG. 3 is a block diagram illustrating a configuration example of a geometry unit 12 and a rendering unit 13 in FIG. 2. In FIG.
It is assumed that the geometry unit 12 and the rendering unit 13 are configured by firmware.

【0019】ジオメトリ部12は、前記FIFO型メモ
リ11に蓄積されたデータを先入れ先出し方式で読み出
すデータ読込部19と、表示図形の位置を決定する座標
変換部20と、図形の色の処理を行なう色計算部21
と、クリップ処理を行なうクリップ部22で構成されて
いる。レンダリング部13は、クリップ部22とのイン
タフェースをとる頂点処理部23と、基準点からの向き
と大きさとによって線分の描画処理を行なうベクトル描
画部24で構成されている。
The geometry section 12 has a data reading section 19 for reading data stored in the FIFO type memory 11 in a first-in first-out manner, a coordinate conversion section 20 for determining the position of a display graphic, and a color for processing the color of the graphic. Calculation unit 21
And a clip section 22 for performing clip processing. The rendering unit 13 includes a vertex processing unit 23 that interfaces with the clip unit 22 and a vector drawing unit 24 that performs line segment drawing processing based on the direction and size from the reference point.

【0020】前記ベクトル描画部24で行われた描画処
理の結果は、前記フレームメモリに書き込まれる。図4
ないし図8は、本発明の一実施例で、描画処理を示すフ
ロー図である。図4において、まず、前記FIFO型メ
モリ11に蓄積された図形データから当該図形を構成す
る第1の頂点を読み込み(ステップ1)、当該第1の頂
点の座標変換処理(ステップ2)、及び色計算処理(ス
テップ3)を行ない、この後、当該第1の頂点につい
て、クリップ枠内外判定を行なう(ステップ4)。
The result of the drawing process performed by the vector drawing unit 24 is written to the frame memory. FIG.
FIG. 8 to FIG. 8 are flowcharts showing a drawing process in one embodiment of the present invention. In FIG. 4, first, the first vertex constituting the figure is read from the figure data stored in the FIFO type memory 11 (step 1), the coordinate conversion processing of the first vertex (step 2), and the color A calculation process (step 3) is performed, and then the inside / outside of the clip frame is determined for the first vertex (step 4).

【0021】当該第1の頂点がクリップ枠内にあれば、
図5において、始点である前記第1の頂点を終点と読み
替え(ステップ5)、第2の頂点を始点として読み込み
(ステップ6)、当該第2の頂点の座標変換処理(ステ
ップ7)、及び色計算処理(ステップ8)を行ない、こ
の後、当該第2の頂点について、クリップ枠内外判定を
行なう(ステップ9)。
If the first vertex is within the clip frame,
In FIG. 5, the first vertex, which is the starting point, is read as the end point (step 5), the second vertex is read as the starting point (step 6), the coordinate conversion processing of the second vertex (step 7), and the color A calculation process (step 8) is performed, and then the inside / outside of the clip frame is determined for the second vertex (step 9).

【0022】更に、当該第2の頂点がクリップ枠内にあ
る場合には、終点である前記第1の頂点に対して同次通
常座標変換を施し(ステップ10)、レンダリング部へ
出力して(ステップ11)、その後で、当該図形の属性
データがフラグと一致しているかの高速フラグチェック
を行なう(ステップ12)。属性データとフラグに設定
されたデータが一致していないと、従来の描画処理パス
である汎用パスへ進行し、一致していると本発明による
パスへ移行する。
Further, when the second vertex is within the clip frame, the same normal coordinate transformation is performed on the first vertex as the end point (step 10), and the result is output to the rendering unit (step 10). Step 11) Then, a high-speed flag check is performed to determine whether the attribute data of the figure matches the flag (step 12). If the attribute data does not match the data set in the flag, the process proceeds to a general-purpose pass, which is a conventional drawing processing pass.

【0023】汎用パスへ進行すると、頂点の読み込みが
終了したか判定し(ステップ13)、読み込んでいない
頂点が残っていると、始点である頂点を終点と読み替え
るステップ5へ戻り、読み込みが終了していると、始点
である頂点に対して同次通常座標変換を施し(ステップ
14)、レンダリング部へ出力する(ステップ15)。
When the process proceeds to the general-purpose path, it is determined whether or not the reading of the vertices has been completed (step 13). If so, the same normal coordinate transformation is performed on the vertex as the starting point (step 14), and output to the rendering unit (step 15).

【0024】また、前記第1の頂点がクリップ枠外にあ
れば、図6において、始点である前記第1の頂点を終点
と読み替え(ステップ16)、第2の頂点を始点として
読み込み(ステップ17)、当該第2の頂点の座標変換
処理(ステップ18)、及び色計算処理(ステップ1
9)を行ない、この後、当該第2の頂点について、クリ
ップ枠内外判定を行なう(ステップ20)。
If the first vertex is outside the clip frame, the first vertex, which is the starting point, is read as the end point in FIG. 6 (step 16), and the second vertex is read as the starting point (step 17). , The coordinate conversion processing of the second vertex (step 18), and the color calculation processing (step 1)
9), and then the inside / outside of the clip frame is determined for the second vertex (step 20).

【0025】そして、当該第2の頂点がクリップ枠内に
ある場合には、終点である前記第1の頂点がクリップ枠
外で、始点である当該第2の頂点がクリップ枠内である
クリップ処理を行なう(ステップ21)。その後で、終
点である前記第1の頂点に対して同次通常座標変換を施
し(ステップ22)、レンダリング部へ出力し(ステッ
プ23)、頂点の読み込みが終了したか確認する(ステ
ップ24)。
When the second vertex is within the clip frame, the clip processing is performed in which the first vertex as the end point is outside the clip frame and the second vertex as the start point is within the clip frame. (Step 21). Then, the same normal coordinate transformation is performed on the first vertex as the end point (step 22), and the result is output to the rendering unit (step 23), and it is confirmed whether the reading of the vertex is completed (step 24).

【0026】頂点の読み込みが終了してない場合には、
始点である前記第2の頂点を終点と読み換えステップ5
へ戻り、頂点の読み込みが終了した場合には、始点であ
る前記第2の頂点に対して同次通常座標変換を施し(ス
テップ25)、レンダリング部へ出力する(ステップ2
6)。また、前記第2の頂点のクリップ枠内外判定ステ
ップ9及び20において、当該第2の頂点がクリップ枠
外にある場合、図7において、終点である前記第1の頂
点がクリップ枠外で、始点である当該第2の頂点がクリ
ップ枠外であるクリップ処理、或いは、終点である前記
第1の頂点がクリップ枠内で、始点である当該第2の頂
点がクリップ枠外にあるクリップ処理を行なう(ステッ
プ27)。
If the reading of the vertices has not been completed,
Replacing the second vertex, which is the start point, with the end point;
When the reading of the vertices is completed, the same normal coordinate transformation is performed on the second vertex as the starting point (step 25), and the result is output to the rendering unit (step 2).
6). In addition, in the clip vertex inside / outside determination steps 9 and 20 of the second vertex, when the second vertex is outside the clip frame, the first vertex which is the end point is outside the clip frame and the start point in FIG. A clip process in which the second vertex is outside the clip frame, or a clip process in which the first vertex as the end point is within the clip frame and the second vertex as the start point is outside the clip frame is performed (step 27). .

【0027】その後で、終点である前記第1の頂点に対
して同次通常座標変換を施し(ステップ28)、レンダ
リング部へ出力し(ステップ29)、頂点の読み込みが
終了したか確認する(ステップ30)。頂点の読み込み
が終了してない場合には、始点である前記第2の頂点を
終点と読み換えステップ16へ戻り、頂点の読み込みが
終了した場合には、始点である前記第2の頂点に対して
同次通常座標変換を施し(ステップ31)、レンダリン
グ部へ出力する(ステップ32)。
Thereafter, the same normal coordinate transformation is performed on the first vertex as the end point (step 28), and the result is output to the rendering unit (step 29), and it is confirmed whether the reading of the vertex is completed (step 28). 30). If the reading of the vertices has not been completed, the second vertex, which is the starting point, is read as the end point, and the process returns to step 16. If the reading of the vertices is completed, the second vertex, which is the starting point, is read. To perform the same normal coordinate transformation (step 31) and output it to the rendering unit (step 32).

【0028】レンダリング部では、従来の処理と同様
に、図形描画装置内に予め設定されている属性定義表を
参照して、表示装置上での図形の描画属性が設定され
る。以上説明したのが、従来の汎用パスと同様の描画処
理であり、以下では、ステップ12において、フラグチ
ェックを行ない、属性データとフラグに設定されたデー
タが一致している場合に移行する本発明のパスでの処理
について説明する。
In the rendering section, similarly to the conventional processing, the drawing attribute of the graphic on the display device is set with reference to an attribute definition table preset in the graphic drawing device. What has been described above is a drawing process similar to the conventional general-purpose path. In the following, in step 12, a flag check is performed, and the present invention shifts to a case where attribute data and data set in the flag match. The processing in the pass will be described.

【0029】本発明のパスへ移行すると、図8におい
て、頂点の読み込みが終了したか確認し(ステップ3
3)、終了した場合には、始点である第2の頂点に対す
る同次通常座標変換は行わずにレンダリング部へ出力さ
れる(ステップ34)。しかも、レンダリング部におい
て属性定義表の参照による描画属性の設定、デプスキュ
ー処理、及び隠線隠面消去処理は行わずに、フラグに設
定されたデータの表示内容がフレームメモリに読み込ま
れ、フレームメモリに読み込まれた後には、表示装置へ
出力される。
When the process proceeds to the path of the present invention, it is confirmed in FIG. 8 whether the reading of the vertices is completed (step 3).
3) When the processing is completed, the second normal vertex, which is the starting point, is output to the rendering unit without performing the normal normal coordinate transformation (step 34). Moreover, the rendering unit does not perform the setting of the drawing attribute by referring to the attribute definition table, the depth skew process, and the hidden line hidden surface erasing process, and the display content of the data set in the flag is read into the frame memory. After the data is read to the display device, it is output to the display device.

【0030】一方、頂点の読み込みが終了してない場合
には、始点である前記第2の頂点を終点と読み換え(ス
テップ35)、第3の頂点が始点として読み込まれ(ス
テップ36)、第3の頂点に座標変換(ステップ3
7)、及び色計算処理(ステップ38)を行ない、その
後、第3の頂点に対してクリップ枠内外判定を行なう
(ステップ39)。
On the other hand, if the reading of the vertices is not completed, the second vertex, which is the starting point, is read as the ending point (step 35), and the third vertex is read as the starting point (step 36). 3 (vertical coordinate)
7), and a color calculation process (step 38) is performed, and then the inside / outside of the clip frame is determined for the third vertex (step 39).

【0031】第3の頂点がクリップ枠内にあると、終点
である前記第2の頂点に対する同次通常座標変換は行わ
ずにレンダリング部へ出力され(ステップ40)、再び
頂点の読み込みが完了したか確認するステップ33に戻
る。しかも、レンダリング部において属性定義表の参照
による描画属性の設定、デプスキュー処理、及び隠線隠
面消去処理は行わずに、フラグに設定されたデータの表
示内容がフレームメモリに読み込まれ、フレームメモリ
に読み込まれた後には、表示装置へ出力される。
If the third vertex is within the clipping frame, it is output to the rendering unit without performing the same normal coordinate transformation on the second vertex as the end point (step 40), and the reading of the vertex is completed again. The process returns to step 33 for checking whether Moreover, the rendering unit does not perform the setting of the drawing attribute by referring to the attribute definition table, the depth skew process, and the hidden line hidden surface erasing process, and the display content of the data set in the flag is read into the frame memory. After the data is read to the display device, it is output to the display device.

【0032】第3の頂点がクリップ枠外にある場合に
は、終点である前記第2の頂点がクリップ枠内で、始点
である当該第3の頂点がクリップ枠外にあるクリップ処
理を行なうステップ27へ進行し、従来の描画処理であ
る汎用パスへ戻る。なお、更に頂点を読み込みを続け、
クリップ枠内に連続して頂点がある場合にば、再び本発
明のパスへ移行することが可能である。
If the third vertex is outside the clip frame, the process proceeds to step 27 in which the second vertex as the end point is within the clip frame and the third vertex as the start point is outside the clip frame. The process proceeds, and returns to the general-purpose path which is the conventional drawing process. In addition, continue reading the vertices further,
If there are consecutive vertices in the clip frame, it is possible to shift to the path of the present invention again.

【0033】図9は、本発明の一実施例で、フラグのデ
ータ形式を説明する図である。プラグのデータには、線
の種類を示す情報と、線の幅を示す情報と、クリップ枠
の個数を示す情報と、投影法を示す情報と、HLHSR
モードを示す情報と、HLHSR識別子を示す情報とが
含まれている。32ビットあるデータの第0ビットに
は、線の種類が実線のときには0が、線の種類が実線以
外のときには1が、また、第1ビットには、線の幅が1
のときには0が、線の幅が1より大きいときには1が、
更に、第2ビットには、クリップ枠の個数が1個のとき
には0が、クリップ枠の個数が1個より多いときには1
が設定される。
FIG. 9 is a diagram for explaining a data format of a flag according to an embodiment of the present invention. The plug data includes information indicating the type of line, information indicating the width of the line, information indicating the number of clip frames, information indicating the projection method, and HLHSR.
Information indicating the mode and information indicating the HLHSR identifier are included. The 0th bit of the 32-bit data is 0 when the line type is a solid line, 1 when the line type is not a solid line, and 1 in the first bit.
0 when the line width is greater than 1, 1
Further, the second bit is 0 when the number of clip frames is one, and 1 when the number of clip frames is more than one.
Is set.

【0034】それから、第3ビットには、平行投影のと
きには0が、透視投影のときには1が、また、第4ビッ
トには、Zバッファが未使用のときには0が、Zバッフ
ァが使用のときには1が、更に、第5ビットには、隠線
消去を行わないときには1が、隠線消去を行なうときに
は0が設定される。第6ビットから第31ビットは空き
領域であるため、0を設定しておく。
Then, the third bit is 0 for parallel projection, 1 for perspective projection, and the fourth bit is 0 when the Z buffer is not used, and 1 when the Z buffer is used. However, in the fifth bit, 1 is set when hidden line erasure is not performed, and 0 is set when hidden line erasure is performed. Bits 6 to 31 are empty areas, and thus 0 is set.

【0035】[0035]

【発明の効果】以上説明したように、本発明によれば、
不要な処理を簡略化でき、使用頻度の高い属性データで
図形を描画する処理を効率的に行うことができ、図形描
画の高速化が図れるという効果がある。CAD等で頻繁
に描画される図形は、主にクリップ枠内に指定される頂
点が多く、線の種類が実線、線の幅が1である線分によ
って、平行投影法で描画される場合が多いので、能率的
に図形描画が行えるという効果がある。
As described above, according to the present invention,
Unnecessary processing can be simplified, processing for drawing a figure with frequently used attribute data can be performed efficiently, and there is an effect that figure drawing can be speeded up. A figure that is frequently drawn by CAD or the like mainly has many vertices specified in a clip frame, and may be drawn by a parallel projection method using a line segment whose line type is a solid line and whose line width is 1. Since there are many, there is an effect that figure drawing can be performed efficiently.

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

【図1】本発明の原理図である。FIG. 1 is a principle diagram of the present invention.

【図2】本発明の一実施例で、図形の描画処理を行なう
装置の構成例を示すブロック図である。
FIG. 2 is a block diagram illustrating a configuration example of an apparatus that performs a graphic drawing process according to an embodiment of the present invention.

【図3】本発明の一実施例で、ジオメトリ部とレンダリ
ング部の構成例を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration example of a geometry unit and a rendering unit according to an embodiment of the present invention.

【図4】本発明の一実施例で、描画処理を示すフロー図
その1である。
FIG. 4 is a first flowchart illustrating a drawing process according to the embodiment of the present invention;

【図5】本発明の一実施例で、描画処理を示すフロー図
その2である。
FIG. 5 is a second flowchart illustrating a drawing process according to the embodiment of the present invention;

【図6】本発明の一実施例で、描画処理を示すフロー図
その3である。
FIG. 6 is a third flowchart illustrating a drawing process according to the embodiment of the present invention;

【図7】本発明の一実施例で、描画処理を示すフロー図
その4である。
FIG. 7 is a flowchart 4 showing a drawing process in the embodiment of the present invention.

【図8】本発明の一実施例で、描画処理を示すフロー図
その5である。
FIG. 8 is a flowchart 5 showing a drawing process in the embodiment of the present invention.

【図9】本発明の一実施例で、フラグの形式データを説
明する図である。
FIG. 9 is a diagram illustrating format data of a flag in one embodiment of the present invention.

【図10】表示装置上のクリップ枠を説明する図であ
る。
FIG. 10 is a diagram illustrating a clip frame on the display device.

【図11】描画図形の頂点と線分との関係を示す図であ
る。
FIG. 11 is a diagram illustrating a relationship between a vertex of a drawing figure and a line segment;

【図12】従来の描画処理の流れを示すフロー図であ
る。
FIG. 12 is a flowchart showing a flow of a conventional drawing process.

【図13】クリップ処理におけるクリップ枠と頂点との
位置関係を示す図である。
FIG. 13 is a diagram illustrating a positional relationship between a clip frame and a vertex in clip processing.

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

1・・・フラグ 2・・・パス 1 ... Flag 2 ... Pass

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 図形の頂点の位置を示す図形データ及び
当該図形の描画形式を示す属性データに基づき、当該図
形を表示装置上に描画する方法であって、 前記図形の頂点に対し、前記表示装置上に描画される図
形の位置を示す図形描画領域への座標変換、及び前記図
形描画領域の内か外かの判定を行ない、更に、前記図形
描画領域内にあると判定した頂点と前記図形描画領域外
にある場合には図形描画領域外処理を施した頂点に対
し、前記図形描画領域から通常座標上への座標変換であ
る同次通常座標変換、及び前記属性データによる図形の
属性の設定を行なう描画処理によって図形を描画する方
法において、 表示装置上に表示される図形の描画形式について、前記
図形描画領域の指定情報と、図形の輪郭を形成する線分
情報と、前記同次通常座標変換を省略する平行投影描画
法の指定情報と、属性の設定を省略するという指定情報
とがデータとして設定されたフラグ(1)を描画装置内
に設け、 前記描画処理が施される図形の第1の頂点に対し、前記
図形描画領域内にあると判定され、且つ図形の第2の頂
点に対し、前記図形描画領域内にあると判定されると、
前記フラグの参照を行ない、当該図形の属性データが前
記フラグに設定されたデータと一致している場合に、当
該第2の頂点に対する前記同次通常座標変換及び属性の
設定を省略するパス(2)へ移行して描画処理を行な
い、なお且つ図形の第3の頂点に対し、前記図形描画領
域内にあると判定された場合には、前記パス(2)にお
いて描画処理を行なうことを特徴とする図形描画方法。
1. A method of drawing a graphic on a display device based on graphic data indicating a position of a vertex of the graphic and attribute data indicating a drawing format of the graphic, the method comprising: Performing coordinate conversion to a graphic drawing area indicating the position of the graphic to be drawn on the device, determining whether the figure is inside or outside the graphic drawing area, and further determining the vertex determined to be within the graphic drawing area and the graphic If it is outside the drawing area, the same normal coordinate conversion as the coordinate conversion from the figure drawing area to the normal coordinates for the vertex subjected to the processing outside the figure drawing area, and setting of the attribute of the figure by the attribute data The method of drawing a figure by a drawing process for performing a drawing process includes the following: a drawing format of a figure to be displayed on a display device; A flag (1) in which designation information of parallel projection drawing method for omitting coordinate conversion and designation information for omitting attribute setting are set as data in the drawing device, When it is determined that the first vertex is in the graphic drawing area and that the second vertex of the graphic is in the graphic drawing area,
When the flag is referred to, and the attribute data of the figure matches the data set in the flag, the path (2) omitting the same normal coordinate conversion and setting of the attribute for the second vertex is omitted. ), The drawing process is performed, and if it is determined that the third vertex of the figure is within the figure drawing area, the drawing process is performed in the path (2). How to draw figures.
JP27584792A 1992-10-14 1992-10-14 Drawing method Expired - Fee Related JP2783090B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27584792A JP2783090B2 (en) 1992-10-14 1992-10-14 Drawing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27584792A JP2783090B2 (en) 1992-10-14 1992-10-14 Drawing method

Publications (2)

Publication Number Publication Date
JPH06124350A JPH06124350A (en) 1994-05-06
JP2783090B2 true JP2783090B2 (en) 1998-08-06

Family

ID=17561268

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27584792A Expired - Fee Related JP2783090B2 (en) 1992-10-14 1992-10-14 Drawing method

Country Status (1)

Country Link
JP (1) JP2783090B2 (en)

Also Published As

Publication number Publication date
JPH06124350A (en) 1994-05-06

Similar Documents

Publication Publication Date Title
JP3966832B2 (en) Drawing processing apparatus and drawing processing method
JP4704348B2 (en) Image generating apparatus and image generating method
US6961065B2 (en) Image processor, components thereof, and rendering method
JP3030206B2 (en) Method and apparatus for clipping a graphic polygon to a clipping area
KR19980702733A (en) 3D graphic display
JP3568555B2 (en) Display device
JPH04220781A (en) Apparatus for decomposing small polygon into trapezoid in accelerating mode
JP2783090B2 (en) Drawing method
US20020101428A1 (en) Graphic engine and method for reducing idle time by validity test
JP2005346605A (en) Antialias drawing method and drawing apparatus using the same
KR0165464B1 (en) Apparatus and method of span rendering for graphics
JPH03150680A (en) Display system, thick line displaying method, and information processor
US6377279B1 (en) Image generation apparatus and image generation method
JP4152383B2 (en) Navigation system
JP2633909B2 (en) 3D graphic display method
JPH04247587A (en) Graphic display device
JPS6315617B2 (en)
JPH10161636A (en) Graphics display device
JPH11203486A (en) Translucent object display method and image display device using the method
JP2827670B2 (en) 2D polygon closed area figure synthesis method
JP2714114B2 (en) Graphic processing method and graphic system
JPH0346826B2 (en)
JP2000035782A (en) Image display method
JPH0581948B2 (en)
JP2001209811A (en) Device and method for storing data and image processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980421

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080522

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090522

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees