JP2010256985A - Drawing device and method - Google Patents

Drawing device and method Download PDF

Info

Publication number
JP2010256985A
JP2010256985A JP2009103135A JP2009103135A JP2010256985A JP 2010256985 A JP2010256985 A JP 2010256985A JP 2009103135 A JP2009103135 A JP 2009103135A JP 2009103135 A JP2009103135 A JP 2009103135A JP 2010256985 A JP2010256985 A JP 2010256985A
Authority
JP
Japan
Prior art keywords
curved surface
data
model
vector
surface model
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
JP2009103135A
Other languages
Japanese (ja)
Inventor
Tokuhiro Nakamura
徳裕 中村
Yasuaki Yamauchi
康晋 山内
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2009103135A priority Critical patent/JP2010256985A/en
Publication of JP2010256985A publication Critical patent/JP2010256985A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To select a suitable rendering method according to a situation of an object. <P>SOLUTION: This drawing device includes: a first storage means 104 storing vector data; a second storage means 101 storing a curved surface model rendered with the vector data and a vector data definition position; a first generation means 105 generating at least one piece of primitive data on a vector definition space; a decision means 102 deciding relation between the vector data and elements constituting the curved surface model in the vector definition space to obtain model control information; a control means 103 re-defining the vector data in reference to the model control information to obtain a re-definition curved surface mode, and deciding whether or not a plurality of elements constituting the re-definition curved surface model are present on the same plane; a second generation means 109 generating raster data in accordance with the plane when the plurality of elements are present on the same plane; and a third generation means 107 generating raster data in accordance with a curved surface when the plurality of elements are not present on the same plane. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、本発明はベクタ図形を描画する描画装置および方法に関する。   The present invention relates to a drawing apparatus and method for drawing a vector graphic.

点や直線、曲線、四角形、楕円などの幾何学的な図形要素を組み合わせることによって構成される画像のことをベクタグラフィックスと呼ぶ。これに対し、点(ピクセルあるいはドット)の配列によって構成される画像のことをラスタグラフィックスと呼ぶ。   An image formed by combining geometric figure elements such as points, straight lines, curves, rectangles, and ellipses is called vector graphics. On the other hand, an image constituted by an array of points (pixels or dots) is called raster graphics.

一般に、ディスプレイに表示される画像やプリンタで印刷される画像はラスタグラフィックスである。これらの機器でベクタグラフィックスを扱う際には、これをラスタグラフィクスへ変換する処理(ラスタライズ)が必要になる。ラスタライズの処理コストは高く、複雑なベクタグラフィックスを高速にラスタライズするためには高性能な計算機が必要とされる。その反面、ベクタグラフィックスは表示の都度、適切な解像度のラスタグラフィックスを生成することができるため、画像の拡大や縮小、変形によって輪郭線などの画質が損なわれることがない。そのため、イラストや図面などの輪郭線が明瞭な人工的な画像はベクタグラフィックスとして扱われることが多い。一方、写真などの自然画像はラスタグラフィックスとして扱われることが多い。   In general, an image displayed on a display or an image printed by a printer is raster graphics. When these devices handle vector graphics, processing (rasterization) for converting them into raster graphics is required. The rasterization processing cost is high, and a high-performance computer is required to rasterize complex vector graphics at high speed. On the other hand, since vector graphics can generate raster graphics with an appropriate resolution each time it is displayed, image quality such as contour lines is not impaired by enlargement, reduction, or deformation of the image. Therefore, artificial images with clear outlines such as illustrations and drawings are often handled as vector graphics. On the other hand, natural images such as photographs are often treated as raster graphics.

ベクタグラフィックスの最も身近な利用例はフォントである。初期の計算機ではCPU性能の制約からラスタ形式のフォント(ビットマップフォント)が使われているが、解像度ごとにフォントデータを保持しなければならなかったため多くの記憶容量を必要としている。その後のCPU性能の向上に伴い、現在の計算機では、解像度に依存しないベクタ形式のフォント(アウトラインフォント)データを保持しておき、ディスプレイやプリンタに見合った適切な解像度のフォントをその都度生成することにより、少ない記憶容量で常に高品質なフォントを表示できる。しかし現在でも、携帯電話やカーナビゲーションシステムなどに内蔵されるCPUは処理能力が比較的低く、ベクタグラフィックスのラスタライズに要する演算コストを低減することが課題になっている。   The most familiar use of vector graphics is fonts. In early computers, raster format fonts (bitmap fonts) are used due to CPU performance limitations, but a large amount of storage capacity is required because font data must be held for each resolution. With the subsequent improvement of CPU performance, the current computer retains vector font (outline font) data that does not depend on the resolution, and generates a font with an appropriate resolution suitable for the display or printer each time. Thus, high quality fonts can always be displayed with a small storage capacity. However, even today, CPUs incorporated in mobile phones, car navigation systems, and the like have a relatively low processing capability, and there is a problem of reducing the calculation cost required for rasterizing vector graphics.

近年、この課題を解決するためにGPU(グラフィックスプロセッサユニット)が活用されている。GPUを利用し、直線と曲線で構成される図形をラスタライズするための手法が既に提案されている(例えば、特許文献1参照)。   In recent years, a GPU (graphics processor unit) has been used to solve this problem. A method for rasterizing a figure composed of straight lines and curves using a GPU has already been proposed (see, for example, Patent Document 1).

また、図形の幾何形状が動的に変化しても高速にラスタライズが可能な手法も公知である(例えば、特許文献2参照)。   In addition, a technique that can perform rasterization at high speed even when the geometrical shape of a figure dynamically changes is also known (for example, see Patent Document 2).

特開2006−106705号公報JP 2006-106705 A 特開2007−241878号公報JP 2007-241878 A

しかしながら、ベクタ図形を曲面上に描画する場合には、処理の負担が増大し高速に描画処理を行うことができない問題がある。
本発明は、ベクタ図形を曲面上に描画する場合であっても、再分割処理等による処理負担の増加を低減し高速に描画処理を行うことのできる描画装置および方法を提供することを目的とする。
However, when drawing a vector figure on a curved surface, there is a problem that the processing load increases and the drawing process cannot be performed at high speed.
An object of the present invention is to provide a drawing apparatus and method capable of performing drawing processing at high speed by reducing an increase in processing load due to subdivision processing or the like even when drawing a vector graphic on a curved surface. To do.

上述の課題を解決するため、本発明に係る描画装置は、ベクタ形式の図形に対応するベクタデータを記憶している第1記憶手段と、前記図形を描画するガイドとしての曲面モデルと、該曲面モデルに対応する、前記ベクタデータがレンダリングされることが可能な領域を示すベクタデータ定義位置とを記憶する第2記憶手段と、前記ベクタデータを輪郭線解析することにより直線輪郭および曲線輪郭のいずれか1以上に対応するデータを含むプリミティブデータを、前記曲面モデルが定義される空間は独立して前記図形を定義するとともに出力するラスタデータのピクセルの属性値を決定するために参照されるベクタ定義空間に生成する第1生成手段と、前記ベクタデータ定義位置と、前記曲面モデルとを参照して、曲面モデルに含まれる要素ごとに同一平面上にあるかどうかを判定し、曲面とみなせる曲面モデルである第1モデルまたは平面とみなせる曲面モデルである第2モデルのどちらか一方の判定結果を得る第1判定手段と、前記第1判定手段により前記第1モデルであると判定された場合、該第1モデルと前記プリミティブデータとを参照して、出力するラスタデータのピクセルの属性値を生成する第2生成手段と、前記第1判定手段により前記第2モデルであると判定された場合、該第2モデルと前記プリミティブデータとを参照して、前記ラスタデータのピクセルの属性値を生成する第3生成手段と、を具備することを特徴とする。   In order to solve the above-described problems, a drawing apparatus according to the present invention includes a first storage unit that stores vector data corresponding to a vector-type graphic, a curved surface model as a guide for drawing the graphic, and the curved surface Second storage means for storing a vector data definition position corresponding to a model and indicating an area where the vector data can be rendered; and by analyzing the contour of the vector data, either a linear contour or a curved contour Vector definition referred to in order to determine the attribute value of the pixel of raster data to output the primitive data including the data corresponding to one or more, the space in which the curved surface model is defined independently defines the figure Referring to the first generation means for generating in space, the vector data definition position, and the curved surface model, the elements included in the curved surface model First determination means for determining whether each of them is on the same plane and obtaining a determination result of either a first model that is a curved surface model that can be regarded as a curved surface or a second model that is a curved surface model that can be regarded as a plane A second generation unit configured to generate an attribute value of a pixel of raster data to be output with reference to the first model and the primitive data when the first determination unit determines the first model; A third generation unit configured to generate an attribute value of a pixel of the raster data with reference to the second model and the primitive data when the first determination unit determines that the second model is the second model; It is characterized by doing.

本発明の描画装置および方法によれば、再分割処理等による処理負担の増加を低減し高速に描画処理を行うことができる。   According to the drawing apparatus and method of the present invention, it is possible to reduce the increase in processing load due to re-division processing and the like and perform drawing processing at high speed.

本実施形態に係る描画装置を示すブロック図。The block diagram which shows the drawing apparatus which concerns on this embodiment. ベクタ図形の一例を示す図。The figure which shows an example of a vector figure. ベクタデータ図形の一例を示す図。The figure which shows an example of a vector data figure. 三角形のうち、凸領域が図形を表す場合((a))と、凹領域が図形を表す場合((b))を示す図。The figure which shows the case where a convex area | region represents a figure among the triangles ((a)), and the case where a concave area | region represents a figure ((b)). 直線輪郭((a))と曲線輪郭から定義される三角形の集合((b))の一例を示す図。The figure which shows an example of the set ((b)) of the triangle defined from a linear outline ((a)) and a curve outline. 描画制御用プリミティブの1つがある曲面モデル要素と交差している状態((a))、またはある曲面モデル要素がある描画制御用プリミティブに含まれている状態((b))を示す図。The figure which shows the state ((a)) which one of the drawing control primitives cross | intersects with a curved surface model element, or the state ((b)) contained in a drawing control primitive with a certain curved surface model element. 図1の曲面ベクトルレンダリング部および図1の平面ベクトルレンダリング部を示すブロック図。FIG. 2 is a block diagram illustrating a curved surface vector rendering unit in FIG. 1 and a planar vector rendering unit in FIG. 1. 図1のモデル制御情報算出部の動作の一例を示すフローチャート。The flowchart which shows an example of operation | movement of the model control information calculation part of FIG. 図1の入力モデル制御部の処理前の文字のイメージを示す図。The figure which shows the image of the character before a process of the input model control part of FIG. 図1の入力モデル制御部の処理後の文字のイメージの一例を示す図。The figure which shows an example of the image of the character after the process of the input model control part of FIG. 図1の入力モデル制御部の処理後の文字のイメージの別例を示す図。The figure which shows another example of the image of the character after the process of the input model control part of FIG. 比較例におけるラスタライズの処理手順を示すフローチャート。9 is a flowchart showing a rasterizing process procedure in a comparative example. 細分割された曲線輪郭から定義される三角形の集合((b))と、それに伴い更新された直線輪郭((a))の一例を示す図。The figure which shows an example of the set ((b)) of the triangle defined from the curve outline subdivided, and the linear outline ((a)) updated in connection with it. 三角形分割された直線輪郭の一例を示す図。The figure which shows an example of the linear outline divided into the triangle. 比較例におけるラスタライズされた直線輪郭((a))および曲線輪郭から定義される三角形の集合((b))の一例を示す図。The figure which shows an example of the set of the triangle ((b)) defined from the rasterized straight line outline ((a)) and curve outline in a comparative example. 比較例における生成されたラスタデータの一例を示す図。The figure which shows an example of the raster data produced | generated in the comparative example. 直線輪郭の一例を示す図。The figure which shows an example of a linear outline. 比較例における直線輪郭から生成された三角形データの一例を示す図。The figure which shows an example of the triangle data produced | generated from the linear outline in a comparative example. 比較例における直線輪郭から生成された三角形の点番号の一例を示す図。The figure which shows an example of the triangle point number produced | generated from the linear outline in a comparative example.

以下、図面を参照しながら本発明の実施形態に係る描画装置および方法について詳細に説明する。
本実施形態に係る描画装置の構成について図1を参照して詳細に説明する。
本実施形態に係る描画装置100は、モデル記憶部101、モデル制御情報算出部102、入力モデル制御部103、ベクタデータ記憶部104、描画制御用プリミティブ生成部105、描画制御用プリミティブ記憶部106、曲面ベクトルレンダリング部107、平面ベクトルレンダリング部109、および提示部108を含む。
ベクタデータ記憶部104は、任意の図形を表すベクタ形式の図形データであるベクタデータを記憶している。描画制御用プリミティブ生成部105は、所望のベクタ図形に対応するベクタデータを読み込み、ベクタデータを描画するために利用する描画制御用プリミティブデータをベクタ定義空間に生成し、描画制御用プリミティブデータを描画制御用プリミティブ記憶部106に記憶する。
Hereinafter, a drawing apparatus and method according to embodiments of the present invention will be described in detail with reference to the drawings.
The configuration of the drawing apparatus according to the present embodiment will be described in detail with reference to FIG.
The drawing apparatus 100 according to the present embodiment includes a model storage unit 101, a model control information calculation unit 102, an input model control unit 103, a vector data storage unit 104, a drawing control primitive generation unit 105, a drawing control primitive storage unit 106, A curved surface vector rendering unit 107, a planar vector rendering unit 109, and a presentation unit 108 are included.
The vector data storage unit 104 stores vector data that is vector-format graphic data representing an arbitrary graphic. The drawing control primitive generation unit 105 reads vector data corresponding to a desired vector graphic, generates drawing control primitive data to be used for drawing vector data in the vector definition space, and draws drawing control primitive data. The data is stored in the control primitive storage unit 106.

モデル記憶部101は、曲面モデル(複数の曲面モデル要素)とベクタデータ定義位置とを対応付けて記憶している。モデル制御情報算出部102は、モデル記憶部101から所望の曲面モデルを抽出し、描画制御用プリミティブ記憶部106から所望の描画制御用プリミティブデータを抽出し、曲面モデル要素ごとに曲面ベクトルレンダリング部107および平面ベクトルレンダリング部109のどちらか一方へ描画制御用プリミティブデータを出力するかどうかの判定結果を示すモデル制御情報を算出する。入力モデル制御部103は、モデル制御情報と、モデル制御情報算出部102が受け取ったものと同じ曲面モデルおよびベクタデータ定義位置とを受け取り、曲面ベクトルレンダリング部107および平面ベクトルレンダリング部109のどちらか一方に出力してレンダリングする曲面モデルを再定義曲面モデルと再定義し、さらに、再定義曲面モデルが同一平面上に定義されているかどうかを判定する。ここで、要素とは曲面モデルを構成する多角形を指し、例えば三角形や長方形を用いる事ができる。   The model storage unit 101 stores a curved surface model (a plurality of curved surface model elements) and vector data definition positions in association with each other. The model control information calculation unit 102 extracts a desired curved surface model from the model storage unit 101, extracts desired drawing control primitive data from the drawing control primitive storage unit 106, and a curved surface vector rendering unit 107 for each curved surface model element. Model control information indicating a determination result as to whether to output drawing control primitive data to either one of the plane vector rendering unit 109 and the plane vector rendering unit 109 is calculated. The input model control unit 103 receives model control information and the same curved surface model and vector data definition position received by the model control information calculation unit 102, and either one of the curved surface vector rendering unit 107 and the planar vector rendering unit 109 is received. The surface model to be output and rendered is redefined as a redefined surface model, and it is further determined whether or not the redefined surface model is defined on the same plane. Here, the element refers to a polygon constituting the curved surface model, and for example, a triangle or a rectangle can be used.

曲面ベクトルレンダリング部107は、再定義曲面モデル要素が同一平面上に定義されていないと判定された場合に、描画制御用プリミティブデータおよび再定義曲面モデルを受け取り、最終的な出力とするラスタデータを生成する。平面ベクトルレンダリング部109は、再定義曲面モデル要素が同一平面上に定義されていると判定された場合に、描画制御用プリミティブデータおよび再定義曲面モデルを受け取り、最終的な出力とするラスタデータを生成する。提示部108は、受け取ったラスタデータをスクリーンに表示する。   When it is determined that the redefined surface model element is not defined on the same plane, the surface vector rendering unit 107 receives the rendering control primitive data and the redefined surface model, and outputs raster data as a final output. Generate. When it is determined that the redefined surface model element is defined on the same plane, the plane vector rendering unit 109 receives the rendering control primitive data and the redefined surface model, and outputs raster data as a final output. Generate. The presentation unit 108 displays the received raster data on the screen.

