JPH09231381A - Drawing equipment - Google Patents
Drawing equipmentInfo
- Publication number
- JPH09231381A JPH09231381A JP3245696A JP3245696A JPH09231381A JP H09231381 A JPH09231381 A JP H09231381A JP 3245696 A JP3245696 A JP 3245696A JP 3245696 A JP3245696 A JP 3245696A JP H09231381 A JPH09231381 A JP H09231381A
- Authority
- JP
- Japan
- Prior art keywords
- data
- shape data
- piecewise linear
- linear function
- deformation
- 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.)
- Withdrawn
Links
Landscapes
- Image Generation (AREA)
- Studio Circuits (AREA)
Abstract
(57)【要約】
【課題】 コンピュータを用いて生成された画像におけ
る形状データを現実に近い質感や自然な味わいを持たせ
てフレームバッファに高速に描画する描画装置を提供す
る。
【解決手段】 データ記憶手段101は、コンピュータ
グラフィックスにより生成された多角形及び線分からな
る形状データを記憶する。関数記憶手段102は、複数
の区間からなる区分的線形関数を記憶する。変形手段1
03は、データ記憶手段101に記憶された形状データ
を関数記憶手段102に記憶された区分的線形関数によ
り変形して変形データを生成する。変形データ記憶手段
104は、変形手段103で得られた変形データを記憶
する。描画手段105は、変形データ記憶手段104に
記憶された変形データをフレームメモリ300上に描画
する。
(57) An object of the present invention is to provide a drawing device that draws shape data in an image generated using a computer in a frame buffer at high speed with a texture and a natural taste close to reality. A data storage unit 101 stores shape data including polygons and line segments generated by computer graphics. The function storage unit 102 stores a piecewise linear function including a plurality of sections. Deformation means 1
03 deforms the shape data stored in the data storage means 101 by the piecewise linear function stored in the function storage means 102 to generate deformation data. The modification data storage unit 104 stores the modification data obtained by the modification unit 103. The drawing unit 105 draws the deformation data stored in the deformation data storage unit 104 on the frame memory 300.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、コンピュータを用
いた映像機器であるコンピュータグラフィックスシステ
ム、特殊効果装置、ビデオゲーム機等に用いられる描画
装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a drawing device used for a computer graphics system which is a video device using a computer, a special effect device, a video game machine and the like.
【0002】[0002]
【従来の技術】例えば、家庭用TVゲーム機やパーソナ
ルコンピュータあるいはコンピュータグラフィックスシ
ステム等において、テレビジョン受像機やモニタ受像機
あるいは陰極線管(CRT:Cathode Ray Tube)ディス
プレイ装置等に出力して表示する画像のデータ、すなわ
ち表示出力画像データを生成する画像生成装置では、中
央演算処理装置(CPU:Central Processing Unit)
とフレームバッファの間に専用の描画装置を設けること
により、高速処理を可能にしている。2. Description of the Related Art For example, in a home TV game machine, a personal computer, a computer graphics system, or the like, the image is output to a television receiver, a monitor receiver, a cathode ray tube (CRT) display device, or the like for display. In an image generation device that generates image data, that is, display output image data, a central processing unit (CPU) is used.
By providing a dedicated drawing device between the frame buffer and the frame buffer, high-speed processing is possible.
【0003】すなわち、上記画像生成装置において、C
PU側では、画像を生成する際に、直接フレームバッフ
ァをアクセスするのではなく、座標変換やクリッピン
グ、光源計算等のジオメトリ処理を行い、3角形や4角
形等の多角形(ポリゴン)及び線分(ライン)の組み合
わせとして3次元の形状を定義して3次元画像を描画す
るための描画命令を作成し、その描画命令を描画装置に
送る。That is, in the above image generating apparatus, C
On the PU side, when generating an image, instead of directly accessing the frame buffer, geometry processing such as coordinate conversion, clipping, and light source calculation is performed, and polygons (polygons) such as a triangle and a quadrangle and line segments are generated. A three-dimensional shape is defined as a combination of (lines), a drawing command for drawing a three-dimensional image is created, and the drawing command is sent to the drawing device.
【0004】例えば、3次元の形状を表示する場合、C
PUは、3次元の形状を分解して得られた複数のポリゴ
ン及びラインに各々対応する描画命令を描画装置に転送
する。そして、描画装置は、CPUから送られてきた描
画命令を解釈して、頂点の色データと奥行きを示すZ値
から、ポリゴンを構成する全ての画素の色とZ値を考慮
して、画素データをフレームバッファに書き込むレンダ
リング処理を行い、フレームバッファに図形を描画す
る。For example, when displaying a three-dimensional shape, C
The PU transfers drawing commands corresponding to a plurality of polygons and lines obtained by decomposing a three-dimensional shape to the drawing device. Then, the drawing device interprets the drawing command sent from the CPU, considers the colors and Z values of all the pixels that form the polygon from the color data of the vertices and the Z value indicating the depth, and then the pixel data. Is written to the frame buffer and rendering is performed to draw a figure in the frame buffer.
【0005】尚、上記Z値は、視点からの奥行き方向の
距離を示す情報である。The Z value is information indicating the distance in the depth direction from the viewpoint.
【0006】ところで、上述のような画像生成装置によ
り生成された表示出力画像データにおける形状は、かっ
ちりとした輪郭線と単調な色が特徴である。このため、
上記形状に対して明るさや色を付与することにより、よ
り現実に近い質感や自然な味わいを持たせるための写実
的なレタリングが追及され、照明モデルやマッピング技
術の改良等による物理的な現象を比較的忠実に取り込む
ための様々な研究が行われている。By the way, the shape of the display output image data generated by the image generating apparatus as described above is characterized by a solid contour line and a monotonous color. For this reason,
By giving brightness and color to the above shapes, we pursue realistic lettering to give a more realistic texture and natural taste, and to improve the physical phenomena by improving the lighting model and mapping technology. Various studies have been conducted to capture it with relative fidelity.
【0007】例えば、上記画像生成装置において、上述
したようにして、3次元の形状から得られた各ポリゴン
及びラインに対応する描画命令をCPUから描画装置に
転送する際、3次元の形状をより実際に近く表現するす
るために、テクスチャマッピングやミップマッピングと
呼ばれる手法が採用されている。また、上記画像生成装
置において、色変換データを記憶したカラールックアッ
プテーブル(CLUT:Cclor Lock Up Table)を介し
て画像の色データを変換することにより、表示色を変化
させる手法も広く知られている。For example, in the above-mentioned image generating apparatus, when the drawing command corresponding to each polygon and line obtained from the three-dimensional shape as described above is transferred from the CPU to the drawing apparatus, the three-dimensional shape is further improved. Techniques called texture mapping and mip mapping have been adopted in order to make a close representation. Further, in the above-mentioned image generation device, a method of changing the display color by converting the color data of the image through a color look-up table (CLUT: Cclor Lock Up Table) storing the color conversion data is also widely known. There is.
【0008】ここで、テクスチャマッピングとは、テク
スチャソース画像として別に用意された2次元画像(絵
柄)、すなわちテクスチャパターンを物体を構成するポ
リゴンの表面に張り付ける技術である。また、ミップマ
ッピングは、3次元の形状に近づいたり、そこから遠ざ
かった場合に、ポリゴンの張り付ける絵柄が不自然にな
らないように画素データを補間するようにしたテクスチ
ャマッピングの手法の1つである。Here, the texture mapping is a technique in which a two-dimensional image (design) prepared separately as a texture source image, that is, a texture pattern, is attached to the surface of polygons constituting an object. In addition, mip mapping is one of texture mapping methods that interpolates pixel data so that a pattern attached to a polygon does not become unnatural when it approaches or moves away from a three-dimensional shape. .
【0009】これに対して、「SIGGRAPH’90」で非写
実的なレタリングのセッションが初めて設けられて以
来、「Paul Haeberli」の「“Paint By Numbers:Abstra
ct Image Representations”(SIGGRAPH’90)」の油
絵風の表現や、「Georges Winkenbachi」と「David H.
Salesin」の「“Computer-Generated Pen-and-Ink Illu
stration”(SIGGRAPH’90)」の素描風の表現等、非
写実的なレタリングの研究も行われている。On the other hand, since the non-photorealistic lettering session was first established in "SIGGRAPH '90", "Paint By Numbers: Abstra" in "Paul Haeberli"
ct Image Representations ”(SIGGRAPH'90)” oil painting style expression, “Georges Winkenbachi” and “David H.
Sales in ”“ Computer-Generated Pen-and-Ink Illu
Research on non-photorealistic lettering, such as the expression of "stration"(SIGGRAPH'90)", is also being conducted.
【0010】[0010]
【発明が解決しようとする課題】しかし、上述したよう
な画像生成装置において、現実に近い質感や自然な味わ
いを持った画像における形状データをフレームバッファ
に描画するためには、画像を解析して変換する計算回路
を描画装置に設ける必要があるが、上記計算回路は、高
価なものであった。したがって、従来の描画装置は、装
置のコストダウンを図ることができなかった。However, in the image generating apparatus as described above, in order to draw the shape data of an image having a texture or a natural taste close to reality in the frame buffer, the image is analyzed. Although it is necessary to provide a calculation circuit for conversion in the drawing device, the calculation circuit is expensive. Therefore, the conventional drawing apparatus cannot reduce the cost of the apparatus.
【0011】また、現実に近い質感や自然な味わいを持
った画像における形状データをフレームバッファに高速
に描画するためには、特殊なハードウェアを描画装置に
設ける必要があった。したがって、従来の描画装置は、
処理速度が高速であっても、特殊なハードウェアなしで
は、現実に近い質感や自然な味わいを持った画像におけ
る形状データをフレームバッファに高速に描画すること
ができなかった。Further, in order to draw the shape data of an image having a texture and a natural taste close to reality in the frame buffer at high speed, it is necessary to provide special drawing hardware in the drawing device. Therefore, the conventional drawing device
Even if the processing speed is high, without special hardware, it was not possible to draw the shape data of an image having a texture and a natural taste close to reality in the frame buffer at high speed.
【0012】そこで、本発明は、上述の如き従来の実情
に鑑みてなされたものであり、次のような目的を有する
ものである。Therefore, the present invention has been made in view of the conventional circumstances as described above, and has the following objects.
【0013】即ち、本発明の目的は、コンピュータを用
いて生成された画像における形状データを現実に近い質
感や自然な味わいを持たせてフレームバッファに高速に
描画する描画装置を提供することにある。That is, an object of the present invention is to provide a drawing apparatus for drawing shape data in an image generated by using a computer in a frame buffer at high speed with a texture and a natural taste close to reality. .
【0014】また、本発明の目的は、コンピュータを用
いて生成された画像における形状データを現実に近い質
感や自然な味わいを持たせてフレームバッファに高速に
描画することを安価に実現する描画装置を提供すること
にある。A further object of the present invention is to provide a drawing apparatus that can inexpensively realize high speed drawing of shape data in an image generated by using a computer with a texture and a natural taste close to reality. To provide.
【0015】また、本発明の目的は、コンピュータを用
いて生成された画像における形状データを現実に近い質
感や自然な味わいを持たせてフレームバッファに高速に
描画する汎用性を持った描画装置を提供することにあ
る。Another object of the present invention is to provide a general-purpose drawing device that draws shape data in an image generated by using a computer into a frame buffer at high speed with a texture and a natural taste close to reality. To provide.
【0016】[0016]
【課題を解決するための手段】上述の課題を解決するた
めに、本発明に係る描画装置は、コンピュータグラフィ
ックスにより生成された多角形及び線分からなる形状デ
ータをフレームメモリ上に描画する描画装置であって、
上記形状データを記憶するデータ記憶手段と、複数の区
間からなる区分的線形関数を記憶する関数記憶手段と、
上記データ記憶手段に記憶された形状データを上記関数
記憶手段に記憶された区分的線形関数により変形して変
形データを生成する変形手段と、上記変形手段で得られ
た変形データを記憶する変形データ記憶手段と、上記変
形データ記憶手段に記憶された変形データをフレームメ
モリ上に描画する描画手段とを備えることを特徴とす
る。In order to solve the above-mentioned problems, a drawing apparatus according to the present invention is a drawing apparatus for drawing shape data consisting of polygons and line segments generated by computer graphics on a frame memory. And
Data storage means for storing the shape data, function storage means for storing a piecewise linear function consisting of a plurality of sections,
Deformation means for deforming the shape data stored in the data storage means by the piecewise linear function stored in the function storage means to generate deformation data, and deformation data for storing the deformation data obtained by the deformation means. It is characterized by comprising a storage means and a drawing means for drawing the deformation data stored in the deformation data storage means on a frame memory.
【0017】また、本発明に係る描画装置は、上記コン
ピュータグラフィックにより生成された形状データは、
2次元形状のデータであることを特徴とする。In the drawing apparatus according to the present invention, the shape data generated by the computer graphic is
It is characterized by being two-dimensional shape data.
【0018】また、本発明に係る描画装置は、上記コン
ピュータグラフィックにより生成された形状データは、
3次元形状のデータであることを特徴とする。In the drawing apparatus according to the present invention, the shape data generated by the computer graphic is
It is characterized by being three-dimensional shape data.
【0019】また、本発明に係る描画装置は、上記関数
記憶手段は、3次元の区分的線形関数を記憶することを
特徴とする。Further, the drawing apparatus according to the present invention is characterized in that the function storage means stores a three-dimensional piecewise linear function.
【0020】また、本発明に係る描画装置は、上記関数
記憶手段は、2次元の区分的線形関数を記憶することを
特徴とする。Further, the drawing apparatus according to the present invention is characterized in that the function storage means stores a two-dimensional piecewise linear function.
【0021】また、本発明に係る描画装置は、上記関数
記憶手段は、区間数の異なる複数種類の区分的線形関数
を記憶する。そして、上記変形手段は、対象となる形状
データの多角形の辺及び線分毎に、上記関数記憶手段に
記憶された複数種類の区分的線形関数から上記多角形の
辺及び線分に応じて選出した任意の区分的線形関数を用
いて変形データを生成することを特徴とする。Further, in the drawing apparatus according to the present invention, the function storage means stores a plurality of types of piecewise linear functions having different numbers of sections. Then, the deforming means, for each side and line segment of the polygon of the target shape data, according to the side and line segment of the polygon from a plurality of kinds of piecewise linear functions stored in the function storage means. It is characterized in that deformation data is generated by using an arbitrary piecewise linear function selected.
【0022】[0022]
【発明の実施の形態】以下、発明の実施の形態につい
て、図面を参照して詳細に説明する。Embodiments of the present invention will be described below in detail with reference to the drawings.
【0023】本発明に係る描画装置は、例えば、コンピ
ュータグラフィックスシステムの画像生成装置おいて、
図1に示すように、CPU200とフレームバッファ3
00の間に設けられた描画装置100に適用される。The drawing apparatus according to the present invention is, for example, in an image generating apparatus of a computer graphics system,
As shown in FIG. 1, the CPU 200 and the frame buffer 3
It is applied to the drawing apparatus 100 provided between the two.
【0024】まず、上記画像生成装置は、表示出力画像
データを生成する装置であり、例えば、3次元の形状を
表示出力する場合、CPU200により、ポリゴン及び
ラインの組み合わせとして3次元の形状を定義し、3次
元の形状を分解して得られた複数のポリゴン及びライン
に各々対応する描画命令を描画装置100に転送するよ
うになされている。First, the image generation device is a device for generating display output image data. For example, when displaying and outputting a three-dimensional shape, the CPU 200 defines a three-dimensional shape as a combination of polygons and lines. A drawing command corresponding to each of a plurality of polygons and lines obtained by decomposing a three-dimensional shape is transferred to the drawing device 100.
【0025】そこで、描画装置100は、上記図1に示
すように、上記CPUの出力を記憶する形状データ用メ
モリ101と、区分的線形関数を記憶する変化情報用メ
モリ102と、形状データ用メモリ101及び変化情報
用メモリ102の各出力が供給される変形処理回路10
3と、変形処理回路103の出力を記憶する変形データ
用メモリ104と、変形データ用メモリ104の出力が
供給される描画処理回路105とを備えている。Therefore, as shown in FIG. 1, the drawing apparatus 100 includes a shape data memory 101 for storing the output of the CPU, a change information memory 102 for storing a piecewise linear function, and a shape data memory. Deformation processing circuit 10 to which respective outputs of 101 and change information memory 102 are supplied
3, a transformation data memory 104 for storing the output of the transformation processing circuit 103, and a drawing processing circuit 105 to which the output of the transformation data memory 104 is supplied.
【0026】つぎに、上述のような構成をした描画装置
100の一連の動作を説明する。Next, a series of operations of the drawing apparatus 100 configured as described above will be described.
【0027】先ず、形状データ用メモリ101は、CP
U200からの描画命令、すなわちポリゴン及びライン
の組み合わせからなる3次元の形状のデータ(以下、単
に形状データと言う。)を記憶する。First, the shape data memory 101 stores the CP
A drawing command from the U200, that is, three-dimensional shape data (hereinafter, simply referred to as shape data) composed of a combination of polygons and lines is stored.
【0028】一方、変化情報用メモリ102には、例え
ば、図2に示すように、長さ方向がu軸で表され、変形
方向がv軸及びw軸で表された、3つの区間「S30=
(u0,v0,w0)〜S31=(u1,v1,w
1)」、「S31=(u1,v1,w1)〜S32=(u
2,v2,w2)」、「S32=(u2,v2,w2)
〜S33=(u3,v3,w3)」からなる3次元の区
分的線形関数f3が予め記憶されている。On the other hand, in the change information memory 102, for example, as shown in FIG. 2, three sections "S" in which the length direction is represented by the u-axis and the deformation direction is represented by the v-axis and the w-axis are shown. 30 =
(U0, v0, w0) ~S 3 1 = (u1, v1, w
1) ”,“ S 3 1 = (u1, v1, w1) to S 3 2 = (u
2, v2, w2) "," S 3 2 = (u2, v2 , w2)
˜S 3 3 = (u3, v3, w3) ”is stored in advance as a three-dimensional piecewise linear function f 3 .
【0029】次に、変形処理回路103は、変化情報用
メモリ102に記憶されている3次元の区分的線形関数
f3を用いて、形状データ用メモリ101に記憶された
形状データを変形させる変形処理を行う。そして、変形
処理回路103は、上記変形処理により得た変形形状デ
ータを変形データ用メモリ104に記憶する。Next, the transformation processing circuit 103 transforms the shape data stored in the shape data memory 101 using the three-dimensional piecewise linear function f 3 stored in the change information memory 102. Perform processing. Then, the modification processing circuit 103 stores the modified shape data obtained by the above modification processing in the modification data memory 104.
【0030】尚、変形処理回路103が行う変形処理に
ついての詳細な説明は後述する。A detailed description of the transformation process performed by the transformation processing circuit 103 will be given later.
【0031】次に、描画処理回路105は、変形データ
用メモリ104に記憶された変形形状データを読み出
し、読み出した変形形状データにおけるポリゴン及びラ
インを構成する全ての画素データを、3次元空間での画
素の輝度とZ座標の値を考慮して、フレームバッファ3
00に描画する。また、描画処理回路105は、変形デ
ータ用メモリ104から読み出した変形形状データに対
して、テクスチャマッピング処理やミップマッピング処
理を行い、テクスチャマッピング処理やミップマッピン
グ処理を行った変形形状データをフレームバッファ30
0に描画する。Next, the drawing processing circuit 105 reads the deformed shape data stored in the deformed data memory 104, and sets all the pixel data forming the polygons and lines in the read deformed shape data in the three-dimensional space. In consideration of the brightness of the pixel and the value of the Z coordinate, the frame buffer 3
Draw to 00. Further, the drawing processing circuit 105 performs texture mapping processing and mip mapping processing on the deformed shape data read from the deformation data memory 104, and the deformed shape data subjected to the texture mapping processing and mip mapping processing is used as the frame buffer 30.
Draw to 0.
【0032】ここで、描画装置105が行う描画処理に
ついて説明すると、例えば、フレームバッファ300
は、図示していないが、3次元空間での各画素の輝度を
格納するフレームバッファと、3次元空間での可視の画
素のZ座標の値(Z値)を格納するZバッファとからな
る。そこで、描画処理回路103は、上記フレームバッ
ファに新たに書き込む画素(以下、新画素と言う。)の
輝度あるいはZ値と、上記Zバッファに格納されている
上記新画素に対応した画素(以下、旧画素と言う。)の
Z値とを比較することにより、上記新画素が上記旧画素
より手前であるか否かを判断する。そして、描画処理回
路103は、上記新画素が上記旧画素より手前であった
場合のみ、その新画素を上記フレームバッファに書き込
み、上記Zバッファに格納されているZ値を更新する。The drawing processing performed by the drawing device 105 will be described below. For example, the frame buffer 300
(Not shown) includes a frame buffer that stores the brightness of each pixel in the three-dimensional space and a Z buffer that stores the value of the Z coordinate (Z value) of a visible pixel in the three-dimensional space. Therefore, the drawing processing circuit 103 causes the brightness or Z value of a pixel (hereinafter, referred to as a new pixel) newly written in the frame buffer, and a pixel (hereinafter, referred to as a pixel corresponding to the new pixel stored in the Z buffer). It is determined whether or not the new pixel is in front of the old pixel by comparing the Z value of the old pixel). Then, the drawing processing circuit 103 writes the new pixel in the frame buffer and updates the Z value stored in the Z buffer only when the new pixel is before the old pixel.
【0033】尚、上述したような描画装置105が行う
描画処理については、「実践コンピュータグラフィック
ス」(日刊工業新聞社)の「Zバッファ・アルゴリズ
ム」に記載されているため、ここでは、その詳細な説明
は省略する。The drawing process performed by the drawing device 105 as described above is described in "Z Buffer Algorithm" of "Practical Computer Graphics" (Nikkan Kogyo Shimbun). Detailed description is omitted.
【0034】上述のようにして、描画処理回路103に
より、変形データ用メモリ104に記憶された変形形状
データがフレームバッファ300に描画される。As described above, the drawing processing circuit 103 draws the deformed shape data stored in the deformation data memory 104 in the frame buffer 300.
【0035】そして、フレームバッファ300に描画さ
れた変形形状データは、ビデオ信号として、図示してい
ないテレビジョン受像機やモニタ受像機等に供給されて
表示出力される。The deformed shape data drawn in the frame buffer 300 is supplied as a video signal to a television receiver, a monitor receiver or the like (not shown) for display and output.
【0036】つぎに、上述した変形処理回路103が行
う変形処理について具体的に説明する。Next, the deformation process performed by the above-described deformation processing circuit 103 will be specifically described.
【0037】例えば、xyz座標で表される3次元空間
において、図3に示すような、点P(=(xp,yp,
zp))と点Q(=(xq,yq,zq))とからなる
ラインLの形状データに対して変形処理を行う場合につ
いて説明する。For example, in a three-dimensional space represented by xyz coordinates, a point P (= (xp, yp,
zp)) and the point Q (= (xq, yq, zq)) will be described for the case where the deformation process is performed on the shape data of the line L.
【0038】先ず、ラインLの点Pから点Qへの方向を
u軸として、u軸、v軸、及びw軸の各単位ベクトル
を、 u = UV(SV(Q,P)) v = CP(x,u) w = CP(u,v) なる演算式により求める。First, assuming that the direction from the point P to the point Q of the line L is the u axis, unit vectors of the u axis, the v axis, and the w axis are expressed as follows: u = UV (SV (Q, P)) v = CP (X, u) w = CP (u, v).
【0039】尚、上記演算式において、“x”は、上記
xyz座標系におけるx軸の単位ベクトル、“U
V()”は、単位ベクトルの計算、“SV()”は、ベ
クトルの減算、“CP()”は、ベクトルの外積を示
す。In the above equation, "x" is the unit vector of the x axis in the xyz coordinate system, "U".
V () ”is a unit vector calculation,“ SV () ”is a vector subtraction, and“ CP () ”is a vector cross product.
【0040】次に、ラインLの点Pを上記図2に示した
3次元の区分的線形関数f3の「u=0」の点に対応さ
せ、ラインLの点Qを3次元の区分的線形関数f3の
「u=1」の点に対応させる。Next, the point P of the line L is made to correspond to the point "u = 0" of the three-dimensional piecewise linear function f 3 shown in FIG. 2, and the point Q of the line L is three-dimensional piecewise. to correspond to the point of the linear function f 3 of the "u = 1".
【0041】すなわち、上記図2において、 S30=(u0,v0,w0)=(0,0,0)=P S33=(u3,v3,w3)=(1,0,0)=Q とする。That is, in FIG. 2, S 3 0 = (u0, v0, w0) = (0,0,0) = P S 3 3 = (u3, v3, w3) = (1,0,0) = Q
【0042】次に、3次元の区分的線形関数f3上の点
S31及び点S32を用いて、点Pと点Qの間に、図4に
示すような新たな点TL31(=(x1,y1,z1))
及びTL32(=(x2,y2,z2))を生成する。Next, using the points S 3 1 and S 3 2 on the three-dimensional piecewise linear function f 3 , a new point T L3 as shown in FIG. 4 is provided between the points P and Q. 1 (= (x1, y1, z1))
And T L32 (= (x2, y2, z2)).
【0043】すなわち、平方根を“sqrt()”とし
て、点P(=(xp,yp,zp))と点Q(=(x
q,yq,zq))とからなるラインLの長さMを、 M=sqrt((xq−xp)2+(yq−yp)2+
(yq−yp)2) なる演算式により求める。That is, the point P (= (xp, yp, zp)) and the point Q (= (x
q, yq, zq)) and the length M of the line L is M = sqrt ((xq-xp) 2 + (yq-yp) 2 +
(Yq-yp) 2 ) The calculation formula is as follows.
【0044】そして、上記演算式により求めたラインL
の長さMと、3次元の区分的線形関数f3上の点S3i
(=(ui,vi,wi))と、単位ベクトルu(=
(xu,yu,zu)),v(=(xv,yv,z
v)),w(=(xw,yw,zw))とを持って、新
たに生成する点TL3i(=(xi,yi,zi))を xi=xp+M×ui×xu+vi×xv+wi×xw yi=yp+M×ui×yu+vi×yv+wi×yw zi=zp+M×ui×zu+vi×zv+wi×zw なる演算式により生成する。Then, the line L obtained by the above arithmetic expression
Length M and the point S 3 i on the three-dimensional piecewise linear function f 3
(= (Ui, vi, wi)) and the unit vector u (=
(Xu, yu, zu)), v (= (xv, yv, z
v)), w (= (xw, yw, zw)), and the newly generated point T L3 i (= (xi, yi, zi)) is xi = xp + M × ui × xu + vi × xv + wi × xw yi = yp + M × ui × yu + vi × yv + wi × yw zi = zp + M × ui × zu + vi × zv + wi × zw.
【0045】したがって、上記演算式により、点TL31
(=(x1,y1,z1))及びTL32(=(x2,y
2,z2))が生成され、変形データ用メモリ104に
は、上記図4に示すような線分の集合(ポリライン)L
3{P,TL31,TL32,Q}が記憶される。Therefore, according to the above equation, the point T L3 1
(= (X1, y1, z1)) and T L3 2 (= (x2, y
2, z2)) is generated and the set of line segments (polyline) L as shown in FIG.
3 {P, T L3 1, T L3 2, Q} is stored.
【0046】また、例えば、図5に示すような、点P
(=(xp,yp,zp))、点Q(=(xq,yq,
zq))、及び点R(=(xr,yr,zr))とから
なる三角形のポリゴンGの形状データに対して変形処理
を行う場合にも、上述したラインLに対する変形処理と
同様に、ポリゴンGの3つの辺PQ,QR,RPを3次
元の区分的線形関数f3を用いて各々変形する。Further, for example, a point P as shown in FIG.
(= (Xp, yp, zp)), point Q (= (xq, yq,
zq)) and the point R (= (xr, yr, zr)), the deformation process is performed on the shape data of the triangular polygon G, similarly to the deformation process for the line L described above. Each of the three sides PQ, QR, and RP of G is transformed by using a three-dimensional piecewise linear function f 3 .
【0047】この結果、図6に示すような頂点の集合G
3{P,TG31,TG32,Q,TG33,TG34,R,T
G35,TG36}が生成される。As a result, a set G of vertices as shown in FIG.
3 {P, T G3 1, T G3 2, Q, T G3 3, T G3 4, R, T
G3 5, T G3 6} is generated.
【0048】ところで、これらの点P,TG31,T
G32,Q,TG33,TG34,R,TG35,TG36は、同
一平面上には存在しないため、この状態では、描画処理
回路103で描画処理を行うことができない。By the way, these points P, T G3 1, T
Since G3 2, Q, T G3 3, T G3 4, R, T G3 5, and T G3 6 do not exist on the same plane, the drawing processing circuit 103 cannot perform drawing processing in this state.
【0049】このため、一般的には、例えば、図7に示
すように、ポリゴンGの中心点Oを求め、頂点の集合G
3と中心点Oからなる三角形の集合{{O,P,T
G31},{O,TG31,TG32},{O,TG32,
Q},{O,Q,TG33},{O,TG33,TG34},
{O,TG34,R},{O,R,TG35},{O,TG3
5,TG36},{O,TG36,P}}を生成して、各三
角形の面法線をそのまま用いて描画する。Therefore, in general, for example, as shown in FIG. 7, the center point O of the polygon G is obtained and the set G of vertices is set.
A set of triangles consisting of 3 and the center point O {{O, P, T
G3 1}, {O, T G3 1, T G3 2}, {O, T G3 2,
Q}, {O, Q, T G3 3}, {O, T G3 3, T G3 4},
{O, T G3 4, R}, {O, R, T G3 5}, {O, T G3
5, T G3 6}, {O, T G3 6, P}} are generated and drawn using the surface normals of the respective triangles as they are.
【0050】しかし、上述のようにして、各三角形の面
法線をそのまま用いて描画した結果、上記図7に示すよ
うに、凹凸した面が描かれた画像Aが得られ、自然な味
わいを持った画像を得ることができない。However, as a result of drawing by using the surface normals of the respective triangles as they are as described above, as shown in FIG. 7, an image A having an uneven surface is obtained, giving a natural taste. I can't get the image I have.
【0051】そこで、この変形処理回路103は、上述
のようにして生成した三角形の集合と、上記三角形の集
合の各三角形の面法線とを変形データ用メモリ104に
記憶する。Therefore, the transformation processing circuit 103 stores the set of triangles generated as described above and the surface normal of each triangle of the set of triangles in the transformation data memory 104.
【0052】したがって、描画処理回路105は、変形
データ用メモリ104に記憶された三角形の集合の全て
三角形の面法線として、元のポリゴンGの面法線を与え
て描画を行うこととなる。この結果、上記図7に示した
凹凸した面のみが描かれた画像Aに対して、図8に示す
ような自然な味わいを持った画像Bを得ることができ
る。Therefore, the drawing processing circuit 105 performs drawing by giving the surface normal of the original polygon G as the surface normal of all the triangles of the set of triangles stored in the deformation data memory 104. As a result, it is possible to obtain an image B having a natural taste as shown in FIG. 8 with respect to the image A shown in FIG. 7 in which only the uneven surface is drawn.
【0053】ここで、上記図8に示した画像Bに対し
て、例えば、描画処理回路105でテクスチャマッピン
グ処理やミップマッピング処理を行う場合、上記テクス
チャマッピング処理やミップマッピング処理で用いられ
るテクスチャ座標は、以下のようにして求められる。Here, for example, when the drawing processing circuit 105 performs texture mapping processing or mip mapping processing on the image B shown in FIG. 8, the texture coordinates used in the texture mapping processing or mip mapping processing are , Is calculated as follows.
【0054】例えば、上記図5に示した点P,Q,Rか
らなるポリゴンGにおいて、3次元の区分的線形関数f
3により得られる点TG3iのテクスチャ座標(mTi,n
Ti)は、点P及び点Qのテクスチャ座標(mTp,nT
p)及び(mTq,nTq)と、3次元の区分的線形関数
f3上の点S3i(=(ui,vi,wi))を持って、
線形補間による mTi=(1−ui)×mTp+ui×mTq nTi=(1−ui)×nTp+ui×nTq なる演算式により求められる。For example, in the polygon G consisting of the points P, Q, and R shown in FIG. 5, the three-dimensional piecewise linear function f
The texture coordinates (m T i, n of the point T G3 i obtained by 3
T i) is the texture coordinates (m T p, n T of the points P and Q).
p) and (m T q, n T q) and the point S 3 i (= (ui, vi, wi)) on the three-dimensional piecewise linear function f 3 ,
Linear interpolation is used to obtain m T i = (1-ui) × m T p + ui × m T q n T i = (1-ui) × n T p + ui × n T q.
【0055】したがって、描画処理回路105では、上
記演算式により求められたテクスチャ座標を用いて、テ
クスチャマッピング処理やミップマッピング処理が行わ
れることとなる。Therefore, in the drawing processing circuit 105, the texture mapping processing and the mip mapping processing are performed using the texture coordinates obtained by the above-mentioned arithmetic expression.
【0056】尚、上記図8に示した画像Bにおいて、三
角形の集合{{O,P,TG31},{O,TG31,TG3
2},{O,TG32,Q},{O,Q,TG33},
{O,TG33,TG34},{O,TG34,R},{O,
R,TG35},{O,TG35,TG36},{O,T
G36,P}}は、実際には平面上に存在しないため、元
のポリゴンGの平面の延長上から画像Bを見た場合、凹
凸が存在していることがわかるが、3次元の区分的線形
関数f3を用いた変形をあまり大きくすると、自然な味
わいを持たせた画像を得ることができない。しかし、上
記図8に示した画像Bに存在する上述したような凹凸
は、あまり大きなものでないため、通常の視点からでは
問題にはならない。In the image B shown in FIG. 8, a set of triangles {{O, P, T G3 1}, {O, T G3 1, T G3
2}, {O, T G3 2, Q}, {O, Q, T G3 3},
{O, T G3 3, T G3 4}, {O, T G3 4, R}, {O,
R, T G3 5}, {O, T G3 5, T G3 6}, {O, T
G3 6, P}} does not actually exist on the plane, so when the image B is viewed from the extension of the plane of the original polygon G, it can be seen that the unevenness exists, but the three-dimensional division If the deformation using the static linear function f 3 is too large, an image with a natural taste cannot be obtained. However, since the unevenness as described above existing in the image B shown in FIG. 8 is not so large, it does not cause a problem from a normal viewpoint.
【0057】上述のように、描画装置100は、CPU
200から供給された形状データのポリゴンの辺やライ
ンを3次元の区分的線形関数f3で置き換えることによ
り変形させてフレームバッファ300に描画するため、
この画像生成装置で表示出力する画像を自然な味わいを
持った画像とすることができる。As described above, the drawing device 100 includes the CPU
Since the sides and lines of the polygon of the shape data supplied from the device 200 are replaced by the three-dimensional piecewise linear function f 3 to be transformed and drawn in the frame buffer 300,
An image displayed and output by this image generation device can be an image having a natural taste.
【0058】例えば、立体形の形状データがCPU20
0から描画装置100に供給された場合、図9に示すよ
うに、この画像生成装置で表示出力される画像Cは、一
見すると、輪郭Egが手書きにより描かれたような自然
な味わいを持っている。また、このような立体形の画像
Cに対して、描画装置100により上述したようなテク
スチャマッピング処理を施した場合、この画像生成装置
で表示出力される画像は、図10に示すように、より実
際に近く表現された画像Cdとなる。For example, the three-dimensional shape data is the CPU 20.
When supplied from 0 to the drawing apparatus 100, as shown in FIG. 9, the image C displayed and output by the image generating apparatus has a natural taste as if the contour Eg was drawn by hand. There is. Further, when the rendering device 100 performs the above-described texture mapping processing on such a three-dimensional image C, the image displayed and output by this image generation device is more detailed as shown in FIG. The image C d is an image that is actually represented in the vicinity.
【0059】また、描画装置100が行う変形処理は、
3次元の区分的線形関数f3を用いた単純な変形操作で
あるため、従来用いられていた画像を解析して変換する
計算回路のような高価な回路を描画装置100に設ける
必要がない。したがって、描画装置100は、この画像
生成装置で表示出力する画像における形状データを、自
然な味わいを持たせて容易に描画することができる。ま
た、描画装置100は、装置のコストダウンを図ること
ができる。The transformation process performed by the drawing apparatus 100 is as follows.
Since it is a simple transformation operation using the three-dimensional piecewise linear function f 3 , it is not necessary to provide the drawing apparatus 100 with an expensive circuit such as a calculation circuit that analyzes and transforms an image that has been conventionally used. Therefore, the drawing apparatus 100 can easily draw the shape data in the image displayed and output by the image generating apparatus with a natural taste. Further, the drawing apparatus 100 can reduce the cost of the apparatus.
【0060】また、描画装置100で上述したような変
形処理を行うことにより、3次元の区分的線形関数f3
により変形して得られた変形形状データのポリゴン数が
元の形状データのポリゴン数より大きくなるが、上記変
形形状データのポリゴンの形状は、所謂トライアングル
・ファン(triangle fan)であるため、多くの頂点が共
有されている。したがって、描画装置100は、上記変
形形状データの描画を高速に行うことができる。したが
って、この画像生成装置は、自然な味わいを持った画像
を高速に表示出力することができる。Further, by performing the above-described transformation processing in the drawing apparatus 100, the three-dimensional piecewise linear function f 3
The number of polygons of the deformed shape data obtained by deforming by the method becomes larger than the number of polygons of the original shape data. However, since the shape of the polygon of the deformed shape data is a so-called triangle fan, The vertices are shared. Therefore, the drawing apparatus 100 can draw the deformed shape data at high speed. Therefore, this image generating apparatus can display and output an image having a natural taste at high speed.
【0061】さらに、元の形状データがポリゴン及びラ
インで構成されているのと同様に、3次元の区分的線形
関数f3により変形して得られた変形形状データもポリ
ゴン及びラインで構成されているため、上述したような
変形処理回路103を従来の描画装置に設けるだけで、
自然な味わいを持った画像を得ることを実現することが
できる。したがって、描画装置100を従来の描画装置
に汎用的に適用いることができる。Further, similarly to the case where the original shape data is composed of polygons and lines, the deformed shape data obtained by deformation by the three-dimensional piecewise linear function f 3 is also composed of polygons and lines. Therefore, by simply providing the transformation processing circuit 103 as described above in the conventional drawing device,
It is possible to obtain an image with a natural taste. Therefore, the drawing apparatus 100 can be generally applied to the conventional drawing apparatus.
【0062】さらにまた、描画装置100では、描画処
理回路105の前段に変形処理回路103を設けること
により、フレームバッファ300への描画を行う前に、
3次元の区分的線形関数f3による変形処理を行うよう
になされているため、例えば、形状データが建築物のよ
う物体であり、その物体の内部を視点が歩き回る(ウォ
ークスルー)場合においても、ウォークスルー中に3次
元の区分的線形関数f3による変形処理が再度行われる
ということはない。したがって、描画装置100は、建
築物内部をウォークスルーするような画像でも、自然な
味わいを持たせた形状データを高速に描画することがで
きる。Furthermore, in the drawing apparatus 100, the transformation processing circuit 103 is provided in the preceding stage of the drawing processing circuit 105, so that before drawing in the frame buffer 300,
Since the transformation processing is performed by the three-dimensional piecewise linear function f 3 , for example, even when the shape data is an object like a building and the viewpoint walks inside the object (walkthrough), The transformation process by the three-dimensional piecewise linear function f 3 is not performed again during the walkthrough. Therefore, the drawing apparatus 100 can draw the shape data having a natural taste at high speed even in an image of walking through the inside of a building.
【0063】また、上述した描画装置100では、変形
処理回路103により3次元の区分的線形関数f3によ
る変形処理を行うこととしたが、変形処理回路103に
より2次元の区分的線形関数f3による変形処理を行う
こととしてもよい。Further, in the drawing apparatus 100 described above, the transformation processing circuit 103 performs the transformation processing by the three-dimensional piecewise linear function f 3 , but the transformation processing circuit 103 makes the two-dimensional piecewise linear function f 3. Alternatively, the transformation process may be performed.
【0064】以下、変形処理回路103が2次元の区分
的線形関数f3による変形処理を行う場合について説明
する。The case where the transformation processing circuit 103 performs the transformation processing using the two-dimensional piecewise linear function f 3 will be described below.
【0065】まず、この場合、変形情報用メモリ102
には、図11に示すように、長さ方向がu軸で表され、
変形方向がv軸で表された、3つの区間「S20=(u
0,v0)〜S21=(u1,v1)」、「S21=(u
1,v1)〜S22=(u2,v2)」、「S22=(u
2,v2)〜S23=(u3,v3)」からなる2次元
の区分的線形関数f2が予め記憶されている。First, in this case, the deformation information memory 102
, The length direction is represented by the u-axis, as shown in FIG.
The three sections “S 2 0 = (u
0, v0) ~S 2 1 = (u1, v1) "," S 2 1 = (u
1, v1) ~S 2 2 = (u2, v2) "," S 2 2 = (u
2, v2) ~S 2 3 = (u3, v3) "is a two-dimensional piecewise linear function f 2 consisting of previously stored.
【0066】そこで、例えば、上記図3に示したよう
な、点P(=(xp,yp,zp))と点Q(=(x
q,yq,zq))とからなるラインLの形状データに
対して変形処理を行う場合、先ず、図12に示すよう
に、点P(=(xp,yp,zp))と点Q(=(x
q,yq,zq))の各々のデバイス座標Pd(=(m
p,np)),Qd(=(mq,nq))を求める。Therefore, for example, as shown in FIG. 3, the point P (= (xp, yp, zp)) and the point Q (= (x
When the deformation process is performed on the shape data of the line L consisting of q, yq, zq)), first, as shown in FIG. 12, a point P (= (xp, yp, zp)) and a point Q (= (X
q, yq, zq)) device coordinates P d (= (m
p, np)) and Q d (= (mq, nq)).
【0067】すなわち、視点が原点Oにあり、視線(ビ
ュー)ベクトルがz軸に一致し、ビューアップベクトル
がy軸に一致しているものとし、ラインL上の点(x
i,yi,zi)と、スクリーンScの幅wと、スクリ
ーンScの高さhと、視点OからスクリーンScまでの
距離dとを持って、デバイス座標(mi,ni)を mi=w/2+d×xi/zi ni=w/2+d×yi/zi なる演算式により求める。That is, assuming that the viewpoint is at the origin O, the line-of-sight (view) vector matches the z-axis, and the view-up vector matches the y-axis, the point (x
i, yi, zi), the width w of the screen Sc, the height h of the screen Sc, and the distance d from the viewpoint O to the screen Sc, the device coordinates (mi, ni) are set to mi = w / 2 + d. Xxi / zi ni = w / 2 + d × yi / zi.
【0068】次に、上記演算式により求めたデバイス座
標系の点Pdと点QdからなるラインLdにおいて、ライ
ンLdの点Pdから点Qdへの方向をu軸として、単位ベ
クトルuを u=UV(SV(Pd,点Qd)) なる演算式により求める。Next, the line L d of points P d and the point Q d of the device coordinate system determined by the above arithmetic expression, the direction from the point P d of the line L d to point Q d as u axis, the unit The vector u is calculated by the arithmetic expression u = UV (SV (P d , point Q d )).
【0069】尚、上記演算式において、“UV()”
は、単位ベクトルの計算、“SV()”は、ベクトルの
減算を示す。In the above equation, "UV ()"
Indicates a unit vector calculation, and “SV ()” indicates vector subtraction.
【0070】次に、ラインLdの点Pdを上記図11に示
した2次元の区分的線形関数f2の「u=0」の点に対
応させ、ラインLdの点Qdを2次元の区分的線形関数f
2の「u=1」の点に対応させる。Next, the point P d of the line L d to correspond to the point "u = 0" in the two-dimensional piecewise linear function f 2 shown in FIG. 11, the point Q d of the line L d 2 Dimensional piecewise linear function f
Correspond to the point "u = 1" of 2 .
【0071】すなわち、上記図11において、 S20=(u0,v0)=(0,0)=Pd S23=(u3,v3)=(1,0)=Qd とする。That is, in FIG. 11, S 2 0 = (u0, v0) = (0,0) = P d S 2 3 = (u3, v3) = (1,0) = Q d .
【0072】次に、2次元の区分的線形関数f2上の点
S21及び点S22を用いて、図13に示すような新たな
点TL21(=(m1,n1))及びTL22(=(m2,
n2))を生成する。Next, with reference to S 2 1 and point S 2 2 points on the two-dimensional piecewise linear function f 2, new point T L2 1 as shown in FIG. 13 (= (m1, n1) ) And T L2 2 (= (m2
n2)) is generated.
【0073】すなわち、平方根を“sqrt()”とし
て、点Pd(=(mp,np))と点Qd(=(mq,n
q))からなるラインLdの長さMdを、 Md=sqrt((mq−mp)2+(nq−np)2) なる演算式により求める。That is, the point P d (= (mp, np)) and the point Q d (= (mq, n) are defined with the square root being “sqrt ()”.
The length M d of the line L d consisting of q)) is calculated by the arithmetic expression M d = sqrt ((mq-mp) 2 + (nq-np) 2 ).
【0074】そして、上記演算式により求めたラインL
dの長さMdと、2次元の区分的線形関数f2上の点S2i
(=(ui,vi))と、単位ベクトルu(=(mu,
mu))とを持って、生成する新たな点TG2iを mi=mp+Md×ui×mu−vi×mu ni=mp+Md×ui×nu+vi×mu なる演算式により生成する。Then, the line L obtained by the above arithmetic expression
the length M d of d, a point on a two-dimensional piecewise linear function f 2 S 2 i
(= (Ui, vi)) and unit vector u (= (mu,
mu)) and a new point T G2 i to be generated is generated by an arithmetic expression mi = mp + M d × ui × mu-vi × mu ni = mp + M d × ui × nu + vi × mu.
【0075】したがって、上記演算式により、点TL21
(=(m1,n1))及びTL22(=(m2,n2))
が生成され、変形データ用メモリ104には、上記図1
3に示すような、デバイス座標系上のポリラインL
2{Pd,TL21,TL22,Qd}が記憶される。Therefore, the point T L2 1
(= (M1, n1)) and T L2 2 (= (m2, n2))
1 is generated, and the modified data memory 104 stores the data in FIG.
Polyline L on the device coordinate system as shown in 3
2 {P d , T L2 1, T L2 2, Q d } is stored.
【0076】そして、描画処理回路105は、変形デー
タ用メモリ104に記憶されたポリラインL2の描画処
理を行う。Then, the drawing processing circuit 105 draws the polyline L 2 stored in the modified data memory 104.
【0077】ここで、描画処理回路105が行うポリラ
インL2の描画処理について説明すると、例えば、描画
処理回路105は、ポリラインL2の個々のラインにお
いて、各ラインを描画するための最適なラスタ位置を各
々選択することにより描画処理を行う。換言すると、描
画処理回路105は、描画しようとするラインの傾きに
応じて、例えば、デバイス座標系における「n」を常に
1単位ずつ増加させ、デバイス座標系における「m」の
増分を、実際のライン位置と最も近いグリッド位置の間
の距離により決定して、ラインをフレームバッファ30
0に描画する。The drawing processing of the polyline L 2 performed by the drawing processing circuit 105 will now be described. For example, the drawing processing circuit 105 has an optimum raster position for drawing each line of the polyline L 2. The drawing process is performed by selecting each of. In other words, the drawing processing circuit 105 always increases “n” in the device coordinate system by one unit in accordance with the inclination of the line to be drawn, and increments “m” in the device coordinate system by the actual increment. The line is determined by the distance between the line position and the closest grid position to determine the line in the frame buffer 30.
Draw to 0.
【0078】尚、上述したような描画処理回路105が
行うポリラインL2の描画処理については、「実践コン
ピュータグラフィックス」(日刊工業新聞社)の「Br
esenhamアルゴリズム」に記載されているため、
ここでは、その詳細な説明は省略する。The drawing processing of the polyline L 2 performed by the drawing processing circuit 105 as described above is described in "Practical computer graphics" (Nikkankogyo Shimbun).
esenham algorithm ”,
Here, detailed description thereof is omitted.
【0079】また、例えば、上記図5に示したような、
点P(=(xp,yp,zp))、点Q(=(xq,y
q,zq))、点R(=(xr,yr,zr))とから
なる三角形のポリゴンGの形状データに対して、2次元
の区分的線形関数f2による変形処理を行う場合、上述
したラインLの2次元の区分的線形関数f2による変形
処理と同様にして、図14に示すような、ポリゴンGの
3つの頂点P,Q,Rに対するデバイス座標Pd,Qd,
Rdを求める。Further, for example, as shown in FIG.
Point P (= (xp, yp, zp)), point Q (= (xq, y
q, zq)) and the point R (= (xr, yr, zr)), the shape data of the triangular polygon G is deformed by the two-dimensional piecewise linear function f 2 as described above. Similar to the transformation processing of the line L by the two-dimensional piecewise linear function f 2 , the device coordinates P d , Q d , for the three vertices P, Q, R of the polygon G as shown in FIG.
Find R d .
【0080】そして、ポリゴンGのデバイス座標上の3
つの辺PdQd,QdRd,RdPdに対して、2次元の区分
的線形関数f2を用いて各々変形する。Then, 3 on the device coordinate of polygon G
The two sides P d Q d , Q d R d , and R d P d are each transformed using a two-dimensional piecewise linear function f 2 .
【0081】この結果、上記図14に示すような頂点の
集合G2{Pd,TG21,TG22,Qd,TG23,T
G24,Rd,TG25,TG26}が生成される。As a result, a set of vertices G 2 {P d , T G2 1, T G2 2, Q d , T G2 3, T as shown in FIG. 14 is obtained.
G2 4, R d , T G2 5, T G2 6} are generated.
【0082】したがって、変形データ用メモリ104に
は、頂点の集合G2{Pd,TG21,TG22,Qd,TG2
3,TG24,Rd,TG25,TG26}が記憶される。Therefore, in the deformation data memory 104, a set of vertices G 2 {P d , T G2 1, T G2 2, Q d , T G2.
3, T G2 4, R d , T G2 5, T G2 6} are stored.
【0083】そして、描画処理回路105は、変形デー
タ用メモリ104に記憶された頂点の集合G2の描画処
理を行う。Then, the drawing processing circuit 105 carries out drawing processing of the set G 2 of vertices stored in the deformation data memory 104.
【0084】ここで、描画処理回路105が行う頂点の
集合G2の描画処理について説明すると、例えば、描画
処理回路105は、頂点の集合G2で示される多角形包
み込む最小の四角形の内部の画素に対して、ラスタ上の
各画素が上記多角形の内部に存在するか否かを判断する
ことにより、上記多角形の塗りつぶし処理を行う。The drawing processing of the vertex set G 2 performed by the drawing processing circuit 105 will now be described. For example, the drawing processing circuit 105 uses the pixel inside the smallest quadrangle that encloses the polygon represented by the vertex set G 2 On the other hand, the polygon filling process is performed by determining whether each pixel on the raster exists inside the polygon.
【0085】尚、上述したような描画処理回路105が
行う頂点の集合G2の描画処理については、「実践コン
ピュータグラフィックス」(日刊工業新聞社)の「多角
形フィルタリング」に記載されているため、ここでは、
その詳細な説明は省略する。The drawing processing of the vertex set G 2 performed by the drawing processing circuit 105 as described above is described in “Practical Computer Graphics” (Nikkan Kogyo Shimbun) “Polygon Filtering”. ,here,
Detailed description is omitted.
【0086】上述のように、変形処理回路103が2次
元の区分的線形関数f2による変形処理を行うこととし
ても、変形処理回路103が3次元の区分的線形関数f
3による変形処理を行う場合と同様に、描画装置100
は、自然な味わいを持たせた形状データを容易に、且つ
高速に描画することができる。また、描画装置100を
従来の描画装置に汎用的に適用いることができる。As described above, even if the transformation processing circuit 103 carries out the transformation processing by the two-dimensional piecewise linear function f 2 , the transformation processing circuit 103 makes the three-dimensional piecewise linear function f.
As in the case of performing the transformation process by 3 , the drawing device 100
Can easily draw shape data with a natural taste at high speed. Further, the drawing apparatus 100 can be applied to a conventional drawing apparatus for general purposes.
【0087】また、上述した描画装置100では、変数
情報用メモリ102に記憶されている区分的線形関数を
3次元又は2次元の区分的線形関数としたが、変数情報
用メモリ102には、ポリゴンの辺やラインの長さに対
応した複数の区分的線形関数が記憶されており、変形処
理回路103は、変数情報用メモリ102に記憶されて
いる複数の区分的線形関数のうち、形状データ用メモリ
101に記憶されている形状データのポリゴンの辺やラ
インの長さに対応した区分的線形関数を用いて変形処理
を行うこととしてもよい。In the drawing apparatus 100 described above, the piecewise linear function stored in the variable information memory 102 is a three-dimensional or two-dimensional piecewise linear function. Of the plurality of piecewise linear functions stored in the variable information memory 102 are stored for the shape data. The transformation process may be performed using a piecewise linear function corresponding to the sides of the polygons or the lengths of the lines of the shape data stored in the memory 101.
【0088】この場合、例えば、変形処理回路103
は、長いポリゴンの辺やラインに対して変形処理を行う
際には、形状データ用メモリ101に記憶されている複
数の区分的線形関数のうち、区間数の多い区分的線形関
数を選出し、選出した区分的線形関数を用いて変形処理
を行う。また、変形処理回路103は、短いポリゴンの
辺やラインに対して変形処理を行う際には、形状データ
用メモリ101に記憶されている複数の区分的線形関数
のうち、区間数の少ない区分的線形関数を選出し、選出
した区分的線形関数を用いて変形処理を行う。In this case, for example, the transformation processing circuit 103
Selects a piecewise linear function with a large number of sections from a plurality of piecewise linear functions stored in the shape data memory 101 when performing deformation processing on the sides or lines of a long polygon, Deformation processing is performed using the selected piecewise linear function. In addition, the deformation processing circuit 103, when performing the deformation processing on the sides or lines of a short polygon, selects a piecewise linear function having a small number of sections from among a plurality of piecewise linear functions stored in the shape data memory 101. A linear function is selected, and transformation processing is performed using the selected piecewise linear function.
【0089】上述のようにして、描画装置100は、形
状データのポリゴンの辺やラインを変形させてフレーム
バッファ300に描画する際に、各描画毎に異なった区
分的線形関数を用いて変形処理を行うことにより、上述
したような変形処理によるポリゴン数の増加率を抑える
ことができる。また、描画装置100は、例えば、形状
の輪郭がゆらゆらと揺らいでいるような表現を持たせた
形状データを描画することができる。As described above, when the drawing apparatus 100 deforms the sides or lines of the polygon of the shape data and draws it in the frame buffer 300, the drawing apparatus 100 uses a different piecewise linear function for each drawing to perform the modification process. By performing the above, it is possible to suppress the increase rate of the number of polygons due to the deformation processing as described above. In addition, the drawing apparatus 100 can draw shape data having an expression that the contour of the shape fluctuates.
【0090】[0090]
【発明の効果】本発明に係る描画装置では、データ記憶
手段は、コンピュータグラフィックスにより生成された
多角形及び線分からなる形状データを記憶する。関数記
憶手段は、複数の区間からなる区分的線形関数を記憶す
る。変形手段は、上記データ記憶手段に記憶された形状
データを上記関数記憶手段に記憶された区分的線形関数
により変形して変形データを生成する。変形データ記憶
手段は、上記変形手段で得られた変形データを記憶す
る。描画手段は、上記変形データ記憶手段に記憶された
変形データをフレームメモリ上に描画する。これによ
り、上記描画装置は、自然な味わいを持たせた形状デー
タをフレームメモリ上に描画することができる。また、
上記変形手段は、上記関数記憶手段に記憶された区分的
線形関数を用いた単純な変形操作を行うため、従来用い
られていた画像を解析して変換する計算回路のような高
価な回路を描画装置に設ける必要がない。したがって、
上記描画装置は、自然な味わいを持たせた形状データを
容易にフレームメモリ上に描画することができ、装置の
コストダウンを図ることができる。また、上記描画装置
では、上記変形手段で変形処理を行うことにより、上記
関数記憶手段に記憶された区分的線形関数により変形し
て得られた変形データのポリゴン数が元の形状データの
ポリゴン数より大きくなるが、上記変形データのポリゴ
ンの形状は、所謂トライアングル・ファン(triangle f
an)であるため、多くの頂点が共有されている。したが
って、上記描画装置は、上記変形データの描画を高速に
行うことができる。また、元の形状データがポリゴン及
びラインで構成されているのと同様に、上記関数記憶手
段に記憶された区分的線形関数により変形して得られた
変形データもポリゴン及びラインで構成されているた
め、上記変形手段を従来の描画装置に設けるだけで、自
然な味わいを持たせた形状データをフレームメモリ上に
描画することができる。したがって、上記描画装置を従
来の描画装置に汎用的に適用いることができる。また、
上記描画装置では、上述のような構成とすることによ
り、フレームメモリへの描画を行う前に、上記関数記憶
手段に記憶された区分的線形関数による変形処理を行う
ようになされているため、例えば、形状データが建築物
のよう物体であり、その物体の内部を視点が歩き回る
(ウォークスルー)場合においても、ウォークスルー中
に上記区分的線形関数による変形処理が再度行われると
いうことはない。したがって、上記描画装置は、建築物
内部をウォークスルーするような画像でも、自然な味わ
いを持たせた形状データを高速にフレームメモリ上に描
画することができる。In the drawing apparatus according to the present invention, the data storage means stores the shape data composed of polygons and line segments generated by computer graphics. The function storage means stores a piecewise linear function composed of a plurality of sections. The deforming means deforms the shape data stored in the data storing means by the piecewise linear function stored in the function storing means to generate deformed data. The modification data storage means stores the modification data obtained by the above modification means. The drawing means draws the deformation data stored in the deformation data storage means on the frame memory. Thus, the drawing device can draw the shape data having a natural taste on the frame memory. Also,
Since the deforming means performs a simple deforming operation using the piecewise linear function stored in the function storing means, it draws an expensive circuit such as a calculation circuit for analyzing and converting an image that has been conventionally used. There is no need to install it in the device. Therefore,
The drawing device can easily draw the shape data having a natural taste on the frame memory, and the cost of the device can be reduced. Further, in the drawing device, the number of polygons of the deformed data obtained by deforming by the piecewise linear function stored in the function storage unit by performing the deforming process by the deforming unit is the number of polygons of the original shape data. Although it becomes larger, the shape of the polygon of the above deformation data is a so-called triangle fan (triangle f).
an), so many vertices are shared. Therefore, the drawing device can draw the deformation data at high speed. Further, similarly to the case where the original shape data is composed of polygons and lines, the deformation data obtained by deforming by the piecewise linear function stored in the function storage means is also composed of polygons and lines. Therefore, the shape data having a natural taste can be drawn on the frame memory only by providing the above-mentioned deforming means in the conventional drawing apparatus. Therefore, the drawing apparatus described above can be applied to a conventional drawing apparatus for general purposes. Also,
With the configuration described above, the drawing apparatus is configured to perform the transformation process using the piecewise linear function stored in the function storage unit before drawing in the frame memory. Even when the shape data is an object such as a building and the viewpoint walks inside the object (walk through), the deformation process by the piecewise linear function is not performed again during the walk through. Therefore, the drawing device can draw the shape data with a natural taste on the frame memory at high speed even for an image that walks through the interior of a building.
【0091】また、本発明に係る描画装置では、上記コ
ンピュータグラフィックにより生成された形状データ
は、2次元形状のデータである。これにより、上記描画
装置は、自然な味わいを持たせた2次元の形状データを
高速に、且つ容易にフレームメモリ上に描画することが
できる。Further, in the drawing apparatus according to the present invention, the shape data generated by the computer graphic is two-dimensional shape data. As a result, the drawing device can easily draw the two-dimensional shape data having a natural taste on the frame memory at high speed.
【0092】また、本発明に係る描画装置では、上記コ
ンピュータグラフィックにより生成された形状データ
は、3次元形状のデータである。これにより、上記描画
装置は、自然な味わいを持たせた3次元の形状データを
高速に、且つ容易にフレームメモリ上に描画することが
できる。Further, in the drawing apparatus according to the present invention, the shape data generated by the computer graphic is three-dimensional shape data. As a result, the drawing apparatus can draw the three-dimensional shape data having a natural taste at high speed and easily on the frame memory.
【0093】また、本発明に係る描画装置では、上記関
数記憶手段は、3次元の区分的線形関数を記憶する。こ
れにより、上記変形手段は、上記データ記憶手段に記憶
された形状データを3次元の区分的線形関数により変形
させることができる。In the drawing apparatus according to the present invention, the function storage means stores a three-dimensional piecewise linear function. As a result, the deforming means can deform the shape data stored in the data storing means by a three-dimensional piecewise linear function.
【0094】また、本発明に係る描画装置では、上記関
数記憶手段は、2次元の区分的線形関数を記憶する。こ
れにより、上記変形手段は、上記データ記憶手段に記憶
された形状データを2次元の区分的線形関数により変形
させることができる。Also, in the drawing apparatus according to the present invention, the function storage means stores a two-dimensional piecewise linear function. As a result, the deformation means can deform the shape data stored in the data storage means by a two-dimensional piecewise linear function.
【0095】また、本発明に係る描画装置では、上記関
数記憶手段は、区間数の異なる複数種類の区分的線形関
数を記憶する。そして、上記変形手段は、対象となる形
状データの多角形の辺及び線分毎に、上記関数記憶手段
に記憶された複数種類の区分的線形関数から上記多角形
の辺及び線分に応じて選出した任意の区分的線形関数を
用いて変形データを生成する。これにより、上記描画装
置は、変形処理によるポリゴン数の増加率を抑えること
ができる。また、上記描画装置は、例えば、形状の輪郭
がゆらゆらと揺らいでいるような表現を持たせた形状デ
ータをフレームメモリ上に描画することができる。Further, in the drawing apparatus according to the present invention, the function storage means stores a plurality of types of piecewise linear functions having different numbers of sections. Then, the deforming means, for each side and line segment of the polygon of the target shape data, according to the side and line segment of the polygon from a plurality of kinds of piecewise linear functions stored in the function storage means. The deformation data is generated using the selected piecewise linear function. As a result, the drawing apparatus can suppress the increase rate of the number of polygons due to the deformation process. Further, the drawing device can draw, on the frame memory, shape data having an expression such that the contour of the shape fluctuates.
【図1】本発明に係る描画装置の構成を示すブロック図
である。FIG. 1 is a block diagram showing a configuration of a drawing apparatus according to the present invention.
【図2】3つの区間からなる3次元の区分的線形関数を
説明するための図である。FIG. 2 is a diagram for explaining a three-dimensional piecewise linear function consisting of three sections.
【図3】ラインの形状データを説明するための図であ
る。FIG. 3 is a diagram for explaining line shape data.
【図4】上記3次元の区分的線形関数を用いて上記ライ
ンを変形させる変形処理を説明するための図である。FIG. 4 is a diagram for explaining a transformation process for transforming the line using the three-dimensional piecewise linear function.
【図5】ポリゴンの形状データを説明するための図であ
る。FIG. 5 is a diagram for explaining polygon shape data.
【図6】上記3次元の区分的線形関数を用いて上記ポリ
ゴンを変形させる変形処理を説明するための図である。FIG. 6 is a diagram for explaining a deformation process for deforming the polygon using the three-dimensional piecewise linear function.
【図7】上記変形処理により得られた三角形の集合の各
三角形の面法線をそのまま用いて描画した場合について
説明するための図である。FIG. 7 is a diagram for explaining a case where drawing is performed using the surface normals of the triangles of the set of triangles obtained by the above deformation processing as they are.
【図8】上記各三角形の面法線として上記ポリゴンの面
法線を与えて描画した場合について説明するための図で
ある。FIG. 8 is a diagram for explaining a case where a surface normal of the polygon is given as a surface normal of each triangle and the drawing is performed.
【図9】上記描画装置により得られた立方体の画像を説
明するための図である。FIG. 9 is a diagram for explaining an image of a cube obtained by the drawing device.
【図10】上記立方体の画像にテクスチャマッピング処
理を施した場合について説明するための図である。FIG. 10 is a diagram for explaining a case where a texture mapping process is performed on the cube image.
【図11】3つの区間からなる2次元の区分的線形関数
を説明するための図である。FIG. 11 is a diagram for explaining a two-dimensional piecewise linear function consisting of three sections.
【図12】上記ライン上の点のデバイス座標を求める処
理を説明するための図である。FIG. 12 is a diagram for explaining a process for obtaining device coordinates of points on the line.
【図13】上記2次元の区分的線形関数を用いて上記ラ
インを変形して得られたデバイス座標系のラインを説明
するための図である。FIG. 13 is a diagram for explaining a line of a device coordinate system obtained by deforming the line using the two-dimensional piecewise linear function.
【図14】上記2次元の区分的線形関数を用いて上記ポ
リゴンを変形して得られたデバイス座標系のポリゴンを
説明するための図である。FIG. 14 is a diagram for explaining a polygon in a device coordinate system obtained by deforming the polygon using the two-dimensional piecewise linear function.
100 描画装置、101 形状データ用メモリ、10
2 変形情報用メモリ、103 変形処理回路、104
変形データ用メモリ、105 描画処理回路、200
CPU、300 フレームバッファ100 drawing device, 101 shape data memory, 10
2 memory for deformation information, 103 deformation processing circuit, 104
Deformation data memory, 105 drawing processing circuit, 200
CPU, 300 frame buffer
Claims (6)
された多角形及び線分からなる形状データをフレームメ
モリ上に描画する描画装置であって、 上記形状データを記憶するデータ記憶手段と、 複数の区間からなる区分的線形関数を記憶する関数記憶
手段と、 上記データ記憶手段に記憶された形状データを上記関数
記憶手段に記憶された区分的線形関数により変形して変
形データを生成する変形手段と、 上記変形手段で得られた変形データを記憶する変形デー
タ記憶手段と、 上記変形データ記憶手段に記憶された変形データをフレ
ームメモリ上に描画する描画手段とを備えることを特徴
とする描画装置。1. A drawing device for drawing on a frame memory shape data composed of polygons and line segments generated by computer graphics, comprising a data storage means for storing the shape data and a section composed of a plurality of sections. Storing means for storing a dynamic linear function; a deforming means for deforming the shape data stored in the data storing means by a piecewise linear function stored in the function storing means to generate deformed data; and the deforming means. A drawing device, comprising: deformation data storage means for storing the deformation data obtained in step 1; and drawing means for drawing the deformation data stored in the deformation data storage means on a frame memory.
成された形状データは、2次元形状のデータであること
を特徴とする請求項1記載の描画装置。2. The drawing apparatus according to claim 1, wherein the shape data generated by the computer graphic is two-dimensional shape data.
成された形状データは、3次元形状のデータであること
を特徴とする請求項1記載の描画装置。3. The drawing apparatus according to claim 1, wherein the shape data generated by the computer graphic is three-dimensional shape data.
形関数を記憶することを特徴とする請求項3記載の描画
装置。4. The drawing apparatus according to claim 3, wherein the function storage means stores a three-dimensional piecewise linear function.
形関数を記憶することを特徴とする請求項2記載の描画
装置。5. The drawing apparatus according to claim 2, wherein the function storage means stores a two-dimensional piecewise linear function.
数種類の区分的線形関数を記憶し、 上記変形手段は、対象となる形状データの多角形の辺及
び線分毎に、上記関数記憶手段に記憶された複数種類の
区分的線形関数から上記多角形の辺及び線分に応じて選
出した任意の区分的線形関数を用いて変形データを生成
することを特徴とする請求項1記載の描画装置。6. The function storage means stores a plurality of types of piecewise linear functions with different numbers of sections, and the transformation means stores the function storage for each side and line segment of a target shape data polygon. The deformation data is generated by using an arbitrary piecewise linear function selected according to the sides and line segments of the polygon from a plurality of piecewise linear functions stored in the means. Drawing device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3245696A JPH09231381A (en) | 1996-02-20 | 1996-02-20 | Drawing equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3245696A JPH09231381A (en) | 1996-02-20 | 1996-02-20 | Drawing equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH09231381A true JPH09231381A (en) | 1997-09-05 |
Family
ID=12359484
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3245696A Withdrawn JPH09231381A (en) | 1996-02-20 | 1996-02-20 | Drawing equipment |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH09231381A (en) |
-
1996
- 1996-02-20 JP JP3245696A patent/JPH09231381A/en not_active Withdrawn
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10102663B2 (en) | Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location | |
| EP1064619B1 (en) | Stochastic level of detail in computer animation | |
| EP0950988A2 (en) | Three-Dimensional image generating apparatus | |
| KR100349483B1 (en) | Image processing in which polygon is divided | |
| JP3124999B1 (en) | Rendering method and apparatus, game apparatus, and computer-readable recording medium storing program for calculating data on shadow of object in virtual space | |
| US6791569B1 (en) | Antialiasing method using barycentric coordinates applied to lines | |
| JPH10334273A (en) | Three-dimensional image processing apparatus and three-dimensional image processing method | |
| JP2004005452A (en) | Image processor, image processing method, semiconductor device, computer program and record medium | |
| JP2007013874A (en) | Image special effects device, graphics processor, program and recording medium | |
| JP3350473B2 (en) | Three-dimensional graphics drawing apparatus and method for performing occlusion culling | |
| JP3547250B2 (en) | Drawing method | |
| JP2001022948A (en) | Image processing apparatus, image processing method, and recording medium | |
| EP1190391A1 (en) | Method and apparatus for generating outlines | |
| US20010055015A1 (en) | Area and span based Z-buffer | |
| JP3872056B2 (en) | Drawing method | |
| JPH09231381A (en) | Drawing equipment | |
| JPH0765195A (en) | Image processing apparatus and method | |
| US7116339B2 (en) | Image rendering method using recursive interpolation | |
| JP3587105B2 (en) | Graphic data processing device | |
| US6624820B2 (en) | Graphic processing method for determining representative texture data for a plurality of pixels and apparatus for same | |
| JP3453410B2 (en) | Image processing apparatus and method | |
| JPH02132572A (en) | image display device | |
| JP4372924B2 (en) | Moving image material generation method and apparatus | |
| JPH0350686A (en) | Graphic processing system | |
| JP2000030081A (en) | Drawing method of three-dimensional drawing apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20030506 |