JP4483026B2 - Graphic information conversion apparatus, graphic information conversion method, and recording medium - Google Patents

Graphic information conversion apparatus, graphic information conversion method, and recording medium Download PDF

Info

Publication number
JP4483026B2
JP4483026B2 JP2000146674A JP2000146674A JP4483026B2 JP 4483026 B2 JP4483026 B2 JP 4483026B2 JP 2000146674 A JP2000146674 A JP 2000146674A JP 2000146674 A JP2000146674 A JP 2000146674A JP 4483026 B2 JP4483026 B2 JP 4483026B2
Authority
JP
Japan
Prior art keywords
information
vertex
polygon
clip
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000146674A
Other languages
Japanese (ja)
Other versions
JP2001331807A (en
Inventor
豪 伊藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2000146674A priority Critical patent/JP4483026B2/en
Publication of JP2001331807A publication Critical patent/JP2001331807A/en
Application granted granted Critical
Publication of JP4483026B2 publication Critical patent/JP4483026B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、ベジエ曲線やベジエ曲面などの図形情報を取り扱うCAD及びCAMシステムを導入したエンタテインメント装置や、携帯端末装置、携帯電話機などに適用して好適な図形情報変換装置図形情報変換方法及び記録媒体に関するものである。
【0002】
【従来の技術】
近年の情報処理分野ではCAD(computer aided drawing)システムやCAM(computer aided manufacturing)システムなどを利用した画像処理装置や情報処理装置などが多くなってきた。この種の処理装置では、自由曲線や自由曲面をそれぞれ作成するための表現方法としてベジエ(Bezier)曲線やベジエ曲面が利用される場合が多い。
【0003】
このベジエ曲線の場合、周知のように(n+1)個の制御点を与えることによって作成された曲線は、n次のベジエ曲線と言われる。また(n+1)×(n+1)個の制御点を与えることによって作成された曲面は、n次ベジエ曲面と言われる。このうちベジエ曲線は制御の容易性などから3次ベジエ曲線が利用されることが多い。ベジエ曲面も同様の理由から(4×4)個の制御点で表現される3次ベジエ曲面が多用されている。
【0004】
図29及び図30は従来例に係る3次ベジエ曲線の例(その1、2)を示す図である。図29に示す3次ベジエ曲線は4つの制御点p0〜p3の座標値を用いて自由曲線を表現するものである。4つの制御点p0〜p3が与えられたとき、パラメータ(影響パラメータ;0≦t≦1)tを与えておくことによって一義的にベジエ曲線Rが決定される。3次ベジエ曲線は次式で表される。
【0005】
R(t)
=(1−t)3p0+3t(1−t)2p1+3t2(1−t)p2+t3p3
ここに、制御点p0〜p3は何れも位置ベクトルであり、位置座標(x,y,z)の成分を有している。制御点p0〜p3のうち曲線が通過する点p0やp3は端点(通過点)と呼称され、その他の制御点p1やp2は内部制御点と呼称される場合がある。
【0006】
そして、図30に示すように複数の端点、例えばp0〜p6を与えることによって、滑らかな自由曲線を作成することができる。2つの端点によって形成される最少構成要素の曲線をセグメントといい、(n+1)×(n+1)個の制御点を与えることによって作成された最少構成要素の曲面(矩形)をパッチという。
【0007】
図31は(4×4)個の制御点によって構成されるパッチPBの具体例を示している。複数のパッチを連ねると、図32に示すような3次のベジエ曲面を形成することができる。このような3次のベジエ曲面を取り扱う情報処理装置では、例えば、図32に示すZ方向に曲面を変化させるような画像処理が施される。この画像処理によって、3次のベジエ曲面を自由に変形することができる。
【0008】
【発明が解決しようとする課題】
ところで、従来方式のディスクトップ型やノート型といった大型の情報処理装置によれば、自由曲線や曲面を表現するときに、浮動小数点の積算器と加算器とを用いて3次のベジエ曲線やベジエ曲面の頂点の座標値計算などを行っていた。
【0009】
しかしながら、この種の積算器は非常に回路規模が大きいものであり、これを携帯電話機や、携帯用のゲーム機などに適用しようとした場合に、チップサイズの増大から携帯端末装置のコンパクト化の妨げとなったり、そのコストアップを招くことになる。従って、携帯端末装置で3次のベジエ曲線やベジエ曲面の頂点の座標値を処理しようとした場合にソフトウエアに頼わざるを得なくなるが、その場合に、演算速度が遅くなって十分な性能を得ることができないという問題がある。
【0010】
また、従来方式のハードウエアによる方式では、光源計算などのライティング処理に必要な頂点の法線ベクトルに関して、一度生成された頂点の座標値を再び使用して計算し直すので、正確な法線ベクトルを算出することが困難になったり、無断な演算時間が増加し、引いては全体の情報処理の高速化の妨げとなるという問題がある。
【0011】
そこで、この発明はこのような従来の課題を解決したものであって、n次の曲面図形を表現するための頂点情報を多角形情報に並び換える場合に、ソフトウエアに依存することなく、ハードウエアにより変換できるようにした図形情報変換装置、画像処理装置、情報処理装置、図形情報変換方法及び記録媒体を提供することを目的とする。
【0012】
【課題を解決するための手段】
上述した課題は、曲面図形を表現するための頂点情報をライン走査のための多角形情報に並び換える装置であって、少なくとも、2ライン分のメモリを有して頂点情報を記憶する記憶装置と、この記憶装置の書込み読出しを制御するメモリ制御部とを備え、メモリ制御部はm個の頂点情報を1ライン目のメモリに書き込むと共に、次のm個の頂点情報を2ライン目のメモリに書き込み、その後、1ライン目のメモリで各々隣接する2個づつの頂点情報と2ライン目のメモリで各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、該四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すことを特徴とする図形情報変換装置によって解決される。
【0013】
本発明に係る図形情報変換装置によれば、曲線図形及び曲面図形を表現するための頂点情報を多角形情報に並び換える場合に、少なくとも、記憶装置に2ライン分のメモリ領域を展開し、メモリ制御部によってm個の頂点情報を1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報を2ライン目のメモリに書き込み、その後、1ライン目のメモリで各々隣接する2個づつの頂点情報と2ライン目のメモリで各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、その四角形を斜めに分割した2(m−1)個の三角形の頂点情報を記憶装置から順次読み出すようになされる。
【0014】
従って、ソフトウエアに依存することなく、n次のベジエ曲線やベジエ曲面を表現する頂点情報をハードウエアにより多角形情報に変換することができる。しかも、小規模なメモリ構成によってスタックメモリなどを実現できるので、高性能かつ低消費電力動作が可能な図形情報変換装置を提供することができる。
【0022】
本発明に係る図形情報変換方法は曲面図形を表現するための頂点情報をライン走査のための多角形情報に並び換える方法であって、少なくとも、2ライン分のメモリ領域を展開し、m個の頂点情報を1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報を2ライン目のメモリ領域に書き込み、その後、1ライン目のメモリ領域で各々隣接する2個づつの頂点情報と2ライン目のメモリ領域で各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、該四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すことを特徴とするものである。
【0023】
本発明に係る図形情報変換方法によれば、ソフトウエアに依存することなく、n次のベジエ曲線やベジエ曲面を表現する頂点情報をハードウエアによって多角形情報に並び換えることができる。しかも、この方法によって実現される図形情報変換装置や、画像処理装置、情報処理装置などにおいて、小規模なメモリ構成により成るスタックメモリなどを使用することができる。
【0024】
本発明に係る記録媒体は曲面図形を表現するための頂点情報をライン走査のための多角形情報に並び換える制御手順を記録した記録媒体であって、この記録媒体には、少なくとも、2ライン分のメモリ領域を展開し、m個の頂点情報を1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報を2ライン目のメモリ領域に書き込み、その後、1ライン目のメモリ領域で各々隣接する2個づつの頂点情報と2ライン目のメモリ領域で各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、該四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すような制御手順が記録されることを特徴とするものである。
【0025】
本発明に係る記録媒体によれば、図形情報変換装置や、画像処理装置、情報処理装置などに内蔵されるスタックメモリやメモリ制御部を当該記録媒体に記録された制御手順に基づいて再現性良く制御できるので、ハードウエアにより変換された多角形情報に基づいてn次のベジエ曲線やベジエ曲面を表現することができる。
【0026】
従って、これらの図形情報を取り扱うCAD及びCAMシステムを導入したエンタテインメント装置や、携帯端末装置及び携帯電話機などに十分利用することができる。
【0027】
【発明の実施の形態】
続いて、この発明に係る図形情報変換装置、画像処理装置、情報処理装置、図形情報変換方法及び記録媒体の一実施の形態について、図面を参照しながら説明をする。
【0028】
(1)実施形態
図1は本発明に係る実施形態としての図形情報変換装置100の構成例を示すブロック図である。
この実施形態では、n次の曲面図形を表現するための頂点情報を多角形情報に並び換える場合にメモリ制御部を備え、m個の頂点情報を1ライン目のメモリに書き込むと共に、次のm個の頂点情報を2ライン目のメモリに書き込み、その後、1ライン目のメモリで各々隣接する2個づつの頂点情報と、2ライン目のメモリで各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、その四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すようにして、ソフトウエアに依存することなく、n次のベジエ曲線やベジエ曲面を表現する頂点情報をハードウエアにより多角形情報に変換できるようにしたものである。
【0029】
図1に示す図形情報生成装置10はn次のベジエ曲線やベジエ曲面を表現する頂点の座標値を生成するものであり、制御装置4、記憶媒体5及び図形情報生成部6を有している。この頂点の座標値は例えば、図2において、水平方向に(n+1[ただし、n≧2])個の制御点p0〜pn及びその垂直方向に(n+1)個の制御点p0〜pn(n+2)−nを格子状に与え、この格子状の(n+1)×(n+1)個の制御点p0〜pn(n+2)から生成されるものである。
【0030】
この図形情報生成部6は図1に示す線形補間器1、メモリ部2及び制御点選択部3を有している。線形補間器1では制御装置4からの桁合わせ制御信号S1などを受けて所定のビット幅の制御点の座標値A,Bと、所定のビット幅で0≦t≦1の値をとる補間係数tとに基づき、制御点間を内分する新たな制御点の座標値に関して(1)式を順次演算するようになされる。
A×(1−t)+B×t・・・・・(1)
【0031】
線形補間器1の出力段にはメモリ部2が接続され、順次演算された補間結果が制御装置4の書込み読出し制御信号S2を受けて記憶され、次の演算に必要な制御点の座標値を順次読み出すように制御される。
【0032】
この線形補間器1は例えば、2×2個の新たな制御点の座標値から頂点の座標値を演算するときに、その頂点の水平方向の接線ベクトルUout及びその垂直方向の接線ベクトルVoutを演算するようになされる。この2つのベクトルをメモリ部2から後段の画像処理装置などに出力するようになされる。これら2つの接線ベクトルUout及びVoutに基づいて頂点における法線ベクトルを求めるためである。法線ベクトルは明るさを演算するライティング処理などに利用される。
【0033】
この線形補間器1の入力段には制御点選択部3が接続され、制御装置4からの切り換え制御信号S0を受けて初期の制御点の座標値A,B又は線形補間演算によって新たに発生した制御点の座標値CA,CBを選択するようになされる。制御装置4にはROMなどの記録媒体5が接続され、このROM情報に基づいて制御装置4は線形補間器1や、メモリ部2、制御点選択部3などの入出力を制御するようになされる。
【0034】
この記録媒体5には少なくとも、所定のビット幅の(n+1)×(n+1)個の制御点の座標値を入力すると共に、所定のビット幅で0≦t≦1の値をとる補間係数tを入力し、隣接する各々2つの制御点の座標値をA,Bとしたとき、この水平方向で隣接する各々2つの制御点間について、それぞれ(1)式を順次演算してn×(n+1)個の新たな制御点の座標値を求め、更に水平方向で隣接する新たな各々2つの制御点間についてそれぞれ(1)式を順次演算することにより、最終的に2×(n+1)個の新たな制御点の座標値を求め、その後、垂直方向で隣接する各々2つの制御点間についてそれぞれ(1)式を順次演算して2×n個の新たな制御点の座標値を求め、更に垂直方向で隣接する新たな各々2つの制御点間についてそれぞれ(1)式を順次演算することにより、最終的に2×2個の新たな制御点の座標値を求め、その後、水平方向及び垂直方向に関して2×2個の制御点間について、それぞれ(1)式を順次演算し、頂点の座標値を求めるような制御手順が記録される。
【0035】
もちろん、この記録媒体5には、頂点の座標値を求めるに当たって、2×2個の新たな制御点の座標値から頂点の水平方向の接線ベクトル及び垂直方向の接線ベクトルを抽出し、その水平方向及び垂直方向の接線ベクトルに基づいて頂点における法線ベクトルを求めるような制御手順も記録されている。
【0036】
これらの制御手順に基づいて制御装置4により線形補間器1を再現性良く制御できるので、n次のベジエ曲線やベジエ曲面を表現する上位所定ビット幅の頂点の座標値をハードウエアにより発生させることができる。従って、ベジエ曲線やベジエ曲面などの図形情報を取り扱うCAD及びCAMシステムを導入したエンタテインメント装置や、携帯用ゲーム機、携帯端末装置、携帯電話機などに当該図形情報生成装置10を十分利用することができる。
【0037】
続いて、線形補間器1の内部構成例について説明する。この例では線形補間器1には浮動小数点線形補間器(FLIP)が使用される。図3は浮動小数点の座標値のデータフォーマット例を示す図である。図3に示すデータフォーマット例によれば、各々の制御点の座標値は32ビットで与えられ、その1ビット目が符号部Sであり、次の8ビットが指数部Eであり、残りの23ビットが加数部Fである。各々の制御点の座標値をこれらの符号部S、指数部E及び加数部Fで示すと式(2)のようになる。
1.F×2(E-127) ・・・(2)
【0038】
この符号部Sでは座標値の正又は負が区別され、指数部Eには8ビットで示される補間係数tが与えられる。補間係数tの値は0≦t≦1を採るが、例えば0.1刻みで(1−t)を演算するようなされる。この例では指数計算を高速化するために、指数部Eは0、16、32、48、64、80、96、112、128の16刻みで計9個の整数により表現するようにした。この場合に、t=0.5がE=64に相当する。加数部Fは小数点以下を23ビットの2進数で表される。これらはIEEE754で規定されているのでこれに従う。
【0039】
図4は線形補間器1の内部構成例を示すブロック図である。図4に示す線形補間器1は各々の制御点に関して浮動小数点で与えられる座標値A,Bに基づいて補間演算するものである。線形補間器1の入力段には桁合わせ部11が設けられ、制御点の所定のビット幅の座標値A,Bの指数部Eの大きい方に桁を合わせるようになされる。桁合わせ部11にはシフトレジスタが使用され、座標値A,Bの小さい方の指数部をシフトして大きい方の指数部に揃えるようになされる。
【0040】
この桁合わせ部11には第1及び第2の乗算器12、13が接続される。乗算器12では桁合わせ後の値A’と補間係数(1−t)とが乗算され、乗算器13は桁合わせ後の値B’と補間係数tとが乗算される。補間係数(1−t)は乗算器12の入力段に接続された減算器14により「1」から補正係数tを減算して生成される。
【0041】
これらの乗算器12,13には加算器15が接続され、乗算器12の出力A’×(1−t)と乗算器13の出力B×tとを加算するようになされる。加算器15には正規化部16が接続され、加算器15の出力A’×(1−t)+B’×tを(2)式で示したような浮動小数点で所定のビット幅の座標値に正規化するようになされる。
【0042】
従って、水平方向で隣接する各々2つの制御点間についてそれぞれA’×(1−t)+B’×tを順次演算して、n×(n+1)個の新たな制御点の座標値を求め、更に水平方向で隣接する新たな各々2つの制御点間についてそれぞれA’×(1−t)+B’×tを順次演算することにより、最終的に2×(n+1)個の新たな制御点の座標値を求め、その後、垂直方向で隣接する各々2つの制御点間についてそれぞれA’×(1−t)+B’×tを順次演算して2×n個の新たな制御点の座標値を求め、更に垂直方向で隣接する新たな各々2つの制御点間についてそれぞれA’×(1−t)+B’×tを順次演算することにより、最終的に2×2個の新たな制御点の座標値を求め、その後、水平方向及び垂直方向に関して2×2個の制御点間について、それぞれA’×(1−t)+B’×tを順次演算することにより、頂点の座標値を求めることができる。
【0043】
続いて、図5〜図10を参照しながら、図形情報生成装置10の動作例について説明をする。図5はU−V座標系における制御点p0〜p15の配置例を示す図である。
【0044】
この例ではn=3とした場合であって、図5に示すU−V座標系の水平方向(以下でu方向という)に4個の制御点及び垂直方向(以下でv方向という)に4個の制御点を格子状に与え、この4×4個の格子状の制御点p0〜p15から例えば図6に示すような3次のベジエ曲面を表現するための頂点の座標値を生成する場合を想定する。
【0045】
この図形情報生成装置10では23ビット幅の4×4個の制御点p0〜p15の座標値と、8ビット幅で0≦t≦1の値をとる補間係数tとが線形補間器1に入力される。そして、隣り合う各々2つの制御点の座標値をA,Bとしたとき、このu方向で隣接する各々2つの制御点間について、図7Aに示す4×4個の制御点p0〜p15の座標値をそれぞれ(1)式で順次演算して図7Bに示すような3×4個の新たな制御点pu0〜pu11の座標値を求める。
【0046】
その後、図7Bに示した3×4個の制御点pu0〜pu11の座標値を更にu方向で隣接する各々2つの制御点間について、それぞれ(1)式で順次演算して図9Aに示すような2×4個の新たな制御点pu0〜pu7の座標値を求める。今度はv方向で隣接する各々2つの制御点間について、図8Aに示した2×4個の制御点pu0〜pu7の座標値をそれぞれ(1)式で順次演算して図8Bに示すような2×3個の新たな制御点pv0〜pv5の座標値を求める。
【0047】
そして、図8Bに示した2×3個の制御点pv0〜pv5の座標値を更にv方向で隣接する各々2つの制御点間について、それぞれ(1)式で順次演算して図10Aに示すような2×2個の新たな制御点pv0〜pv3の座標値を求める。その後、図9Aに示した2×2個の制御点間について、u方向及びv方向に関してそれぞれ(1)式を順次演算し、図9Bに示すような2×2個の新たな制御点pp0〜pp3の座標値を求める。そして、図9Bに示した2×2個の新たな制御点pp0〜pp3の座標値をu方向及びv方向に関してそれぞれ(1)式を順次演算し、図9Cに示すような頂点P0の座標値を求めることを前提とする。
【0048】
もちろん、記録媒体5に記録された制御手順に基づいて、制御装置4は制御点の座標値A,Bの指数部の大きい方に桁を合わせ、この桁合わせ後の座標値Aと補間係数(1−t)とを乗算すると共に、桁合わせ後の座標値Bと補正係数tとを乗算し、その後、乗算結果を加算した後の加算値を浮動小数点で示される所定のビット幅の座標値に正規化するようなされる。
【0049】
これらを補間条件にして、図10のフローチャートのステップA1で4×4個の制御点の座標値が、記録媒体5の制御手順に従って、制御装置4の制御を受けた線形補間器1に23ビット幅の4×4個の制御点p0〜p15の座標値と、8ビット幅で0≦t≦1の値をとる補間係数tとが入力される。座標値の浮動小数点の指数部Eは0、16、32、48、64、80、96、112、128である。
【0050】
その後、ステップA2に移行してU座標を初期設定をするために、その座標値がu=0に設定される。そして、ステップA3に移行してu=128になったか否かが検出される。u=128になった場合には、4×4個の制御点p0〜p15による3次のベジエ曲面の頂点座標値が得られる。u=128になっていない場合には補間演算を継続するために、ステップA4に移行する。このu方向に関して1つの頂点の座標値の生成について9回の補間処理がなされる。
【0051】
ステップA4ではu方向で隣接する各々2つの制御点間について、(1)式により補間され、制御点p0〜p15を16個から8個に減らされる。例えば、(1)式に関して
C=FLIP(A,B,u);
と記述すると、u方向で隣接する各々2つの制御点間について、図7Aに示した4×4個の制御点p0〜p15の座標値がそれぞれ(2)式で順次演算され、図7Bに示したような3×4個の新たな制御点pu0〜pu11の座標値が求められる。
【0052】
pu[0]=FLIP(p[0],p[1],u);
pu[1]=FLIP(p[1],p[2],u);
pu[2]=FLIP(p[2],p[3],u);
pu[3]=FLIP(p[4],p[5],u);
pu[4]=FLIP(p[5],p[6],u);
pu[5]=FLIP(p[6],p[7],u);
pu[6]=FLIP(p[8],p[9],u);
pu[7]=FLIP(p[9],p[10],u);
pu[8]=FLIP(p[10],p[11],u);
pu[9]=FLIP(p[12],p[13],u);
pu[10]=FLIP(p[13],p[14],u);
pu[11]=FLIP(p[14],p[15],u); ・・・(3)
この制御点pu0〜pu11の座標値はメモリ部2に格納される。ここで隣り合う各々2つの制御点の座標値をCA,CBとする。
【0053】
その後、この座標値CA,CBがメモリ部2から読み出され、これが制御装置4の切り換え制御を受けた制御点選択部3により選択され、更にu方向で隣接する各々2つの制御点間について、(1)式により補間され、制御点pu0〜pu11を12個から8個に減らされる。ここで、(1)式に関して
C=FLIP(CA,CB,u);
と記述すると、u方向で隣接する各々2つの制御点間について、それぞれ(4)式で順次演算して図8Aに示すような2×4個の新たな制御点pu0〜pu7の座標値が求められる。
【0054】
pu[0]=FLIP(pu[0],pu[1],u);
pu[1]=FLIP(pu[1],pu[2],u);
pu[2]=FLIP(pu[3],pu[4],u);
pu[3]=FLIP(pu[4],pu[5],u);
pu[4]=FLIP(pu[6],pu[7],u);
pu[5]=FLIP(pu[7],pu[8],u);
pu[6]=FLIP(pu[9],pu[10],u);
pu[7]=FLIP(pu[10],pu[11],u);・・・(4)
これらの座標値もメモリ部2に格納される。
【0055】
その後、ステップA5に移行してV座標を初期設定をするために、その座標値がv=0に設定される。そして、ステップA6に移行してV座標についてv=128になったか否かが検出される。v=128でV座標における補間処理の1サイクルが終了するためである。従って、v=128でステップA11に移行するが、v=0、16、32、48、64、80、96、112の場合にはv方向の補間処理を継続するために、ステップA7に移行する。
【0056】
ステップA7ではv方向で隣接する各々2つの制御点間について、(1)式により補間され、制御点pu0〜pu7を8個から4個に減らされる。例えば、v方向で隣接する各々2つの制御点間について、図8Aに示した2×4個の制御点pu0〜pu7の座標値CA,CBをそれぞれ(5)式で順次演算して図8Bに示すような2×3個の新たな制御点pv0〜pv5の座標値が求められる。
【0057】
pv[0]=FLIP(pu[0],pu[2],v);
pv[1]=FLIP(pu[1],pu[3],v);
pv[2]=FLIP(pu[2],pu[4],v);
pv[3]=FLIP(pu[3],pu[5],v);
pv[4]=FLIP(pu[4],pu[6],v);
pv[5]=FLIP(pu[5],pu[7],v); ・・・・(5)
【0058】
これらの座標値もメモリ部2に格納される。その後、同様な読出し制御を受けて、図9Bに示した2×3個の制御点pv0〜pv5の座標値を更にv方向で隣接する各々2つの制御点間について、ステップA8に移行して、それぞれ(6)式で順次演算して図9Aに示すような2×2個の新たな制御点pv0〜pv3の座標値が求められる。
【0059】
pv[0]=FLIP(pv[0],pv[2],v);
pv[1]=FLIP(pv[1],pv[3],v);
pv[2]=FLIP(pv[2],pv[4],v);
pv[3]=FLIP(pv[3],pv[5],v); ・・・(6)
【0060】
その後、ステップA8に移行して図9Aに示した2×2個の制御点間について、u方向及びv方向に関してそれぞれ(7)式を順次演算し、図9Bに示すような2×2個の新たな制御点pp0〜pp3の座標値が求められる。
【0061】
pp[0]=FLIP(pv[0],pv[1],u);
pp[1]=FLIP(pv[2],pv[3],u);
pp[2]=FLIP(pv[0],pv[2],v);
pp[3]=FLIP(pv[1],pv[3],v); ・・・(7)
【0062】
そして、図9Bに示した2×2個の新たな制御点pp0〜pp3の座標値をステップA9に移行してu方向及びv方向に関してそれぞれ(8)式を順次演算し、図9Cに示すような頂点P0の座標値が求められる。
P0=FLIP(pp[0],pp[1],v) ・・・(8)
【0063】
なお、上式(2)〜(8)はいずれもC言語で記述したものである。その後、ステップA10に移行してv方向の補間処理の粗さを調整するv=v+dvが演算される。ここでdvはベジエ曲面を表現するv方向のパッチ面の分割数を粗くするか細かくするかを設定するための演算子である。dvは例えば16,8などの整数で与えられ、ここではパッチ面の分割数を細かくするために16(粗)を8(密)に減ずるようなv=v+dvを演算した後に、ステップA6に戻る。
【0064】
ステップA6では同様な補間演算をv=0〜128の場合について行うために、V座標についてv=128になったか否かが検出される。つまり、1つの頂点の座標値の生成についてu方向を1つ変化させる毎に、このv方向に関して9回の補間処理がなされる。従って、v方向に関して9回の補間処理が終わると、ステップA6でv=128となった場合に、ステップA11に移行して、u方向の補間処理の粗さを調整するu=u+duが演算される。
【0065】
ここでduはu方向のパッチ面の分割数を粗くするか細かくするかを設定するための演算子である。ここではパッチ面の分割数を細かくするために16を8に減ずるようなu=u+duを演算した後に、ステップA3に戻る。ステップA3では同様な補間演算をu=0〜128の場合について行うために、U座標についてu=128になったか否かが検出される。u=128になった場合には、9×9=81回の補間処理を経て4×4個の制御点p0〜p15による3次のベジエ曲面の1つの頂点座標値が得られ、その部分の補間演算を終了する。
【0066】
その後、ステップA12に移行して与えられた制御点について全て頂点座標値を生成したかが検出される。例えば、制御装置4からの線形補間器1へ終了コマンドが発行されることで、頂点座標値の生成処理を終了する。終了コマンド検出されない場合には、ステップA1に戻って次の4×4個の制御点が入力され、上述した処理が繰り返される。これにより、他の3次のベジエ曲面の頂点座標値をハードウエアにより得ることができる。
【0067】
[法線ベクトルの生成例]
図11A〜図11Cは図形情報生成装置10による法線ベクトルの生成例を示す遷移図である。この例では、図9Bに示した2×2個の新たな制御点pp0〜pp3の座標値から頂点P0のu方向の接線ベクトルu(上矢印を省略する)及びv方向の接線ベクトルv(上矢印を省略する)が抽出され、この2つの接線ベクトルu,vに基づいて頂点P0における法線ベクトルzが求められる。
【0068】
図11Aに示すu方向の接線ベクトルuはU座標のx成分をuxとし、そのy成分をuyとし、そのz成分をuzとすると、(9)により演算される。
【0069】
ux=pp[3].x−pp[2].x;
uy=pp[3].y−pp[2].y;
uz=pp[3].z−pp[2].z; ・・・・・(9)
【0070】
同様にして、図11Bに示すv方向の接線ベクトルvはV座標のx成分をvxとし、そのy成分をvyとし、そのz成分をvzとすると、(10)により演算される。
【0071】
vx=pp[1].x−pp[0].x;
vy=pp[1].y−pp[0].y;
vz=pp[1].z−pp[0].z; ・・・・・(10)
【0072】
図11Cに示す頂点P0の法線ベクトルzは、これら2つの接線ベクトルu,vの外積を演算したものである。この法線ベクトルzは光色を算出するライティング処理に使用される。例えば、光源から照射される光の向きを光源ベクトルとしたとき、この光源ベクトルと法線ベクトルの内積が演算される。そして、光源ベクトルと法線ベクトルとが一致したとき(cosθ=1)に、一番明るくなうように輝度を演算するようになされる。
【0073】
なお、頂点P0の接線ベクトルu,vは4個の制御点の座標値が重なっていると、正確に接線ベクトルu,vを演算できないので、制御装置4内に比較器などを設け、4個の制御点の座標値が重なているか否かを判別するようにするとよい。例えば、制御点の先頭の2つの座標値と最後の2つの座標値を比較して一致しているか否かを判別する。直線や球形に係る図形情報を生成する場合に座標値が一致するからである。
【0074】
このように、本発明に係る第1の実施形態としての図形情報生成装置10によれば、u方向に4個の制御点及びv方向に4個の制御点を線形補間器1に与えると、ソフトウエアに依存することなく、ハードウエアによりこの制御点p0〜p15から3次のベジエ曲面を表現する頂点P0の座標値を生成することができる。しかも、2×2個の新たな制御点pp0〜pp3の座標値から頂点P0の接線ベクトルu,vを抽出できるので、ライティング処理に必要な法線ベクトルzを生成することができる。
【0075】
また、桁合わせ部11、乗算器12,13、加算器15及び正規化部16といった小規模な回路構成によって線形補間器1を実現できるので、高性能かつ低消費電力動作が可能な図形情報生成装置10を提供することができる。これにより、当該図形情報生成装置10をベジエ曲面などの画像処理を行う画像処理装置、特に消費電力が制限される携帯端末装置などの情報処理装置に十分応用することができる。
【0076】
この例では制御点の座標値A,Bに関して各々浮動小数点の場合について説明したが、これに限られることはなく、これらの座標値A,Bを固定小数点で線形補間器1に与えてもよい。また、頂点の座標値は2次元のU−V座標系で処理する場合について説明したが、もちろん、3次以上でも本発明を適用することができる。頂点の座標値もこの限りではない。ベジエ曲面に限らずベジエ曲線や、3次だけでなくそれ以外の次数のベジエ曲面に適用することができる。
【0077】
[第1の画像処理装置]
図12は本発明に係る実施形態としての第1の画像処理装置100の構成例を示すブロック図である。
【0078】
この実施形態では、上述した図形情報生成装置10が応用され、ソフトウエアに依存することなく、ハードウエアにより生成された上位所定ビット幅の頂点の座標値を用いてn次のベジエ曲線やベジエ曲面を画像処理するものである。
【0079】
図12に示す画像処理装置100は図形情報生成装置10の主要部の一例となるベジエ分割装置17を有しており、その図形情報生成部6によって生成されたn次の曲面図形を画像処理するものである。この画像処理装置100はベジエ分割装置17の他に制御装置4’、操作部19、記憶媒体5の一例となるROM45、記憶装置の一例となるメインメモリ18などを有している。メインメモリ18には例えば3次のベジエ曲線やベジエ曲面を画像処理するための4×4個の制御点の座標値A,Bが記憶されている。この制御点の座標値A,Bは外部から書き換え可能になされる。メインメモリ18の記録内容例については図13において説明をする。
【0080】
このメインメモリ18には制御装置4’が接続されると共に、この制御装置4’には操作部19が接続されている。この操作部19はメインメモリ18の読出し制御をするための操作情報D3を入力するように操作される。制御装置4’では操作情報D3に基づいてメインメモリ18に書込み読出し信号S4を出力する。メインメモリ18では3次のベジエ曲線やベジエ曲面を画像処理するための4×4個の制御点の座標値A,Bが書込み読出し信号S4に基づいて図形情報生成部6に読み出される。
【0081】
このメインメモリ18に接続された図形情報生成部6では、操作情報D3に基づいて読み出された制御点の座標値A,Bに関して、u方向に(n+1[ただし、n≧2])個の制御点及びv方向に(n+1)個の制御点を格子状に与え、この格子状の制御点からn次の曲面図形に係る頂点座標値を生成するようになされる。この例では3次の曲面図形を表現するための頂点の座標値が生成される。ここで生成された頂点の座標値は頂点情報Coutとして後段の処理回路へ出力される。
【0082】
もちろん、図形情報生成部6には図4で説明した線形補間器を有しており、浮動小数点又は固定小数点で示される、23ビット幅の制御点の座標値A,Bと、8ビット幅で0≦t≦1の値をとる補間係数tとに基づき、制御点間を内分する新たな制御点の座標値に関してA×(1−t)+B×tを順次演算するようになされる。更に、図形情報生成部6では2×2個の新たな制御点の座標値から頂点のu方向に接線ベクトル及びv方向に接線ベクトルを抽出するようになされる。
【0083】
この図形情報生成部6には演算器7が接続され、2×2個の新たな制御点の座標値から抽出された頂点P0のu方向の接線ベクトル情報Uinとv方向の接線ベクトル情報Vinとを入力し、この情報Uinと情報Vinの外積を演算してその頂点P0の法線ベクトル情報Houtを出力するようになされる。
【0084】
制御装置4’に接続されたROM45には、制御点の座標値A,Bの指数部の大きい方に桁を合わせ、この桁合わせ後の座標値Aと補間係数(1−t)とを乗算すると共に、桁合わせ後の座標値Bと補正係数tとを乗算し、その後、乗算結果を加算した後の加算値を浮動小数点で示される所定のビット幅の座標値に正規化するような制御手順や、頂点P0のu方向の接線ベクトル情報Uinとv方向の接線ベクトル情報Vinとを所定のタイミングで外積を演算して出力するような制御手順が記述されている。
【0085】
続いて、メインメモリ18の記録内容例について説明する。図13はメインメモリ18の記録内容例を示すイメージ図である。この例では、1Mバイトのメモリ領域に、その格納アドレス0x00000〜0xFFFFFによって指定される番地にプログラム情報、描画リスト、形状データ、テクスチャデータID=1、及びID=2が記録されている。これらのデータは外部から転送されたゲームデータや、電子アニメーション用のデータであってもよい。
【0086】
図13に示す記録内容例によれば、n次のベジエ曲面などを生成するアプリケーション本体、このアプリケーションのサブルーチンなどのモジュール群及びライブラリ群から成るプログラム情報がメモリ領域の先頭に記述されている。このアプリケーションには例えば、n次のベジエ曲面を生成操作するモードを設定するか、又は他の操作モードを設定するかを選択させるようなプログラムデータも含まれる。プログラム情報の後には、1ポリゴンの形状データを複数繋げるための制御命令(以下でポリゴン描画命令ともいう)などの描画リストが記述されている。
【0087】
この描画リストの後には映像素材情報となる形状データが記述されている。例えばゲーム情報や広告情報などを2次元又は3次元映像表示するような動画データを含むグラフィックモデルデータ群が記述されている。動画データはDCT(離散コサイン変換)により画像圧縮されている。形状データの後には、グラフィックテクスチャデータ群が記述されている。テクスチャデータは76バイトで1ポリゴンの形状データを構成するようになされ、この例では三角形と四角形の2つのIDを持つテクスチャデータが記述される。テクスチャデータの内容については図23において説明する。この他にサウンドシーケンスデータ群及びサウンドウエーブデータ群が記述される場合もある。ユーザーの操作と、サウンドシーケンスに応じてサウンドウエーブデータを処理するためである。
【0088】
このように、本発明に係る実施形態としての第1の画像処理装置100によれば、上述した図形情報生成装置10の主要部がベジエ分割装置17に応用されるので、ソフトウエアに依存するところが少なくなり、n次のベジエ曲線やベジエ曲面を表現する上位所定ビット幅の頂点P0の座標値を用いてハードウエアにより高速に画像処理を行うことができる。従って、ベジエ分割装置17を構成する線形補間器を小規模な回路構成によって実現できるので、高性能かつ低消費電力動作が可能な画像処理装置100を提供することができる。
【0089】
また、本発明に係るROM45によれば、当該ROM45に記録された制御手順に基づいてベジエ分割装置17に内蔵される線形補間器を再現性良く制御できるので、n次のベジエ曲線やベジエ曲面を表現する上位所定ビット幅の頂点の座標値をハードウエアにより発生させることができる。
【0090】
(2)第2の実施形態
図14は本発明に係る第2の実施形態としての図形情報変換装置20の構成例を示すブロック図である。
【0091】
この実施形態ではn次の曲面図形を表現するための頂点情報を多角形情報に並び換える場合にメモリ制御部を備え、m個の頂点情報を1ライン目のメモリに書き込むと共に、次のm個の頂点情報を2ライン目のメモリに書き込み、その後、1ライン目のメモリで各々隣接する2個づつの頂点情報と、2ライン目のメモリで各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、その四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すようにして、ソフトウエアに依存することなく、n次のベジエ曲線やベジエ曲面を表現する頂点情報をハードウエアにより多角形情報に変換できるようにしたものである。
【0092】
図14に示す図形情報変換装置20は、n次の曲線図形及び曲面図形を表現するための頂点情報Cinをライン走査のための多角形(以下でポリゴンともいう)情報に並び換えるものである。この図形情報変換装置20には少なくとも、2ライン分のメモリ21A,21Bを有した記憶装置21が設けられ、1ライン毎に頂点情報Cinを記憶するようになされる。この記憶装置21にはラインメモリ21A,21Bを有したスタックメモリ21’などを使用するとよい。
【0093】
この記憶装置21にはメモリ制御部22が接続され、当該記憶装置21の書込み読出しを制御するようになされる。例えば、メモリ制御部22はm個の頂点情報Cinを1ライン目のメモリ21Aに書き込むと共に、次のm個の頂点情報Cinを2ライン目のメモリ21Bに書き込み、その後、1ライン目のメモリ21Aで各々隣接する2個づつの頂点情報Cinと2ライン目のメモリ21Bで各々隣接する2個づつの頂点情報Cinとにより形成される(m−1)個の四角形の頂点情報Cinをそのまま、もしくは、その四角形を斜めに分割した2(m−1)個の三角形の頂点情報Coutを順次読み出すようになされる。以下で四角形又は三角形の頂点情報を多角形情報Coutともいう。
【0094】
この例では2ライン目のメモリ21Bに書き込んだm個の頂点情報Cinは、次の第3ライン目に相当するm個の頂点情報Cinの並び換えに使用するので、1ライン目のメモリ21Aに順次シフトするようになされる。第3ライン目に相当するm個の頂点情報Cinを常に2ライン目のメモリ21Bに書き込むようにするためである。
【0095】
この例では更に、予め四角形動作モード又は三角形動作モードのいずれかを選択するための設定情報D4が入力される。ここで四角形動作モードとは四角形の頂点情報Cinを生成する図形変換制御をいい、三角形動作モードとは三角形の頂点情報Cinを生成する図形変換制御をいうものとする。例えば、設定情報D4が「1」のときは、四角形動作モードが選択され、それが「0」のときは三角形動作モードが選択される。多角形情報Coutは少なくとも、多角形の頂点の座標値、色テクスチャ情報及びクリップ情報を含むものである。色テクスチャ情報はn次の曲面図形を表示する背景の色情報である。クリップ情報は多角形情報Coutに基づいて三次元映像加工(以下でレンダリングという)処理するか否かを判断するためのコードであり、多角形の各頂点毎に付加される。
【0096】
ここで、多角形情報Coutによって表現される奥行きを含む表示領域(モニタなどの有効表示領域に等しい)に関して視認可能な範囲をクリップ領域としたとき、このクリップ領域から外れる多角形の頂点にクリップ情報「1」が付加され、このクリップ領域内に入っている多角形の頂点にはクリップ情報「0」が付加される。クリップ情報の付加については図18で説明する。
【0097】
このメモリ制御部22には判定部23が接続され、上述のクリップ領域から外れる多角形情報Coutを判別するようになされる。判定部23では、予め多角形の各々の頂点毎に付加されたクリップ情報を入力し、この多角形の頂点が1つでもクリップ領域内にある場合には、当該多角形情報Coutをレンダリング処理に含められる。n次のベジエ曲面などの一部がモニタなどの有効表示領域にかかっていて表示が必要であることによる。
【0098】
反対に、この多角形の全ての頂点がクリップ領域外にある場合には、当該多角形情報Coutをレンダリング処理から除外するようになされる。n次のベジエ曲面などがモニタなどの有効表示領域から外れてしまい、レンダリング処理を施してモニタ画面上に現れないことによる。この判定部23は三角形情報Coutを判定する場合には三入力NAND回路や三入力AND回路などから構成され、四角形情報を判定する場合には四入力NAND回路や四入力AND回路などから構成される。NAND回路を使用する場合にはインバータが接続され、入力又は出力論理を反転するようになされる。
【0099】
図15はm=8における図形情報変換例を示すイメージ図である。図16A及びBは三角形情報Cout及び四角形情報Cout’の出力例を示すイメージ図である。
【0100】
図15に示すベジエ曲面は8個の頂点情報Cinを走査ライン毎に同一平面に並べたものである。この例では、三角形動作モードでm=8の場合に、図16Aに示す三角形の各頂点が「1,2,9」、「2,9,10」、「2,3,10」、「3,10,11」、「3,4,11」・・・・の三角形情報Coutがメモリ制御部22から判定部23へ出力される。もちろん、各三角形の各頂点毎にクリップ情報「1」又は「0」が付加される。
【0101】
四角形動作モードでm=8の場合に、図16Bに示す四角形の各頂点が「1,2,9,10」、「2,3,10,11」、「3,4,11,12」・・・・の四角形情報Cout’がメモリ制御部22から判定部23へ出力される。もちろん、各四角形の各頂点毎にクリップ情報「1」又は「0」が付加される。
【0102】
図17は液晶表示モニタなどのクリップ領域例を示す仮想表示空間のイメージ図である。図18はスクリーン座標系xs,ysにおけるクリップ領域CLと4ビットのクリップコードの関係例を示す対応図である。この例では図17に示す仮想表示空間上にスクリーン座標系xs、ys、zsが定義され、奥行きはzs座標に関してZ=±1に入る多角形情報Coutのみをレンダリング処理に移行するようになされる。多角形情報Coutは上述した判別部23で判定される。
【0103】
図17に示すクリップ領域CLは、多角形情報Coutによって表現される奥行きを含む表示領域に関してビューポイントから視認可能な範囲を定義したものである。このクリップ領域CLは液晶表示モニタなどの480ライン×640画素の有効表示領域に等しい。このクリップ領域CLから外れる多角形の頂点に予めクリップ情報「1」が付加され、このクリップ領域CL内に入っている多角形の頂点にはクリップ情報「0」が付加される。
【0104】
つまり、図18に示す対応図はスクリーン座標系xs,ysにおいて、仮想表示面を井桁に分割したものである。この図の中央部はクリップ領域CLであり、この領域内に含まれる頂点情報Cinには各多角形の頂点P0毎にクリップ情報の一例となる4ビットのクリップコード「0000」が付加される。また、クリップ領域CLの左上部領域▲1▼に含まれる頂点情報Cinには各頂点毎にクリップコード「1001」が付加される。
【0105】
同様にして、その上部領域▲2▼に含まれる頂点情報Cinには各頂点毎にクリップコード「1000」が付加され、その右上部領域▲3▼に含まれる頂点情報Cinには各頂点毎にクリップコード「1010」が付加される。更に、その左横領域▲4▼に含まれる頂点情報Cinには各頂点毎にクリップコード「0001」が付加され、その右横領域▲5▼に含まれる頂点情報Cinには各頂点毎にクリップコード「0010」が付加される。
【0106】
クリップ領域CLの左下部領域▲6▼に含まれる頂点情報Cinには各頂点毎にクリップコード「0101」が付加され、その下部領域▲7▼に含まれる頂点情報Cinには各頂点毎にクリップコード「0100」が付加され、その右下部領域▲8▼に含まれる頂点情報Cinには各頂点毎にクリップコード「0110」がそれそれ付加される。これらのクリップコード(クリップ情報)は図形情報生成後の座標変換処理の際に頂点情報Cinに付加される。このクリップ情報を図形情報変換後に判定するようにしたのは、図15で説明したように例えば、ベジエ曲面を同一平面に並べて始めて、変換後の多角形情報Coutがクリップ領域CLに含まれるか否かが判定できることによる。
【0107】
図19はクリップコードによる判定結果例を示すイメージ図である。図19に示す斜線の三角形はレンダリング処理がなされないものであり、白抜きの三角形はレンダリング処理に移行されるものである。
【0108】
つまり、図19に示す領域▲1▼、▲3▼、▲4▼及び▲5▼のみに含まれる三角形「イ」と、三角形「ハ」〜「ホ」と、領域▲1▼、▲2▼及び▲3▼にかかっているがクリップ領域CLにかかっていない三角形「ロ」とは判定部23により「レンダリング処理しない」と判定される。これらはレンダリング処理をしても液晶表示モニタには表示されないので、判定部23によって当該三角形情報Coutを除外するようになされる。
【0109】
これに対して、クリップ領域CLにかかっている三角形「ト」と、領域▲2▼及び▲4▼〜▲8▼にかかっているものの、クリップ領域CLにその大部分がかかっている三角形「ヘ」とは判定部23により「レンダリング処理をする」と判別される。クリップ領域CLに一部でもかかっている三角形「ト」などは液晶表示モニタの有効表示領域で表示されるからである。
【0110】
図20はスクリーン座標系ys,zsにおける奥行きを考慮したクリップ領域CL’と6ビットのクリップコードの関係例を示す対応図である。この例では図20に示す仮想表示空間の奥行きにスクリーン座標系ys、zsが対応され、zs座標に関してZ=±1に入る三角形情報Coutのみをレンダリング処理に移行するようになされる。三角形情報Coutは上述した判別部23で判定される。
【0111】
図20に示す対応図はスクリーン座標系ys,zsにおいて、仮想空間を井桁に分割したものである。この対応図の中央部は奥行きを考慮したクリップ領域CL’であり、この領域内に含まれる頂点情報Cinには各三角形の頂点P0毎にクリップ情報の他の一例となる6ビットのクリップコード「0000XX」が付加される。また、クリップ領域CL’の前上部領域▲1▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「0110XX」が付加される。
【0112】
同様にして、クリップ上部領域▲2▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「0010XX」が付加され、その後上部領域▲3▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「1010XX」が付加される。更に、その前中央領域▲4▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「0100XX」が付加され、クリップ領域CLの後中央領域▲5▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「1000XX」が付加される。
【0113】
クリップ領域CLの前下部領域▲6▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「0101XX」が付加され、クリップ下部領域▲7▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「0001XX」が付加され、その後下部領域▲8▼’に含まれる頂点情報Cinには各頂点毎にクリップコード「1001XX」がそれそれ付加される。これらのクリップコード(クリップ情報)は図形情報生成後の座標変換処理の際に頂点情報Cinに付加される。
【0114】
続いて、本発明に係る実施形態としての図形情報変換方法について図形情報変換装置20の動作例を説明する。図21は本発明に係る実施形態としての図形情報変換装置20の動作例を示すフローチャートである。
【0115】
この例では3次の曲線図形及び曲面図形を表現するための、m=128の頂点情報Cinをライン走査のための三角形情報Coutに並び換える場合を想定する。少なくとも、U−V座標系で3次の曲面図形を表現したとき、その制御点の先端から最終端に至る長さ分(m=128)の頂点情報Cinが書き込める、2ライン分のメモリ領域を展開できるスタックメモリ21’などを準備する。
【0116】
この例で頂点情報Cinは多角形の頂点P0の座標値、色テクスチャ情報及びクリップ情報を含むものとし、多角形の各頂点毎に図18で説明したようなクリップコードが付加されているものとする。
【0117】
これを前提にして、図21に示すフローチャートのステップB1で頂点情報Cinに関してポリゴン形状を設定する。ここで、例えば設定情報D4=「0」を設定して三角形動作モードが選択される。その後、ステップB2で128個の頂点情報Cinを1ライン目のメモリ領域に書き込む。
【0118】
そして、ステップB3で次の128個の頂点情報Cinを2ライン目のメモリ領域に書き込む。その後、予め設定された動作モードに基づいてステップB4で制御を切り換える。この例では三角形動作モードが選択されているので、ステップB5に移行して1ライン目のメモリ領域で各々隣接する2個づつの頂点情報Cinと2ライン目のメモリ領域で各々隣接する2個づつの頂点情報Cinとにより形成される127個の四角形を斜めに分割した254個の三角形の頂点情報Cinを順次読み出すようになされる(図16A参照)。
【0119】
なお、予め設定された動作モードが四角形動作モードの場合には、ステップB6に移行して1ライン目のメモリ領域と2ライン目のメモリ領域の各々の頂点情報Cinとにより形成される127個の四角形の頂点情報Cinをそのまま順次読み出すようになされる(図16B参照)。
【0120】
その後、ステップB7に移行してクリップ領域CLから外れる三角形情報Coutが判別部23によって判別される。この三角形情報Coutの判別の際に、図19で説明した三角形「ト」、「ヘ」のように頂点が1つでもクリップ領域CL内にある場合には、当該三角形情報Coutをレンダリング処理に含め、三角形「イ」〜「ホ」のように、全ての頂点がクリップ領域CL外にある場合には、当該三角形情報Coutをレンダリング処理から除外するようになされる。
【0121】
そして、ステップB8に移行して、全ての三角形情報Coutの判別が終了したか否かがチェックされる。判別が全部終了していない場合にはステップB2に戻って上述した処理を繰り返すようになされる。判別が全部完了した場合には当該図形情報変換処理を終了する。
【0122】
このように、本発明に係る第2の実施形態としての図形情報変換装置20によれば、3次の曲線図形及び曲面図形を表現するための頂点情報Cinを三角形情報Coutに並び換える場合に、1ライン目のメモリ領域と2ライン目のメモリ領域の各々の頂点情報Cinとにより形成される127個の四角形の頂点情報Cinをそのまま、もしくは、その四角形を斜めに分割した254個の三角形の頂点情報Cinを記憶装置21から順次読み出すようになされる。
【0123】
従って、ソフトウエアに依存することなく、n次のベジエ曲線やベジエ曲面を表現する頂点情報Cinをハードウエアにより三角形情報Coutに並び換えることができる。しかも、メモリ21A,21Bといった小規模なメモリ構成によってスタックメモリなどを実現できるので、高性能かつ低消費電力動作が可能な図形情報変換装置20を提供することができる。
【0124】
[第2の画像処理装置]
図22は本発明に係る実施形態としての第2の画像処理装置200の構成例を示すブロック図である。
【0125】
この例では図14で説明した図形情報変換装置の一例となる頂点並換え装置201を備え、図6で説明した第1の画像処理装置100から出力される多角形の頂点P0の法線ベクトルHout及び各々の多角形の頂点情報(テクスチャデータ)Cinを座標変換した後に、ソフトウエアに依存することなくその頂点情報Cinを並び換え、その後、ライン走査のための画像処理をするようにしたものである。
【0126】
図22に示す第2の画像処理装置200は、第1の実施形態で生成されたn次の曲面図形を画像処理するものである。この装置200には第1の画像処理装置100が設けられ、n次の曲面図形を表現するための頂点の座標値を生成するようになされる。画像処理装置100には第1の実施形態で説明した図形情報生成装置が使用される。その内部構成例については図1及び図12で説明しているのでその説明を省略する。
【0127】
この画像処理装置100にはライティング処理部25と座標変換&クリップコード付加部24とが接続されている。ライティング処理部25では図12に示した演算器(外積)7から得られる頂点P0の法線ベクトルzと、予め設定された光源ベクトルとの内積(cosθ)を演算して光色を算出するようになされる。例えば、n次のベジエ曲面の頂点P0の法線ベクトルと光源ベクトルとが一致(θ=0又は180°)したときに、その頂点P0が一番明るくなうような輝度を演算するようになされる。
【0128】
また、座標変換&クリップコード付加部24では、画像処理装置100によるポリゴン描画命令に基づいて頂点P0の座標値がスクリーン座標(映像表示)系の座標値に変換されると共に、図18及び図20で説明したクリップコードが付加される。この例では、頂点情報Cinは76バイトで1ポリゴンの形状データを構成するようになされる(図23参照)。座標変換&クリップコード付加部24には頂点並換え装置201が接続されている。頂点並換え装置201はメモリ制御部22の一例となる書込みスタック22A及び読出しスタック22Bと、スタックメモリ(記憶装置)21’と、クリップ判定器(判定部)23’とを有している。なお、ライティング処理部25の出力は頂点並換え装置201をスルーしてラスタライズ処理部26に至るようになされる。
【0129】
スタックメモリ21’には、少なくとも、図14に示したような2ライン分のメモリ21A,21Bを有して頂点情報Cinが記憶される。書込みスタック22Aでは座標変換されたm個の頂点情報Cinを順次スタックメモリ21’の1ライン目に書き込むと共に、次のm個の頂点情報Cinを2ライン目に書き込むようになされる。読出しスタック22Bでは1ライン目で各々隣接する2個づつの頂点情報Cinと2ライン目で各々隣接する2個づつの頂点情報Cinとにより形成されるm−1個の四角形を斜めに分割した、図16で説明したような2(m−1)個の三角形情報Coutをスタックメモリ21’から順次読み出すようになされる。
【0130】
スタック読出し器22Bにはクリップ判定器23’が接続され、図19で説明したようなクリップ領域CLから外れる三角形情報Coutを判定するようになされる。クリップ判定器23’では予め三角形の各々の頂点毎に付加されたクリップコードが入力され、これらのクリップコードの三入力AND論理が演算され、三角形の頂点P0が1つでもクリップ領域CL内にある場合には、当該三角形情報Coutをレンダリング処理に含め、これら三角形の全ての頂点がクリップ領域CL外にある場合には、当該三角形情報Coutをレンダリング処理から除外するようになされる。
【0131】
上述したライティング処理部25及びクリップ判定器23’にはラスタライズ処理部26が接続され、座標変換後の頂点情報Cinが1ポリゴン毎にラスタライズ処理され、1画素のカラーテクスチャアドレス(U,V)が算出される。スクリーン座標系においてライン走査するためである。
【0132】
続いて、図23〜図26を参照しながら、第2の画像処理装置200の動作例について説明をする。図23は1ポリゴン(三角形)の形状データの記録内容例を示すデータフォーマットである。
【0133】
この例で図23に示す頂点情報Cinは、図24に示すような三角形の1ポリゴンの形状データを76バイトで構成するようになされる。つまり、1ポリゴンは図24に示す3つの頂点1,2,3を有する三角形により表現され、形状データの先頭には図23に示すテクスチャIDが記述され、その後には、三角形の第1頂点のX、Y、Z座標が各々の記述されると共に、第1頂点のカラー値、テクスチャU、V座標が記述される。
【0134】
これに続いて第2頂点のX、Y、Z座標が各々の記述されると共に、第2頂点のカラー値、テクスチャU、V座標が記述される。更に、第3頂点のX、Y、Z座標が各々の記述されると共に、第3頂点のカラー値、テクスチャU、V座標が記述される。これらの頂点情報Cinはユーザーの操作に応じて図16で説明したような三角形状の頂点1,2,3を繋ぎ合わせるように連続される。
【0135】
この例では、一方で、第1の画像処理装置100から出力される、n次の曲面図形を表現するための多角形の頂点P0の法線ベクトルHoutをライティング処理し、他方で各々の多角形の頂点情報Cinを座標変換した後に、ソフトウエアに依存することなく、その頂点情報Cinを並び換え、その後、ライン走査のための画像処理をする場合を想定する。
【0136】
つまり、連続された頂点情報Cinは1頂点毎に座標変換される。座標変換後の頂点情報Cinは、図25に示す1ポリゴン毎にラスタライズ処理を行って1画素毎にカラーテクスチャアドレス(U,V)が算出される。その後、テクスチャIDにより指示される頂点情報CinからU,V座標のテクスチャカラーが読み出され、各々の画素のカラー値が決定され、このカラー値に基づいて液晶表示モニタなどに3次元映像画像が表示される。なお、n次の曲面図形の各々の頂点の座標値は第1の画像処理装置100によって生成されるものとする。
【0137】
これを前提にして、図26に示すフローチャートのステップE1で第1の画像処理装置100から座標変換&クリップコード付加部24へ描画リストD2が転送される。その後、座標変換&クリップコード付加部24ではステップE2で描画リストD2に基づいて1頂点毎に頂点情報Cinがスクリーン座標系の座標値に変換される。この座標変換&クリップコード付加部24により座標変換された頂点情報Cinは、上述した頂点並換え装置201により、ライン走査のための三角形情報Coutに並び換えられる。
【0138】
そして、ステップE3で1ポリゴン毎にラスタライズ処理部26へ転送される。このラスタライズ処理部26では、1ピクセル(X,Y)毎のZ値、カラー値(Rf,Gf,Bf)、テクスチャアドレス(U,V)が算出される。その後、U,V座標系のテクスチャカラー値(Rt,Gt,Bt)が読み出される。そして、スクリーン座標系のカラー値RGBが(10)式により求められる。
R=Rf×Rt,G=Gf×Gt,B=Bf×Bt・・・・(10)
【0139】
その後、ステップE7に移行して奥行き情報であるZ値が比較される。Z値が図20に示したようにクリップ領域の手前にある場合には三角形情報Coutの書込みを行う。Z値がクリップ領域の後方にある場合には液晶表示モニタに表示されないので、その書込みを行わないようになされる。その後、ステップE9に移行して三角形情報Coutの書込みが全部終了したか否かがチェックされる。全部書込みを終了した場合には、当該画像処理を終了する。当該三角形情報Coutの書込みを全部終了していない場合にはステップE1に戻って上述した処理を繰り返すようになされる。
【0140】
このように、本発明に係る実施形態としての第2の画像処理装置200によれば、ソフトウエアに依存することなく、スタック書込み器22Aによってm個の頂点情報Cinが1ライン目のメモリ領域に書き込まれると共に、次のm個の頂点情報Cinが2ライン目のメモリに書き込まれ、その後、1ライン目のメモリで各々隣接する2個づつの頂点情報Cinと2ライン目のメモリで各々隣接する2個づつの頂点情報Cinとにより形成される(m−1)個の四角形を斜めに分割した2(m−1)個の三角形の頂点情報Cinがスタックメモリ部21’からスタック読出し器22Bにより順次読み出すようになされる。
【0141】
これにより、ハードウエアにより並び換えられた三角形情報Coutに基づいてn次のベジエ曲線やベジエ曲面を表現するような画像処理をすることができる。
【0142】
しかも、小規模な回路構成によって頂点並換え装置201などを実現できるので、高性能かつ低消費電力動作が可能な画像処理装置200を提供することができる。また、当該画像処理装置200を組み込んだエンタテインメント装置や、携帯端末装置及び携帯電話機などを構成することができる。
【0143】
(3)実施例
図27は本発明に係る実施例としての携帯端末装置300の構成例を示すブロック図である。
【0144】
この例では上述した第1の画像処理装置100と第2の画像処理装置200とを組み合わせ、情報処理装置の一例となる携帯端末装置300を構成したものである。第1及び第2の実施形態で説明した同じ符号のものは同じ機能を有するためその説明を省略する。
【0145】
つまり、図27に示す携帯端末装置300は、図12に示した第1の画像処理装置100と図22に示した第2の画像処理装置200とを1チップ化したLSI回路を主要部と成し、n次の曲面図形を外部操作に基づいて情報処理をするものである。
【0146】
図27において、一点鎖線で囲んだ第1の画像処理装置100はベジエ分割装置17、メインメモリ18、操作ボタン39、CPU40、入力コントローラ43及びROM(Read Only Memory)45などから構成され、二点鎖線で囲んだ第2の画像処理装置200は座標変換&クリップコード付加部24、ライティング処理部25、頂点並換え装置201及びラスタライズ処理部26から構成されている。
【0147】
これらの構成要素の他に携帯端末装置300には、メモリコントローラ27、フレームメモリ28、液晶表示コントローラ(LCDC)29、インタフェース42、サウンドプロセスユニット(以下で単にSPUという)44などが設けられている。この例で波線で囲んだ部分が1チップに集積化されるものである。もちろん、ベジエ分割装置17や、頂点並換え装置201、SPU44などは個別にICチップ化して同一プリント基板上に実装してもよい。
【0148】
図27に示すバス41にはベジエ分割装置17、メインメモリ18、CPU40、インタフェース42、入力コントローラ43、SPU44及びROM45などが接続されている。ROM45は第1及び第2の実施形態で接続した制御手順や、メインメモリ18、SPU44等の管理を行ういわゆるオペレーティングシステム等のプログラム情報を格納したものである。
【0149】
この例で、インタフェース42にはメモリカートリッジ30などが装着されて使用される。メモリカートリッジ30はゲームデータや、電子アニメーションなどの電子コンテンツを記録したものである。メモリカートリッジ30は例えば、バス34を有しており、このバス34にインタフェース31、読出しコントロール用のマスクROM32及びコンテンツ記録用のEEPROM33などが接続されている。EEPROM33にはゲームデータなどのプログラム情報や映像素材情報が記録されている。
【0150】
このメモリカートリッジ30の内容はインタフェース42及びバス41を通してメインメモリ18に転送される。メモリカートリッジ30から転送されてきたゲームキャラタの、例えば、第1の実施形態で説明したn次のベジエ曲面やベジエ曲線などを生成するための制御点の座標値が記憶される(図13参照)。メインメモリ18にはランダムアクセスメモリ(RAM:Random Access Memory)からなる。ここでいうメインメモリ18は、そのメモリ上でプログラムを実行できるものをいう。
【0151】
このメインメモリ18にはバス41を通してベジエ分割装置17が接続され、メインメモリ18から読み出した制御点の座標値に基づいてn次の曲面図形を画像処理するようになされる。ベジエ分割装置17は第1の実施形態で説明した浮動小数点の線形補間器を有しており、23ビット幅の制御点の座標値A,Bと、8ビット幅で0≦t≦1の値をとる補間係数tとに基づき、これらの制御点間を内分する新たな制御点の座標値に関してA×(1−t)+B×tを順次演算するようになされる。線形補間器の内部構成例及びその機能については図4で説明した通りであるのでその説明を省略する。これらの制御手順はROM45に記述されており、アプリケーション実行時にCPU40によって読み出される。
【0152】
上述のバス41にはベジエ分割装置17を制御するために入力コントローラ(INTC)43が接続され、この入力コントローラ43には操作ボタン39が装備されている。この操作ボタン39はユーザによって操作される。操作ボタン39を操作すると入力コントローラ43で操作情報D3が発生され、この操作情報D3はバス41を通してCPU40に入力するようになされる。CPU40は操作情報D3に基づいてメインメモリ18から頂点情報Cinを読み出すと共に、このの頂点情報Cinに関して、その曲線図形及び曲面図形を変化させるような表示制御を実行するようになされる。
【0153】
CPU40はROM45に記憶されているオペレーティングシステムを実行することにより、この携帯端末装置300の全体を制御するもので、例えば、32ビットのRISC−CPUから成る。そして、この携帯端末装置300は電源が投入されると、ゲームモード又は番組再生モードに応じてCPU40がROM45に記憶されているオペレーティングシステムを実行することにより、CPU40がベジエ分割装置17や、SPU44等の制御を行うようになっている。このCPU40は割込み制御を行うので、制御負担を軽減するために、ダイレクトメモリアクセス(DMA:Direct Memory Access)転送用の制御装置を別に設けるようにしてもよい。
【0154】
このベジエ分割装置17にはライティング処理部25と座標変換&クリップコード付加部24とが接続されている。ライティング処理部25ではCPU40からの演算要求に応じて、図12に示した演算器(外積)7から得られる頂点P0の法線ベクトルzと、予め設定された光源ベクトルとの内積(cosθ)を演算して光色を算出するようになされる(光源計算)。
【0155】
また、座標変換&クリップコード付加部24では、ポリゴン描画命令に基づいて頂点P0の座標値がスクリーン座標(映像表示)系の座標値に変換されると共に、図18及び図20で説明したクリップコードが頂点情報Cinに付加される。この例でも、頂点情報Cinは76バイトで1ポリゴンの形状データを構成するようになされる(図23参照)。この座標変換&クリップコード付加部24にはジオメトリトランスファエンジン(GTE:Geometry Transfer Engine)などの並列演算器が用いられ、CPU40からの演算要求に応じて座標変換、行列あるいはベクトル等の演算処理が高速に行われる。具体的には、この並列演算器により、例えば1つの三角形状のポリゴンに同じ色で描画するフラットシェーディングを行う演算の場合では、1秒間に最大150万程度のポリゴンの座標演算を行うことができ、これによって、この携帯端末装置300では、CPU40の負荷を低減するとともに、高速な座標演算を行うことができる。
【0156】
この座標変換&クリップコード付加部24には頂点並換え装置201が接続され、少なくとも、図14に示したような2ライン分のメモリ21A,21Bを有して頂点情報Cinが記憶される。頂点並換え装置201にはグラフィックプロセッサユニット(GPU:Graphic Processing Unit )などが使用され、CPU40からの描画指示に従って頂点並び換えが行われる。頂点並換え装置201では座標変換されたm個の頂点情報Cinを順次1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報Cinを2ライン目のメモリ領域に書き込むようになされる。その後、1ライン目で各々隣接する2個づつの頂点情報Cinと2ライン目で各々隣接する2個づつの頂点情報Cinとにより形成されるm−1個の四角形を斜めに分割した2(m−1)個の三角形情報Coutを順次読み出すようになされる。
【0157】
更に、頂点並換え装置201では図19で説明したようなクリップ領域CLから外れる三角形情報Coutを判定するようになされる。三角形の頂点P0が1つでもクリップ領域CL内にある場合には、当該三角形情報Coutをレンダリング処理に含め、これら三角形の全ての頂点がクリップ領域CL外にある場合には、当該三角形情報Coutをレンダリング処理から除外するようになされる。
【0158】
この頂点並換え装置201にはラスタライズ処理部26が接続され、座標変換後の頂点情報Cinが1ポリゴン毎にラスタライズ処理され、1画素のカラーテクスチャアドレス(U,V)が算出される。このラスタライズ処理部26にはメモリコントローラ27を通してフレームメモリ28が接続され、このメモリコントローラ27にはLCDC29を通して液晶表示モニタ36が接続されている。
【0159】
メモリコントローラ27ではラスタライズ処理部26からフレームメモリ28へ液晶表示モニタ36の1画面分の表示データが書き込まれる。例えば、メモリコントローラ27は、CPU40からの描画命令に従って、フレームメモリ28に対して多角形(ポリゴン)等の描画を行う。このメモリコントローラ27は、1秒間に最大36万程度のポリゴンの描画を行うことができるようになっている。さらに、このフレームメモリ28は、いわゆるデュアルポートRAMからなり、メモリコントローラ27からの描画処理と、表示のための読み出しとを同時に行うことができるようになっている。
【0160】
このフレームメモリ28は、例えば1Mバイトの容量を有し、それぞれ16ビットの、横が1024画素、縦が512画素からなるマトリックスとして扱われる。また、このフレームメモリ28には、映像出力として展開される表示領域の他に、メモリコントローラ27がポリゴン等の描画を行う際に参照するカラールックアップテーブル(CLUT:Color Look Up Table )が記憶されるCLUT領域と、描画時に座標変換されてメモリコントローラ27によって描画されるポリゴン等の中に挿入(マッピング)される素材(テクスチャ)が記憶されるテクスチャ領域が設けられている。これらのCLUT領域とテクスチャ領域は、表示領域の変更等に従って動的に変更されるようになっている。
【0161】
なお、このメモリコントローラ27はラスタライズ処理部26と共に、上述のフラットシェーディングの他にポリゴンの頂点の色から補完してポリゴン内の色を決めるグーローシェーディングと、このテクスチャ領域に記憶されているテクスチャをポリゴンに張り付けるテクスチャマッピングを行うことができるようになっている。これらのグーローシェーディングまたはテクスチャマッピングを行う場合には、この座標変換&クリップコード付加部24は、1秒間に最大50万程度のポリゴンの座標演算を行うようになされる。
【0162】
上述のメモリコントローラ27からの表示データはLCDC29で映像出力信号φvに変換され、この映像出力信号φvが液晶表示モニタ36に出力される。液晶表示モニタ36では例えば、3次のベジエ曲面から成るゲームキャラクタを3次元表示するようになされる。
【0163】
また、SPU44ではCPU40からの指示に基づいて、ゲームや電子アニメーションに係る音声情報を再生し増幅などが行われてその音声信号がスピーカー37に出力される。SPU44内に波形データ等を記録したサウンドバッファなどを設け、楽音、効果音等を発生するようにしてもよい。サウンドバッファを設けた場合には、SPU44で、例えば16ビットの音声データを4ビットの差分信号として適応予測符号化(ADPCM:Adaptive Differential PCM )された音声データを再生(ADPCM復号機能)したり、サウンドバッファに記憶されている波形データを再生することにより、効果音等を発生(再生機能)したり、サウンドバッファに記憶されている波形データを変調させて再生(変調機能)することもできるようになる。このような機能を備えることによって、このSPU44は、CPU40からの指示によって記録された波形データに基づいて楽音、効果音等を発生するいわゆるサンプリング音源として使用することができる。
【0164】
続いて、携帯端末装置300の動作例について説明をする。図28は携帯端末装置300における処理例を示すフローチャートである。この例では、ゲーム用のメモリカートリッジ30を装着してゲームモードを実行することを想定する。ゲームデータには3次のベジエ曲面により構成されるキャラクタが準備され、ベジエ分割装置17では線形補間器により制御点の座標値が分割され、頂点並換え装置では三角形動作モードにより頂点情報Cinが並び換えられることを前提とする。
【0165】
これを前提にして、図28のフローチャートのステップF1でユーザは当該携帯端末装置300にメモリカートリッジ30を装着した後に、ステップF2で電源をオンする。ここで電源が投入されると、CPU40がROM45に記憶されているオペレーティングシステムを実行することにより、ベジエ分割装置17や、SPU44等の制御を行うようになされる。この例ではユーザはステップF3でゲームモードを選択する。このアプリケーション実行時にCPU40によってROM45から第1及び第2の実施形態で説明した制御手順が読み出される。
【0166】
そして、一方で、ユーザはステップF4で操作ボタン39を操作する。操作ボタン39が操作されると、入力コントローラ43及びバス41を通してCPU40に操作情報D3が入力される。この操作情報D3はゲームキャラタを構成する3次のベジエ曲面やベジエ曲線などを変形させたり、キャラクタを移動させたりするために使用される。
【0167】
この操作情報D3の入力に並行して、CPU40はステップF5〜ステップF10で操作情報D3に基づいてメインメモリ18から頂点情報Cinを読み出すと共に、この頂点情報Cinに関して、その3次の曲線図形及び曲面図形を変化させるような表示制御を実行するようになされる。
【0168】
つまり、ステップF5ではメモリカートリッジ30からプログラム情報及び映像素材情報から成るゲームデータが読み出され、メインメモリ18に転送される。この映像素材情報には、ゲームキャラタを構成する3次のベジエ曲面やベジエ曲線などを生成するための制御点の座標値が含まれている(図13参照)。
【0169】
このゲームデータがメインメモリ18に転送されると、ステップF6に移行してベジエ分割装置17では操作情報D3に基づいてメインメモリ18から読み出した制御点の座標値に基づいて3次の曲面図形を画像処理するようになされる。例えば、ベジエ分割装置17の浮動小数点の線形補間器により、23ビット幅の制御点の座標値A,Bと、8ビット幅で0≦t≦1の値をとる補間係数tとに基づき、これらの制御点間を内分する新たな制御点の座標値に関してA×(1−t)+B×tを順次演算するようになされる。
【0170】
そして、ステップF7ではCPU40からのポリゴン描画命令に基づいて頂点P0の座標値が座標変換&クリップコード付加部24により、スクリーン座標(映像表示)系の座標値に変換されると共に、図18及び図20で説明したクリップコードが頂点情報Cinに付加される。例えば、フラットシェーディングの場合に、1秒間に最大150万程度のポリゴンの座標演算が行われる。
【0171】
これに並行してステップF8ではCPU40からの演算要求に応じてライティング処理部25により、図12に示した演算器(外積)7から得られる頂点P0の法線ベクトルzと、予め設定された光源ベクトルとの内積(cosθ)を演算して光色を算出するようになされる(光源計算)。
【0172】
その後、ステップF9に移行してCPU40からの描画命令に応じて頂点並換え装置201では、座標変換されたm個の頂点情報Cinを順次1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報Cinを2ライン目のメモリ領域に書き込むようになされる。その後、1ライン目で各々隣接する2個づつの頂点情報Cinと2ライン目で各々隣接する2個づつの頂点情報Cinとにより形成されるm−1個の四角形を斜めに分割した2(m−1)個の三角形情報Coutを順次読み出すようになされる。
【0173】
更に、頂点並換え装置201では図19で説明したようなクリップ領域CLから外れる三角形情報Coutを判定するようになされる。三角形の頂点P0が1つでもクリップ領域CL内にある場合には、当該三角形情報Coutをレンダリング処理に含め、これら三角形の全ての頂点がクリップ領域CL外にある場合には、当該三角形情報Coutをレンダリング処理から除外するようになされる。
【0174】
その後、ステップF10では座標変換後の頂点情報Cinがラスタライズ処理部26により、1ポリゴン毎にラスタライズ処理され、1画素のカラーテクスチャアドレス(U,V)が算出される。そして、ステップF11に移行してメモリコントローラ27ではラスタライズ処理部26からフレームメモリ28へ液晶表示モニタ36の1画面分の表示データが書き込まれる。例えば、メモリコントローラ27は、CPU40からの描画命令に従って、フレームメモリ28に対して1秒間に最大36万程度のポリゴンの多角形(ポリゴン)等の描画が行われる。
【0175】
ここで、メモリコントローラ27がポリゴン等の描画を行う際に、テクスチャ領域やカラールックアップテーブルなどが参照され、フラットシェーディング処理、グーローシェーディング処理、テクスチャマッピング処理等を行うようになされる。この映像表示処理による表示データはLCDC29で映像出力信号φvに変換され、この映像出力信号φvが液晶表示モニタ36に出力される。液晶表示モニタ36では例えば、3次のベジエ曲面から成るゲームキャラクタを3次元表示するようになされる。この映像表示処理に伴う音声情報はCPU40からの指示に基づいて、SPU44により再生され増幅され、その音声信号がスピーカー37に出力される。これにより、ユーザは携帯端末装置300でゲームを楽しむことができる。
【0176】
なお、ゲームが終わると、ステップF12に移行してゲームモードを終了するか否かがCPU40により判断される。ゲームモードを終了する場合には、電源オフ情報などがCPU40により検出されるので、これらの情報処理を終了する。ユーザがゲームモードの繰り返しなどを操作ボタン39を操作してCPU40に指示した場合には、ステップF4及びステップF5に戻って、上述したステップF4〜ステップF11が繰り返される。これにより、ユーザは携帯端末装置300で何度もゲームを楽しむことができる。
【0177】
このように、本発明に係る実施例としての携帯端末装置300によれば、第1及び第2の画像処理装置100、200が応用されるので、ソフトウエアに依存することなく、外部からの操作情報D3とハードウエアにより処理された三角形情報Coutとに基づいてゲームキャラクタなどのベジエ曲面を高速に情報処理することができる。
【0178】
このベジエ曲面を小規模なハードウエアによって処理することができるだけではなく、同時に後段のライティング処理部25で必要な法線ベクトルも算出することができる。また、クリップ判定を頂点並び換えと同時に簡単に行うことができ、クリップ領域CLに一部でも入る可能性のない三角形情報Coutを除去できる。
【0179】
従って、無駄な三角形情報Coutをレンダリング処理しなくても済み、当該携帯端末装置300の性能を向上させることができる。これにより、今まで、曲面処理が困難であった携帯端末装置300等でベジエ曲面処理を導入することができる。
【0180】
しかも、ベジエ分割装置17を構成する線形補間器を小規模な回路構成によって実現できるし、小規模なメモリ構成によって頂点並換え装置201を実現できる。従って、高性能かつ低消費電力動作が可能な携帯端末装置300や、ゲーム機能付きの携帯電話機を提供することができる。
【0181】
また、本実施例に係るROM45によれば、ベジエ分割装置17や頂点並換え装置201を制御手順に基づいてタイミング良く制御できるので、n次の曲面図形を全てハードウエアで処理・描画することが可能となる。ソフトウエアによるオーバーヘッドが無くなるので、非常に高性能な携帯端末装置300を構成することができる。
【0182】
【発明の効果】
以上説明したように、本発明に係る図形情報変換装置によれば、曲線図形及び曲面図形を表現するための頂点情報を多角形情報に並び換える場合にメモリ制御部が備えられ、m個の頂点情報を1ライン目のメモリに書き込むと共に、次のm個の頂点情報を2ライン目のメモリに書き込み、その後、1ライン目のメモリで各々隣接する2個づつの頂点情報と、2ライン目のメモリで各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、その四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すものである。
【0183】
この構成によって、ソフトウエアに依存することなく、n次のベジエ曲線やベジエ曲面を表現する頂点情報をハードウエアにより多角形情報に並び換えることができる。しかも、小規模なメモリ構成によってスタックメモリなどを実現できるので、高性能かつ低消費電力動作が可能な図形情報変換装置を提供することができる。
【0184】
本発明に係る画像処理装置によれば、水平方向の(n+1)個の制御点及び垂直方向の(n+1)個の制御点から生成されたn次の曲面図形を画像処理する場合に、上述した図形情報変換装置が備えられるものである。
【0185】
この構成によって、ソフトウエアに依存することなく、ハードウエアにより並び換えられた多角形情報に基づいてn次のベジエ曲線やベジエ曲面を表現するような画像処理をすることができる。しかも、小規模なメモリ構成によって図形情報変換装置などを実現できるので、高性能かつ低消費電力動作が可能な画像処理装置を提供することができる。
【0186】
本発明に係る情報処理装置によれば、水平方向の(n+1)個の制御点及び垂直方向の(n+1)個の制御点から生成されたn次の曲面図形を外部からの操作情報に基づいて情報処理をする場合に、上述した画像処理装置が備えられるものである。
【0187】
この構成によって、ソフトウエアに依存することなく、ハードウエアにより画像処理された多角形情報に基づいてn次のベジエ曲線やベジエ曲面を表現するような情報処理をすることができる。しかも、小規模なメモリ構成によって画像処理装置などを実現できるので、高性能かつ低消費電力動作が可能な情報処理装置、特に、エンタテインメント装置や、携帯電話機、携帯端末装置などを提供することができる。
【0188】
本発明に係る図形情報変換方法によれば、曲面図形を表現するための頂点情報をライン走査のための多角形情報に並び換える際に、少なくとも、2ライン分のメモリ領域を展開し、m個の頂点情報を1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報を2ライン目のメモリ領域に書き込み、その後、前記1ライン目のメモリで各々隣接する2個づつの頂点情報と前記2ライン目のメモリで各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、その四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すようになされる。
【0189】
この構成によって、ソフトウエアに依存することなく、n次のベジエ曲線やベジエ曲面を表現する頂点情報をハードウエアによって多角形情報に並び換えることができる。しかも、この方法によって実現される図形情報変換装置や、画像処理装置、情報処理装置などにおいて、小規模なメモリ構成により成るスタックメモリなどを使用することができる。
【0190】
本発明に係る記録媒体によれば、曲面図形をライン走査をするための頂点情報を多角形情報に並び換える制御手順が記述されて成るものである。
【0191】
この構成によって、図形情報変換装置や、画像処理装置、情報処理装置などに内蔵されるスタックメモリやメモリ制御部を当該記録媒体に記録された制御手順に基づいて再現性良く制御することができる。
【0192】
この発明はベジエ曲線やベジエ曲面などの図形情報を取り扱うCAD及びCAMシステムを導入したエンタテインメント装置や、携帯端末装置、携帯電話機などに適用して極めて好適である。
【図面の簡単な説明】
【図1】本発明に係る第1の実施形態としての図形情報生成装置10の構成例を示すブロック図である。
【図2】頂点の座標値生成時の(n+1)×(n+1)個の制御点p0〜pn(n+2)の配置例を示す図である。
【図3】浮動小数点による座標値のデータフォーマット例を示す図である。
【図4】線形補間器1の内部構成例を示すブロック図である。
【図5】U−V座標系における4×4個の制御点p0〜p15の配置例を示す図である。
【図6】3次のベジエ曲面の図形例を示すイメージ図である。
【図7】A及びBは3次のベジエ曲面図形の頂点の座標値の生成例(その1)を示す遷移図である。
【図8】A及びBは3次のベジエ曲面図形の頂点の座標値の生成例(その2)を示す遷移図である。
【図9】A〜Cは3次のベジエ曲面図形の頂点の座標値の生成例(その3)を示す遷移図である。
【図10】図形情報生成装置10における動作例を示すフローチャートである。
【図11】A〜Cは3次のベジエ曲面図形の頂点P0の法線ベクトルの生成例を示す遷移図である。
【図12】本発明に係る実施形態としての第1の画像処理装置100の構成例を示すブロック図である。
【図13】メインメモリ18の記録内容例を示すイメージ図である。
【図14】本発明に係る第2の実施形態としての図形情報変換装置20の構成例を示すブロック図である。
【図15】m=8における図形情報変換例を示すイメージ図である。
【図16】A及びBは三角形情報Cout及び四角形情報Cout’の出力例を示すイメージ図である。
【図17】液晶表示モニタなどのクリップ領域例を示す仮想表示空間のイメージ図である。
【図18】スクリーン座標系xs,ysにおけるクリップ領域と4ビットのクリップコードの関係例を示す対応図である。
【図19】クリップコードによる判定結果例を示すイメージ図である。
【図20】スクリーン座標系ys,zsにおけるクリップ領域と奥行きコードを含めた6ビットのクリップコードの関係例を示す対応図である。
【図21】本発明に係る実施形態としての図形情報変換装置20における動作例を示すフローチャートである。
【図22】本発明に係る実施形態としての第2の画像処理装置200の構成例を示すブロック図である。
【図23】1ポリゴン(三角形)の形状データの記録内容例を示すデータフォーマットである。
【図24】三角形状のポリゴンの構成例を示すイメージ図である。
【図25】三角形情報Coutのラスタライズ処理例を示すイメージ図である。
【図26】第2の画像処理装置200における処理例を示すフローチャートである。
【図27】本発明に係る実施例としての携帯端末装置300の構成例を示すブロック図である。
【図28】携帯端末装置300における処理例を示すフローチャートである。
【図29】従来例に係る3次のベジエ曲線の例(その1)を示す図である。
【図30】3次のベジエ曲線の例(その2)を示す図である。
【図31】3次のベジエ曲面の例(その1)を示す図である。
【図32】3次のベジエ曲面の例(その2)を示す図である。
【符号の説明】
1・・・線形補間器、2,21A,21B・・・メモリ部、21’・・・スタックメモリ、3・・・制御点選択部、4,4’・・・制御装置、5・・・記録媒体、5’・・・ROM(記録媒体)、6・・・図形情報生成部、7・・・演算器、10・・・図形情報生成装置、11・・・桁合わせ部、12,13・・・乗算器、14・・・減算器、15・・・加算器、16・・・正規化部、17・・・ベジエ分割装置、18・・・メインメモリ、19・・・操作部、20・・・図形情報変換装置、21・・・記憶装置、22・・・メモリ制御部、22A・・・スタック書込み器、22B・・・スタック読出し器、23・・・判定部、23’・・・クリップ判定器、24・・・座標変換&クリップコード付加部、25・・・ライティング処理部、26・・・ラスタライズ処理部、30・・・メモリカートリッジ、36・・・液晶表示モニタ、100・・・第1の画像処理装置、200・・・第2の画像処理装置、300・・・携帯端末装置(情報処理装置)
[0001]
BACKGROUND OF THE INVENTION
INDUSTRIAL APPLICABILITY The present invention is a graphic information conversion device suitable for application to an entertainment device, a portable terminal device, a cellular phone, etc., in which a CAD and CAM system that handles graphic information such as a Bezier curve and a curved surface is introduced , The present invention relates to a graphic information conversion method and a recording medium.
[0002]
[Prior art]
In the information processing field in recent years, image processing apparatuses and information processing apparatuses using a CAD (computer aided drawing) system, a CAM (computer aided manufacturing) system, and the like have increased. In this type of processing apparatus, a Bezier curve or a Bezier curved surface is often used as an expression method for creating a free curve or a free curved surface, respectively.
[0003]
In the case of this Bezier curve, as is well known, a curve created by giving (n + 1) control points is called an nth-order Bezier curve. A curved surface created by giving (n + 1) × (n + 1) control points is called an nth-order Bezier curved surface. Of these, a cubic Bezier curve is often used as a Bezier curve for ease of control. For the same reason, a cubic Bezier surface expressed by (4 × 4) control points is often used for the Bezier surface.
[0004]
29 and 30 are diagrams showing examples (parts 1 and 2) of the cubic Bezier curve according to the conventional example. The cubic Bezier curve shown in FIG. 29 expresses a free curve using the coordinate values of the four control points p0 to p3. When four control points p0 to p3 are given, a Bezier curve R is uniquely determined by giving a parameter (influence parameter; 0 ≦ t ≦ 1) t. A cubic Bezier curve is expressed by the following equation.
[0005]
R (t)
= (1-t) Three p0 + 3t (1-t) 2 p1 + 3t 2 (1-t) p2 + t Three p3
Here, the control points p0 to p3 are all position vectors and have components of position coordinates (x, y, z). Of the control points p0 to p3, points p0 and p3 through which the curve passes may be referred to as end points (pass points), and the other control points p1 and p2 may be referred to as internal control points.
[0006]
Then, as shown in FIG. 30, a smooth free curve can be created by giving a plurality of end points, for example, p0 to p6. The curve of the minimum component formed by two end points is called a segment, and the curved surface (rectangle) of the minimum component created by giving (n + 1) × (n + 1) control points is called a patch.
[0007]
FIG. 31 shows a specific example of the patch PB composed of (4 × 4) control points. When a plurality of patches are connected, a cubic Bezier curved surface as shown in FIG. 32 can be formed. In an information processing apparatus that handles such a cubic Bezier curved surface, for example, image processing is performed to change the curved surface in the Z direction shown in FIG. By this image processing, the cubic Bezier curved surface can be freely deformed.
[0008]
[Problems to be solved by the invention]
By the way, according to a conventional large-scale information processing apparatus such as a desktop type or a notebook type, when expressing a free curve or curved surface, a cubic Bezier curve or Bezier is obtained by using a floating point accumulator and an adder. The coordinate value of the vertex of the curved surface was calculated.
[0009]
However, this type of integrator has a very large circuit scale. When this is applied to a mobile phone, a portable game machine, etc., the reduction in the size of the portable terminal device due to the increase in chip size. It will hinder or increase the cost. Therefore, when the mobile terminal device tries to process the coordinate value of the cubic Bezier curve or the vertex of the Bezier curved surface, it is forced to rely on software, but in that case, the calculation speed becomes slow and sufficient performance is obtained. There is a problem that you can not get.
[0010]
Also, in the conventional hardware method, the vertex normal vector necessary for lighting processing such as light source calculation is re-calculated using the vertex coordinate value once generated, so the accurate normal vector There is a problem that it becomes difficult to calculate, or the calculation time without permission increases, which hinders the speeding up of the entire information processing.
[0011]
Therefore, the present invention solves such a conventional problem, and when rearranging vertex information for expressing an nth-order curved surface figure into polygon information, it does not depend on software, and does not depend on hardware. An object of the present invention is to provide a graphic information conversion device, an image processing device, an information processing device, a graphic information conversion method, and a recording medium that can be converted by wear.
[0012]
[Means for Solving the Problems]
The above-described problem is an apparatus for rearranging vertex information for expressing a curved surface figure into polygon information for line scanning, and a storage device that has at least two lines of memory and stores vertex information; And a memory control unit that controls writing and reading of the storage device, and the memory control unit writes m pieces of vertex information to the memory on the first line and the next m pieces of vertex information to the memory on the second line. After writing, (m−1) rectangular vertices formed by two adjacent vertex information in the first line memory and two adjacent vertex information in the second line memory This can be solved by a graphic information conversion device that reads information as it is or sequentially reads out vertex information of 2 (m−1) triangles obtained by obliquely dividing the rectangle.
[0013]
According to the graphic information conversion apparatus of the present invention, when rearranging the vertex information for expressing a curved graphic and a curved graphic into polygon information, at least a memory area for two lines is expanded in the storage device, and the memory The control unit writes m vertex information to the memory area of the first line, and writes the next m pieces of vertex information to the memory of the second line. The vertex information of the (m−1) squares formed by the vertex information and two pieces of vertex information adjacent to each other in the memory of the second line is used as it is, or 2 (m− 1) Vertex information of each triangle is sequentially read from the storage device.
[0014]
Therefore, vertex information representing an nth-order Bezier curve or a Bezier curved surface can be converted into polygon information by hardware without depending on software. In addition, since a stack memory or the like can be realized with a small memory configuration, a graphic information conversion apparatus capable of high performance and low power consumption operation can be provided.
[0022]
A graphic information conversion method according to the present invention is a method of rearranging vertex information for expressing a curved graphic into polygon information for line scanning, and at least expands a memory area for two lines, and sets m pieces of memory information. The vertex information is written into the memory area of the first line, the next m pieces of vertex information are written into the memory area of the second line, and then the two vertex information adjacent to each other in the memory area of the first line and 2 Vertex information of (m−1) squares formed by two adjacent vertex information in the memory area on the line, or 2 (m−1) pieces obtained by dividing the square diagonally The vertex information of the triangles is sequentially read out.
[0023]
According to the graphic information conversion method of the present invention, it is possible to rearrange vertex information representing an nth-order Bezier curve or a Bezier curved surface into polygon information by hardware without depending on software. In addition, in a graphic information conversion apparatus, an image processing apparatus, an information processing apparatus and the like realized by this method, a stack memory having a small memory configuration can be used.
[0024]
A recording medium according to the present invention is a recording medium that records a control procedure for rearranging vertex information for expressing a curved figure into polygon information for line scanning, and the recording medium includes at least two lines. And the m-vertex information is written to the memory area of the first line, and the next m-vertex information is written to the memory area of the second line. The vertex information of (m−1) squares formed by the information of two adjacent vertices and the information of two vertices adjacent to each other in the memory area of the second line is left as it is, or the rectangle is slanted. The control procedure for sequentially reading the vertex information of 2 (m−1) triangles divided into two is recorded.
[0025]
According to the recording medium of the present invention, the stack memory and the memory control unit built in the graphic information conversion device, the image processing device, the information processing device, etc. are reproducible based on the control procedure recorded on the recording medium. Since it can be controlled, an n-th order Bezier curve or a Bezier curved surface can be expressed based on polygon information converted by hardware.
[0026]
Therefore, the present invention can be sufficiently utilized for entertainment devices, portable terminal devices, cellular phones, and the like that have introduced CAD and CAM systems that handle these graphic information.
[0027]
DETAILED DESCRIPTION OF THE INVENTION
Subsequently, an embodiment of a graphic information conversion apparatus, an image processing apparatus, an information processing apparatus, a graphic information conversion method, and a recording medium according to the present invention will be described with reference to the drawings.
[0028]
(1) Embodiment
FIG. 1 is a block diagram showing a configuration example of a graphic information conversion apparatus 100 as an embodiment according to the present invention.
In this embodiment, when rearranging vertex information for expressing an nth-order curved surface figure into polygon information, a memory control unit is provided, and m vertex information is written in the memory of the first line and the next m The vertex information is written in the memory on the second line, and then formed by two vertex information adjacent to each other in the memory on the first line and two vertex information adjacent to each other in the memory on the second line. Depends on the software so that the vertex information of (m-1) squares to be read as they are or the vertex information of 2 (m-1) triangles obtained by diagonally dividing the square is read sequentially. Instead, vertex information representing an nth-order Bezier curve or Bezier curved surface can be converted into polygon information by hardware.
[0029]
A graphic information generating apparatus 10 shown in FIG. 1 generates coordinate values of vertices representing an nth-order Bezier curve or a Bezier curved surface, and includes a control device 4, a storage medium 5, and a graphic information generating unit 6. . For example, in FIG. 2, the coordinate values of the vertices are (n + 1 [where n ≧ 2]) control points p0 to pn in the horizontal direction and (n + 1) control points p0 to pn (n + 2) in the vertical direction. -N is given in a lattice shape, and is generated from (n + 1) × (n + 1) control points p0 to pn (n + 2) in the lattice shape.
[0030]
The graphic information generation unit 6 includes the linear interpolator 1, the memory unit 2, and the control point selection unit 3 shown in FIG. The linear interpolator 1 receives the digit alignment control signal S1 from the control device 4 and the like, and the interpolation coefficient which takes the coordinate values A and B of the control point having a predetermined bit width and 0 ≦ t ≦ 1 with the predetermined bit width. Based on t, the equation (1) is sequentially calculated with respect to the coordinate values of the new control points that internally divide between the control points.
A × (1-t) + B × t (1)
[0031]
A memory unit 2 is connected to the output stage of the linear interpolator 1, and the sequentially calculated interpolation results are stored in response to the write / read control signal S2 of the control device 4, and the coordinate values of the control points necessary for the next calculation are stored. It is controlled to read sequentially.
[0032]
The linear interpolator 1 calculates, for example, a vertex coordinate value from the coordinate values of 2 × 2 new control points, and calculates a horizontal tangent vector Uout and a vertical tangent vector Vout of the vertex. To be made. These two vectors are output from the memory unit 2 to a subsequent image processing apparatus or the like. This is because a normal vector at the vertex is obtained based on these two tangent vectors Uout and Vout. The normal vector is used for lighting processing for calculating brightness.
[0033]
The control point selection unit 3 is connected to the input stage of the linear interpolator 1 and receives the switching control signal S0 from the control device 4 and newly generated by the coordinate values A and B of the initial control point or the linear interpolation calculation. The coordinate values CA and CB of the control points are selected. A recording medium 5 such as a ROM is connected to the control device 4, and the control device 4 controls input / output of the linear interpolator 1, the memory unit 2, the control point selection unit 3 and the like based on the ROM information. The
[0034]
At least the coordinate values of (n + 1) × (n + 1) control points having a predetermined bit width are input to the recording medium 5 and an interpolation coefficient t that takes a value of 0 ≦ t ≦ 1 with a predetermined bit width is provided. When the coordinate values of the two adjacent control points are A and B, the equation (1) is sequentially calculated for each of the two adjacent control points in the horizontal direction, and n × (n + 1) By calculating the coordinate values of the new control points and calculating the equation (1) sequentially for each of the two new control points adjacent in the horizontal direction, 2 × (n + 1) new control points are finally obtained. Then, the coordinate values of the control points are calculated, and then the formula (1) is sequentially calculated between each of the two adjacent control points in the vertical direction to obtain the coordinate values of 2 × n new control points. Each between two new control points adjacent in each direction By sequentially calculating the equation (1), the coordinate values of 2 × 2 new control points are finally obtained, and then (1) between the 2 × 2 control points in the horizontal direction and the vertical direction, respectively (1 ) Is sequentially calculated, and a control procedure for obtaining the vertex coordinate value is recorded.
[0035]
Of course, in this recording medium 5, in determining the vertex coordinate value, the horizontal tangent vector and the vertical tangent vector of the vertex are extracted from the coordinate values of 2 × 2 new control points, and the horizontal direction In addition, a control procedure for obtaining the normal vector at the vertex based on the tangent vector in the vertical direction is also recorded.
[0036]
Since the linear interpolator 1 can be controlled with good reproducibility by the control device 4 based on these control procedures, the coordinate value of the vertex of the upper predetermined bit width representing the nth-order Bezier curve or Bezier surface is generated by hardware. Can do. Therefore, the graphic information generating apparatus 10 can be fully used for entertainment devices, portable game machines, portable terminal devices, cellular phones, and the like that incorporate CAD and CAM systems that handle graphic information such as Bezier curves and curved surfaces. .
[0037]
Next, an internal configuration example of the linear interpolator 1 will be described. In this example, the linear interpolator 1 is a floating point linear interpolator (FLIP). FIG. 3 is a diagram showing an example of the data format of the floating-point coordinate values. According to the data format example shown in FIG. 3, the coordinate value of each control point is given by 32 bits, the first bit of which is the sign part S, the next 8 bits is the exponent part E, and the remaining 23 bits. The bit is the addend part F. When the coordinate value of each control point is indicated by these sign part S, exponent part E, and addend part F, the following equation (2) is obtained.
1. F × 2 (E-127) ... (2)
[0038]
The sign part S distinguishes between positive and negative coordinate values, and the exponent part E is given an interpolation coefficient t indicated by 8 bits. The value of the interpolation coefficient t is 0 ≦ t ≦ 1, but (1-t) is calculated in increments of 0.1, for example. In this example, in order to speed up the exponent calculation, the exponent part E is expressed by a total of nine integers in 16 increments of 0, 16, 32, 48, 64, 80, 96, 112, 128. In this case, t = 0.5 corresponds to E = 64. The addend part F is expressed by a 23-bit binary number after the decimal point. These are defined in IEEE754 and follow this.
[0039]
FIG. 4 is a block diagram showing an example of the internal configuration of the linear interpolator 1. The linear interpolator 1 shown in FIG. 4 performs an interpolation operation based on coordinate values A and B given in floating point for each control point. A digit aligning unit 11 is provided in the input stage of the linear interpolator 1 so that the digit is aligned with the larger one of the exponent parts E of the coordinate values A and B of a predetermined bit width of the control point. A shift register is used for the digit aligning section 11, and the exponent part having the smaller coordinate values A and B is shifted to align with the larger exponent part.
[0040]
The digit aligning unit 11 is connected to first and second multipliers 12 and 13. The multiplier 12 multiplies the digit-aligned value A ′ and the interpolation coefficient (1-t), and the multiplier 13 multiplies the digit-aligned value B ′ and the interpolation coefficient t. The interpolation coefficient (1-t) is generated by subtracting the correction coefficient t from “1” by the subtractor 14 connected to the input stage of the multiplier 12.
[0041]
An adder 15 is connected to the multipliers 12 and 13 so as to add the output A ′ × (1−t) of the multiplier 12 and the output B × t of the multiplier 13. A normalization unit 16 is connected to the adder 15, and the output A ′ × (1−t) + B ′ × t of the adder 15 is a coordinate value having a predetermined bit width in a floating point as shown in the equation (2). To be normalized.
[0042]
Accordingly, A ′ × (1−t) + B ′ × t is sequentially calculated between each two adjacent control points in the horizontal direction to obtain coordinate values of n × (n + 1) new control points, Further, by sequentially calculating A ′ × (1−t) + B ′ × t for each of two new control points adjacent in the horizontal direction, finally, 2 × (n + 1) new control points are obtained. A coordinate value is obtained, and thereafter, A ′ × (1−t) + B ′ × t is sequentially calculated between each two adjacent control points in the vertical direction to obtain coordinate values of 2 × n new control points. In addition, by sequentially calculating A ′ × (1−t) + B ′ × t for each of two new control points adjacent in the vertical direction, finally, 2 × 2 new control points are obtained. Obtain coordinate values, and then between 2x2 control points in the horizontal and vertical directions, respectively By sequentially calculating A ′ × (1−t) + B ′ × t, the coordinate value of the vertex can be obtained.
[0043]
Subsequently, an operation example of the graphic information generation apparatus 10 will be described with reference to FIGS. FIG. 5 is a diagram illustrating an arrangement example of the control points p0 to p15 in the U-V coordinate system.
[0044]
In this example, n = 3, 4 control points in the horizontal direction (hereinafter referred to as u direction) and 4 in the vertical direction (hereinafter referred to as v direction) of the UV coordinate system shown in FIG. When the control points are given in a grid shape, and the coordinate values of the vertices for expressing a cubic Bezier surface as shown in FIG. 6 are generated from the 4 × 4 grid control points p0 to p15. Is assumed.
[0045]
In this graphic information generating apparatus 10, coordinate values of 4 × 4 control points p0 to p15 having a 23-bit width and an interpolation coefficient t having an 8-bit width and 0 ≦ t ≦ 1 are input to the linear interpolator 1. Is done. Then, assuming that the coordinate values of two adjacent control points are A and B, the coordinates of 4 × 4 control points p0 to p15 shown in FIG. The values are sequentially calculated by equation (1) to obtain the coordinate values of 3 × 4 new control points pu0 to pu11 as shown in FIG. 7B.
[0046]
Thereafter, the coordinate values of the 3 × 4 control points pu0 to pu11 shown in FIG. 7B are further calculated sequentially by the expression (1) between each two adjacent control points in the u direction, as shown in FIG. 9A. The coordinate values of 2 × 4 new control points pu0 to pu7 are obtained. Next, for each of two adjacent control points in the v direction, the coordinate values of 2 × 4 control points pu0 to pu7 shown in FIG. 8A are sequentially calculated by equation (1), as shown in FIG. 8B. The coordinate values of 2 × 3 new control points pv0 to pv5 are obtained.
[0047]
Then, the coordinate values of the 2 × 3 control points pv0 to pv5 shown in FIG. 8B are further calculated sequentially from the respective two control points adjacent in the v direction by the equation (1), as shown in FIG. 10A. The coordinate values of 2 × 2 new control points pv0 to pv3 are obtained. 9A is sequentially calculated with respect to the u direction and the v direction between the 2 × 2 control points shown in FIG. 9A, and 2 × 2 new control points pp0 to pp0 as shown in FIG. 9B are obtained. The coordinate value of pp3 is obtained. Then, the coordinate values of 2 × 2 new control points pp0 to pp3 shown in FIG. 9B are sequentially calculated for the u direction and the v direction, respectively, and the coordinate value of the vertex P0 as shown in FIG. 9C is calculated. Assuming that
[0048]
Of course, based on the control procedure recorded on the recording medium 5, the control device 4 aligns the digit to the larger exponent part of the coordinate values A and B of the control point, and the coordinate value A and the interpolation coefficient ( 1−t), the coordinate value B after digit adjustment and the correction coefficient t, and then the addition result obtained by adding the multiplication results is a coordinate value having a predetermined bit width indicated by a floating point. It will be normalized to.
[0049]
With these as interpolation conditions, the coordinate values of 4 × 4 control points in step A1 in the flowchart of FIG. 10 are 23 bits in the linear interpolator 1 controlled by the control device 4 according to the control procedure of the recording medium 5. The coordinate values of 4 × 4 control points p0 to p15 having a width and an interpolation coefficient t having an 8-bit width and 0 ≦ t ≦ 1 are input. The exponent E of the floating point of the coordinate value is 0, 16, 32, 48, 64, 80, 96, 112, 128.
[0050]
Thereafter, the process proceeds to step A2, and the coordinate value is set to u = 0 in order to initialize the U coordinate. Then, the process proceeds to step A3, where it is detected whether u = 128. When u = 128, the vertex coordinate values of the cubic Bezier surface with 4 × 4 control points p0 to p15 are obtained. If u is not 128, the process proceeds to step A4 in order to continue the interpolation calculation. For the generation of the coordinate value of one vertex with respect to the u direction, nine interpolation processes are performed.
[0051]
In step A4, each two adjacent control points in the u direction are interpolated by the equation (1), and the control points p0 to p15 are reduced from 16 to 8. For example, regarding equation (1)
C = FLIP (A, B, u);
Is written, the coordinate values of the 4 × 4 control points p0 to p15 shown in FIG. 7A are sequentially calculated by the equation (2) between each two adjacent control points in the u direction, as shown in FIG. 7B. Such coordinate values of 3 × 4 new control points pu0 to pu11 are obtained.
[0052]
pu [0] = FLIP (p [0], p [1], u);
pu [1] = FLIP (p [1], p [2], u);
pu [2] = FLIP (p [2], p [3], u);
pu [3] = FLIP (p [4], p [5], u);
pu [4] = FLIP (p [5], p [6], u);
pu [5] = FLIP (p [6], p [7], u);
pu [6] = FLIP (p [8], p [9], u);
pu [7] = FLIP (p [9], p [10], u);
pu [8] = FLIP (p [10], p [11], u);
pu [9] = FLIP (p [12], p [13], u);
pu [10] = FLIP (p [13], p [14], u);
pu [11] = FLIP (p [14], p [15], u); (3)
The coordinate values of the control points pu0 to pu11 are stored in the memory unit 2. Here, the coordinate values of two adjacent control points are CA and CB.
[0053]
Thereafter, the coordinate values CA and CB are read from the memory unit 2 and selected by the control point selection unit 3 that has been subjected to the switching control of the control device 4. Further, between each two control points adjacent in the u direction, The control points pu0 to pu11 are reduced from 12 to 8 by interpolation using equation (1). Here, with respect to equation (1)
C = FLIP (CA, CB, u);
When each of the two control points adjacent in the u direction is sequentially calculated by the equation (4), the coordinate values of 2 × 4 new control points pu0 to pu7 as shown in FIG. 8A are obtained. It is done.
[0054]
pu [0] = FLIP (pu [0], pu [1], u);
pu [1] = FLIP (pu [1], pu [2], u);
pu [2] = FLIP (pu [3], pu [4], u);
pu [3] = FLIP (pu [4], pu [5], u);
pu [4] = FLIP (pu [6], pu [7], u);
pu [5] = FLIP (pu [7], pu [8], u);
pu [6] = FLIP (pu [9], pu [10], u);
pu [7] = FLIP (pu [10], pu [11], u); (4)
These coordinate values are also stored in the memory unit 2.
[0055]
Thereafter, the process proceeds to step A5, where the coordinate value is set to v = 0 in order to initialize the V coordinate. Then, the process proceeds to step A6 where it is detected whether or not v = 128 has been reached for the V coordinate. This is because v = 128 completes one cycle of interpolation processing in the V coordinate. Therefore, when v = 128, the process proceeds to step A11. However, when v = 0, 16, 32, 48, 64, 80, 96, 112, the process proceeds to step A7 in order to continue the interpolation process in the v direction. .
[0056]
In step A7, each two adjacent control points in the v direction are interpolated by the equation (1), and the control points pu0 to pu7 are reduced from eight to four. For example, for each of two adjacent control points in the v direction, the coordinate values CA and CB of 2 × 4 control points pu0 to pu7 shown in FIG. The coordinate values of 2 × 3 new control points pv0 to pv5 as shown are obtained.
[0057]
pv [0] = FLIP (pu [0], pu [2], v);
pv [1] = FLIP (pu [1], pu [3], v);
pv [2] = FLIP (pu [2], pu [4], v);
pv [3] = FLIP (pu [3], pu [5], v);
pv [4] = FLIP (pu [4], pu [6], v);
pv [5] = FLIP (pu [5], pu [7], v); (5)
[0058]
These coordinate values are also stored in the memory unit 2. Thereafter, under the same readout control, the coordinate values of the 2 × 3 control points pv0 to pv5 shown in FIG. 9B are further shifted to step A8 between each two adjacent control points in the v direction. The coordinate values of 2 × 2 new control points pv0 to pv3 as shown in FIG.
[0059]
pv [0] = FLIP (pv [0], pv [2], v);
pv [1] = FLIP (pv [1], pv [3], v);
pv [2] = FLIP (pv [2], pv [4], v);
pv [3] = FLIP (pv [3], pv [5], v); (6)
[0060]
Thereafter, the process proceeds to step A8, and the formula (7) is sequentially calculated with respect to the u direction and the v direction between the 2 × 2 control points shown in FIG. 9A, and 2 × 2 pieces as shown in FIG. 9B. The coordinate values of new control points pp0 to pp3 are obtained.
[0061]
pp [0] = FLIP (pv [0], pv [1], u);
pp [1] = FLIP (pv [2], pv [3], u);
pp [2] = FLIP (pv [0], pv [2], v);
pp [3] = FLIP (pv [1], pv [3], v); (7)
[0062]
Then, the coordinate values of 2 × 2 new control points pp0 to pp3 shown in FIG. 9B are shifted to step A9, and the equations (8) are sequentially calculated in the u direction and the v direction, as shown in FIG. 9C. A coordinate value of the correct vertex P0 is obtained.
P0 = FLIP (pp [0], pp [1], v) (8)
[0063]
The above formulas (2) to (8) are all written in C language. Thereafter, the process proceeds to step A10 where v = v + dv for adjusting the roughness of the interpolation process in the v direction is calculated. Here, dv is an operator for setting whether the number of divisions of the v-direction patch surface expressing the Bezier curved surface is rough or fine. For example, dv is given by an integer such as 16, 8, and in this case, v = v + dv is calculated such that 16 (coarse) is reduced to 8 (fine) in order to make the number of divisions of the patch surface fine, and then the process returns to step A6. .
[0064]
In step A6, since the same interpolation calculation is performed for v = 0 to 128, it is detected whether or not v = 128 for the V coordinate. That is, every time the u direction is changed by one for the generation of the coordinate value of one vertex, nine interpolation processes are performed in the v direction. Accordingly, when nine interpolation processes are completed in the v direction, when v = 128 in step A6, the process proceeds to step A11 where u = u + du for adjusting the roughness of the u direction interpolation process is calculated. The
[0065]
Here, du is an operator for setting whether the number of divisions of the patch surface in the u direction is coarse or fine. Here, u = u + du is calculated such that 16 is reduced to 8 in order to reduce the number of divisions of the patch surface, and then the process returns to step A3. In step A3, since the same interpolation calculation is performed for the case of u = 0 to 128, it is detected whether u = 128 for the U coordinate. When u = 128, after passing through 9 × 9 = 81 interpolation processes, one vertex coordinate value of a cubic Bezier surface with 4 × 4 control points p0 to p15 is obtained. Ends the interpolation operation.
[0066]
Thereafter, the process proceeds to step A12 to determine whether all vertex coordinate values have been generated for the given control points. For example, when the end command is issued from the control device 4 to the linear interpolator 1, the vertex coordinate value generation processing is ended. If the end command is not detected, the process returns to step A1 to input the next 4 × 4 control points, and the above-described processing is repeated. Thereby, the vertex coordinate values of other cubic Bezier curved surfaces can be obtained by hardware.
[0067]
[Generation example of normal vector]
11A to 11C are transition diagrams showing examples of normal vector generation by the graphic information generation apparatus 10. In this example, the tangent vector u in the u direction of the vertex P0 (up arrow is omitted) and the tangent vector v in the v direction (upward) from the coordinate values of the 2 × 2 new control points pp0 to pp3 shown in FIG. 9B. The arrow is omitted), and the normal vector z at the vertex P0 is obtained based on the two tangent vectors u and v.
[0068]
The tangent vector u in the u direction shown in FIG. 11A is calculated by (9), where the x component of the U coordinate is ux, the y component is uy, and the z component is uz.
[0069]
ux = pp [3]. x-pp [2]. x;
uy = pp [3]. y-pp [2]. y;
uz = pp [3]. z-pp [2]. z; (9)
[0070]
Similarly, the tangent vector v in the v direction shown in FIG. 11B is calculated by (10), where the x component of the V coordinate is vx, the y component is vy, and the z component is vz.
[0071]
vx = pp [1]. x-pp [0]. x;
vy = pp [1]. y-pp [0]. y;
vz = pp [1]. z-pp [0]. z; (10)
[0072]
The normal vector z of the vertex P0 shown in FIG. 11C is obtained by calculating the outer product of these two tangent vectors u and v. This normal vector z is used in the lighting process for calculating the light color. For example, when the direction of light emitted from the light source is a light source vector, the inner product of the light source vector and the normal vector is calculated. When the light source vector matches the normal vector (cos θ = 1), the luminance is calculated so as to be brightest.
[0073]
Note that the tangent vectors u and v of the vertex P0 cannot be accurately calculated if the coordinate values of the four control points are overlapped. It may be determined whether or not the coordinate values of the control points overlap. For example, the first two coordinate values and the last two coordinate values of the control point are compared to determine whether or not they match. This is because the coordinate values match when generating graphic information relating to a straight line or a sphere.
[0074]
Thus, according to the graphic information generating apparatus 10 as the first embodiment according to the present invention, when four control points in the u direction and four control points in the v direction are given to the linear interpolator 1, Regardless of software, the coordinate values of the vertex P0 representing the cubic Bezier surface can be generated from the control points p0 to p15 by hardware. In addition, since the tangent vectors u and v of the vertex P0 can be extracted from the coordinate values of 2 × 2 new control points pp0 to pp3, the normal vector z necessary for the lighting process can be generated.
[0075]
Further, since the linear interpolator 1 can be realized by a small circuit configuration such as the digit aligning unit 11, the multipliers 12 and 13, the adder 15 and the normalizing unit 16, graphic information generation capable of high performance and low power consumption operation is possible. An apparatus 10 can be provided. Accordingly, the graphic information generation apparatus 10 can be sufficiently applied to an image processing apparatus that performs image processing such as a Bezier curved surface, particularly an information processing apparatus such as a portable terminal device in which power consumption is limited.
[0076]
In this example, the coordinate values A and B of the control points have been described in the case of floating point, but the present invention is not limited to this, and the coordinate values A and B may be given to the linear interpolator 1 in a fixed point. . Moreover, although the case where the coordinate values of the vertices are processed in the two-dimensional U-V coordinate system has been described, it is needless to say that the present invention can also be applied to a third or higher order. The coordinate value of the vertex is not limited to this. The present invention can be applied not only to a Bezier curved surface but also to a Bezier curved surface, and a Bezier curved surface of other orders as well as a cubic.
[0077]
[First image processing apparatus]
FIG. 12 is a block diagram showing a configuration example of the first image processing apparatus 100 as an embodiment according to the present invention.
[0078]
In this embodiment, the graphic information generation apparatus 10 described above is applied, and the n-th order Bezier curve or Bezier curved surface is used by using the coordinate value of the apex of the upper predetermined bit width generated by hardware without depending on software. Is subjected to image processing.
[0079]
An image processing apparatus 100 shown in FIG. 12 has a Bezier dividing device 17 which is an example of a main part of the graphic information generating device 10, and performs image processing on the n-order curved surface graphic generated by the graphic information generating unit 6. Is. In addition to the Bezier dividing device 17, the image processing device 100 includes a control device 4 ′, an operation unit 19, a ROM 45 as an example of the storage medium 5, a main memory 18 as an example of a storage device, and the like. The main memory 18 stores, for example, coordinate values A and B of 4 × 4 control points for image processing of a cubic Bezier curve or a Bezier curved surface. The coordinate values A and B of the control points can be rewritten from the outside. An example of contents recorded in the main memory 18 will be described with reference to FIG.
[0080]
A control device 4 ′ is connected to the main memory 18, and an operation unit 19 is connected to the control device 4 ′. The operation unit 19 is operated to input operation information D3 for controlling the reading of the main memory 18. The control device 4 ′ outputs a write / read signal S4 to the main memory 18 based on the operation information D3. In the main memory 18, the coordinate values A and B of 4 × 4 control points for image processing of a cubic Bezier curve or a Bezier curved surface are read to the graphic information generating unit 6 based on the write / read signal S 4.
[0081]
In the graphic information generation unit 6 connected to the main memory 18, (n + 1 [where n ≧ 2]) pieces of coordinate values A and B of the control points read based on the operation information D3 are provided in the u direction. The control points and (n + 1) control points in the v direction are provided in a grid pattern, and vertex coordinate values related to the nth-order curved surface figure are generated from the grid control points. In this example, vertex coordinate values for expressing a cubic curved surface figure are generated. The vertex coordinate values generated here are output to the subsequent processing circuit as vertex information Cout.
[0082]
Of course, the graphic information generation unit 6 has the linear interpolator described in FIG. 4, and the coordinate values A and B of the control point of 23-bit width indicated by the floating point or the fixed point and the 8-bit width. Based on the interpolation coefficient t having a value of 0 ≦ t ≦ 1, A × (1−t) + B × t is sequentially calculated with respect to the coordinate value of a new control point that internally divides between control points. Further, the graphic information generation unit 6 extracts a tangent vector in the u direction and a tangent vector in the v direction from the coordinate values of 2 × 2 new control points.
[0083]
An arithmetic unit 7 is connected to the graphic information generating unit 6, and the tangent vector information Uin in the u direction and the tangent vector information Vin in the v direction of the vertex P0 extracted from the coordinate values of 2 × 2 new control points, , The outer product of the information Uin and the information Vin is calculated, and the normal vector information Hout of the vertex P0 is output.
[0084]
In the ROM 45 connected to the control device 4 ′, a digit is aligned with the larger exponent part of the coordinate values A and B of the control point, and the coordinate value A after the digit alignment is multiplied by the interpolation coefficient (1-t). At the same time, the coordinate value B after digit adjustment is multiplied by the correction coefficient t, and then the addition value after adding the multiplication results is normalized to the coordinate value of a predetermined bit width indicated by the floating point. A procedure and a control procedure are described in which the outer product of the tangent vector information Uin in the u direction and the tangent vector information Vin in the v direction at the vertex P0 is calculated and output at a predetermined timing.
[0085]
Next, an example of contents recorded in the main memory 18 will be described. FIG. 13 is an image diagram showing an example of recorded contents of the main memory 18. In this example, program information, a drawing list, shape data, texture data ID = 1, and ID = 2 are recorded in an address specified by the storage address 0x00000 to 0xFFFFF in a 1 Mbyte memory area. These data may be game data transferred from the outside or data for electronic animation.
[0086]
According to the recorded content example shown in FIG. 13, program information including an application main body that generates an n-th order Bezier curved surface, a module group such as a subroutine of the application, and a library group is described at the top of the memory area. This application includes, for example, program data for selecting whether to set an operation mode for generating an n-th order Bezier curved surface or to set another operation mode. After the program information, a drawing list such as a control command (hereinafter also referred to as a polygon drawing command) for connecting a plurality of shape data of one polygon is described.
[0087]
After this drawing list, shape data serving as video material information is described. For example, a graphic model data group including moving image data for displaying 2D or 3D video information such as game information and advertisement information is described. The moving image data is compressed by DCT (Discrete Cosine Transform). A graphic texture data group is described after the shape data. The texture data is 76 bytes and constitutes the shape data of one polygon. In this example, texture data having two IDs of a triangle and a quadrangle is described. The contents of the texture data will be described with reference to FIG. In addition, a sound sequence data group and a sound wave data group may be described. This is because the sound wave data is processed according to the user's operation and the sound sequence.
[0088]
As described above, according to the first image processing apparatus 100 as the embodiment of the present invention, the main part of the graphic information generating apparatus 10 described above is applied to the Bezier dividing apparatus 17, and therefore depends on software. Image processing can be performed at high speed by hardware using the coordinate value of the apex P0 having a predetermined upper bit width that represents an nth-order Bezier curve or a Bezier curved surface. Therefore, since the linear interpolator constituting the Bezier dividing device 17 can be realized with a small circuit configuration, it is possible to provide the image processing device 100 capable of high performance and low power consumption operation.
[0089]
Further, according to the ROM 45 according to the present invention, since the linear interpolator built in the Bezier dividing device 17 can be controlled with good reproducibility based on the control procedure recorded in the ROM 45, an nth-order Bezier curve or Bezier curved surface can be obtained. The coordinate value of the vertex of the upper predetermined bit width to be expressed can be generated by hardware.
[0090]
(2) Second embodiment
FIG. 14 is a block diagram showing a configuration example of the graphic information conversion apparatus 20 as the second embodiment according to the present invention.
[0091]
In this embodiment, when rearranging vertex information for expressing an n-th order curved surface figure into polygon information, a memory control unit is provided, and m vertex information is written in the memory of the first line, and the next m Is written to the memory on the second line, and then formed from two pieces of vertex information adjacent to each other in the memory on the first line and two pieces of vertex information adjacent to each other in the memory on the second line. The vertex information of the (m−1) squares is read as it is, or the vertex information of 2 (m−1) triangles obtained by obliquely dividing the square is read sequentially, without depending on software. , Vertex information representing an nth-order Bezier curve or Bezier curved surface can be converted into polygon information by hardware.
[0092]
The graphic information conversion apparatus 20 shown in FIG. 14 rearranges the vertex information Cin for expressing the nth-order curved graphic and curved graphic into polygon (hereinafter also referred to as polygon) information for line scanning. The graphic information conversion device 20 is provided with at least a storage device 21 having memories 21A and 21B for two lines, and stores vertex information Cin for each line. The storage device 21 may be a stack memory 21 ′ having line memories 21A and 21B.
[0093]
A memory control unit 22 is connected to the storage device 21 so as to control writing / reading of the storage device 21. For example, the memory control unit 22 writes m pieces of vertex information Cin to the memory 21A of the first line, writes the next m pieces of vertex information Cin to the memory 21B of the second line, and then stores the memory 21A of the first line. (M−1) vertex information Cin of two squares formed by two vertex information Cin adjacent to each other and two vertex information Cin adjacent to each other in the memory 21B of the second line as they are, or The vertex information Cout of 2 (m−1) triangles obtained by obliquely dividing the quadrangle is sequentially read out. Hereinafter, vertex information of a quadrangle or a triangle is also referred to as polygon information Cout.
[0094]
In this example, the m pieces of vertex information Cin written in the memory 21B of the second line are used for rearranging the m pieces of vertex information Cin corresponding to the next third line. The shift is performed sequentially. This is because the m pieces of vertex information Cin corresponding to the third line are always written in the memory 21B of the second line.
[0095]
In this example, further, setting information D4 for selecting either the square operation mode or the triangle operation mode is input in advance. Here, the quadrangle operation mode refers to graphic conversion control for generating quadrant vertex information Cin, and the triangle operation mode refers to graphic conversion control for generating triangle vertex information Cin. For example, when the setting information D4 is “1”, the square operation mode is selected, and when it is “0”, the triangle operation mode is selected. The polygon information Cout includes at least coordinate values of vertexes of the polygon, color texture information, and clip information. The color texture information is background color information for displaying an nth-order curved surface graphic. Clip information is a code for determining whether or not to perform 3D video processing (hereinafter referred to as rendering) based on polygon information Cout, and is added to each vertex of the polygon.
[0096]
Here, when a visible range regarding the display area including the depth represented by the polygon information Cout (equal to an effective display area such as a monitor) is set as a clip area, the clip information is displayed at the vertex of the polygon that is out of the clip area. “1” is added, and clip information “0” is added to the vertices of the polygon in the clip area. The addition of clip information will be described with reference to FIG.
[0097]
A determination unit 23 is connected to the memory control unit 22 so as to determine polygon information Cout deviating from the clip area described above. In the determination unit 23, clip information added in advance for each vertex of the polygon is input. If even one of the polygon vertices is in the clip area, the polygon information Cout is used for rendering processing. Included. This is because a part of the nth-order Bezier curved surface is over an effective display area such as a monitor and needs to be displayed.
[0098]
On the other hand, when all the vertices of the polygon are outside the clip area, the polygon information Cout is excluded from the rendering process. This is because the nth-order Bezier curved surface or the like is out of the effective display area such as the monitor and does not appear on the monitor screen after rendering processing. The determination unit 23 includes a three-input NAND circuit and a three-input AND circuit when determining triangle information Cout, and includes a four-input NAND circuit and a four-input AND circuit when determining square information. . When a NAND circuit is used, an inverter is connected to invert the input or output logic.
[0099]
FIG. 15 is an image diagram showing an example of graphic information conversion when m = 8. FIGS. 16A and 16B are image diagrams showing output examples of triangle information Cout and quadrangle information Cout ′.
[0100]
The Bezier curved surface shown in FIG. 15 is obtained by arranging eight pieces of vertex information Cin on the same plane for each scanning line. In this example, when m = 8 in the triangle operation mode, the vertices of the triangle shown in FIG. 16A are “1, 2, 9”, “2, 9, 10”, “2, 3, 10”, “3”. , 10, 11 ”,“ 3,4, 11 ”... Are output from the memory control unit 22 to the determination unit 23. Of course, clip information “1” or “0” is added to each vertex of each triangle.
[0101]
When m = 8 in the square operation mode, the vertices of the square shown in FIG. 16B are “1, 2, 9, 10”, “2, 3, 10, 11”, “3,4, 11, 12”. The quadrangle information Cout ′ is output from the memory control unit 22 to the determination unit 23. Of course, clip information “1” or “0” is added to each vertex of each square.
[0102]
FIG. 17 is an image view of a virtual display space showing an example of a clip area such as a liquid crystal display monitor. FIG. 18 is a correspondence diagram showing an example of the relationship between the clip area CL and the 4-bit clip code in the screen coordinate system xs, ys. In this example, the screen coordinate system xs, ys, zs is defined on the virtual display space shown in FIG. 17, and only the polygon information Cout whose depth is Z = ± 1 with respect to the zs coordinate is transferred to the rendering process. . The polygon information Cout is determined by the determination unit 23 described above.
[0103]
A clip area CL shown in FIG. 17 defines a viewable range from the viewpoint with respect to a display area including a depth expressed by the polygon information Cout. This clip area CL is equivalent to an effective display area of 480 lines × 640 pixels such as a liquid crystal display monitor. Clip information “1” is added in advance to the vertices of the polygon that is out of the clip area CL, and clip information “0” is added to the vertices of the polygon that is in the clip area CL.
[0104]
In other words, the correspondence diagram shown in FIG. 18 is obtained by dividing the virtual display surface into cross beams in the screen coordinate system xs, ys. The center of this figure is a clip area CL, and the vertex information Cin included in this area is added with a 4-bit clip code “0000” as an example of clip information for each vertex P0 of each polygon. In addition, the clip code “1001” is added to each vertex in the vertex information Cin included in the upper left region (1) of the clip region CL.
[0105]
Similarly, a clip code “1000” is added to each vertex in the vertex information Cin included in the upper area (2), and the vertex information Cin included in the upper right area (3) is added to each vertex. Clip code “1010” is added. Further, a clip code “0001” is added to each vertex in the vertex information Cin included in the left lateral region (4), and the vertex information Cin included in the right lateral region (5) is clipped for each vertex. The code “0010” is added.
[0106]
In the vertex information Cin included in the lower left area (6) of the clip area CL, a clip code “0101” is added for each vertex, and the vertex information Cin included in the lower area (7) is clipped for each vertex. The code “0100” is added, and the clip code “0110” is added to each vertex in the vertex information Cin included in the lower right area (8). These clip codes (clip information) are added to the vertex information Cin at the time of coordinate conversion processing after generation of graphic information. The clip information is determined after the graphic information conversion, as described with reference to FIG. 15, for example, when the Bezier curved surfaces are arranged on the same plane and the converted polygon information Cout is included in the clip area CL. This is because it can be determined.
[0107]
FIG. 19 is an image diagram illustrating an example of a determination result using a clip code. The hatched triangles shown in FIG. 19 are not rendered, and the white triangles are transferred to the rendering process.
[0108]
That is, the triangle “I”, the triangles “C” to “H” included only in the areas (1), (3), (4), and (5) shown in FIG. 19 and the areas (1), (2) And the triangle “B” that is applied to (3) but not applied to the clip area CL is determined by the determination unit 23 as “not rendered”. Since these are not displayed on the liquid crystal display monitor even after the rendering process, the determination unit 23 excludes the triangle information Cout.
[0109]
In contrast, the triangle “G” that covers the clip area CL and the triangle “H” that covers the areas (2) and (4) to (8), but mostly covers the clip area CL. "Is determined to be" perform rendering "by the determination unit 23. This is because a triangle “G” or the like that partially covers the clip area CL is displayed in the effective display area of the liquid crystal display monitor.
[0110]
FIG. 20 is a correspondence diagram showing an example of the relationship between the clip area CL ′ considering the depth in the screen coordinate system ys, zs and the 6-bit clip code. In this example, the screen coordinate system ys, zs corresponds to the depth of the virtual display space shown in FIG. 20, and only the triangle information Cout that falls in Z = ± 1 with respect to the zs coordinate is shifted to the rendering process. The triangle information Cout is determined by the determination unit 23 described above.
[0111]
The correspondence diagram shown in FIG. 20 is obtained by dividing the virtual space into a cross digit in the screen coordinate system ys, zs. The center part of the correspondence diagram is a clip area CL ′ taking depth into consideration, and the vertex information Cin included in this area includes a 6-bit clip code “example of clip information for each vertex P0 of each triangle”. "0000XX" is added. Further, the clip code “0110XX” is added to each vertex in the vertex information Cin included in the front upper region {circle around (1)} of the clip region CL ′.
[0112]
Similarly, the clip code “0010XX” is added to each vertex in the vertex information Cin included in the clip upper region {circle around (2)}, and thereafter the vertex information Cin included in the upper region {circle around (3)} is added to each vertex. Is added with the clip code “1010XX”. Further, a clip code “0100XX” is added to each vertex in the vertex information Cin included in the front center region {circle around (4)}, and the vertex information Cin included in the rear center region {circle around (5)} of the clip region CL includes A clip code “1000XX” is added to each vertex.
[0113]
Clip information “0101XX” is added to each vertex in the vertex information Cin included in the front lower area {circle around (6)} of the clip area CL, and each vertex is added to the vertex information Cin included in the clip lower area {circle around (7)}. Is added with the clip code “0001XX”, and thereafter the clip code “1001XX” is added for each vertex to the vertex information Cin included in the lower area {circle over (8)}. These clip codes (clip information) are added to the vertex information Cin at the time of coordinate conversion processing after generation of graphic information.
[0114]
Subsequently, an operation example of the graphic information conversion apparatus 20 will be described with respect to the graphic information conversion method according to the embodiment of the present invention. FIG. 21 is a flowchart showing an operation example of the graphic information conversion apparatus 20 as an embodiment according to the present invention.
[0115]
In this example, it is assumed that m = 128 vertex information Cin for representing a cubic curve figure and a curved figure is rearranged to triangle information Cout for line scanning. A memory area for two lines in which vertex information Cin for a length (m = 128) from the front end to the final end of the control point can be written at least when a cubic curved surface figure is expressed in the U-V coordinate system. A stack memory 21 ′ that can be expanded is prepared.
[0116]
In this example, the vertex information Cin includes the coordinate value of the polygon vertex P0, color texture information, and clip information, and a clip code as described in FIG. 18 is added to each vertex of the polygon. .
[0117]
On the premise of this, a polygon shape is set for the vertex information Cin in step B1 of the flowchart shown in FIG. Here, for example, setting information D4 = “0” is set, and the triangle operation mode is selected. Thereafter, in step B2, 128 pieces of vertex information Cin are written into the memory area of the first line.
[0118]
In step B3, the next 128 pieces of vertex information Cin are written in the memory area of the second line. Thereafter, the control is switched in step B4 based on a preset operation mode. In this example, since the triangle operation mode is selected, the process proceeds to step B5, and two vertex information Cin adjacent to each other in the memory area of the first line and two adjacent to each other in the memory area of the second line. The vertex information Cin of 254 triangles obtained by obliquely dividing 127 squares formed by the vertex information Cin of the 254 triangles is sequentially read (see FIG. 16A).
[0119]
When the preset operation mode is the quadrangle operation mode, the process proceeds to step B6, where 127 pieces of information are formed by the vertex information Cin of each of the memory area of the first line and the memory area of the second line. The rectangular vertex information Cin is sequentially read as it is (see FIG. 16B).
[0120]
Thereafter, the process proceeds to step B7 where the determination unit 23 determines the triangle information Cout that deviates from the clip area CL. When determining the triangle information Cout, if even one vertex is in the clip area CL like the triangles “G” and “F” described in FIG. 19, the triangle information Cout is included in the rendering process. When all the vertices are outside the clip area CL as in the triangles “I” to “E”, the triangle information Cout is excluded from the rendering process.
[0121]
Then, the process proceeds to step B8, and it is checked whether or not all the triangle information Cout has been discriminated. If all the determinations are not completed, the process returns to step B2 to repeat the above-described processing. When all the determinations are completed, the graphic information conversion process is terminated.
[0122]
Thus, according to the graphic information conversion apparatus 20 as the second embodiment according to the present invention, when the vertex information Cin for expressing the cubic curve figure and the curved figure is rearranged into the triangle information Cout, The vertex information Cin of 127 squares formed by the vertex information Cin of each of the memory area of the first line and the memory area of the second line is used as it is, or the vertices of 254 triangles obtained by obliquely dividing the square. Information Cin is sequentially read from the storage device 21.
[0123]
Therefore, the vertex information Cin representing the nth-order Bezier curve or Bezier curved surface can be rearranged into the triangle information Cout by hardware without depending on software. In addition, since a stack memory or the like can be realized with a small memory configuration such as the memories 21A and 21B, the graphic information conversion apparatus 20 capable of high performance and low power consumption operation can be provided.
[0124]
[Second image processing apparatus]
FIG. 22 is a block diagram showing a configuration example of the second image processing apparatus 200 as an embodiment according to the present invention.
[0125]
In this example, the vertex rearrangement device 201 as an example of the graphic information conversion device described in FIG. 14 is provided, and the normal vector Hout of the polygon vertex P0 output from the first image processing device 100 described in FIG. And after converting the vertex information (texture data) Cin of each polygon, the vertex information Cin is rearranged without depending on the software, and then image processing for line scanning is performed. is there.
[0126]
A second image processing apparatus 200 shown in FIG. 22 performs image processing on the nth-order curved surface graphic generated in the first embodiment. The apparatus 200 is provided with a first image processing apparatus 100, which generates vertex coordinate values for expressing an nth-order curved surface graphic. As the image processing apparatus 100, the graphic information generating apparatus described in the first embodiment is used. Since the internal configuration example has been described with reference to FIGS. 1 and 12, the description thereof will be omitted.
[0127]
A lighting processing unit 25 and a coordinate conversion & clip code adding unit 24 are connected to the image processing apparatus 100. The lighting processing unit 25 calculates the light color by calculating the inner product (cos θ) between the normal vector z of the vertex P0 obtained from the calculator (outer product) 7 shown in FIG. 12 and a preset light source vector. To be made. For example, when the normal vector of the vertex P0 of the nth-order Bezier surface matches the light source vector (θ = 0 or 180 °), the luminance is calculated such that the vertex P0 is brightest. The
[0128]
Further, the coordinate conversion & clip code adding unit 24 converts the coordinate value of the vertex P0 into the coordinate value of the screen coordinate (video display) system based on the polygon rendering command from the image processing apparatus 100, and also FIG. 18 and FIG. The clip code described in the above is added. In this example, the vertex information Cin is 76 bytes and constitutes the shape data of one polygon (see FIG. 23). A vertex rearrangement device 201 is connected to the coordinate conversion & clip code adding unit 24. The vertex rearrangement apparatus 201 includes a write stack 22A and a read stack 22B, which are examples of the memory control unit 22, a stack memory (storage device) 21 ′, and a clip determination unit (determination unit) 23 ′. Note that the output of the lighting processing unit 25 passes through the vertex rearrangement device 201 and reaches the rasterization processing unit 26.
[0129]
The stack memory 21 ′ has at least two lines of memories 21A and 21B as shown in FIG. 14 and stores vertex information Cin. In the writing stack 22A, the m vertex information Cin whose coordinates have been converted are sequentially written to the first line of the stack memory 21 ′, and the next m vertex information Cin is written to the second line. In the read stack 22B, m−1 squares formed by two vertex information Cin adjacent to each other in the first line and two vertex information Cin adjacent to each other in the second line are diagonally divided. The 2 (m−1) pieces of triangle information Cout as described with reference to FIG. 16 are sequentially read from the stack memory 21 ′.
[0130]
A clip determiner 23 'is connected to the stack reader 22B to determine the triangle information Cout that deviates from the clip region CL as described with reference to FIG. A clip code added in advance for each vertex of the triangle is input to the clip determiner 23 ', and a three-input AND logic of these clip codes is calculated, and even one of the triangle vertices P0 is in the clip region CL. In this case, the triangle information Cout is included in the rendering process, and when all the vertices of these triangles are outside the clip region CL, the triangle information Cout is excluded from the rendering process.
[0131]
A rasterization processing unit 26 is connected to the lighting processing unit 25 and the clip determination unit 23 ′ described above, and the vertex information Cin after coordinate conversion is rasterized for each polygon, and a color texture address (U, V) of one pixel is obtained. Calculated. This is because line scanning is performed in the screen coordinate system.
[0132]
Subsequently, an operation example of the second image processing apparatus 200 will be described with reference to FIGS. 23 to 26. FIG. 23 is a data format showing an example of recorded contents of shape data of one polygon (triangle).
[0133]
In this example, the vertex information Cin shown in FIG. 23 is composed of 76 bytes of shape data of one polygon of a triangle as shown in FIG. That is, one polygon is represented by a triangle having three vertices 1, 2, and 3 shown in FIG. 24, and the texture ID shown in FIG. 23 is described at the top of the shape data, and thereafter, the first vertex of the triangle is described. Each of the X, Y, and Z coordinates is described, and the color value of the first vertex and the texture U and V coordinates are described.
[0134]
Following this, the X, Y, and Z coordinates of the second vertex are each described, and the color value, texture U, and V coordinate of the second vertex are described. Further, the X, Y, and Z coordinates of the third vertex are described, and the color value, texture U, and V coordinate of the third vertex are described. The vertex information Cin is continued so as to connect the triangular vertices 1, 2, and 3 as described in FIG. 16 according to the operation of the user.
[0135]
In this example, on the one hand, the normal vector Hout of the polygon vertex P0 for expressing the nth-order curved surface graphic output from the first image processing apparatus 100 is subjected to lighting processing, and on the other hand, each polygon is displayed. It is assumed that the vertex information Cin is rearranged and the vertex information Cin is rearranged without depending on software, and then image processing for line scanning is performed.
[0136]
That is, the coordinates of the continuous vertex information Cin are converted for each vertex. The vertex information Cin after coordinate conversion is subjected to rasterization processing for each polygon shown in FIG. 25, and a color texture address (U, V) is calculated for each pixel. Thereafter, the texture color of the U and V coordinates is read from the vertex information Cin specified by the texture ID, the color value of each pixel is determined, and the 3D video image is displayed on a liquid crystal display monitor or the like based on this color value. Is displayed. Note that the coordinate values of the vertices of the n-th curved surface graphic are generated by the first image processing apparatus 100.
[0137]
On the premise of this, the drawing list D2 is transferred from the first image processing apparatus 100 to the coordinate conversion & clip code adding unit 24 in step E1 of the flowchart shown in FIG. Thereafter, in step E2, the coordinate conversion & clip code adding unit 24 converts the vertex information Cin into a coordinate value in the screen coordinate system for each vertex based on the drawing list D2. The vertex information Cin whose coordinates are converted by the coordinate conversion & clip code adding unit 24 is rearranged into the triangle information Cout for line scanning by the vertex rearranging device 201 described above.
[0138]
Then, in step E3, each polygon is transferred to the rasterization processing unit 26. In the rasterization processing unit 26, a Z value, a color value (Rf, Gf, Bf), and a texture address (U, V) for each pixel (X, Y) are calculated. Thereafter, texture color values (Rt, Gt, Bt) in the U and V coordinate systems are read out. Then, the color value RGB of the screen coordinate system is obtained by equation (10).
R = Rf × Rt, G = Gf × Gt, B = Bf × Bt (10)
[0139]
Thereafter, the process proceeds to step E7 where the Z value, which is depth information, is compared. When the Z value is in front of the clip area as shown in FIG. 20, the triangle information Cout is written. When the Z value is behind the clip area, it is not displayed on the liquid crystal display monitor, so that the writing is not performed. Thereafter, the process goes to step E9, where it is checked whether or not all the writing of the triangle information Cout has been completed. When all writing has been completed, the image processing ends. If all the writing of the triangle information Cout has not been completed, the process returns to step E1 to repeat the above-described processing.
[0140]
As described above, according to the second image processing apparatus 200 as the embodiment of the present invention, the m vertex information Cin is stored in the memory area of the first line by the stack writer 22A without depending on software. At the same time, the next m pieces of vertex information Cin are written to the memory on the second line, and then the two pieces of vertex information Cin adjacent to each other in the memory on the first line and the memory on the second line are adjacent to each other. Vertex information Cin of 2 (m−1) triangles obtained by obliquely dividing (m−1) squares formed by two pieces of vertex information Cin is obtained from the stack memory unit 21 ′ by the stack reader 22B. It is made to read sequentially.
[0141]
Accordingly, it is possible to perform image processing that expresses an nth-order Bezier curve or a Bezier curved surface based on the triangle information Cout rearranged by hardware.
[0142]
In addition, since the apex rearrangement device 201 and the like can be realized with a small circuit configuration, it is possible to provide the image processing device 200 capable of high performance and low power consumption operation. In addition, an entertainment device incorporating the image processing device 200, a mobile terminal device, a mobile phone, and the like can be configured.
[0143]
(3) Examples
FIG. 27 is a block diagram showing a configuration example of a mobile terminal device 300 as an embodiment according to the present invention.
[0144]
In this example, the first image processing apparatus 100 and the second image processing apparatus 200 described above are combined to constitute a mobile terminal apparatus 300 that is an example of an information processing apparatus. Since the same reference numerals described in the first and second embodiments have the same functions, the description thereof is omitted.
[0145]
That is, the mobile terminal device 300 shown in FIG. 27 includes, as a main part, an LSI circuit in which the first image processing device 100 shown in FIG. 12 and the second image processing device 200 shown in FIG. The n-th order curved surface graphic is processed based on an external operation.
[0146]
In FIG. 27, a first image processing apparatus 100 surrounded by a one-dot chain line includes a Bezier dividing device 17, a main memory 18, an operation button 39, a CPU 40, an input controller 43, a ROM (Read Only Memory) 45, and the like. The second image processing device 200 surrounded by a chain line is composed of a coordinate conversion & clip code adding unit 24, a lighting processing unit 25, a vertex rearranging device 201, and a rasterization processing unit 26.
[0147]
In addition to these components, the mobile terminal device 300 includes a memory controller 27, a frame memory 28, a liquid crystal display controller (LCDC) 29, an interface 42, a sound process unit (hereinafter simply referred to as SPU) 44, and the like. . In this example, the portion surrounded by the wavy line is integrated on one chip. Of course, the Bezier dividing device 17, the vertex rearranging device 201, the SPU 44, and the like may be individually formed as IC chips and mounted on the same printed board.
[0148]
A bus 41 shown in FIG. 27 is connected to the Bezier dividing device 17, the main memory 18, the CPU 40, the interface 42, the input controller 43, the SPU 44, the ROM 45, and the like. The ROM 45 stores program information such as a control procedure connected in the first and second embodiments and a so-called operating system for managing the main memory 18 and the SPU 44.
[0149]
In this example, the memory cartridge 30 or the like is mounted on the interface 42 and used. The memory cartridge 30 records game data and electronic contents such as electronic animation. For example, the memory cartridge 30 includes a bus 34, and an interface 31, a read control mask ROM 32, a content recording EEPROM 33, and the like are connected to the bus 34. In the EEPROM 33, program information such as game data and video material information are recorded.
[0150]
The contents of the memory cartridge 30 are transferred to the main memory 18 through the interface 42 and the bus 41. The coordinate values of the control points for generating, for example, the n-th order Bezier curved surface or Bezier curved line described in the first embodiment of the game character transferred from the memory cartridge 30 are stored (see FIG. 13). ). The main memory 18 includes a random access memory (RAM). The main memory 18 here is a memory that can execute a program on the memory.
[0151]
The main memory 18 is connected to a Bezier dividing device 17 through a bus 41 so that an n-th order curved surface graphic is subjected to image processing based on the coordinate values of control points read from the main memory 18. The Bezier division unit 17 includes the floating point linear interpolator described in the first embodiment, and the coordinate values A and B of a control point having a 23-bit width and a value of 0 ≦ t ≦ 1 in an 8-bit width. A × (1−t) + B × t is sequentially calculated with respect to the coordinate values of new control points that internally divide between these control points. Since the internal configuration example and the function of the linear interpolator are the same as those described with reference to FIG. These control procedures are described in the ROM 45 and read by the CPU 40 when the application is executed.
[0152]
An input controller (INTC) 43 is connected to the above-described bus 41 in order to control the Bezier dividing device 17, and this input controller 43 is equipped with an operation button 39. This operation button 39 is operated by the user. When the operation button 39 is operated, operation information D3 is generated by the input controller 43, and this operation information D3 is input to the CPU 40 through the bus 41. The CPU 40 reads out the vertex information Cin from the main memory 18 based on the operation information D3, and executes display control for changing the curved figure and the curved figure with respect to the vertex information Cin.
[0153]
The CPU 40 controls the entire portable terminal device 300 by executing an operating system stored in the ROM 45, and is composed of, for example, a 32-bit RISC-CPU. When the mobile terminal device 300 is turned on, the CPU 40 executes the operating system stored in the ROM 45 in accordance with the game mode or the program playback mode, so that the CPU 40 executes the Bezier dividing device 17, the SPU 44, and the like. Control is to be performed. Since the CPU 40 performs interrupt control, a control device for direct memory access (DMA) transfer may be provided separately in order to reduce the control burden.
[0154]
A lighting processing unit 25 and a coordinate conversion & clip code adding unit 24 are connected to the Bezier dividing device 17. In response to a calculation request from the CPU 40, the lighting processing unit 25 calculates an inner product (cos θ) between the normal vector z of the vertex P0 obtained from the calculator (outer product) 7 shown in FIG. 12 and a preset light source vector. A light color is calculated by calculation (light source calculation).
[0155]
Further, the coordinate conversion & clip code adding unit 24 converts the coordinate value of the vertex P0 into the coordinate value of the screen coordinate (video display) system based on the polygon drawing command, and the clip code described with reference to FIGS. Is added to the vertex information Cin. Also in this example, the vertex information Cin is constituted by 76 bytes to form the shape data of one polygon (see FIG. 23). The coordinate transformation & clip code adding unit 24 uses a parallel computing unit such as a geometry transfer engine (GTE), and performs coordinate transformation, matrix or vector computation processing in response to computation requests from the CPU 40. To be done. Specifically, with this parallel computing unit, for example, in the case of computation that performs flat shading that draws the same color on one triangular polygon, the coordinate computation of a maximum of about 1.5 million polygons can be performed per second. As a result, the portable terminal device 300 can reduce the load on the CPU 40 and perform high-speed coordinate calculation.
[0156]
A vertex rearrangement device 201 is connected to the coordinate transformation & clip code adding unit 24, and at least vertex information Cin is stored with memories 21A and 21B for two lines as shown in FIG. The vertex rearrangement apparatus 201 uses a graphic processor unit (GPU) or the like, and performs vertex rearrangement according to a drawing instruction from the CPU 40. The vertex rearrangement apparatus 201 sequentially writes the m pieces of vertex information Cin whose coordinates have been converted to the memory area of the first line, and writes the next m pieces of vertex information Cin to the memory area of the second line. After that, m−1 squares formed by two vertex information Cin adjacent to each other in the first line and two vertex information Cin adjacent to each other in the second line are diagonally divided into 2 (m -1) The triangle information Cout is sequentially read out.
[0157]
Further, the vertex rearrangement apparatus 201 determines the triangle information Cout deviating from the clip area CL as described with reference to FIG. If even one of the vertices P0 of the triangle is within the clip area CL, the triangle information Cout is included in the rendering process, and if all the vertices of these triangles are outside the clip area CL, the triangle information Cout is Excluded from the rendering process.
[0158]
A rasterization processing unit 26 is connected to the vertex rearrangement apparatus 201, and the vertex information Cin after coordinate conversion is rasterized for each polygon, and a color texture address (U, V) for one pixel is calculated. A frame memory 28 is connected to the rasterization processing unit 26 through a memory controller 27, and a liquid crystal display monitor 36 is connected to the memory controller 27 through an LCDC 29.
[0159]
In the memory controller 27, display data for one screen of the liquid crystal display monitor 36 is written from the rasterization processing unit 26 to the frame memory 28. For example, the memory controller 27 performs drawing of a polygon (polygon) or the like on the frame memory 28 in accordance with a drawing command from the CPU 40. The memory controller 27 can draw a maximum of about 360,000 polygons per second. Further, the frame memory 28 includes a so-called dual port RAM, and can perform drawing processing from the memory controller 27 and reading for display at the same time.
[0160]
The frame memory 28 has a capacity of 1 Mbyte, for example, and is handled as a 16-bit matrix composed of 1024 pixels in the horizontal direction and 512 pixels in the vertical direction. The frame memory 28 stores a color look-up table (CLUT) to be referred to when the memory controller 27 draws polygons and the like in addition to the display area developed as the video output. And a texture area for storing a material (texture) that is inserted (mapped) into a polygon or the like that is coordinate-converted at the time of drawing and drawn by the memory controller 27. The CLUT area and the texture area are dynamically changed according to the change of the display area.
[0161]
In addition to the flat shading described above, the memory controller 27 complements the above-described flat shading with the Gouraud shading that determines the color within the polygon by complementing the vertex color of the polygon, and the texture stored in this texture area. Texture mapping can be applied to polygons. When performing such Gouraud shading or texture mapping, the coordinate conversion & clip code adding unit 24 is configured to perform coordinate calculations of up to about 500,000 polygons per second.
[0162]
The display data from the memory controller 27 is converted into a video output signal φv by the LCDC 29, and this video output signal φv is output to the liquid crystal display monitor 36. For example, the liquid crystal display monitor 36 displays a three-dimensional game character composed of a cubic Bezier curved surface.
[0163]
Further, the SPU 44 reproduces sound information related to the game or electronic animation based on an instruction from the CPU 40, amplifies the sound information, and outputs the sound signal to the speaker 37. A sound buffer or the like in which waveform data or the like is recorded in the SPU 44 may be provided to generate musical sounds, sound effects, or the like. When the sound buffer is provided, the SPU 44 reproduces (ADPCM decoding function) audio data that is adaptively predictive-encoded (ADPCM: Adaptive Differential PCM) using, for example, 16-bit audio data as a 4-bit differential signal, By playing back the waveform data stored in the sound buffer, sound effects can be generated (playback function), or the waveform data stored in the sound buffer can be modulated and played back (modulation function) become. By providing such a function, the SPU 44 can be used as a so-called sampling sound source that generates musical sounds, sound effects, and the like based on waveform data recorded by instructions from the CPU 40.
[0164]
Subsequently, an operation example of the mobile terminal device 300 will be described. FIG. 28 is a flowchart showing a processing example in the mobile terminal device 300. In this example, it is assumed that the game mode is executed by mounting the memory cartridge 30 for the game. In the game data, a character composed of a cubic Bezier curved surface is prepared. In the Bezier dividing device 17, the coordinate values of the control points are divided by a linear interpolator. In the vertex rearranging device, the vertex information Cin is arranged by the triangle operation mode. It is assumed that it will be replaced.
[0165]
Based on this assumption, the user turns on the power in Step F2 after mounting the memory cartridge 30 in the portable terminal device 300 in Step F1 of the flowchart of FIG. When the power is turned on, the CPU 40 executes the operating system stored in the ROM 45, thereby controlling the Bezier dividing device 17, the SPU 44, and the like. In this example, the user selects a game mode in step F3. When the application is executed, the control procedure described in the first and second embodiments is read from the ROM 45 by the CPU 40.
[0166]
On the other hand, the user operates the operation button 39 in step F4. When the operation button 39 is operated, the operation information D3 is input to the CPU 40 through the input controller 43 and the bus 41. The operation information D3 is used for deforming a cubic Bezier curved surface, a Bezier curve, or the like constituting the game character or moving the character.
[0167]
In parallel with the input of the operation information D3, the CPU 40 reads out the vertex information Cin from the main memory 18 based on the operation information D3 in Step F5 to Step F10, and the third-order curve figure and curved surface regarding the vertex information Cin. Display control is performed to change the figure.
[0168]
That is, in step F 5, game data including program information and video material information is read from the memory cartridge 30 and transferred to the main memory 18. This video material information includes the coordinate values of control points for generating a cubic Bezier curved surface, a Bezier curve, etc. constituting the game character (see FIG. 13).
[0169]
When this game data is transferred to the main memory 18, the process proceeds to step F6, where the Bezier dividing device 17 generates a tertiary curved surface graphic based on the coordinate values of the control points read from the main memory 18 based on the operation information D3. Image processing is performed. For example, the floating point linear interpolator of the Bezier division device 17 uses the coordinate values A and B of the control point having a 23-bit width and the interpolation coefficient t having an 8-bit width and 0 ≦ t ≦ 1. A × (1−t) + B × t is sequentially calculated with respect to the coordinate values of new control points that internally divide the control points.
[0170]
In step F7, the coordinate value of the vertex P0 is converted into the coordinate value of the screen coordinate (video display) system by the coordinate conversion & clip code adding unit 24 based on the polygon drawing command from the CPU 40, and FIG. The clip code described in 20 is added to the vertex information Cin. For example, in the case of flat shading, polygon calculations of up to about 1.5 million polygons are performed per second.
[0171]
In parallel with this, in step F8, the lighting processing unit 25 responds to a calculation request from the CPU 40, and the normal vector z of the vertex P0 obtained from the calculator (outer product) 7 shown in FIG. The light color is calculated by calculating the inner product (cos θ) with the vector (light source calculation).
[0172]
Thereafter, the process proceeds to step F9 and the vertex rearrangement apparatus 201 sequentially writes the m pieces of vertex information Cin whose coordinates have been converted to the memory area of the first line in response to a drawing command from the CPU 40, and the next m pieces of vertex information. The vertex information Cin is written into the memory area of the second line. After that, m−1 squares formed by two vertex information Cin adjacent to each other in the first line and two vertex information Cin adjacent to each other in the second line are diagonally divided into 2 (m -1) The triangle information Cout is sequentially read out.
[0173]
Further, the vertex rearrangement apparatus 201 determines the triangle information Cout deviating from the clip area CL as described with reference to FIG. If even one of the vertices P0 of the triangle is within the clip area CL, the triangle information Cout is included in the rendering process, and if all the vertices of these triangles are outside the clip area CL, the triangle information Cout is Excluded from the rendering process.
[0174]
Thereafter, in step F10, the vertex information Cin after the coordinate conversion is rasterized for each polygon by the rasterization processing unit 26, and a color texture address (U, V) for one pixel is calculated. In step F11, the memory controller 27 writes display data for one screen of the liquid crystal display monitor 36 from the rasterization processing unit 26 to the frame memory 28. For example, the memory controller 27 draws a maximum of about 360,000 polygons (polygons) per second on the frame memory 28 in accordance with a drawing command from the CPU 40.
[0175]
Here, when the memory controller 27 draws a polygon or the like, a texture region, a color lookup table, or the like is referred to, and flat shading processing, Gouraud shading processing, texture mapping processing, or the like is performed. Display data by this video display processing is converted into a video output signal φv by the LCDC 29, and this video output signal φv is output to the liquid crystal display monitor 36. For example, the liquid crystal display monitor 36 displays a three-dimensional game character composed of a cubic Bezier curved surface. The audio information associated with the video display process is reproduced and amplified by the SPU 44 based on an instruction from the CPU 40, and the audio signal is output to the speaker 37. Thereby, the user can enjoy a game with the portable terminal device 300.
[0176]
When the game is over, the CPU 40 determines whether or not to move to step F12 to end the game mode. When the game mode is ended, since the power-off information and the like are detected by the CPU 40, the information processing ends. When the user operates the operation button 39 to instruct the CPU 40 to repeat the game mode or the like, the process returns to Step F4 and Step F5, and Steps F4 to F11 described above are repeated. Thereby, the user can enjoy a game many times with the portable terminal device 300.
[0177]
As described above, according to the portable terminal device 300 as the embodiment of the present invention, the first and second image processing devices 100 and 200 are applied, so that the operation from the outside can be performed without depending on the software. Based on the information D3 and the triangle information Cout processed by the hardware, a Bezier curved surface such as a game character can be processed at high speed.
[0178]
Not only can this Bezier curved surface be processed by small-scale hardware, but also a normal vector required by the lighting processing unit 25 in the subsequent stage can be calculated. Further, the clip determination can be easily performed simultaneously with the rearrangement of the vertices, and the triangle information Cout that does not possibly enter the clip region CL can be removed.
[0179]
Therefore, it is not necessary to render the useless triangle information Cout, and the performance of the mobile terminal device 300 can be improved. As a result, the Bezier curved surface processing can be introduced in the portable terminal device 300 or the like that has been difficult to perform curved surface processing until now.
[0180]
Moreover, the linear interpolator constituting the Bezier dividing device 17 can be realized with a small circuit configuration, and the vertex rearranging device 201 can be realized with a small memory configuration. Therefore, it is possible to provide the mobile terminal device 300 capable of high performance and low power consumption operation and the mobile phone with a game function.
[0181]
Further, according to the ROM 45 according to the present embodiment, the Bezier dividing device 17 and the vertex rearranging device 201 can be controlled with good timing based on the control procedure, so that all n-order curved surface figures can be processed and drawn by hardware. It becomes possible. Since the overhead due to software is eliminated, a very high performance portable terminal device 300 can be configured.
[0182]
【The invention's effect】
As described above, according to the graphic information converting apparatus according to the present invention, when rearranging vertex information for expressing a curved graphic and a curved graphic into polygon information, a memory control unit is provided, and m vertexes are provided. The information is written to the memory of the first line and the next m pieces of vertex information are written to the memory of the second line. Vertex information of (m−1) squares formed by two adjacent vertex information in the memory as they are, or 2 (m−1) triangle vertices obtained by obliquely dividing the square Information is read sequentially.
[0183]
With this configuration, vertex information representing an nth-order Bezier curve or Bezier curved surface can be rearranged into polygon information by hardware without depending on software. In addition, since a stack memory or the like can be realized with a small memory configuration, a graphic information conversion apparatus capable of high performance and low power consumption operation can be provided.
[0184]
According to the image processing apparatus of the present invention, when image processing is performed on an nth-order curved surface figure generated from (n + 1) control points in the horizontal direction and (n + 1) control points in the vertical direction, A graphic information conversion device is provided.
[0185]
With this configuration, it is possible to perform image processing that expresses an nth-order Bezier curve or Bezier curved surface based on polygon information rearranged by hardware without depending on software. In addition, since a graphic information conversion apparatus or the like can be realized with a small memory configuration, an image processing apparatus capable of high performance and low power consumption operation can be provided.
[0186]
According to the information processing apparatus of the present invention, an nth-order curved surface figure generated from (n + 1) control points in the horizontal direction and (n + 1) control points in the vertical direction is based on operation information from the outside. When performing information processing, the above-described image processing apparatus is provided.
[0187]
With this configuration, it is possible to perform information processing that expresses an nth-order Bezier curve or a Bezier curved surface based on polygon information image-processed by hardware without depending on software. In addition, since an image processing device or the like can be realized with a small memory configuration, an information processing device capable of high performance and low power consumption operation, in particular, an entertainment device, a mobile phone, a mobile terminal device, and the like can be provided. .
[0188]
According to the graphic information conversion method according to the present invention, when rearranging vertex information for expressing a curved graphic into polygon information for line scanning, at least two lines of memory area are expanded, and m pieces And the next m pieces of vertex information are written to the memory area of the second line, and then the two pieces of vertex information adjacent to each other in the memory of the first line The vertex information of (m−1) squares formed by two adjacent vertex information in the memory of the second line is used as it is, or 2 (m−1) obtained by dividing the rectangle diagonally. The vertex information of the triangles is sequentially read out.
[0189]
With this configuration, vertex information representing an nth-order Bezier curve or Bezier curved surface can be rearranged into polygon information by hardware without depending on software. In addition, in a graphic information conversion apparatus, an image processing apparatus, an information processing apparatus and the like realized by this method, a stack memory having a small memory configuration can be used.
[0190]
According to the recording medium of the present invention, a control procedure for rearranging vertex information for line scanning of a curved figure into polygon information is described.
[0191]
With this configuration, it is possible to control the stack memory and the memory control unit built in the graphic information conversion device, the image processing device, the information processing device, etc. with high reproducibility based on the control procedure recorded on the recording medium.
[0192]
The present invention is extremely suitable when applied to an entertainment device, a portable terminal device, a cellular phone, etc., in which a CAD and CAM system for handling graphic information such as a Bezier curve and a Bezier curved surface is introduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration example of a graphic information generating apparatus 10 as a first embodiment according to the present invention.
FIG. 2 is a diagram illustrating an arrangement example of (n + 1) × (n + 1) control points p0 to pn (n + 2) at the time of generating vertex coordinate values.
FIG. 3 is a diagram showing a data format example of coordinate values in floating point.
FIG. 4 is a block diagram showing an example of the internal configuration of the linear interpolator 1;
FIG. 5 is a diagram illustrating an arrangement example of 4 × 4 control points p0 to p15 in the U-V coordinate system.
FIG. 6 is an image diagram showing a graphic example of a cubic Bezier curved surface.
FIGS. 7A and 7B are transition diagrams showing an example (part 1) of generating coordinate values of vertices of a cubic Bezier surface graphic.
FIGS. 8A and 8B are transition diagrams showing an example (part 2) of generating coordinate values of vertices of a cubic Bezier curved surface graphic.
FIGS. 9A to 9C are transition diagrams showing an example (part 3) of generating coordinate values of vertices of a cubic Bezier curved surface figure.
FIG. 10 is a flowchart showing an operation example in the graphic information generating apparatus 10;
FIGS. 11A to 11C are transition diagrams showing an example of generating a normal vector of a vertex P0 of a cubic Bezier curved surface figure.
FIG. 12 is a block diagram showing a configuration example of a first image processing apparatus 100 as an embodiment according to the present invention.
FIG. 13 is an image diagram showing an example of recorded contents of the main memory 18;
FIG. 14 is a block diagram showing a configuration example of a graphic information conversion apparatus 20 as a second embodiment according to the present invention.
FIG. 15 is an image diagram showing an example of graphic information conversion when m = 8.
FIGS. 16A and 16B are image diagrams showing output examples of triangle information Cout and square information Cout ′;
FIG. 17 is an image diagram of a virtual display space showing an example of a clip area such as a liquid crystal display monitor.
FIG. 18 is a correspondence diagram illustrating a relationship example between a clip area and a 4-bit clip code in the screen coordinate system xs, ys.
FIG. 19 is an image diagram showing an example of a determination result by a clip code.
FIG. 20 is a correspondence diagram showing a relationship example between a clip area and a 6-bit clip code including a depth code in the screen coordinate system ys, zs.
FIG. 21 is a flowchart showing an operation example in the graphic information conversion apparatus 20 as the embodiment according to the invention.
FIG. 22 is a block diagram showing a configuration example of a second image processing apparatus 200 as an embodiment according to the present invention.
FIG. 23 is a data format showing an example of recorded contents of shape data of one polygon (triangle).
FIG. 24 is an image diagram showing a configuration example of a triangular polygon.
FIG. 25 is an image view showing an example of rasterizing processing of triangle information Cout.
FIG. 26 is a flowchart illustrating an example of processing in the second image processing apparatus.
FIG. 27 is a block diagram illustrating a configuration example of a mobile terminal device 300 as an embodiment according to the present invention.
FIG. 28 is a flowchart showing an example of processing in the mobile terminal device 300.
FIG. 29 is a diagram showing an example (part 1) of a cubic Bezier curve according to a conventional example.
FIG. 30 is a diagram illustrating an example (part 2) of a cubic Bezier curve.
FIG. 31 is a diagram illustrating an example (part 1) of a cubic Bezier curved surface.
FIG. 32 is a diagram illustrating an example (part 2) of a cubic Bezier curved surface.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Linear interpolator, 2, 21A, 21B ... Memory part, 21 '... Stack memory, 3 ... Control point selection part, 4, 4' ... Control apparatus, 5 ... Recording medium, 5 ′... ROM (recording medium), 6... Graphic information generation unit, 7... Arithmetic unit, 10. ... multiplier, 14 ... subtractor, 15 ... adder, 16 ... normalization unit, 17 ... Bézier dividing device, 18 ... main memory, 19 ... operation unit, DESCRIPTION OF SYMBOLS 20 ... Graphic information converter, 21 ... Memory | storage device, 22 ... Memory control part, 22A ... Stack writer, 22B ... Stack reader, 23 ... Judgment part, 23 '. ..Clip determination unit, 24... Coordinate conversion & clip code addition unit, 25... Lighting processing unit, 26. Rasterization processing unit, 30 ... memory cartridge, 36 ... liquid crystal display monitor, 100 ... first image processing device, 200 ... second image processing device, 300 ... mobile terminal device ( Information processing equipment)