[ベクタデータ記憶部104]
ベクタデータ記憶部104は、1種類以上のベクタ図形に対応する1以上のベクタデータを記憶している。ベクタデータは、ラスタライズされる任意のベクタ形式の図形(ベクタ図形と呼ぶ。ベクタ図形の一例を図2に示す)を表すベクタ形式の図形データであり、ラスタライズされる領域を含む任意の図形を示す、始点、制御点、および終点の座標と、ベクタ図形の種類(例えばフォント、絵)と、ベクタ図形を構成する各点(始点、制御点、および終点)の接続関係と、内部のラスタライズされる領域を示す情報とを含む。また、直線および曲線のどちら側を図形の内部とするかの情報を直線および曲線ごと定義していなくとも、直線および曲線のどちら側を内部領域とするかをあらかじめ決めておけばベクタデータの輪郭線解析と同時に内部領域を定義することができる。ベクタ図形の一例を図2に示し、図2のベクタ図形に対応するベクタデータに含まれる各点と各点との接続関係を図3に示す。
なお、ベクタデータは上記の形式に限定されるものではなく、色情報やアルファ値などのグラフィックスの分野において一般的に利用される他のデータを含んでもよい。
[Vector data storage unit 104]
The vector data storage unit 104 stores one or more vector data corresponding to one or more types of vector graphics. The vector data is vector-format graphic data representing an arbitrary vector-format graphic to be rasterized (referred to as a vector graphic; an example of the vector graphic is shown in FIG. 2), and indicates an arbitrary graphic including an area to be rasterized. The coordinates of the start point, control point, and end point, the type of vector graphic (for example, font, picture), the connection relationship of each point (start point, control point, and end point) constituting the vector graphic, and internal rasterization Information indicating the area. Even if the information on which side of a straight line or curve is to be inside the figure is not defined for each straight line or curve, the outline of the vector data can be determined by deciding which side of the straight line or curve is the internal area. The internal area can be defined simultaneously with the line analysis. An example of the vector graphic is shown in FIG. 2, and the connection relation between each point included in the vector data corresponding to the vector graphic of FIG. 2 is shown in FIG.
The vector data is not limited to the above format, and may include other data generally used in the graphics field such as color information and alpha value.

[描画制御用プリミティブ生成部105]
描画制御用プリミティブ生成部105は、ベクタデータ記憶部104に記憶されているベクタデータを参照して、描画を行うベクタデータを抽出し、抽出したベクタデータから描画制御用プリミティブデータをベクタ定義空間に少なくとも1つ生成する。ベクタ定義空間は、曲面モデルが定義される空間とは独立した空間であって、独自の位置座標(またはテクスチャ座標)などでレンダリング対象のベクタデータが定義される空間のうちのある範囲で定義されるものである。ベクタ定義空間は、例えば各軸が0から1までの範囲で定義される2次元空間である。また、ベクタ定義空間は、後述するレンダリング部107、109が出力するラスタデータのピクセルの属性値を決定するために参照される空間である。ピクセルの属性値とは、ベクタ定義空間での位置座標、各ピクセルの色情報、および透明度などを示す通常複数の値である。ラスタデータは、最終的に提示部108に提示される画像の解像度と同じ解像度をもつ画像データである。曲面モデルについては後述のモデル記憶部101において詳細に説明する。
描画制御用プリミティブデータとは、ベクタデータを曲面モデルに描画するために利用するデータであり、例えば三角形、凸多角形を形成する点座標およびある点座標を結ぶ線を含むデータである。また、描画制御用プリミティブデータが表す描画制御用プリミティブは、ベクタデータの始点、制御点、および終点とを解析することによって生成される図形であり、例えば三角形群が挙げられるが、他にも凸多角形群を含む場合もある。なお、本実施形態では描画制御用プリミティブが三角形群と多角形群を含んでいる場合を例に説明を行う。図3では、図形の直線あるいはパラメトリック曲線の端点を黒丸で表し、パラメトリック曲線の制御点を白丸で表している。
描画制御用プリミティブ生成部105は、ベクタデータを輪郭線解析した結果、曲線輪郭(例えば図5(b))と直線輪郭(例えば図15)とに対応するデータを含む描画制御用プリミティブデータを生成する。描画制御用プリミティブデータは、ベクタ図形を再現する上でベクタデータと等価である。曲線輪郭から生成される描画制御用プリミティブは、曲線輪郭のパラメトリック曲線の始点と終点、および制御点の3点を結んで定義される多角形(ここでは三角形)の集合である。各三角形はパラメトリック曲線に外接しており、曲線は必ず三角形の内部に存在する。図3の例では、図3に含まれる始点と終点、および制御点の3点を結んで定義される三角形の集合である。また、曲線輪郭から定義される三角形は、図4(b)に示すように内部に定義されている曲線の凸領域を表すもの(凸曲線輪郭と称する)と、図4(a)に示すように凹領域を表すもの(凹曲線輪郭と称する)の2種類で構成される。なお、曲線輪郭から定義される三角形については、三角形の内側にあるピクセルのうち、曲線の凸領域に属するピクセルのみがラスタライズされる。
[Drawing control primitive generation unit 105]
The drawing control primitive generation unit 105 refers to the vector data stored in the vector data storage unit 104, extracts vector data to be drawn, and draws the drawing control primitive data from the extracted vector data into the vector definition space. At least one is generated. The vector definition space is a space that is independent of the space where the curved surface model is defined, and is defined in a certain range of the space where the vector data to be rendered is defined by unique position coordinates (or texture coordinates). Is. The vector definition space is a two-dimensional space in which each axis is defined in the range from 0 to 1, for example. The vector definition space is a space that is referred to in order to determine pixel attribute values of raster data output from rendering units 107 and 109 described later. The pixel attribute value is usually a plurality of values indicating position coordinates in the vector definition space, color information of each pixel, transparency, and the like. The raster data is image data having the same resolution as the resolution of the image finally presented on the presentation unit 108. The curved surface model will be described in detail in the model storage unit 101 described later.
The drawing control primitive data is data used to draw vector data on a curved surface model, and is data including, for example, a point coordinate forming a triangle or a convex polygon and a line connecting the point coordinates. The drawing control primitive data represented by the drawing control primitive data is a figure generated by analyzing the start point, the control point, and the end point of the vector data. It may contain polygon groups. In the present embodiment, the case where the drawing control primitive includes a triangle group and a polygon group will be described as an example. In FIG. 3, the straight line of the figure or the end point of the parametric curve is represented by a black circle, and the control point of the parametric curve is represented by a white circle.
The drawing control primitive generation unit 105 generates drawing control primitive data including data corresponding to a curved outline (for example, FIG. 5B) and a straight line outline (for example, FIG. 15) as a result of contour analysis of the vector data. To do. The rendering control primitive data is equivalent to the vector data in reproducing the vector graphic. The drawing control primitive generated from the curve contour is a set of polygons (here, triangles) defined by connecting the three points of the start point and end point of the parametric curve of the curve contour and the control point. Each triangle circumscribes a parametric curve, and the curve is always present inside the triangle. The example of FIG. 3 is a set of triangles defined by connecting the three points of the start point, the end point, and the control point included in FIG. Further, a triangle defined from a curved contour represents a convex region of a curved line defined inside (referred to as a convex curved contour) as shown in FIG. 4B, and a triangular shape defined in FIG. 4A. Are composed of two types, one representing a concave region (referred to as a concave curve contour). As for the triangle defined from the curved contour, only the pixels belonging to the convex region of the curve among the pixels inside the triangle are rasterized.

直線輪郭は、制御点を無視してベクタデータに含まれる直線および曲線の始点と終点を線分で結ぶことによって得られる多角形と定義される。この直線輪郭は、例えば具体的には後述する図15に示す図形となる。さらにこの直線輪郭について三角化を行う。具体的には直線輪郭を構成する多角形の複数の頂点のうち、任意の1つの頂点(ピボットという)を選択する。そして、ピボットと他の全ての頂点を直線で結び、連結する2つの頂点が1つの三角形の辺となるように、ピボットを1つの頂点とする複数の三角形を生成する。これら複数の三角形を直線輪郭から生成される描画制御用プリミティブとする。ここで連結する2つの頂点とは、多角形の辺によって結ばれている2つの頂点のことを意味する。
このようにベクタデータから描画制御用プリミティブデータを生成するより詳しい方法は例えば上記特開2007−241878号公報で示されているため、ここでの詳細な説明は省略する。
A straight line outline is defined as a polygon obtained by ignoring control points and connecting the start and end points of straight lines and curves included in vector data with line segments. For example, the straight line outline is a figure shown in FIG. Further, this straight line outline is triangulated. Specifically, an arbitrary vertex (referred to as a pivot) is selected from a plurality of vertices of a polygon constituting the straight line outline. Then, the pivot and all other vertices are connected by a straight line, and a plurality of triangles having the pivot as one vertex are generated so that the two vertices to be connected are sides of one triangle. The plurality of triangles are used as drawing control primitives generated from the straight outline. The two vertices connected here mean two vertices connected by polygon sides.
A more detailed method for generating primitive data for drawing control from vector data in this way is described in, for example, the above-mentioned Japanese Patent Application Laid-Open No. 2007-241878, and detailed description thereof is omitted here.

しかしながら、描画制御用プリミティブデータの生成方法はこれに限定されるものではなく、例えば、曲線輪郭から定義される三角形は、上述したように凹曲線輪郭と、凸曲線輪郭の2種類で構成される。直線輪郭は、例えばこの2種類の曲線輪郭に応じて定義されてもよい。この場合、直線輪郭は、凸曲線輪郭では制御点を無視して始点と終点との2点を結び、凹曲線輪郭では始点と制御点と終点との3点をこの順番に結び、これらの線分を連結して得られる多角形の輪郭の集合である。このように結んだ直線輪郭の例としては、図5(a)が挙げられる。図5(a)から分かるように、直線輪郭を構成する多角形は1つとは限らない(この例では3つの多角形で構成される)。また、各多角形は自己交差や穴を含むことがある。
この場合、図形(例えば三角形)の内部のラスタライズされる領域を示す情報は、例えば2種類の上述した曲線輪郭で決定される。この2種類の曲線輪郭によって、始点、制御点、および終点で決まる曲線で区切られる、三角形内部の領域のうち、どちらの領域がラスタライズされる領域であるかを示すことができる。
However, the method for generating the drawing control primitive data is not limited to this. For example, the triangle defined from the curved contour is composed of the concave curved contour and the convex curved contour as described above. . The linear contour may be defined according to these two types of curved contours, for example. In this case, the straight contour ignores the control point in the convex curve contour and connects the start point and the end point, and the concave curve contour connects the start point, the control point, and the end point in this order. It is a set of polygonal outlines obtained by connecting minutes. FIG. 5A is an example of the linear contours connected in this way. As can be seen from FIG. 5 (a), the number of polygons constituting the straight contour is not limited to one (in this example, it is composed of three polygons). Each polygon may contain self-intersections and holes.
In this case, information indicating the rasterized area inside the figure (for example, a triangle) is determined by, for example, two types of curved contours described above. With these two types of curve contours, it is possible to indicate which of the regions inside the triangle, which is divided by the curve determined by the start point, the control point, and the end point, is the region to be rasterized.

描画制御用プリミティブデータは、上述したように、ベクタ定義空間に定義される。この場合、描画制御用プリミティブデータがベクタ定義空間が定義される範囲に全て含まれ、かつ三角形群を覆う最小の矩形が最も大きくなるように三角形の正規化を行う。具体的には、矩形が描画制御用プリミティブを全て覆う最小の長方形であり、各辺がベクタ定義空間のいずれかの軸と平行で、なおかつ2辺が垂直に交差している長方形であって、その長方形の2辺のうち長い方の辺がベクタ定義空間に収まる最も長い長さになるように拡大するさいの倍率を決定したうえで、その長方形の縦横比を維持したまま拡大し、正規化することができる。この手法とは異なり、例えば、描画制御用プリミティブ生成部105で生成された描画制御用プリミティブデータがベクタ定義空間に全て含まれ、かつ矩形の各辺がベクタ定義空間のいずれかの軸と平行な最小の長方形を考え、その長方形の縦横比を維持したまま、その長方形をベクタ定義空間に含まれる範囲で拡大した際の倍率で正規化することもできる。しかしながらこの方法に限定するものではなく、グラフィックスの分野で一般的な他の正規化方法を用いてもよい。   The drawing control primitive data is defined in the vector definition space as described above. In this case, the normalization of the triangle is performed so that the rendering control primitive data is all included in the range in which the vector definition space is defined, and the smallest rectangle covering the triangle group is the largest. Specifically, the rectangle is the smallest rectangle that covers all the drawing control primitives, each side is parallel to any axis in the vector definition space, and two sides intersect perpendicularly, After determining the magnification when expanding so that the longer of the two sides of the rectangle becomes the longest length that can fit in the vector definition space, the rectangle is expanded and normalized while maintaining the aspect ratio of the rectangle. can do. Unlike this method, for example, the drawing control primitive data generated by the drawing control primitive generation unit 105 are all included in the vector definition space, and each side of the rectangle is parallel to any axis of the vector definition space. Considering the smallest rectangle, it is possible to normalize with the magnification when the rectangle is enlarged within the range included in the vector definition space while maintaining the aspect ratio of the rectangle. However, the present invention is not limited to this method, and other normalization methods common in the graphics field may be used.

[描画制御用プリミティブ記憶部106]
描画制御用プリミティブ記憶部106は、描画制御用プリミティブ生成部105から描画制御用プリミティブデータを受け取って記憶する。
[Drawing control primitive storage unit 106]
The drawing control primitive storage unit 106 receives and stores drawing control primitive data from the drawing control primitive generation unit 105.

[モデル記憶部101]
モデル記憶部101は、各頂点にパラメータを含む複数の曲面モデル要素を含む曲面モデルと、この曲面モデルに対応するベクタデータ定義位置とを記憶している。曲面モデル要素は、辺の数が3以上で構成される多角形で示され、例えば三角形である。複数の曲面モデル要素の集合によって曲面モデルを表現する。ベクタデータ定義位置は、プリミティブデータに基づいてベクタ図形を再現するために曲面モデルのどの位置にベクタデータをレンダリングするかを示す。すなわち、ベクタデータ定義位置は、ベクタ定義空間で定義された領域が曲面モデルのどの領域にレンダリングされるかを示す。ここでの曲面モデルは、ベクタ図形を描画するガイドとして使用される。また、モデル記憶部101には、曲面モデル要素により構成される曲面モデルが複数記憶されていてもよい。
[Model storage unit 101]
The model storage unit 101 stores a curved surface model including a plurality of curved surface model elements including parameters at each vertex, and a vector data definition position corresponding to the curved surface model. The curved surface model element is indicated by a polygon having three or more sides, for example, a triangle. A curved surface model is expressed by a set of a plurality of curved surface model elements. The vector data definition position indicates at which position of the curved surface model the vector data is rendered in order to reproduce the vector graphic based on the primitive data. That is, the vector data definition position indicates in which area of the curved surface model the area defined in the vector definition space is rendered. The curved surface model here is used as a guide for drawing vector graphics. The model storage unit 101 may store a plurality of curved surface models configured by curved surface model elements.

この曲面モデル要素の各頂点には、ベクタ定義空間での対応位置を示すパラメータが定義されているものとする。このパラメータは例えば、テクスチャ座標の利用が考えられる。このパラメータにより、曲面が表される空間における曲面モデル要素の位置座標と、ベクタ定義空間におけるベクタデータ定義位置とが対応しているため、ベクタ定義空間における曲面モデル要素(ここでは三角形)を定義することができ、ベクタ定義空間にあるレンダリング対象のベクタデータと曲面モデル要素とのベクタ定義空間での位置関係を容易に判定することができる。さらに、曲面モデル要素が三角形の場合には、三角形を生成する3頂点によってある曲面モデル要素の法線ベクトルを決定することができる。   It is assumed that a parameter indicating a corresponding position in the vector definition space is defined at each vertex of the curved surface model element. For example, the use of texture coordinates can be considered for this parameter. With this parameter, the position coordinates of the curved surface model element in the space where the curved surface is represented correspond to the vector data definition position in the vector definition space, so define the curved surface model element (here, a triangle) in the vector definition space. It is possible to easily determine the positional relationship between the vector data to be rendered in the vector definition space and the curved surface model element in the vector definition space. Further, when the curved surface model element is a triangle, the normal vector of the curved surface model element can be determined by the three vertices that generate the triangle.