Claims (16)

曲面図形を表現するための頂点情報をライン走査のための多角形情報に並び換える装置であって、
少なくとも、2ライン分のメモリを有して前記頂点情報を記憶する記憶装置と、
前記記憶装置の書込み読出しを制御するメモリ制御部とを備え、
前記メモリ制御部は、
m個の頂点情報を1ライン目のメモリに書き込むと共に、次のm個の頂点情報を2ライン目のメモリに書き込み、
その後、前記1ライン目のメモリで各々隣接する2個づつの頂点情報と前記2ライン目のメモリで各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、該四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すことを特徴とする図形情報変換装置。
An apparatus for rearranging vertex information for expressing a curved surface figure into polygon information for line scanning,
A storage device having at least two lines of memory to store the vertex information;
A memory control unit for controlling writing and reading of the storage device,
The memory control unit
Write m vertex information to the memory on the first line and write the next m vertex information to the memory on the second line.
Thereafter, (m−1) rectangular vertices formed by the information of two adjacent vertices in the memory of the first line and the information of two adjacent vertices in the memory of the second line. A graphic information conversion apparatus that sequentially reads out vertex information of 2 (m-1) triangles obtained by dividing the square as it is, or by dividing the quadrangle diagonally.
予め前記四角形の頂点情報又は三角形の頂点情報のいずれかを選択するための設定情報が入力されることを特徴とする請求項1に記載の図形情報変換装置。  2. The graphic information conversion apparatus according to claim 1, wherein setting information for selecting either the vertex information of the quadrangle or the vertex information of the triangle is input in advance. 前記頂点情報は、
少なくとも、前記多角形の頂点の座標値、色テクスチャ情報及びクリップ情報を含むことを特徴とする請求項1に記載の図形情報変換装置。
The vertex information is
The graphic information conversion apparatus according to claim 1, comprising at least coordinate values of vertexes of the polygon, color texture information, and clip information.
前記頂点情報によって表現される奥行きを含む表示領域に関して視認可能な範囲をクリップ領域としたとき、
前記クリップ領域から外れる多角形情報を判定する判定部が設けられることを特徴とする請求項1に記載の図形情報変換装置。
When a visible range regarding the display area including the depth represented by the vertex information is a clip area,
The graphic information conversion apparatus according to claim 1, further comprising a determination unit that determines polygon information deviating from the clip area.
前記判定部は、
予め多角形の各々の頂点毎に付加されたクリップ情報を入力し、
前記多角形の頂点が1つでも前記クリップ領域内にある場合には、当該多角形情報を三次元映像加工処理に含め、
前記多角形の全ての頂点がクリップ領域外にある場合には、当該多角形情報を三次元映像加工処理から除外することを特徴とする請求項4に記載の図形情報変換装置。
The determination unit
Input clip information added in advance for each vertex of the polygon,
If even one of the polygon vertices is within the clip region, the polygon information is included in the 3D video processing,
The graphic information conversion apparatus according to claim 4, wherein when all the vertices of the polygon are outside the clip region, the polygon information is excluded from the 3D video processing.
曲面図形を表現するための頂点情報をライン走査のための多角形情報に並び換える方法であって、
少なくとも、2ライン分のメモリ領域を展開し、
m個の頂点情報を1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報を2ライン目のメモリ領域に書き込み、
その後、前記1ライン目のメモリ領域で各々隣接する2個づつの頂点情報と前記2ライン目のメモリ領域で各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、該四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すことを特徴とする図形情報変換方法。
A method of rearranging vertex information for expressing a curved figure into polygon information for line scanning,
Expand the memory area for at least 2 lines,
Write m vertex information to the memory area of the first line, and write the next m vertex information to the memory area of the second line,
Thereafter, (m−1) squares formed by two vertex information adjacent to each other in the memory area of the first line and two vertex information adjacent to each other in the memory area of the second line. The graphic information conversion method is characterized in that the vertex information of 2 (m-1) triangles obtained by dividing the quadrangle as it is or by obliquely dividing the quadrangle is sequentially read.
予め前記四角形の頂点情報又は三角形の頂点情報のいずれかを読み出すかを選択するようになされることを特徴とする請求項6に記載の図形情報変換方法。7. The graphic information conversion method according to claim 6 , wherein whether to read out the vertex information of the quadrangle or the vertex information of the triangle is selected in advance. 前記頂点情報は、
少なくとも、前記多角形の頂点の座標値、色テクスチャ情報及びクリップ情報を含むことを特徴とする請求項6に記載の図形情報変換方法。
The vertex information is
The graphic information conversion method according to claim 6 , comprising at least coordinate values of vertexes of the polygon, color texture information, and clip information.
前記頂点情報によって表現される奥行きを含む表示領域に関して視認可能な範囲をクリップ領域としたとき、
前記クリップ領域から外れる多角形情報を判定することを特徴とする請求項6に記載の図形情報変換方法。
When a visible range regarding the display area including the depth represented by the vertex information is a clip area,
The graphic information conversion method according to claim 6 , wherein polygon information deviating from the clip area is determined.
前記多角形情報の判定に当たって、
予め多角形の各々の頂点毎にクリップ情報を付加することを特徴とする請求項9に記載の図形情報変換方法。
In determining the polygon information,
The graphic information conversion method according to claim 9 , wherein clip information is added in advance to each vertex of the polygon.
前記多角形情報の判定の際に、
前記多角形の頂点が1つでも前記クリップ領域内にある場合には、当該多角形情報を三次元映像加工処理に含め、
前記多角形の全ての頂点がクリップ領域外にある場合には、当該多角形情報を三次元映像加工処理から除外することを特徴とする請求項6に記載の図形情報変換方法。
When determining the polygon information,
If even one of the polygon vertices is within the clip region, the polygon information is included in the 3D video processing,
The graphic information conversion method according to claim 6 , wherein when all the vertices of the polygon are outside the clip region, the polygon information is excluded from the 3D video processing.
曲面図形を表現するための頂点情報をライン走査のための多角形情報に並び換える制御手順を記録した記録媒体であって、
前記記録媒体には、
少なくとも、2ライン分のメモリ領域を展開し、
m個の頂点情報を1ライン目のメモリ領域に書き込むと共に、次のm個の頂点情報を2ライン目のメモリ領域に書き込み、
その後、前記1ライン目のメモリ領域で各々隣接する2個づつの頂点情報と前記2ライン目のメモリ領域で各々隣接する2個づつの頂点情報とにより形成される(m−1)個の四角形の頂点情報をそのまま、もしくは、該四角形を斜めに分割した2(m−1)個の三角形の頂点情報を順次読み出すような制御手順が記録されることを特徴とする記録媒体。
A recording medium recording a control procedure for rearranging vertex information for expressing a curved surface figure into polygon information for line scanning,
The recording medium includes
Expand the memory area for at least 2 lines,
Write m vertex information to the memory area of the first line, and write the next m vertex information to the memory area of the second line,
Thereafter, (m−1) squares formed by two vertex information adjacent to each other in the memory area of the first line and two vertex information adjacent to each other in the memory area of the second line. The recording medium is recorded with a control procedure for sequentially reading out the vertex information of 2 (m-1) triangles obtained by dividing the square information as it is or by obliquely dividing the square.
前記頂点情報には、
少なくとも、前記多角形の頂点の座標値、色テクスチャ情報及びクリップ情報を含めるようになされることを特徴とする請求項12に記載の記録媒体。
The vertex information includes
The recording medium according to claim 12 , wherein at least coordinate values of vertexes of the polygon, color texture information, and clip information are included.
前記頂点情報によって表現される奥行きを含む表示領域に関して視認可能な範囲をクリップ領域としたとき、
前記クリップ領域から外れる多角形情報を判定するような制御手順が記録されることを特徴とする請求項12に記載の記録媒体。
When a visible range regarding the display area including the depth represented by the vertex information is a clip area,
The recording medium according to claim 12 , wherein a control procedure for determining polygon information deviating from the clip area is recorded.
前記多角形情報の判定に当たって、
予め多角形の各々の頂点毎にクリップ情報を付加するように制御手順が記録されることを特徴とする請求項12に記載の記録媒体。
In determining the polygon information,
13. The recording medium according to claim 12 , wherein a control procedure is recorded in advance so as to add clip information for each vertex of the polygon.
前記多角形情報の判定の際に、
前記多角形の頂点が1つでも前記クリップ領域内にある場合には、当該多角形情報を三次元映像加工処理に含め、
前記多角形の全ての頂点がクリップ領域外にある場合には、当該多角形情報を三次元映像加工処理から除外するような制御手順が記録されることを特徴とする請求項15に記載の記録媒体。
When determining the polygon information,
If even one of the polygon vertices is within the clip region, the polygon information is included in the 3D video processing,
16. The recording according to claim 15 , wherein when all the vertices of the polygon are outside the clip area, a control procedure is recorded so as to exclude the polygon information from the 3D video processing. Medium.
JP2000146674A 2000-05-18 2000-05-18 Graphic information conversion apparatus, graphic information conversion method, and recording medium Expired - Fee Related JP4483026B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000146674A JP4483026B2 (en) 2000-05-18 2000-05-18 Graphic information conversion apparatus, graphic information conversion method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000146674A JP4483026B2 (en) 2000-05-18 2000-05-18 Graphic information conversion apparatus, graphic information conversion method, and recording medium