なお、保存されるデータはこれらのみに限定されない。レンダリングの際の視点の位置や視線方向を表すカメラパラメータや並行投影または投視投影のどちらで投影するかなど、グラフィックスの分野でレンダリングの際に一般的に用いられる他の情報がモデル記憶部101に記憶されていてもよい。この場合、曲面モデルが表される空間における曲面モデル要素ごとの、透明度、色を含む情報も上述したパラメータに含まれる。
本実施形態では、曲面モデル要素が三角形で構成されている場合を例に説明する。これを一般的な多角形に適用する場合には、例えば、多角形を三角形の集合に分割する方法がある。分割方法については、例えば“M.ドバーグ、M.ファン.クリベルド、M.オーバマーズ、O.シュワルツコップ 共著、浅野哲夫 訳:コンピュータ・ジオメトリ 計算機科学:アルゴリズムと応用、近代科学社”に記載の方法を用いることが可能である。
The data to be stored is not limited to these. Other information commonly used for rendering in the graphics field, such as camera parameters that represent the position of the viewpoint and the direction of the line of sight during rendering, and whether to project in parallel projection or projection projection, is the model storage unit. 101 may be stored. In this case, information including transparency and color for each curved surface model element in the space where the curved surface model is represented is also included in the above-described parameters.
In the present embodiment, a case where the curved surface model element is configured by a triangle will be described as an example. When this is applied to a general polygon, for example, there is a method of dividing the polygon into a set of triangles. As for the division method, for example, the method described in “M. Doberg, M. Van Kriveld, M. Obermarz, O. Schwartzkop, Tetsuo Asano Translation: Computer Geometry Computer Science: Algorithms and Applications, Modern Science Co., Ltd.” It is possible to use.

[モデル制御情報算出部102]
モデル制御情報算出部102は、モデル記憶部101から所望の曲面モデルおよびベクタデータ定義位置を抽出し、描画制御用プリミティブ記憶部106から所望の描画制御用プリミティブデータを抽出し、曲面モデル要素ごとに最終的な入力曲面モデル要素とするかどうかを判定して、曲面モデル要素ごとにベクタ図形との関係を示す判定結果であるモデル制御情報を算出する。
ここで、モデル制御情報の判定方法について図6を用いて詳細に説明する。
モデル記憶部101に記憶されている曲面モデル要素(ここでは、三角形である多角形2の内部領域601)と、描画制御用プリミティブ記憶部106に記憶されている描画制御用プリミティブデータが表す描画制御用プリミティブに含まれる任意の図形(ここでは、三角形である多角形1の内部領域602)とについて、ベクタデータ定義位置にある曲面モデル要素ごとに以下の判定を行う。
(a)互いの三角形が交差している状態であるかどうか
(b)一方の三角形がもう一方の三角形の内部領域に完全に含まれる状態であるかどうか(例えば、図6では多角形2の内部領域603が多角形1の内部領域604に完全に含まれている)
上記2点をそれぞれの三角形について個別に判定する。この判定手法は、例えば“中前栄八郎、西田友是:3次元コンピュータグラフィックス、pp63−72、昭晃堂”に記載の手法を用いることができるため、ここでの詳細な説明は省略する。また、このときの判定はベクタ定義空間でおこなわれる。判定を行うには、曲面モデルを構成する三角形がベクタ定義空間でどの様に定義されるかを調べる。曲面モデル要素ごとの頂点はベクタ定義空間での対応位置を示すパラメータを保持しているため、ベクタ定義空間での曲面モデル要素をそれぞれ定義することができる。なお、このときのベクタ定義空間は2次元の空間である。
以上の判定の結果、互いの三角形が交差したか、または一方の三角形がもう一方の三角形の内部領域に完全に含まれる場合には最終的な判定結果を「真」として、それ以外の場合は「偽」として、ベクタデータ定義位置にある曲面モデル要素ごとにこの「真」「偽」の判定結果がモデル制御情報として入力モデル制御部103に出力される。つまり、モデル制御情報が「真」の曲面モデル要素は、ベクタデータが描かれる領域を含む曲面モデル要素であるといえるため、これを最終的な入力曲面モデル要素とする。このモデル制御情報は、例えば曲面モデル要素ごとの「真」「偽」の判定を、フラグを用いて示して、曲面モデル要素ごとのフラグを入力モデル制御部103に出力してもよい。
なお、判定は必ずしも以上に挙げた手順である必要はなく、曲面モデル要素(多角形2の内部領域601、603)が描画制御用プリミティブに含まれる任意の図形(多角形1の内部領域602、604)と交差するか、または曲面モデル要素と描画制御用プリミティブに含まれる任意の図形のどちらか一方が、もう一方の内部領域に完全に含まれる状態になっているかの判定ができればよい。すなわち、モデル制御情報算出部102は、ベクタ定義空間での曲面モデル要素の占める領域と描画制御用プリミティブが占める領域とが重なっているかどうかの判定ができればよい。また、用途によっては簡易な判定で置き換えてもよい。例えば、曲面モデル要素ごとの頂点が描画制御用プリミティブに含まれる任意の図形の内部領域に含まれるかどうかを調べる。これにより曲面モデル要素と描画制御用プリミティブとの位置関係の判定を、通常の判定に比べて高速に判定することが可能になる。
なお、モデル制御情報算出部102で判定に用いた、モデル記憶部101に格納されている曲面モデルについては書き換えをおこなわない。
また、モデル制御情報算出部102は、モデル記憶部101から所望の曲面モデルおよびベクタデータ定義位置を受け取るときに、受け取った曲面モデルおよびベクタデータ定義位置と同じデータを入力モデル制御部103へ送るように、モデル記憶部101へ指示する。
[Model control information calculation unit 102]
The model control information calculation unit 102 extracts a desired curved surface model and vector data definition position from the model storage unit 101, extracts desired drawing control primitive data from the drawing control primitive storage unit 106, and stores each surface model element. It is determined whether or not the final input curved surface model element is used, and model control information, which is a determination result indicating the relationship with the vector graphic, is calculated for each curved surface model element.
Here, the determination method of model control information is demonstrated in detail using FIG.
The drawing control represented by the curved surface model elements (here, the internal area 601 of the polygon 2 which is a triangle) stored in the model storage unit 101 and the drawing control primitive data stored in the drawing control primitive storage unit 106 The following determination is made for each curved surface model element at the vector data definition position with respect to an arbitrary figure included in the primitive for use (here, the internal region 602 of the polygon 1 that is a triangle).
(A) Whether the triangles intersect each other
(B) Whether one triangle is completely included in the inner region of the other triangle (for example, in FIG. 6, the inner region 603 of the polygon 2 is completely included in the inner region 604 of the polygon 1. ing)
The above two points are individually determined for each triangle. As this determination method, for example, the method described in “Eiichiro Nakamae, Tomoyoshi Nishida: 3D Computer Graphics, pp 63-72, Shosodo” can be used, and detailed description thereof is omitted here. The determination at this time is performed in the vector definition space. In order to make the determination, it is examined how triangles constituting the curved surface model are defined in the vector definition space. Since the vertex for each curved surface model element holds a parameter indicating the corresponding position in the vector definition space, each curved surface model element can be defined in the vector definition space. Note that the vector definition space at this time is a two-dimensional space.
As a result of the above judgment, if the triangles intersect or one triangle is completely included in the inner area of the other triangle, the final judgment result is “true”, otherwise As “false”, the determination result of “true” and “false” is output to the input model control unit 103 as model control information for each curved surface model element at the vector data definition position. That is, a curved surface model element whose model control information is “true” can be said to be a curved surface model element including an area where vector data is drawn. For example, the model control information may indicate “true” or “false” for each curved surface model element using a flag, and may output the flag for each curved surface model element to the input model control unit 103.
Note that the determination does not necessarily have to be performed according to the above-described procedure, and an arbitrary figure (inner area 602 of polygon 1) in which a curved surface model element (inner areas 601 and 603 of polygon 2) is included in the drawing control primitive. 604) or any one of the arbitrary figures included in the curved surface model element and the drawing control primitive may be determined to be completely included in the other internal region. That is, the model control information calculation unit 102 only needs to be able to determine whether the area occupied by the curved model element in the vector definition space overlaps the area occupied by the drawing control primitive. Further, depending on the use, it may be replaced by simple determination. For example, it is checked whether or not the vertex for each curved surface model element is included in the internal area of an arbitrary graphic included in the drawing control primitive. This makes it possible to determine the positional relationship between the curved surface model element and the drawing control primitive faster than the normal determination.
Note that the curved surface model stored in the model storage unit 101 used for the determination by the model control information calculation unit 102 is not rewritten.
When the model control information calculation unit 102 receives a desired curved surface model and vector data definition position from the model storage unit 101, the model control information calculation unit 102 sends the same data as the received curved surface model and vector data definition position to the input model control unit 103. To the model storage unit 101.

[入力モデル制御部103]
入力モデル制御部103は、モデル制御情報算出部102から曲面モデル要素ごとの判定結果を示すモデル制御情報を受け取り、モデル記憶部101から、モデル制御情報算出部102が受け取ったものと同じ曲面モデルおよびベクタデータ定義位置を受け取り、モデル制御情報に含まれる判定結果が「真」である曲面モデル要素を含む新たな曲面モデルを再定義するとともに、再定義された曲面モデル(以下、再定義曲面モデルという)を構成する要素である曲面モデル要素(以下、再定義曲面モデル要素)ごとに、再定義曲面モデルに含まれる全ての再定義曲面モデル要素が同一平面上に定義されているかどうかを判定する。再定義曲面モデル要素は、モデル記憶部101から受け取った曲面モデルのうち、モデル制御情報に含まれる判定結果が「真」である曲面モデル要素を抽出して曲面を構成したものであるので、再定義曲面モデル要素を次のレンダリング処理への入力とする。よって、モデル制御情報算出部102で算出されたモデル制御情報に含まれる判定結果が「偽」の曲面モデル要素については以降の処理がおこなわれなくなる。すなわち、入力モデル制御部103は、判定結果が「真」である曲面モデル要素を再定義曲面モデル要素とする。
[Input model control unit 103]
The input model control unit 103 receives model control information indicating a determination result for each curved surface model element from the model control information calculation unit 102, and receives from the model storage unit 101 the same curved surface model and model model information received by the model control information calculation unit 102. A new curved surface model including a curved surface model element that receives a vector data definition position and the determination result included in the model control information is “true” is redefined, and a redefined curved surface model (hereinafter referred to as a redefined curved surface model). For each curved surface model element (hereinafter referred to as a redefined curved surface model element) that is a component of (), it is determined whether all the redefined curved surface model elements included in the redefined curved surface model are defined on the same plane. Since the redefined curved surface model element is a curved surface model extracted from the curved surface model received from the model storage unit 101 and the determination result included in the model control information is “true”, The defined curved surface model element is used as an input to the next rendering process. Therefore, subsequent processing is not performed for curved surface model elements whose determination result included in the model control information calculated by the model control information calculation unit 102 is “false”. That is, the input model control unit 103 sets a curved surface model element whose determination result is “true” as a redefined curved surface model element.

また、入力モデル制御部103は、再定義曲面モデルに対しては、再定義曲面モデルが平面であるか、つまり再定義曲面モデルに含まれる全ての再定義曲面モデル要素が同一平面上にあるかどうかの判定を行う。平面部分の判定は、例えば、曲面モデルが定義される空間における再定義曲面モデルに含まれる再定義曲面モデル要素の法線ベクトルの方向が全て、ほぼ同一であるかどうかを調べることで判定可能である。法線ベクトルの方向が全てほぼ同一であるかどうかは以下の手順で判定することができる。なお、以下で扱う法線ベクトルは、全て単位ベクトルとなるように長さが調整されているものとする。
1)再定義曲面モデルから任意の再定義曲面モデル要素を1つ選び出し、その法線ベクトルを基準となる法線ベクトルVとして定義する。
2)上記「1)」で選択した再定義曲面モデル要素以外の再定義曲面モデル要素の法線ベクトルとVとの内積を求め、その値が1.0に近い値をとるかを判定する。近い値かどうかの判定は、例えば、求めた内積と1.0との値の差が、あらかじめユーザによって定義された閾値以内の値であるかどうかを判定する。
3)上記「2)」の判定を全ての再定義曲面モデル要素に対してそれぞれ行い、求めた全ての内積が閾値以内の場合には、再定義曲面モデルが平面を構成するとして、再定義曲面モデルを平面ベクトルレンダリング部109に出力する。それ以外の場合、すなわち求めた内積と1.0との値の差が閾値を超える再定義曲面モデル要素が存在した場合は、再定義曲面モデルが平面を構成しないとして、再定義曲面モデルを曲面ベクトルレンダリング部107に出力する。なお、法線ベクトルは、モデル記憶部101に記憶されている曲面モデルごとに予め計算してモデル記憶部101に記憶し、入力モデル制御部103においてその法線ベクトルの値を参照して曲面モデルが平面であるかどうかの判定をおこなってもよいし、入力モデル制御部103が曲面モデル要素の各頂点の位置座標からこの曲面モデル要素の法線ベクトルを計算してもよい。
Also, the input model control unit 103 determines whether the redefined surface model is a plane for the redefined surface model, that is, whether all the redefined surface model elements included in the redefined surface model are on the same plane. Judge whether or not. The plane part can be determined, for example, by examining whether the normal vector directions of the redefined surface model elements included in the redefined surface model in the space where the surface model is defined are almost the same. is there. Whether or not the directions of the normal vectors are almost the same can be determined by the following procedure. Note that the lengths of normal vectors to be treated below are adjusted so as to be all unit vectors.
1) One arbitrary redefined surface model element is selected from the redefined surface model, and the normal vector is defined as a reference normal vector Vb .
2) An inner product of the normal vector of the redefined surface model element other than the redefined surface model element selected in the above “1)” and V b is obtained, and it is determined whether the value takes a value close to 1.0. . For example, it is determined whether or not the difference between the calculated inner product and 1.0 is a value within a threshold defined in advance by the user.
3) The determination of “2)” above is performed for all the redefined curved surface model elements, and if all the inner products obtained are within the threshold value, the redefined curved surface model constitutes a plane and the redefined curved surface The model is output to the plane vector rendering unit 109. In other cases, that is, when there is a redefined curved surface model element in which the difference between the calculated inner product and 1.0 exceeds the threshold value, the redefined curved surface model is determined to be a curved surface by assuming that the redefined curved surface model does not constitute a plane. The data is output to the vector rendering unit 107. The normal vector is calculated in advance for each curved surface model stored in the model storage unit 101 and stored in the model storage unit 101, and the input model control unit 103 refers to the value of the normal vector to refer to the curved surface model. It may be determined whether or not is a plane, or the input model control unit 103 may calculate a normal vector of the curved surface model element from the position coordinates of each vertex of the curved surface model element.

[曲面ベクトルレンダリング部107]
曲面ベクトルレンダリング部107は、描画制御用プリミティブ記憶部106から描画制御用プリミティブデータを受け取り、入力モデル制御部103から、平面を構成しないと判定された再定義曲面モデルを受け取り、再定義曲面モデルと描画制御用プリミティブデータとから最終的な出力とするラスタデータを生成して提示部108へ送る。曲面ベクトルレンダリング部107が描画制御用プリミティブ記憶部106から受け取る描画制御用プリミティブデータについては、例えばモデル制御情報算出部102が描画制御用プリミティブ記憶部106から描画制御用プリミティブデータを抽出する際に、描画制御用プリミティブ記憶部106が同じ描画制御用プリミティブデータを曲面ベクトルレンダリング部107および平面ベクトルレンダリング部109へ渡す。他の例として、モデル制御情報算出部102が直接、描画制御用プリミティブ記憶部106から抽出した描画制御用プリミティブデータを曲面ベクトルレンダリング部107および平面ベクトルレンダリング部109に渡してもよい。さらに他の例として、入力モデル制御部103が、再定義曲面モデルが同一平面上にないと判定した場合には、この判定結果をモデル制御情報算出部102に返し、モデル制御情報算出部102が描画制御用プリミティブデータを曲面ベクトルレンダリング部107に渡し、再定義曲面モデルが同一平面上にあると判定した場合には、この判定結果をモデル制御情報算出部102に返し、モデル制御情報算出部102が描画制御用プリミティブデータを平面ベクトルレンダリング部109に渡してもよい。
[Curved surface vector rendering unit 107]
The curved surface vector rendering unit 107 receives the rendering control primitive data from the rendering control primitive storage unit 106, receives the redefined curved surface model determined not to constitute a plane from the input model control unit 103, and receives the redefined curved surface model and Raster data as final output is generated from the drawing control primitive data and sent to the presentation unit 108. Regarding the drawing control primitive data received by the curved surface vector rendering unit 107 from the drawing control primitive storage unit 106, for example, when the model control information calculation unit 102 extracts the drawing control primitive data from the drawing control primitive storage unit 106, The drawing control primitive storage unit 106 passes the same drawing control primitive data to the curved surface vector rendering unit 107 and the planar vector rendering unit 109. As another example, the model control information calculation unit 102 may directly pass the drawing control primitive data extracted from the drawing control primitive storage unit 106 to the curved surface vector rendering unit 107 and the plane vector rendering unit 109. As yet another example, when the input model control unit 103 determines that the redefined curved surface model is not on the same plane, the determination result is returned to the model control information calculation unit 102, and the model control information calculation unit 102 If the primitive data for drawing control is passed to the curved surface vector rendering unit 107 and it is determined that the redefined curved surface model is on the same plane, the determination result is returned to the model control information calculating unit 102 and the model control information calculating unit 102 May pass the primitive data for drawing control to the plane vector rendering unit 109.

次に、曲面ベクトルレンダリング部107に含まれる各ブロックの動作について詳細に説明する。
曲面ベクトルレンダリング部107は、図7の左側の図に示すように描画用パラメータ算出部701、描画属性制御情報算出部202、ラスタデータ生成部703、およびラスタデータ記憶部704を含む。
Next, the operation of each block included in the curved surface vector rendering unit 107 will be described in detail.
The curved surface vector rendering unit 107 includes a drawing parameter calculation unit 701, a drawing attribute control information calculation unit 202, a raster data generation unit 703, and a raster data storage unit 704 as shown in the left diagram of FIG. 7.

[描画用パラメータ算出部701]
描画用パラメータ算出部701は、入力モデル制御部103から、平面を構成しないと判定された再定義曲面モデルを受け取り、後述する手法で描画用パラメータを算出する。描画用パラメータとは、曲面モデル(ここでは、再定義曲面モデル)をスクリーンに投影した際にそれぞれの曲面モデル要素(ここでは、再定義曲面モデル要素)が占めるピクセルごとに、ベクタ定義空間における位置座標、色情報および透明度を含む情報を示すパラメータである。
描画用パラメータ算出部701は、再定義曲面モデルに加え、さらに必要であればカメラパラメータや投影方法を読み込む。この場合、描画用パラメータ算出部701は、後述のラスタデータ生成部703で生成されるラスタデータの各ピクセルが、ベクタ定義空間のどの位置に対応するかを表すパラメータ、およびどのような色が定義されていればよいかを算出する。これにより、各ピクセルのベクタ定義空間での位置座標(以下、対応位置という)、各ピクセルの色情報、および透明度などのピクセルの属性情報(以下、ピクセル属性情報という)が決定され、これを描画用パラメータとする。すなわち、描画用パラメータ算出部701はピクセルごとに描画用パラメータを算出する。
[Drawing Parameter Calculation Unit 701]
The drawing parameter calculation unit 701 receives from the input model control unit 103 a redefined curved surface model that is determined not to constitute a plane, and calculates drawing parameters by a method described later. The drawing parameters are the positions in the vector definition space for each pixel occupied by each curved surface model element (here, the redefined curved surface model element) when the curved surface model (here, the redefined curved surface model) is projected onto the screen. It is a parameter indicating information including coordinates, color information, and transparency.
In addition to the redefined curved surface model, the drawing parameter calculation unit 701 reads camera parameters and a projection method if necessary. In this case, the drawing parameter calculation unit 701 defines parameters indicating which positions in the vector definition space each pixel of the raster data generated by the raster data generation unit 703 described later corresponds to, and what color is defined. It is calculated whether it should be done. As a result, the position coordinates of each pixel in the vector definition space (hereinafter referred to as corresponding position), the color information of each pixel, and pixel attribute information (hereinafter referred to as pixel attribute information) such as transparency are determined and rendered. Parameter. That is, the drawing parameter calculation unit 701 calculates a drawing parameter for each pixel.

なお本実施形態では、ベクタ定義空間における独自の位置座標として例えばテクスチャ座標を用いる。テクスチャ座標を利用する場合、描画用パラメータ算出部701は、グラフィックスの分野で一般的に用いられるテクスチャマッピングの手法を用いて曲面モデルとベクタ定義空間との対応を計算し、ベクタ定義空間での位置を算出できる。
各ピクセルの対応位置(例えばテクスチャ座標)、各ピクセルの色情報、および透明度をどのようにして算出するかについては、曲面モデルをレンダリングする際のレンダリング方法と同様の方法で行うことができる。例えば、曲面モデルを微細な三角形面の集合で近似し、各ピクセル属性情報がどの三角形面で決定されるかを計算することで求めることが可能である。この計算方法は三角形面をレンダリングする際のピクセル属性情報の決定方法と同じであり、グラフィックスの分野では一般的な方法であるため説明は省略する。また、曲面モデルからのピクセル属性情報の決定方法はこれに限るものではない。例えば、各ピクセルから、レンダリングする際の視線の方向に半直線を延ばし、曲面モデルと半直線の交点部分の対応位置(例えばテクスチャ座標)、色情報、透明度などをピクセル属性情報とする。また、この方法に限定するものでもなく、ピクセルごとにピクセル属性情報が算出可能な他の方法を用いてもよい。
またベクタ定義空間に対応する描画用パラメータは、上記の形式に限定されるものではなく、グラフィックスの分野において一般的に利用される他のデータを用いるか、あるいは含んでもよい。また、例えば、あらかじめ決定される式にパラメータとして代入されるような、独自に定義した値であってもよい。また、曲率など曲面モデルから算出されるパラメータを利用してこのパラメータを変更したものを含んでもよい。
In the present embodiment, for example, texture coordinates are used as unique position coordinates in the vector definition space. When using the texture coordinates, the drawing parameter calculation unit 701 calculates the correspondence between the curved surface model and the vector definition space by using a texture mapping method generally used in the graphics field. The position can be calculated.
How to calculate the corresponding position (for example, texture coordinates) of each pixel, the color information of each pixel, and the transparency can be performed by a method similar to the rendering method when rendering the curved surface model. For example, it can be obtained by approximating a curved surface model with a set of fine triangular faces and calculating which triangular face each pixel attribute information is determined on. This calculation method is the same as the method for determining pixel attribute information when rendering a triangular surface, and since it is a common method in the graphics field, description thereof is omitted. Further, the method for determining the pixel attribute information from the curved surface model is not limited to this. For example, a half line is extended from each pixel in the direction of the line of sight when rendering, and the corresponding position (for example, texture coordinates) of the intersection of the curved model and the half line, color information, transparency, etc. are used as pixel attribute information. Further, the present invention is not limited to this method, and other methods that can calculate pixel attribute information for each pixel may be used.
Further, the drawing parameters corresponding to the vector definition space are not limited to the above format, and other data generally used in the graphics field may be used or included. For example, it may be a uniquely defined value that is substituted as a parameter in a formula determined in advance. Moreover, what changed this parameter using the parameter calculated from curved surface models, such as a curvature, may be included.

[描画判定情報算出部702]
描画判定情報算出部702は、描画制御用プリミティブ記憶部106から描画制御用プリミティブデータを受け取り、描画用パラメータ算出部701から描画用パラメータを受け取り、描画判定情報を算出する。描画判定情報とは、ベクタデータが形成する閉領域に各ピクセルの対応位置が含まれるかどうかを判定するための情報であり、ここでは後述する描画判定変数である。この対応位置の判定方法としては、例えば、以下の方法が挙げられる。
[Drawing determination information calculation unit 702]
The drawing determination information calculation unit 702 receives drawing control primitive data from the drawing control primitive storage unit 106, receives drawing parameters from the drawing parameter calculation unit 701, and calculates drawing determination information. The drawing determination information is information for determining whether or not the corresponding position of each pixel is included in the closed region formed by the vector data, and is a drawing determination variable described later. Examples of the method for determining the corresponding position include the following methods.

1)描画制御用プリミティブデータに含まれる任意の図形データ(ここでは三角形とする)を1つ読み込む。
2)この図形データ、またはこの図形データの一部分が、描画用パラメータ算出部701で算出された各ピクセルの対応位置を含むかどうかを調べる。
3)対応位置がこの図形データの内部領域に含まれれば描画判定変数を1とする。
ここで、描画判定変数とは、出力用のラスタデータにピクセルを書き込むかどうかを判定する変数である。また、読み込んだ描画制御用プリミティブが、直線輪郭から生成された三角形の場合と曲線輪郭から生成された三角形の場合とで判定の処理が異なる。
直線輪郭から生成された三角形の場合は、各ピクセルの対応位置が三角形の内部に含まれていれば描画判定変数に1を加算する。
一方、曲線輪郭から生成された三角形の場合、描画制御用プリミティブ生成部105での生成ルールによって処理が異なる。第1の条件は、各ピクセルの対応位置が三角形の内部に含まれていれば「真」というものであり、生成ルールによらず共通の条件である。第2の条件は描画制御用プリミティブデータの生成ルールによって異なる。直線輪郭が、制御点を無視してベクタデータに含まれる直線および曲線の始点と終点を線分で結ぶことにより生成される場合、曲線の凸領域内に各ピクセルの対応位置が含まれていれば「真」となる。また、2種類の曲線輪郭により、直線輪郭の生成の際に制御点を含むかどうか切り替える場合、すなわち凸曲線輪郭では制御点を無視して始点と終点との2点を結び、凹曲線輪郭では始点と制御点と終点との3点をこの順番に結び、これらの線分を連結して直線輪郭を生成する場合、凸曲線(曲線の凸領域が図形を表す曲線)の凸領域、あるいは凹曲線(曲線の凹領域が図形を表す曲線)の凹領域の、どちらかに含まれていれば三角形の一部に含まれるものとして「真」となる。これらの2つの条件が「真」である場合に、描画判定変数に1を加算する。なお、ここでは1を加算しているが、奇数であれば1でなくてもよい。
1) One arbitrary graphic data (here, a triangle) included in the drawing control primitive data is read.
2) It is checked whether this graphic data or a part of this graphic data includes the corresponding position of each pixel calculated by the drawing parameter calculation unit 701.
3) If the corresponding position is included in the internal area of the graphic data, the drawing determination variable is set to 1.
Here, the drawing determination variable is a variable for determining whether or not to write a pixel to the output raster data. Also, the determination process differs depending on whether the read drawing control primitive is a triangle generated from a straight line outline or a triangle generated from a curved outline.
In the case of a triangle generated from a straight outline, 1 is added to the drawing determination variable if the corresponding position of each pixel is included within the triangle.
On the other hand, in the case of a triangle generated from a curved contour, processing differs depending on the generation rule in the drawing control primitive generation unit 105. The first condition is “true” if the corresponding position of each pixel is included in the triangle, and is a common condition regardless of the generation rule. The second condition differs depending on the rule for generating primitive data for drawing control. If a straight line contour is generated by linking the start and end points of a straight line and a curve included in vector data ignoring control points, the corresponding position of each pixel is included in the convex area of the curve. “True”. In addition, when switching whether or not to include a control point when generating a straight contour by two types of curved contours, that is, in a convex curved contour, the control point is ignored and the two points of the start point and the end point are connected, and in the concave curved contour When connecting the three points of the start point, the control point, and the end point in this order, and connecting these line segments to generate a straight outline, the convex region of the convex curve (the curved convex region represents a figure) or concave If it is included in one of the concave areas of the curve (the curved concave area represents a figure), it is “true” as being included in a part of the triangle. When these two conditions are “true”, 1 is added to the drawing determination variable. Although 1 is added here, it may not be 1 if it is an odd number.

上記1)から3)を、全ての描画制御用プリミティブデータに含まれる全ての図形データ(ここでは三角形)について判定されるまで繰り返すことにより、各ピクセルの対応位置が、描画制御用プリミティブまたは描画制御用プリミティブの一部に含まれると判定された回数が得られる。本実施形態ではこの描画判定変数を描画判定情報とする。
例えば、描画制御用プリミティブが3つの直線輪郭から生成された三角形で構成されており、各ピクセルの対応位置がそのうちの2つの三角形の内部に相当する場合、描画判定変数は2となる。また、ベクタデータが色情報やアルファ値などの情報を保持しており、必要であれば、併せて各ピクセルの対応位置での色情報やアルファ値を算出してもよい。
By repeating the above 1) to 3) until determination is made for all graphic data (here, triangles) included in all drawing control primitive data, the corresponding position of each pixel becomes the drawing control primitive or drawing control. The number of times determined to be included in a part of the primitive is obtained. In the present embodiment, this drawing determination variable is used as drawing determination information.
For example, when the drawing control primitive is composed of triangles generated from three straight outlines, and the corresponding position of each pixel corresponds to the inside of two of the triangles, the drawing determination variable is 2. Further, the vector data holds information such as color information and alpha value, and if necessary, the color information and alpha value at the corresponding position of each pixel may be calculated together.

[ラスタデータ生成部703]
ラスタデータ生成部703は、描画判定情報算出部702から描画判定情報(描画判定変数)および描画用パラメータを受け取り、ピクセル属性情報を用いて画面表示用のラスタデータに書き込みを行うかどうか、すなわち描画するかどうかをピクセルごとに決定して、ラスタデータを生成する。ラスタデータ生成部703は、ピクセルの描画判定変数が奇数である場合に、対応位置に対応するピクセルの属性値を描画用パラメータに基づいて生成し、ラスタデータにピクセルを書き込む。このとき、ベクタデータから算出された色情報やアルファ値があれば、すでに算出されているピクセル属性情報の色情報やアルファ値などの該当する部分をベクタデータから算出された値で置き換える、またはすでに算出されているピクセル属性情報の色情報やアルファ値とブレンドするなどの処理を行ってもよい。描画判定変数が奇数であるとは、直線輪郭から生成された描画制御用プリミティブデータ、および曲線輪郭から生成された描画制御用プリミティブデータに定義されている曲線の図形内部側の領域を全てラスタライズした場合に、そのピクセルが奇数回書き込まれるということと等しくなる。これを上記特開2007−241878号公報で示されているステンシルデータの生成に置き換えて考えると、ステンシルデータのビット反転が奇数回おこなわれ、0以外の値となり、図形内部と判定されることと等しくなる。これは、上記特開2007−241878号公報のステンシルデータと同様の結果を得ることができる。
[Raster data generation unit 703]
The raster data generation unit 703 receives the drawing determination information (drawing determination variable) and the drawing parameters from the drawing determination information calculation unit 702, and uses pixel attribute information to write the screen display raster data. Whether to do this is determined for each pixel, and raster data is generated. When the pixel drawing determination variable is an odd number, the raster data generation unit 703 generates a pixel attribute value corresponding to the corresponding position based on the drawing parameter, and writes the pixel to the raster data. At this time, if there is color information or alpha value calculated from vector data, the corresponding part such as color information or alpha value of pixel attribute information already calculated is replaced with a value calculated from vector data, or already Processing such as blending with the color information or alpha value of the calculated pixel attribute information may be performed. The drawing determination variable is an odd number. Rasterized all areas inside the figure of the curve defined in the drawing control primitive data generated from the straight line outline and the drawing control primitive data generated from the curve outline. The case is equivalent to the pixel being written an odd number of times. If this is replaced with the generation of stencil data disclosed in the above-mentioned Japanese Patent Application Laid-Open No. 2007-241878, the bit inversion of the stencil data is performed an odd number of times, resulting in a value other than 0 and being determined to be inside the figure. Will be equal. This can obtain the same result as the stencil data of the above-mentioned Japanese Patent Application Laid-Open No. 2007-241878.

[ラスタデータ記憶部704]
ラスタデータ記憶部704は、ラスタデータ生成部703からラスタデータを受け取って記憶し、提示部108へ送る。ただし、ラスタデータの構成はこの形式に限定されるものではなく、グラフィックスの分野において一般的に利用される他のデータを含んでもよい。
[Raster data storage unit 704]
The raster data storage unit 704 receives raster data from the raster data generation unit 703, stores it, and sends it to the presentation unit 108. However, the configuration of the raster data is not limited to this format, and may include other data generally used in the graphics field.

[平面ベクトルレンダリング部109]
平面ベクトルレンダリング部109は、描画制御用プリミティブ記憶部106から描画制御用プリミティブデータを参照して抽出し、入力モデル制御部103から、平面を構成すると判定された再定義曲面モデルを受け取り、再定義曲面モデルと描画制御用プリミティブデータとから最終的な出力とするラスタデータを生成して提示部108へ送る。
次に、平面ベクトルレンダリング部109に含まれる各ブロックの動作について詳細に説明する。
平面ベクトルレンダリング部109は、図7の右側の図に示すようにステンシルデータ生成部705、および平面レンダリング結果データ生成部706を含む。
[Planar vector rendering unit 109]
The plane vector rendering unit 109 extracts the drawing control primitive data from the drawing control primitive storage unit 106 with reference to the drawing control primitive data, receives from the input model control unit 103 the redefined curved surface model determined to constitute the plane, and redefines it. Raster data that is the final output is generated from the curved surface model and drawing control primitive data, and is sent to the presentation unit 108.
Next, the operation of each block included in the plane vector rendering unit 109 will be described in detail.
The plane vector rendering unit 109 includes a stencil data generation unit 705 and a plane rendering result data generation unit 706 as shown in the diagram on the right side of FIG.

[ステンシルデータ生成部705]
ステンシルデータ生成部705は、描画制御用プリミティブ記憶部106から描画制御用プリミティブデータを受け取り、入力モデル制御部103から平面を構成すると判定された再定義曲面モデルを受け取り、描画制御用プリミティブデータの描画制御用プリミティブの内部のピクセルをラスタライズすることによってステンシルデータを生成する。生成されたステンシルデータを、平面レンダリング結果データ生成部706へ送る。
ステンシルデータとは、最終的に提示部108に提示する解像度と同じ解像度を持つ画像データである。ステンシルデータの各ピクセルには数ビット程度の数値が割り当てられており、毎フレーム全ての描画に先立って各ピクセルが0に初期化される。
ステンシルデータ生成部705は、描画制御用プリミティブ記憶部106に記憶されている直線輪郭から生成された描画制御用プリミティブデータおよび曲線輪郭から生成された描画制御用プリミティブデータを読み込みラスタライズする。
[Stencil data generation unit 705]
The stencil data generation unit 705 receives drawing control primitive data from the drawing control primitive storage unit 106, receives a redefined curved surface model determined to constitute a plane from the input model control unit 103, and draws drawing control primitive data. Stencil data is generated by rasterizing pixels inside the control primitive. The generated stencil data is sent to the planar rendering result data generation unit 706.
Stencil data is image data having the same resolution as that finally presented to the presentation unit 108. A numerical value of about several bits is assigned to each pixel of the stencil data, and each pixel is initialized to 0 prior to drawing every frame.
The stencil data generation unit 705 reads and rasterizes the drawing control primitive data generated from the straight contour stored in the drawing control primitive storage unit 106 and the drawing control primitive data generated from the curved contour.

具体的には、例えば、直線輪郭から生成された描画制御用プリミティブデータについては、各描画制御用プリミティブの内部領域にあるピクセルをラスタライズする。曲線輪郭から生成された描画制御用プリミティブについては、その三角形の内側にあるピクセルのうち、曲線の凸領域に属するピクセルをラスタライズする。このとき、ラスタライズされたピクセルに対応するステンシルデータのピクセル値を、各三角形についてビット反転する。この手法に関しては、例えば、特開2007−241878号公報の手法を適用することができる。   Specifically, for example, with respect to drawing control primitive data generated from a straight outline, pixels in the internal area of each drawing control primitive are rasterized. With respect to the drawing control primitive generated from the curved contour, the pixels belonging to the convex region of the curved line among the pixels inside the triangle are rasterized. At this time, the pixel value of the stencil data corresponding to the rasterized pixel is bit-inverted for each triangle. With respect to this method, for example, the method disclosed in Japanese Patent Application Laid-Open No. 2007-241878 can be applied.

また、例えばラスタライズ方法としては、非ゼロ規則に基づいたラスタライズを行うことが考えられる。このとき、ラスタライズされたピクセルのうち描画制御用プリミティブである三角形を構成する各点を、時計回りしたときの三角形に含まれるピクセルの値をインクリメント(+1)し、反時計回りしたときの三角形に含まれるピクセルの値をデクリメント(−1)する。直線輪郭から生成された描画制御用プリミティブについては、各描画制御用プリミティブの内部領域にある全てのピクセルがラスタライズされる。曲線輪郭から生成された描画制御用プリミティブについては、その三角形の内側にあるピクセルのうち、曲線の凸領域に属するピクセルのみがラスタライズされる。   For example, as a rasterization method, it is conceivable to perform rasterization based on a non-zero rule. At this time, among the rasterized pixels, each point constituting the triangle which is a rendering control primitive is incremented (+1) by adding the value of the pixel included in the triangle when rotated clockwise, to the triangle when rotated counterclockwise. Decrement (-1) the value of the contained pixel. With respect to the drawing control primitive generated from the straight outline, all the pixels in the inner area of each drawing control primitive are rasterized. For the drawing control primitive generated from the curved contour, only the pixels belonging to the convex region of the curved line among the pixels inside the triangle are rasterized.

[平面レンダリング結果データ生成部706]
平面レンダリング結果データ生成部706は、ステンシルデータ生成部705からステンシルデータを受け取り、ステンシルデータを参照しながら出力とするラスタデータを生成し、提示部108へ送る。出力するラスタデータは、再定義曲面モデルをスクリーンに投影した際に再定義曲面モデルが占めるピクセルをラスタライズすることにより生成する。ただし、これらのピクセルのうち、ラスタライズされるのはそのピクセル値が0以外である場所に限られる。
このラスタデータは、最終的に提示部108に提示する解像度と同じ解像度を持つ画像データであり、ラスタデータの各ピクセルには複数の色成分(例えば、RGBA)ごとに数ビット程度の数値が割り当てられている。
[Plane rendering result data generation unit 706]
The planar rendering result data generation unit 706 receives the stencil data from the stencil data generation unit 705, generates raster data to be output while referring to the stencil data, and sends the raster data to the presentation unit 108. The raster data to be output is generated by rasterizing the pixels occupied by the redefined surface model when the redefined surface model is projected onto the screen. However, among these pixels, rasterization is limited only to locations where the pixel value is other than zero.
This raster data is image data having the same resolution as that finally presented to the presentation unit 108, and each pixel of the raster data is assigned a numerical value of several bits for each of a plurality of color components (for example, RGBA). It has been.

[提示部108]
提示部108は、曲面ベクトルレンダリング部107または平面ベクトルレンダリング部109からラスタデータを受け取り、必要に応じてスクリーンに表示を行う。
[Presentation unit 108]
The presentation unit 108 receives raster data from the curved surface vector rendering unit 107 or the planar vector rendering unit 109 and displays it on the screen as necessary.

なお、平面ベクトルレンダリング部109および曲面ベクトルレンダリング部107で出力される結果は、ビットマップやJPEG、GIFなどのグラフィックス分野で一般的に用いられる画像形式でラスタデータ記憶部704に保存されてもよいし、ネットワークを通じて出力結果、あるいは保存されたデータが転送されてもよい。
さらに図1では、モデル記憶部101とベクタデータ記憶部104および描画制御用プリミティブ記憶部106を異なるブロックとして表記しているが、これらは単一のメモリ上にまとめて構成してもよいし、異なる複数のメモリ上に分割して構成してもよい。
また本実施形態では、ベクタ定義空間は例えば各軸が0から1までの範囲で定義される2次元の空間であるとするが、ベクタ定義空間はこの形式に限定されるものではない。各軸が0から1以外の範囲で定義されてもよい。
また、モデル制御情報算出部102は、描画制御用プリミティブ記憶部106から受け取った描画制御用プリミティブデータと、モデル記憶部101から受け取った曲面モデルとに対して、ベクタデータ定義位置にある曲面モデル要素ごとに最終的な入力曲面モデル要素とするかどうかの判定をおこなわなくてもよい。この場合、モデル制御情報算出部102は、受け取った曲面モデル要素全てを再定義曲面モデル要素とするようにモデル制御情報を設定して、入力モデル制御部103に送る。このとき、入力モデル制御部103は、このモデル制御情報を参照して、モデル記憶部101から受け取った曲面モデル要素について再定義曲面モデル要素を定義する。すなわち、この場合はモデル記憶部101から受け取った曲面モデル要素全てが再定義曲面モデル要素として定義される。入力モデル制御部103は、この再定義曲面モデル要素に対して同一平面にあるかどうかを判定する。これにより、曲面モデル要素と描画制御用プリミティブとの交差、および内包の判定分の処理コストを減らすことができる。
Note that the results output from the plane vector rendering unit 109 and the curved surface vector rendering unit 107 may be stored in the raster data storage unit 704 in an image format generally used in the graphics field such as bitmap, JPEG, or GIF. Alternatively, the output result or stored data may be transferred through the network.
Further, in FIG. 1, the model storage unit 101, the vector data storage unit 104, and the drawing control primitive storage unit 106 are shown as different blocks, but these may be configured together on a single memory, You may divide and comprise on a plurality of different memories.
In this embodiment, the vector definition space is, for example, a two-dimensional space in which each axis is defined in the range from 0 to 1, but the vector definition space is not limited to this format. Each axis may be defined in a range other than 0 to 1.
In addition, the model control information calculation unit 102 has a curved surface model element at a vector data definition position with respect to the drawing control primitive data received from the drawing control primitive storage unit 106 and the curved surface model received from the model storage unit 101. It is not necessary to determine whether or not to make the final input curved surface model element every time. In this case, the model control information calculation unit 102 sets the model control information so that all the received curved surface model elements are redefined curved surface model elements, and sends the model control information to the input model control unit 103. At this time, the input model control unit 103 refers to the model control information and defines a redefined curved surface model element for the curved surface model element received from the model storage unit 101. That is, in this case, all the curved surface model elements received from the model storage unit 101 are defined as redefined curved surface model elements. The input model control unit 103 determines whether or not the redefined curved surface model element is in the same plane. Thereby, it is possible to reduce the processing cost for the intersection determination of the curved surface model element and the drawing control primitive and the determination of the inclusion.

以上に示した実施形態によれば、ベクタデータをレンダリングする際に、曲面モデルが同一平面上に定義されているかをベクタデータ単位で判定して、コストの低い平面レンダリングが利用できる場合にはそちらを利用するように切り換えることで、レンダリング対象に曲面レンダリングを用いる必要があるオブジェクトと平面レンダリングでよいオブジェクトが混在している場合でも、オブジェクトの状況に応じて適したレンダリング方法を選択することが可能であり、ベクタデータをレンダリングする際の処理効率を向上させる。   According to the embodiment described above, when rendering vector data, it is determined in vector data units whether a curved surface model is defined on the same plane, and if plane rendering with low cost can be used, By switching to use, it is possible to select a rendering method that is suitable for the situation of the object even when objects that need to use curved surface rendering and objects that can be planar rendering are mixed. It improves the processing efficiency when rendering vector data.

(第1の変形例)
本変形例では、モデル制御情報算出部102において三角形が交差、および一方の三角形がもう一方の三角形の内部領域に完全に含まれる状態になっているかを判定する際に、曲面モデル要素とベクタデータとで判定を行うことが上記実施形態とは異なる。上記実施形態では曲面モデル要素に対し描画制御用プリミティブを判定対象としているため、ベクタデータ単位でレンダリング方法を選択する場合にベクタデータの形状によっては余分な領域が判定対象となることがある。本変形例では、曲面モデル要素に対しベクタ図形の輪郭線を判定対象としているので、ベクタデータにあわせて三角形を選択することができる。以下に、上記実施形態とは異なる動作を行うブロックのみ説明する。
(First modification)
In this modification, the model control information calculation unit 102 determines whether the triangle intersects and one triangle is completely included in the inner area of the other triangle. This is different from the above embodiment. In the above embodiment, since the rendering control primitive is a determination target for the curved surface model element, when a rendering method is selected in units of vector data, an extra region may be a determination target depending on the shape of the vector data. In the present modification, the contour of the vector graphic is set as the determination target for the curved surface model element, so that a triangle can be selected according to the vector data. Only blocks that perform operations different from those in the above embodiment will be described below.

描画制御用プリミティブ生成部105は、描画制御用プリミティブデータとともにベクタデータを描画制御用プリミティブ記憶部106へ送る。
描画制御用プリミティブ記憶部106は、描画制御用プリミティブ生成部105から受け取った描画制御用プリミティブデータおよびベクタデータを記憶する。
The drawing control primitive generation unit 105 sends the vector data together with the drawing control primitive data to the drawing control primitive storage unit 106.
The drawing control primitive storage unit 106 stores drawing control primitive data and vector data received from the drawing control primitive generation unit 105.

モデル制御情報算出部102は、モデル記憶部101から所望の曲面モデルおよびベクタデータ定義位置を抽出し、描画制御用プリミティブ記憶部106から所望のベクタデータを抽出し、曲面モデル要素ごとに判定を行い、曲面モデル要素ごとの判定結果を示すモデル制御情報を入力モデル制御部103へ送る。なお、モデル制御情報算出部102は、ベクタデータ記憶部104からベクタデータを受け取ってもよい。
判定方法としては、ベクタデータに含まれる制御点、始点、および終点の接続関係を示すベクタデータ図形(例えば図3)の輪郭線を追跡した場合に出現する、制御点を含む全ての点で構成される多角形と曲面モデル要素とが交差しているかどうか、または、この多角形と曲面モデル要素とについて、一方がもう一方の内部領域に完全に含まれる状態になっているかどうかを判定する。なお、描画制御用プリミティブ記憶部106からこの多角形を得てもよい。例えば、曲線輪郭から定義される描画制御用プリミティブ(三角形)と直線輪郭で示される描画制御用プリミティブ(多角形)を上述した判定に用いる多角形として同様の判定を行ってもよい。上述した判定の具体的な判定方法については、例えば“中前栄八郎、西田友是:3次元コンピュータグラフィックス、pp63−72、昭晃堂”に記載されている方法を用いることができるため、ここでの詳細な説明は省略する。
しかしながら、判定方法はこれに限定されるものではなく、曲面モデルがベクタ定義空間に占める領域が、ベクタ図形(例えば図2の図形)が占める領域と重なるかどうかを調べることができればよい。互いに交差している場合と、ベクタデータ図形(例えば図3の図形)の輪郭線を追跡してできる多角形または曲面モデル要素のどちらか一方が、もう一方に含まれている場合とを区別する必要は無く、また描画制御用プリミティブデータが定義されているため、例えば図8に示すフローチャートのような方法でも判定が可能である。
The model control information calculation unit 102 extracts a desired curved surface model and vector data definition position from the model storage unit 101, extracts desired vector data from the drawing control primitive storage unit 106, and performs determination for each curved surface model element. Then, model control information indicating the determination result for each curved surface model element is sent to the input model control unit 103. Note that the model control information calculation unit 102 may receive vector data from the vector data storage unit 104.
The determination method is composed of all points including control points that appear when the outline of a vector data figure (for example, FIG. 3) indicating the connection relationship between the control points, start points, and end points included in the vector data is traced. It is determined whether the polygon and the curved surface model element intersect with each other, or whether one of the polygon and the curved surface model element is completely included in the other internal region. The polygon may be obtained from the drawing control primitive storage unit 106. For example, a drawing control primitive (triangle) defined by a curved contour and a drawing control primitive (polygon) defined by a straight contour may be similarly determined as polygons used for the above-described determination. As a specific determination method for the above-described determination, for example, the method described in “Eihachiro Nakamae, Tomomi Nishida: 3D Computer Graphics, pp 63-72, Shosodo” can be used. The detailed description in is omitted.
However, the determination method is not limited to this, and it is only necessary to check whether or not the area occupied by the curved surface model in the vector definition space overlaps the area occupied by the vector graphic (for example, the graphic of FIG. 2). Distinguish between the case where they intersect each other and the case where either one of polygons or curved surface model elements formed by tracking the outline of a vector data figure (for example, the figure in FIG. 3) is included in the other There is no need, and since primitive data for drawing control is defined, the determination can also be made by a method such as the flowchart shown in FIG.

はじめにステップS801では、曲面モデルからまだ判定がおこなわれていない曲面モデル要素(一般には多角形。例えば三角形。)を選択する。次に、ステップS802では、曲面モデル要素の各頂点のベクタ定義空間での位置を描画判定情報算出部702の対応位置として、上記の描画判定情報算出部702の説明と同様の手順で描画判定変数を算出する。描画判定変数が奇数であれば曲面モデル要素の一部は必ずベクタデータ図形の内部領域にあるため、モデル制御情報は「真」となりステップS806に進む。描画判定変数が偶数の場合は、ステップS803に進む。
ステップS803では、ベクタデータ図形の各頂点、制御点のいずれかが曲面モデル要素の内部領域に1つでも含まれるかどうかを調べる。ベクタデータ図形の各頂点、制御点のいずれかが曲面モデル要素の内部領域に1つでも含まれていればモデル制御情報は「真」となりステップS806に進む。ベクタデータ図形の各頂点、制御点のいずれも曲面モデル要素の内部領域に含まれていない場合は、ステップS804に進む。ステップS804では、曲線輪郭から定義される三角形を構成する各稜線または直線輪郭を構成する各稜線と、曲面モデル要素を構成する稜線とが交差しているかどうかを調べる。交差していればモデル制御情報は「真」となりステップS806に進む。それ以外の場合はステップS805に進み、モデル制御情報は「偽」となる。
ステップS807では、曲面モデルに含まれる全ての曲面モデル要素について判定をおこなったかどうかを調べ、全ての曲面モデル要素について判定をおこなったのであれば終了し、まだ判定されていない曲面モデルが存在するのであれば、ステップS801に戻り、上述した処理を同様に行う。
In step S801, a curved surface model element (generally a polygon, for example, a triangle) that has not yet been determined from the curved surface model is selected. Next, in step S802, the position of each vertex of the curved surface model element in the vector definition space is set as the corresponding position of the drawing determination information calculation unit 702, and the drawing determination variable is processed in the same procedure as described above for the drawing determination information calculation unit 702. Is calculated. If the drawing determination variable is an odd number, a part of the curved surface model element is always in the internal area of the vector data figure, so the model control information becomes “true” and the process proceeds to step S806. If the drawing determination variable is an even number, the process proceeds to step S803.
In step S803, it is checked whether at least one of the vertices and control points of the vector data figure is included in the internal area of the curved surface model element. If any one of the vertices and control points of the vector data figure is included in the internal area of the curved surface model element, the model control information becomes “true” and the process proceeds to step S806. If neither the vertex nor the control point of the vector data figure is included in the internal area of the curved surface model element, the process proceeds to step S804. In step S804, it is checked whether each ridge line constituting the triangle defined by the curved contour or each ridge line constituting the straight line contour intersects with the ridge line constituting the curved surface model element. If they intersect, the model control information becomes “true” and the process proceeds to step S806. Otherwise, the process proceeds to step S805, and the model control information becomes “false”.
In step S807, it is checked whether or not all the curved surface model elements included in the curved surface model have been determined. If all the curved surface model elements have been determined, the process ends. Since there is a curved surface model that has not been determined yet. If there is, the process returns to step S801 and the above-described processing is performed in the same manner.

以上の処理により、入力モデル制御部103において本実施形態および第1の変形例を適用したイメージについて図9Aから図9Cを参照して説明する。
図9Aは「次」という文字に対しレンダリング処理を行う前の、制御処理をおこなっていない状態を示し、図9Bおよび図9Cはそれぞれ、実施形態適用後および第1の変形例適用後の制御処理をおこなった状態を示す。図9Aに示す制御処理前の状態よりも図9Bに示す実施形態適用後のほうがレンダリングを行うデータが削減されていることがわかる。さらに、図9Cに示す第1の変形例適用後はベクタ図形の輪郭線と曲線輪郭から生成された描画制御用プリミティブの稜線を判定対象としているため、「次」の文字を構成するベクタデータに合わせてレンダリングを行うことができ、大幅なデータ削減が可能である。
With the above processing, an image in which the present embodiment and the first modification are applied to the input model control unit 103 will be described with reference to FIGS. 9A to 9C.
FIG. 9A shows a state in which the control process is not performed before the rendering process for the character “next”. FIGS. 9B and 9C are the control processes after the application of the embodiment and after the application of the first modification, respectively. Shows the state of the It can be seen that the data to be rendered is reduced after application of the embodiment shown in FIG. 9B than in the state before the control processing shown in FIG. 9A. Further, after the application of the first modification shown in FIG. 9C, the ridge line of the drawing control primitive generated from the contour line of the vector graphic and the curved line contour is to be determined, so that the vector data constituting the “next” character is included in the vector data. Rendering can be performed together, and the data can be greatly reduced.

また、より処理コストと削減される三角形とのバランスを考慮する場合は、S802、およびS804の処理を変更できる。S802では、曲面モデル要素の各頂点のベクタ定義空間での位置を描画判定情報算出部702の対応位置として、上記の描画判定情報算出部702の説明と同様の手順で描画判定変数を算出する。ただし、この時の判定には直線輪郭から生成された描画制御用プリミティブを用いる。描画判定変数が奇数であれば曲面モデルの一部は必ず直線輪郭で囲まれた多角形の内部にあるため、モデル制御情報は「真」となる。描画判定変数が偶数の場合、さらに、対応位置が曲線輪郭から生成された描画制御用プリミティブの内部に1つでも含まれるかを調べる。含まれている場合、モデル制御情報は「真」となる。モデル制御情報が「真」の場合にはステップS806に進む。モデル制御情報が「偽」の場合にはステップS803に進む。それ以外の場合は「偽」となる。S803は前記した処理と同様の処理を行う。S804では、描画制御用プリミティブの各稜線と曲面モデルを構成する稜線とが交差しているかどうかを調べる。交差していればモデル制御情報は「真」となりステップS806に進む。それ以外の場合はステップS805に進み、モデル制御情報は「偽」となる。   Further, when considering the balance between the processing cost and the triangle to be reduced, the processing of S802 and S804 can be changed. In S <b> 802, the drawing determination variable is calculated in the same procedure as the description of the drawing determination information calculation unit 702, with the position of each vertex of the curved surface model element in the vector definition space as the corresponding position of the drawing determination information calculation unit 702. However, a drawing control primitive generated from a straight outline is used for the determination at this time. If the drawing determination variable is an odd number, the model control information is “true” because a part of the curved surface model is always inside the polygon surrounded by the straight outline. When the drawing determination variable is an even number, it is further checked whether at least one corresponding position is included in the drawing control primitive generated from the curved contour. If it is included, the model control information is “true”. If the model control information is “true”, the process proceeds to step S806. If the model control information is “false”, the process proceeds to step S803. Otherwise, it is “false”. In step S803, the same process as described above is performed. In step S804, it is checked whether each ridge line of the drawing control primitive intersects with a ridge line constituting the curved surface model. If they intersect, the model control information becomes “true” and the process proceeds to step S806. Otherwise, the process proceeds to step S805, and the model control information is “false”.

以上に示した第1の変形例によれば、ベクタデータの輪郭線を判定対象としているため、ベクタデータにあわせて三角形を選択することができる。そのため、レンダリング方法の選択の精度や判定速度が向上する。   According to the first modification shown above, the outline of the vector data is targeted for determination, and therefore a triangle can be selected according to the vector data. For this reason, the accuracy and determination speed of selecting a rendering method are improved.

(第2の変形例)
上記実施形態では、入力モデル制御部103において、モデル制御情報が「真」の曲面モデルに含まれる全ての曲面モデル要素が、同一平面上に定義されているかどうかによって、曲面ベクトルレンダリング部107と平面ベクトルレンダリング部109のどちらに曲面モデルを入力するかを決定している。よって、平面と見なせる部分と曲面と見なせる部分が混在している曲面モデルについては、同一平面上にない曲面モデルとして判定する必要がある。本変形例では、平面と見なせる部分と曲面と見なせる部分が混在する曲面モデルについても、平面と見なせる曲面モデルと曲面と見なせる曲面モデルとを分離してそれぞれ別のレンダリング方法を適用する。
(Second modification)
In the above embodiment, in the input model control unit 103, the curved surface vector rendering unit 107 and the plane are determined depending on whether or not all the curved surface model elements included in the curved model whose model control information is “true” are defined on the same plane. The vector rendering unit 109 determines which of the curved surface models is input. Therefore, a curved surface model in which a portion that can be regarded as a plane and a portion that can be regarded as a curved surface are mixed must be determined as a curved surface model that is not on the same plane. In this modification, even for a curved surface model in which a portion that can be regarded as a plane and a portion that can be regarded as a curved surface are mixed, the curved surface model that can be regarded as a plane and the curved surface model that can be regarded as a curved surface are separated and different rendering methods are applied.

[入力モデル制御部103]
入力モデル制御部103は、モデル記憶部101から曲面モデルおよびベクタデータ定義位置を受け取り、モデル制御情報算出部102から曲面モデル要素ごとの判定結果を示すモデル制御情報を受け取り、曲面モデルを構成する曲面モデル要素が同一平面上にあるかどうかを判定し、平面とみなせる曲面モデルと、曲面とみなせる曲面モデルとに分類する。以下に、本変形例での曲面モデルの分類方法について説明する。
まず、曲面モデルから任意の曲面モデル要素(三角形)Tcを選択する。次に、この曲面モデル要素に隣接する曲面モデル要素がそれぞれTcと同一平面上に定義されているかを調べる。同一平面上に無い場合には、その曲面モデル要素については処理を終了とする。同一平面上にある場合には、その曲面モデル要素はTcのグループに属するものとし、さらにその曲面モデル要素と隣接する曲面モデル要素について、Tcと同一平面上に定義されているかを調べる。これを全ての曲面モデル要素についての処理が終了するまで再帰的に行う。処理が終了した後、曲面モデルの中にまだグループに属していない曲面モデル要素が有る場合、それらの曲面モデル要素の中から任意の曲面モデル要素を再度選択し、前記の手順を繰り返す。これを、曲面モデル要素全てが処理されるまで繰り返す。
[Input model control unit 103]
The input model control unit 103 receives a curved surface model and a vector data definition position from the model storage unit 101, receives model control information indicating a determination result for each curved surface model element from the model control information calculation unit 102, and forms curved surface models It is determined whether the model elements are on the same plane, and are classified into a curved surface model that can be regarded as a plane and a curved surface model that can be regarded as a curved surface. Below, the classification method of the curved surface model in this modification is demonstrated.
First, an arbitrary curved surface model element (triangle) Tc is selected from the curved surface model. Next, it is checked whether the curved surface model elements adjacent to the curved surface model element are defined on the same plane as Tc. If they are not on the same plane, the process ends for the curved surface model element. If they are on the same plane, it is assumed that the curved surface model element belongs to the group of Tc, and it is checked whether the curved surface model element adjacent to the curved surface model element is defined on the same plane as Tc. This is recursively performed until the processing for all curved surface model elements is completed. After the processing is completed, if there is a curved surface model element that does not yet belong to the group in the curved surface model, an arbitrary curved surface model element is selected again from the curved surface model elements, and the above-described procedure is repeated. This is repeated until all the curved surface model elements are processed.

以上の処理をおこなった結果、モデル制御情報が「真」の曲面モデル要素は、0個以上の平面と見なせる曲面モデル要素のグループと、その他の曲面モデル要素、つまり曲面と見なされる曲面モデル要素とに分類される。このうち、平面と見なせるグループの曲面モデル要素を平面ベクトルレンダリング部109に送り、その他の曲面モデル要素を曲面ベクトルレンダリング部107に送る。   As a result of the above processing, a curved surface model element whose model control information is “true” includes a group of curved surface model elements that can be regarded as zero or more planes, and other curved surface model elements, that is, curved surface model elements that are regarded as curved surfaces. are categorized. Among these, the curved surface model elements of a group that can be regarded as a plane are sent to the planar vector rendering unit 109, and other curved surface model elements are sent to the curved surface vector rendering unit 107.

以上に示した第2の変形例によれば、曲面モデルのうちベクタデータが含まれる曲面モデル要素が部分的に平面と見なせる場合に、平面部分と曲面部分とを分離して別のレンダリング方法を適用することで、ベクタデータのレンダリング効率を向上させる。   According to the second modified example described above, when a curved surface model element including vector data in a curved surface model can be partially regarded as a flat surface, a separate rendering method is performed by separating the flat surface portion and the curved surface portion. By applying it, the rendering efficiency of vector data is improved.

(比較例)
以下、本発明の実施形態との比較例として、特開2006−106705号公報および特開2007−241878号公報に記載された技術について説明する。
ベクタグラフィックスのラスタライズに要する演算コストを低減するため、GPU(グラフィックスプロセッサユニット)が活用されていることについては既に述べた。GPUを利用して、図2に示すような、直線と曲線で構成されるベクタ図形をラスタライズするための上記特開2006−106705号公報の手法をまず説明する。
(Comparative example)
Hereinafter, as a comparative example with the embodiment of the present invention, techniques described in Japanese Patent Application Laid-Open Nos. 2006-106705 and 2007-241878 will be described.
As described above, a GPU (graphics processor unit) is used to reduce the calculation cost required for rasterizing vector graphics. First, the technique disclosed in Japanese Patent Laid-Open No. 2006-106705 for rasterizing a vector graphic composed of straight lines and curves as shown in FIG. 2 using the GPU will be described.

このラスタライズ手法のフローチャートを図10に示す。この図から分かるように、上記特開2006−106705号公報の手法の処理は、CPUによる前処理とGPUによる主処理の大きく2段階の処理から成る。最初に、CPUによってベクタ形式の図形が三角形の集まりに分解され、その後、GPUによって各三角形がラスタライズされる。GPUの処理単位は三角形であり、図2のような直線と曲線で構成されるベクタ図形を直接扱うことができないため、このような2段階の処理に分かれている。
最初のステップS1001では、HDDやRAMなどの記憶媒体からベクタデータを読み込み、その輪郭線を解析する処理がおこなわれる。例えば、図2のベクタ図形を表すベクタ形式のデータは、図3に示すベクタデータ図形に示されるような点と直線を含む。この図3では、図形の直線あるいはパラメトリック曲線の端点を黒丸で表し、パラメトリック曲線の制御点を白丸で表している。ステップS1001では、このようなベクタデータ図形を解析して、図5に示すような2種類の輪郭線データを生成する。
本明細書では、上述したように、図5(a)の輪郭線データを「直線輪郭」と表記し、図5(b)の輪郭線データを「曲線輪郭から定義される三角形」と表記している。また、以下では描画制御用プリミティブデータを三角形データ、描画制御用プリミティブを三角形として説明する。
図10のフローチャートの説明に戻る。ステップS1002では、前のステップで生成された曲線輪郭から定義される三角形に重なりがあるか調べる処理がおこなわれる。その結果、重なりが見つかった場合はステップS1003に進み、重なっている2つの三角形のうちの面積の大きい方を細分割する処理がおこなわれる。
この処理の影響で直線輪郭にも変更が生じるため、次のステップS1004では、直線輪郭を更新する処理がおこなわれる。その後、ステップS1002に戻って再び重なりがあるか調べ、重なりがなければステップS1005に進む。曲線輪郭から定義される三角形に重なりが残っている限り、ステップS1002からS1004の処理が繰り返される。
A flowchart of this rasterization method is shown in FIG. As can be seen from this figure, the processing of the method disclosed in Japanese Patent Application Laid-Open No. 2006-106705 comprises two stages of processing: CPU pre-processing and GPU main processing. First, the CPU divides the vector-style figure into a collection of triangles, and then rasterizes each triangle by the GPU. The processing unit of the GPU is a triangle, and a vector figure composed of straight lines and curves as shown in FIG. 2 cannot be directly handled. Therefore, the processing unit is divided into two steps.
In the first step S1001, vector data is read from a storage medium such as an HDD or a RAM, and a process for analyzing the contour line is performed. For example, the vector format data representing the vector graphic of FIG. 2 includes points and straight lines as shown in the vector data graphic shown in FIG. In FIG. 3, the straight line of the figure or the end point of the parametric curve is represented by a black circle, and the control point of the parametric curve is represented by a white circle. In step S1001, such a vector data figure is analyzed to generate two types of contour data as shown in FIG.
In this specification, as described above, the contour line data in FIG. 5A is expressed as “straight line contour”, and the contour line data in FIG. 5B is expressed as “triangle defined from the curved contour”. ing. In the following description, the drawing control primitive data is assumed to be triangle data, and the drawing control primitive is assumed to be a triangle.
Returning to the flowchart of FIG. In step S1002, a process is performed to check whether there is an overlap in the triangle defined from the curved contour generated in the previous step. As a result, if an overlap is found, the process proceeds to step S1003, and a process of subdividing the larger area of the two overlapping triangles is performed.
Since the straight contour is also changed due to the influence of this processing, in the next step S1004, processing for updating the straight contour is performed. Thereafter, the process returns to step S1002 to check again whether there is an overlap. If there is no overlap, the process proceeds to step S1005. As long as there is an overlap in the triangle defined from the curved contour, the processing of steps S1002 to S1004 is repeated.

例えば図5(b)に示す曲線輪郭から定義される三角形の集合の場合、ステップS1002において三角形aとb、および三角形cとdが重なっていることが分かる。ステップS1003では、三角形aおよびcが、それぞれ、図11(b)に示すような2つの三角形a0とa1、およびc0とc1に細分割される。そしてステップS1004では、図11(a)に示すように直線輪郭を更新する処理がおこなわれる。
ステップS1005では、直線輪郭を構成する各多角形を三角形に分割する処理がおこなわれる。例えば図11(a)の3つの多角形は、図12に示すような三角形の集まりに分割される。
以上(ステップS1001からS1005)の処理は、全てCPUによる前処理として実行される。
ステップS1006では、直線輪郭を構成する三角形(図12)および曲線輪郭から定義される三角形(図13(b))が、GPUによってラスタライズされる。このとき、直線輪郭を構成する三角形については、図13(a)に示すように、その三角形の内側にある全てのピクセルがラスタライズされる。
これに対して曲線輪郭から定義される三角形については、図13(b)に示すように、その三角形の内側にあるピクセルのうち、凹曲線輪郭の凹領域、あるいは凸曲線輪郭の凸領域がラスタライズされる。
このようにして得られた直線輪郭と曲線輪郭から定義される三角形のラスタライズ結果は、GPU内部のフレームバッファに併せて記憶される。例えば、図13(a)と図13(b)は、図14に示すようなラスタデータとしてフレームバッファに記憶される。
For example, in the case of a set of triangles defined from the curved contour shown in FIG. 5B, it can be seen that the triangles a and b and the triangles c and d overlap in step S1002. In step S1003, the triangles a and c are subdivided into two triangles a0 and a1, and c0 and c1, respectively, as shown in FIG. In step S1004, a process for updating the linear contour is performed as shown in FIG.
In step S1005, a process of dividing each polygon constituting the straight contour into triangles is performed. For example, the three polygons in FIG. 11A are divided into a collection of triangles as shown in FIG.
The above processes (steps S1001 to S1005) are all executed as preprocessing by the CPU.
In step S1006, the triangles (FIG. 13B) defined from the triangles (FIG. 12) and the curved contours constituting the straight line contour are rasterized by the GPU. At this time, with respect to the triangle constituting the straight outline, as shown in FIG. 13A, all pixels inside the triangle are rasterized.
On the other hand, for the triangle defined from the curved contour, as shown in FIG. 13B, among the pixels inside the triangle, the concave region of the concave curved contour or the convex region of the convex curved contour is rasterized. Is done.
Triangular rasterization results defined from the straight and curved contours obtained in this way are stored together with the frame buffer inside the GPU. For example, FIGS. 13A and 13B are stored in the frame buffer as raster data as shown in FIG.

従来のGPUを利用したラスタライズ手法では、複数の三角形を用いて曲線を近似していたため、拡大したときに粗く見えてしまう問題があった。また、より滑らかにラスタライズするためには多数の三角形を用いて曲線の近似精度を上げるしかなく、記憶容量と処理コストの増大が避けられなかった。これに対して上記特開2006−106705号公報の手法では、三角形単位ではなく、曲線近傍のピクセル単位に処理するため、解像度に依存せず常に滑らかに曲線をラスタライズすることができる。その上、記憶容量と処理コストも解像度に依存せず、常に少なくて済む。   In the conventional rasterization method using the GPU, a curve is approximated using a plurality of triangles, so that there is a problem that the image looks rough when enlarged. In addition, in order to rasterize more smoothly, the approximation accuracy of a curve must be increased using a large number of triangles, and an increase in storage capacity and processing cost is inevitable. On the other hand, according to the method disclosed in Japanese Patent Application Laid-Open No. 2006-106705, processing is performed in units of pixels in the vicinity of the curve, not in units of triangles, so that the curve can always be rasterized smoothly regardless of resolution. In addition, the storage capacity and the processing cost do not depend on the resolution and are always small.

しかし、上記特開2006−106705号公報のラスタライズ手法には以下の2つの問題がある。
1つ目の問題は前処理のコストが高いことである。特に、図10のステップS1002の曲線輪郭から定義される三角形の重複判定と、ステップS1005の直線輪郭の三角形分割のコストが高い。
前処理のコストは、図形の幾何形状が時間的に変化しない場合であれば大きな問題にはならない。一度前処理をしてしまえば、以降は再び前処理を行う必要はないからである。しかし、動的に図形の幾何形状が変化する場合は、その都度、前処理をやり直さなければならず、ラスタライズ処理全体のボトルネックになることが多い。
2つ目の問題は、アンチエイリアシングのためにアルファブレンドを用いていることである。ここでアンチエイリアシングとは、ラスタライズされた図形の輪郭線に現れるジャギー(階段状のギザギザ)を除去する処理のことである。また、アルファブレンドとはアルファ値と呼ばれる係数を用いて2つのピクセル値を半透明合成する処理のことである。
広く知られているように、アルファブレンドを用いるためには全ての図形をデプス値でソート(デプスソート)し、奥に位置する図形から順番にラスタライズしなければならない。デプスソートは非常にコストが高い処理であり、ラスタライズ処理全体のボトルネックになることが多い。
However, the rasterizing method disclosed in Japanese Patent Laid-Open No. 2006-106705 has the following two problems.
The first problem is the high cost of preprocessing. In particular, the cost of the triangle overlap determination defined from the curved contour in step S1002 in FIG. 10 and the triangulation of the straight contour in step S1005 are high.
The cost of the preprocessing is not a big problem if the geometric shape of the figure does not change with time. This is because once pre-processing is performed, it is not necessary to perform pre-processing again thereafter. However, when the geometrical shape of a figure changes dynamically, the preprocessing must be performed again each time, which often becomes a bottleneck of the entire rasterization process.
The second problem is using alpha blending for anti-aliasing. Here, anti-aliasing is a process of removing jaggy (stepped jagged edges) appearing on the contour line of a rasterized figure. Alpha blending is a process of translucently synthesizing two pixel values using a coefficient called alpha value.
As widely known, in order to use alpha blending, all figures must be sorted by depth value (depth sort), and rasterized in order from the figure located at the back. Depth sorting is a very expensive process and often becomes a bottleneck of the entire rasterization process.

上記特開2007−241878号公報ではこれら2つの問題を解決する方法を提案している。
上記特開2007−241878号公報では、ベクタデータに含まれる直線および曲線の始点と終点を単純に線分で結ぶことによって得られる多角形を直線輪郭としている。例えば、図3のベクタデータ図形から解析された直線輪郭は、図15に示すような3つの多角形P0、P1、P2になる。曲線輪郭から定義される三角形については、上記特開2006−106705号公報と同様のものを用いている。
得られた直線輪郭を構成する各多角形について、任意の1点(ピボット)が選択される。そして次に、ピボットと、ピボットを含まない全ての連結する2点を結ぶ三角形を生成する。ここで連結する2点とは、多角形の辺によって結ばれている2つの点のことを意味する。
例えば、図15の3つの多角形P0、P1、P2において、それぞれ点0、23、28がピボットとして選択された場合、図16に示すような三角形が生成される。三角形が重なっており、この図だけでは三角形の形状を把握することが難しいため、図17に3つの多角形P0、P1、P2から生成された三角形を構成する3つの点の番号を示す。
なお、図17はあくまで説明を分かりやすくするための補足であり、三角形データそのものを表しているのではないことに注意する。実際の三角形データは、各三角形を構成する3点の位置座標、およびテクスチャ座標、および接続関係などから構成される。
Japanese Patent Application Laid-Open No. 2007-241878 proposes a method for solving these two problems.
In the above Japanese Unexamined Patent Publication No. 2007-241878, a polygon obtained by simply connecting the start and end points of a straight line and a curve included in vector data with a line segment is defined as a straight line outline. For example, the linear contour analyzed from the vector data figure of FIG. 3 becomes three polygons P0, P1, and P2 as shown in FIG. As for the triangle defined from the curved contour, the same one as in the above Japanese Patent Laid-Open No. 2006-106705 is used.
An arbitrary point (pivot) is selected for each polygon forming the obtained straight outline. Then, a triangle is generated that connects the pivot and all two connecting points not including the pivot. The two points connected here mean two points connected by a side of the polygon.
For example, in the three polygons P0, P1, and P2 in FIG. 15, when points 0, 23, and 28 are selected as pivots, triangles as shown in FIG. 16 are generated. Since triangles are overlapped and it is difficult to grasp the shape of the triangles only with this figure, FIG. 17 shows the numbers of three points constituting the triangles generated from the three polygons P0, P1, and P2.
Note that FIG. 17 is only a supplement for easy understanding of the description, and does not represent the triangle data itself. The actual triangle data is composed of position coordinates of three points constituting each triangle, texture coordinates, connection relations, and the like.

次に、三角形内部のピクセルをラスタライズすることによってステンシルデータを生成する処理がおこなわれる。なお、ステンシルデータは、最終的に提示する解像度と同じ解像度をもつ画像データである。
まず、直線輪郭から生成される三角形データおよび曲線輪郭から生成される三角形データを読み込み、ラスタライズする。このとき、直線輪郭の三角形については、その三角形の内側にある全てのピクセルがラスタライズされ、これらのピクセル位置に対応するステンシルデータのピクセル値がビット反転される。
一方、曲線輪郭から定義される三角形については、その三角形の内側にあるピクセルのうち、曲線の凸領域に属するピクセルがラスタライズされ、これらのピクセル位置に対応するステンシルデータのピクセル値がビット反転される。
結果として、図形の内部は奇数回ピクセル値がビット反転され、図形の外部は偶数回ピクセル値がビット反転される。
Next, a process of generating stencil data is performed by rasterizing the pixels inside the triangle. The stencil data is image data having the same resolution as that finally presented.
First, triangle data generated from a straight outline and triangle data generated from a curved outline are read and rasterized. At this time, for the triangle of the straight outline, all the pixels inside the triangle are rasterized, and the pixel values of the stencil data corresponding to these pixel positions are bit-inverted.
On the other hand, for triangles defined from curved contours, pixels belonging to the convex region of the curve among the pixels inside the triangle are rasterized, and pixel values of stencil data corresponding to these pixel positions are bit-inverted. .
As a result, the pixel value is bit-inverted an odd number of times inside the graphic, and the pixel value is bit-inverted an even number of times outside the graphic.

上記の処理によって塗りつぶすピクセルが判断できるため、描画用のラスタデータの対応するピクセルを塗りつぶすことで描画結果を生成することができる。
上記特開2007−241878号公報では、直線輪郭の三角形分割などをおこなわないため、ベクタデータの頂点を移動しても三角形データの接続関係が変化しなければ三角形データの対応する頂点座標を書き換えるだけでよく、再度三角形データを作り直す必要はない。そのため、図形の幾何形状が動的に変化しても高速にラスタライズが可能である。
また、描画用のラスタデータのサブピクセル精度の画像を用意し、カバレッジデータをもとにサブピクセルの一部に図形の色を割り当て、最終的な描画用のラスタデータを生成する際に合成することでアルファブレンドが不要なアンチエイリアシングを可能としている。
Since the pixel to be filled can be determined by the above processing, the drawing result can be generated by painting the corresponding pixel of the raster data for drawing.
In the above Japanese Patent Laid-Open No. 2007-241878, since the triangulation of the straight contour is not performed, if the connection relation of the triangle data does not change even if the vertex of the vector data is moved, the corresponding vertex coordinates of the triangle data are simply rewritten. There is no need to recreate the triangle data. Therefore, even if the geometrical shape of the figure changes dynamically, it can be rasterized at high speed.
Also, a subpixel-accurate image of the raster data for drawing is prepared, the color of the figure is assigned to a part of the subpixel based on the coverage data, and is synthesized when the final raster data for drawing is generated. This enables anti-aliasing that does not require alpha blending.

しかし、上記特開2006−106705号公報および特開2007−241878号公報に記載された技術では、図形を曲面上にレンダリングしたい場合にそのまま適用することができない。
一般に、多角形データを曲面上にレンダリングする場合、多角形データを微細な多角形データ群に分割することで元の多角形データ内に頂点を追加し、その頂点を移動することによって実現する。上記特開2007−241878号公報の方法を利用してベクタデータを曲面上にレンダリングする場合にも、上記特開2007−241878号公報で示される方法で生成された三角形データを再分割する必要がある。
三角形データの再分割には様々な方法があるが、十分に曲面に沿っている、つまり曲面上にレンダリングされているといえる描画結果が得られるように再分割する方法の処理コストは高い。
ベクタデータを描画するための三角形データを再分割してしまうため、図形の幾何形状が変化する場合には、その都度、再分割処理をやり直す必要がある。このため、上記特開2006−106705号公報の問題点であり、上記特開2007−241878号公報の利点である、動的な図形の幾何形状の変化への対応も不可能となる。
However, the techniques described in Japanese Patent Application Laid-Open Nos. 2006-106705 and 2007-241878 cannot be applied as they are when rendering a figure on a curved surface.
In general, rendering polygon data on a curved surface is realized by adding vertices to the original polygon data by dividing the polygon data into fine polygon data groups and moving the vertices. Even when vector data is rendered on a curved surface using the method disclosed in Japanese Patent Application Laid-Open No. 2007-241878, it is necessary to subdivide the triangle data generated by the method disclosed in Japanese Patent Application Laid-Open No. 2007-241878. is there.
There are various methods for re-dividing the triangle data. However, the processing cost of the method of re-division so as to obtain a drawing result that is sufficiently along the curved surface, that is, rendered on the curved surface, is high.
Since the triangle data for drawing the vector data is subdivided, it is necessary to redo the subdivision process every time the geometric shape of the figure changes. For this reason, it is impossible to cope with the dynamic geometrical shape change which is a problem of the above-mentioned Japanese Patent Application Laid-Open No. 2006-106705 and the advantage of the above-mentioned Japanese Patent Application Laid-Open No. 2007-241878.

なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

100・・・描画装置、101・・・モデル記憶部、102・・・モデル制御情報算出部、103・・・入力モデル制御部、104・・・ベクタデータ記憶部、105・・・描画制御用プリミティブ生成部、106・・・描画制御用プリミティブ記憶部、107・・・曲面ベクトルレンダリング部、108・・・提示部、109・・・平面ベクトルレンダリング部、601、603・・・多角形2の内部領域、602、604・・・多角形1の内部領域、701・・描画用パラメータ算出部、702・・・描画判定情報算出部、703・・・ラスタデータ生成部、704・・・ラスタデータ記憶部、705・・・ステンシルデータ生成部、706・・・平面レンダリング結果データ生成部。 DESCRIPTION OF SYMBOLS 100 ... Drawing apparatus, 101 ... Model storage part, 102 ... Model control information calculation part, 103 ... Input model control part, 104 ... Vector data storage part, 105 ... For drawing control Primitive generator 106, rendering control primitive storage 107, curved surface vector rendering unit 108, presentation unit 109, plane vector rendering unit 601, 603, polygon 2 Internal region, 602, 604... Polygon 1 internal region, 701... Drawing parameter calculation unit, 702 .. Drawing determination information calculation unit, 703 .. Raster data generation unit, 704 .. Raster data Storage unit, 705, stencil data generation unit, 706, plane rendering result data generation unit.

Claims (11)

ベクタ形式の図形に対応するベクタデータを記憶している第1記憶手段と、
前記図形を描画するガイドとしての曲面モデルと、該曲面モデルに対応する、前記ベクタデータがレンダリングされることが可能な領域を示すベクタデータ定義位置とを記憶する第2記憶手段と、
前記ベクタデータを輪郭線解析することにより直線輪郭および曲線輪郭のいずれか1以上に対応するデータを含むプリミティブデータを、前記曲面モデルが定義される空間と独立して前記図形を定義するとともに出力するラスタデータのピクセルの属性値を決定するために参照されるベクタ定義空間に生成する第1生成手段と、
前記ベクタデータ定義位置と、前記曲面モデルとを参照して、曲面モデルに含まれる要素ごとに同一平面上にあるかどうかを判定し、曲面とみなせる曲面モデルである第1モデルまたは平面とみなせる曲面モデルである第2モデルのどちらか一方の判定結果を得る第1判定手段と、
前記第1判定手段により前記第1モデルであると判定された場合、該第1モデルと前記プリミティブデータとを参照して、出力するラスタデータのピクセルの属性値を生成する第2生成手段と、
前記第1判定手段により前記第2モデルであると判定された場合、該第2モデルと前記プリミティブデータとを参照して、前記ラスタデータのピクセルの属性値を生成する第3生成手段と、を具備することを特徴とする描画装置。
First storage means for storing vector data corresponding to a vector format figure;
A second storage means for storing a curved surface model as a guide for drawing the graphic, and a vector data definition position corresponding to the curved surface model and indicating an area where the vector data can be rendered;
By performing contour analysis on the vector data, primitive data including data corresponding to at least one of a linear contour and a curved contour is defined and output independently of the space in which the curved surface model is defined. First generation means for generating in a vector definition space referred to in order to determine pixel attribute values of raster data;
A curved surface that can be regarded as a first model or a plane that is a curved surface model that can be regarded as a curved surface by determining whether each element included in the curved surface model is on the same plane with reference to the vector data definition position and the curved surface model First determination means for obtaining a determination result of one of the second models as models;
A second generation unit configured to generate pixel attribute values of raster data to be output with reference to the first model and the primitive data when the first determination unit determines that the first model is included;
A third generation unit configured to generate an attribute value of a pixel of the raster data with reference to the second model and the primitive data when the first determination unit determines that the second model is the second model; A drawing apparatus comprising the drawing apparatus.
前記要素ごとに、該要素が前記ベクタ定義空間のどの位置になるかを算出し、ベクタ定義空間で要素と前記図形に対応するデータとの関係を判定する第2判定手段をさらに具備し、
前記第1判定手段は、前記要素ごとに前記第2判定手段の判定結果を参照して、前記複数の要素から採用する要素を決定し、採用する要素を含む再定義曲面モデルを生成し、第1モデルおよび第2モデルを、該再定義曲面モデルに含まれる要素ごとに同一平面上にあるかどうかにより判定し、該第1モデルまたは該第2モデルのどちらか一方の判定結果を得、
前記第2生成手段は、前記再定義曲面モデルより判定された前記第1モデルと前記プリミティブデータとを参照し、出力するラスタデータのピクセルの属性値を生成し、
前記第3生成手段は、前記再定義曲面モデルより判定された前記第2モデルと前記プリミティブデータとを参照し、前記ラスタデータのピクセルの属性値を生成することを特徴とする請求項1に記載の描画装置。
For each of the elements, it further comprises second determination means for calculating where the element is in the vector definition space and determining the relationship between the element and data corresponding to the graphic in the vector definition space,
The first determination unit refers to the determination result of the second determination unit for each element, determines an element to be adopted from the plurality of elements, generates a redefined curved surface model including the element to be adopted, Determining whether the first model and the second model are on the same plane for each element included in the redefined curved surface model, obtaining a determination result of either the first model or the second model;
The second generation means refers to the first model determined from the redefined curved surface model and the primitive data, generates attribute values of pixels of raster data to be output,
The said 3rd production | generation means produces | generates the attribute value of the pixel of the said raster data with reference to the said 2nd model and the said primitive data determined from the said redefined surface model. Drawing device.
前記第2判定手段は、前記要素と前記ベクタデータとの関係を判定することを特徴とする請求項2に記載の描画装置。   The drawing apparatus according to claim 2, wherein the second determination unit determines a relationship between the element and the vector data. 前記第2判定手段は、前記ベクタ定義空間での前記要素の占める領域とベクタデータが示す図形が占める領域が重なっているかどうかを判定すること特徴とする請求項3に記載の描画装置。   The drawing apparatus according to claim 3, wherein the second determination unit determines whether an area occupied by the element in the vector definition space overlaps an area occupied by a graphic indicated by vector data. 前記第2判定手段は、前記要素と前記プリミティブデータとの関係を判定することを特徴とする請求項2に記載の描画装置。   The drawing apparatus according to claim 2, wherein the second determination unit determines a relationship between the element and the primitive data. 前記第2判定手段は、前記ベクタ定義空間での前記要素の占める領域と前記プリミティブデータが表すプリミティブが占める領域とが重なっているかを判定することを特徴とする請求項5に記載の描画装置。   The drawing apparatus according to claim 5, wherein the second determination unit determines whether an area occupied by the element in the vector definition space overlaps an area occupied by a primitive represented by the primitive data. 前記第1判定手段は、前記複数の要素が平面を構成する曲面モデルの一部であるかどうかの判定結果に基づいて、曲面を構成する複数の要素と平面を構成する複数の要素とに分離し、前記曲面を構成する複数の要素は前記第2生成手段へ送り、前記平面を構成する複数の要素は前記第3生成手段へ送ることを特徴とする請求項1から請求項6のいずれか1項に記載の描画装置。   The first determination means separates into a plurality of elements constituting the curved surface and a plurality of elements constituting the plane based on a determination result of whether or not the plurality of elements are part of the curved surface model constituting the plane. The plurality of elements constituting the curved surface are sent to the second generation means, and the plurality of elements constituting the plane are sent to the third generation means. The drawing apparatus according to item 1. 前記第2生成手段は、
前記曲面モデルをスクリーンに投影した際に該曲面モデルの要素が占めるピクセルごとに、ベクタ定義空間における対応位置、色情報、および透明度を含む描画用パラメータを算出する算出手段と、
前記プリミティブデータについて前記対応位置を含むかどうかを判定し、前記対応位置を含むプリミティブデータが前記直線輪郭から生成されたプリミティブデータであれば前記対応位置の描画判定変数に第1値を加算し、前記対応位置を含むプリミティブデータが前記曲線輪郭から生成されたプリミティブデータであり、かつ該対応位置が曲線輪郭の凸領域に含まれるならば、前記描画判定変数に前記第1値を加算する第3判定手段と、
前記描画判定変数が奇数であるならば、前記対応位置に対応するピクセルの属性値を前記描画用パラメータに基づいて生成する第4生成手段と、を含むことを特徴とする請求項1から請求項7のいずれか1項に記載の描画装置。
The second generation means includes
Calculating means for calculating drawing parameters including a corresponding position in the vector definition space, color information, and transparency for each pixel occupied by elements of the curved surface model when the curved surface model is projected onto a screen;
It is determined whether or not the corresponding position is included in the primitive data, and if the primitive data including the corresponding position is primitive data generated from the straight line outline, a first value is added to the drawing determination variable of the corresponding position. If the primitive data including the corresponding position is primitive data generated from the curved contour, and the corresponding position is included in the convex region of the curved contour, a third value that adds the first value to the drawing determination variable A determination means;
4. The fourth generation unit according to claim 1, further comprising: a fourth generation unit configured to generate an attribute value of a pixel corresponding to the corresponding position based on the drawing parameter if the drawing determination variable is an odd number. 8. The drawing apparatus according to any one of 7 above.
前記第2生成手段は、
前記曲面モデルをスクリーンに投影した際に該曲面モデルの要素が占めるピクセルごとに、ベクタ定義空間における対応位置、色情報、および透明度を含む描画用パラメータを算出する算出手段と、
前記プリミティブデータについて前記対応位置を含むかどうかを判定し、前記対応位置を含むプリミティブデータが前記直線輪郭から生成されたプリミティブデータであれば前記対応位置の描画判定変数に第1値を加算し、前記対応位置を含むプリミティブデータが前記曲線輪郭から生成されたプリミティブデータであり、かつ該対応位置が曲線輪郭の凸領域および凹領域のいずれか一方に含まれるならば、前記描画判定変数に前記第1値を加算する第3判定手段と、
前記描画判定変数が奇数であるならば、前記対応位置に対応するピクセルの属性値を前記描画用パラメータに基づいて生成する第4生成手段と、を含むことを特徴とする請求項1から請求項7のいずれか1項に記載の描画装置。
The second generation means includes
Calculating means for calculating drawing parameters including a corresponding position in the vector definition space, color information, and transparency for each pixel occupied by elements of the curved surface model when the curved surface model is projected onto a screen;
It is determined whether or not the corresponding position is included in the primitive data, and if the primitive data including the corresponding position is primitive data generated from the straight line outline, a first value is added to the drawing determination variable of the corresponding position. If the primitive data including the corresponding position is primitive data generated from the curved contour, and the corresponding position is included in one of the convex region and the concave region of the curved contour, the drawing determination variable includes the first data. Third determination means for adding one value;
4. The fourth generation unit according to claim 1, further comprising: a fourth generation unit configured to generate an attribute value of a pixel corresponding to the corresponding position based on the drawing parameter if the drawing determination variable is an odd number. 8. The drawing apparatus according to any one of 7 above.
前記第3生成手段は、前記プリミティブデータおよび前記第2モデルを参照してピクセルをラスタライズしてステンシルデータを生成する第5生成手段と、
前記ステンシルデータを参照して前記出力ラスタデータを生成する第6生成手段と、を含むことを特徴とする請求項1から請求項9のいずれか1項に記載の描画装置。
The third generation means includes fifth generation means for generating stencil data by rasterizing pixels with reference to the primitive data and the second model;
10. The drawing apparatus according to claim 1, further comprising: a sixth generation unit configured to generate the output raster data with reference to the stencil data.
ベクタ形式の図形に対応するベクタデータを記憶し、
前記図形を描画するガイドとしての曲面モデルと、該曲面モデルに対応する、前記ベクタデータがレンダリングされることが可能な領域を示すベクタデータ定義位置とを記憶し、
前記ベクタデータを輪郭線解析することにより直線輪郭および曲線輪郭のいずれか1以上に対応するデータを含むプリミティブデータを、前記曲面モデルが定義される空間と独立して前記図形を定義するとともに出力するラスタデータのピクセルの属性値を決定するために参照されるベクタ定義空間に生成し、
前記ベクタデータ定義位置と、前記曲面モデルとを参照して、曲面モデルに含まれる要素ごとに同一平面上にあるかどうかを判定し、曲面とみなせる曲面モデルである第1モデルまたは平面とみなせる曲面モデルである第2モデルのどちらか一方の第1判定結果を得、
前記第1判定結果により前記第1モデルであると判定された場合、該第1モデルと前記プリミティブデータとを参照して、出力するラスタデータのピクセルの属性値を生成し、
前記第1判定結果により前記第2モデルであると判定された場合、該第2モデルと前記プリミティブデータとを参照して、前記ラスタデータのピクセルの属性値を生成することを特徴とする描画方法。
Stores vector data corresponding to vector format figures,
A curved surface model as a guide for drawing the figure, and a vector data definition position corresponding to the curved surface model and indicating an area where the vector data can be rendered;
By performing contour analysis on the vector data, primitive data including data corresponding to at least one of a linear contour and a curved contour is defined and output independently of the space in which the curved surface model is defined. Generate in the vector definition space referenced to determine the pixel attribute value of the raster data,
A curved surface that can be regarded as a first model or a plane that is a curved surface model that can be regarded as a curved surface by determining whether each element included in the curved surface model is on the same plane with reference to the vector data definition position and the curved surface model Obtain the first judgment result of either one of the models, the second model,
If it is determined that the first model is based on the first determination result, the attribute value of the pixel of the raster data to be output is generated with reference to the first model and the primitive data.
When it is determined that the second model is based on the first determination result, an attribute value of a pixel of the raster data is generated with reference to the second model and the primitive data. .
JP2009103135A 2009-04-21 2009-04-21 Drawing device and method Pending JP2010256985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009103135A JP2010256985A (en) 2009-04-21 2009-04-21 Drawing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009103135A JP2010256985A (en) 2009-04-21 2009-04-21 Drawing device and method

Publications (1)

Publication Number Publication Date
JP2010256985A true JP2010256985A (en) 2010-11-11

Family

ID=43317863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009103135A Pending JP2010256985A (en) 2009-04-21 2009-04-21 Drawing device and method

Country Status (1)

Country Link
JP (1) JP2010256985A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04309187A (en) * 1991-04-08 1992-10-30 Japan Small Corp Mapping method for stereoscopic model
JP2006106705A (en) * 2004-08-27 2006-04-20 Microsoft Corp Rendering outline font
JP2007241878A (en) * 2006-03-10 2007-09-20 Toshiba Corp Unit, method and program for image rendering
JP2008287426A (en) * 2007-05-16 2008-11-27 Mitsubishi Electric Corp Distortion correction device and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04309187A (en) * 1991-04-08 1992-10-30 Japan Small Corp Mapping method for stereoscopic model
JP2006106705A (en) * 2004-08-27 2006-04-20 Microsoft Corp Rendering outline font
JP2007241878A (en) * 2006-03-10 2007-09-20 Toshiba Corp Unit, method and program for image rendering
JP2008287426A (en) * 2007-05-16 2008-11-27 Mitsubishi Electric Corp Distortion correction device and program

Similar Documents

Publication Publication Date Title
KR100834596B1 (en) Image processing apparatus, image processing method, and computer readable recording medium having image processing program
JP4157569B2 (en) Drawing apparatus, drawing method, and drawing program
US8773439B2 (en) Approximation of stroked higher-order curved segments by quadratic bèzier curve segments
JP5232358B2 (en) Rendering outline fonts
US8044955B1 (en) Dynamic tessellation spreading for resolution-independent GPU anti-aliasing and rendering
US8243070B1 (en) Triangulation for accelerated rendering of polygons
JP6863693B2 (en) Graphics processing system and method
US7948487B2 (en) Occlusion culling method and rendering processing apparatus
US20110310102A1 (en) Systems and methods for subdividing and storing vertex data
US8928668B2 (en) Method and apparatus for rendering a stroked curve for display in a graphics processing system
US8072452B1 (en) Efficient multi-resolution curve rendering
KR20050030595A (en) Image processing apparatus and method
US7812837B2 (en) Reduced Z-buffer generating method, hidden surface removal method and occlusion culling method
JP2006521629A (en) Method and apparatus for anti-aliasing a region of a two-dimensional distance field representing an object
US20090309898A1 (en) Rendering apparatus and method
JP2006521627A (en) How to animate an object as a frame sequence according to a video script
JP2006521624A (en) Converting a 2D object to a 2D distance field
US20230082839A1 (en) Rendering scalable raster content
JP2010256985A (en) Drawing device and method
JP2010256986A (en) Drawing device and method
US7224369B2 (en) Image processing apparatus and method of same
KR100269118B1 (en) Rasterization using quadrangle
Kawata et al. Image-based point rendering for multiple range images
US20160321835A1 (en) Image processing device, image processing method, and display device
US11776179B2 (en) Rendering scalable multicolored vector content

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110916

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120806

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120821

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121211