Publications (2)

Publication Number Publication Date
JP2001331807A JP2001331807A (en) 2001-11-30
JP4483026B2 true JP4483026B2 (en) 2010-06-16

Family

ID=18652994

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000146674A Expired - Fee Related JP4483026B2 (en) 2000-05-18 2000-05-18 Graphic information conversion apparatus, graphic information conversion method, and recording medium

Country Status (1)

Country Link
JP (1) JP4483026B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951349B (en) * 2019-05-17 2024-03-22 珠海金山办公软件有限公司 Method and device for adjusting graph vertex types and electronic equipment
CN111429549B (en) * 2020-03-02 2023-08-01 北京梧桐车联科技有限责任公司 Route image generation method, device and storage medium

Also Published As

Publication number Publication date
JP2001331807A (en) 2001-11-30

Similar Documents

Publication Publication Date Title
JP4385524B2 (en) Polygon data generation method and image display apparatus using the same
US7002591B1 (en) Method and apparatus for interleaved processing of direct and indirect texture coordinates in a graphics system
US6873324B2 (en) Data processing method, recording medium and data processing apparatus
US8217962B2 (en) Single-pass bounding box calculation
CN102227752B (en) Discarding of vertex points during two-dimensional graphics rendering using three-dimensional graphics hardware
JPWO2003001458A1 (en) Information processing equipment
US7075530B2 (en) Fast lighting processors
JP4483025B2 (en) Image processing apparatus and information processing apparatus
JP3604312B2 (en) Computer-readable recording medium having recorded video game program, object drawing method in video game, and video game apparatus
JP4193979B2 (en) Shadow volume generation program and game device
US7068273B2 (en) Recording medium which stores 3D image processing program, 3D image processor, 3D image processing method, and video game machine
JP4483026B2 (en) Graphic information conversion apparatus, graphic information conversion method, and recording medium
US7015930B2 (en) Method and apparatus for interpolating pixel parameters based on a plurality of vertex values
JP4556646B2 (en) Graphic information generating apparatus, image processing apparatus, information processing apparatus, and graphic information generating method
JP4581261B2 (en) Arithmetic apparatus, arithmetic processing method, and image processing apparatus
US7015917B2 (en) Curved surface subdivision apparatus
JP3979162B2 (en) Image processing apparatus and method
JPH11212955A (en) Arithmetic unit and image processor
JP2002163671A (en) Game system, program and information storage medium
JP2007128180A (en) Arithmetic processing unit
JP2002541600A (en) Apparatus and method for perspective transformation
JP3617960B2 (en) Three-dimensional game image processing program, three-dimensional game image processing method, and video game apparatus
JP3618109B2 (en) Central processing unit
JP4468974B2 (en) Image generating apparatus, image generating method, and program
JP3268484B2 (en) Shading method and shading device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060516

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070202

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20090916

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20091029

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091210

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100201

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100302

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100315

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

Free format text: PAYMENT UNTIL: 20130402

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees