JP3733207B2 - Polyhedron generation method, polyhedron generation apparatus, recording medium, and color image processing apparatus - Google Patents
Polyhedron generation method, polyhedron generation apparatus, recording medium, and color image processing apparatus Download PDFInfo
- Publication number
- JP3733207B2 JP3733207B2 JP15895097A JP15895097A JP3733207B2 JP 3733207 B2 JP3733207 B2 JP 3733207B2 JP 15895097 A JP15895097 A JP 15895097A JP 15895097 A JP15895097 A JP 15895097A JP 3733207 B2 JP3733207 B2 JP 3733207B2
- Authority
- JP
- Japan
- Prior art keywords
- polyhedron
- triangular polygon
- triangular
- normal vector
- polygon
- 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
Links
Images
Landscapes
- Image Generation (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、多面体生成方法、多面体生成装置、記録媒体、およびカラー画像処理装置に関する。
【0002】
【従来の技術】
色を構成する要素として3つの属性(明るさ、色相、彩度)があるのは広く知られていることである。こられ3つの属性を各々直交する座標に割り当て、3次元ユークリッド空間で表現する例として、RGB色空間やXYZ色空間等が広く用いられている。
【0003】
様々な色空間の中でも空間内の距離と色差を結び付けたものとして均等知覚色空間というものが存在する。その中でもCIE1976−Lab空間(以下、単にLab色空間)は、色のマッピング状態や各カラーデバイスの色再現領域を解析するために、よく用いられる均等知覚色空間の一つである。色のマッピング状態や各カラーデバイスの色再現領域を解析するためには、カラーデバイスが出力する色(Lab値)を測定、又は計算で求め、該Lab色空間内にプロットする必要がある。ここで、プロットというのは、グラフにそのデータを記すことを意味する.二変数のプロットであればXY座標等の平面上における座標位置に点列等を記すが、座標が空間として構成される場合は、3Dのレンダリング機能を利用しなければならない。
【0004】
3Dのレンダリングシステムは、予め設定された観察位置を通して、ある投影面に写像される画像を生成することで空間上のオブジェクトを疑似的に二次元の画像で再現するものである。さらには、操作する利用者がより詳細にその様子を観察するために、回転や拡大縮小等の機能が付加されている場合も多い。このような機能を用いることで、色空間内に点在する色のデータを可視化することは従来より行なわれている。
【0005】
【発明が解決しようとする課題】
ところで、前述した3Dのレンダリング機能を提供する3次元レンダリングシステムは、多くの種類が存在する。その中でも、隠面処理の都合上、描画する三角ポリゴンの法線ベクトルを一致させなければならないものが存在する。
【0006】
しかし、従来より三角ポリゴン等で構成された多面体について、該ポリゴン群の法線ベクトルを自動処理によって一致させる手法については何ら技術開示されていない。このため、隠面処理の都合上、描画する三角ポリゴンの法線ベクトルを一致させなければならない3次元レンダリングシステムにおいては、法線ベクトルが不揃いのポリゴン群を描画することは不可能であった。
【0007】
ここで、3次元レンダリングシステムにおいて、登録する三角ポリゴンの3つ頂点の順番と該三角ポリゴンの法線ベクトルの向きとの関係を、図9に基づいて説明する。
【0008】
三角ポリゴンにおける法線ベクトルを考えると、長さは一意に求められるが、その向きは必要に応じて明確に定義しなければならない。そこで、登録されている頂点の順番でみたときに、右ネジの進行方向と同じように進む方向を法線ベクトルの向きとして定義する。04→19→05と右回りで登録されている三角ポリゴンの場合は奥方向に法線ベクトルが向いており、ちょうど右ネジが右回転の時に進行する場合と同じである。一方、04→11→05と登録されている三角ポリゴンの場合は手前方向に法線ベクトルが向き、ちょうど右ネジを左回転させた時に進行する方向と同じである。この例から、04→19→05と登録されている三角ポリゴンと、04→11→05と登録されている三角ポリゴンとは、法線ベクトルが一致していないことがわかる。
【0009】
また、このような法線ベクトルが一致しない三角ポリゴン群を、上記システムにおいて表示すると、本来は描画されるべき三角ポリゴンが表示されなかったりするという問題も生じる。
【0010】
本発明は、このような不都合を解決することを目的とする。
【0011】
【課題を解決するための手段】
本発明に係る多面体生成方法は、例えば、三角ポリゴンを用いて多面体を生成する多面体生成装置で使用される多面体生成方法であって、前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負となる場合は、前記多面体生成装置に前記三角ポリゴンの法線ベクトルを変更させる変更工程を有することを特徴とする。また、本発明に係る他の多面体生成方法は、例えば、三角ポリゴンを用いて多面体を生成する多面体生成装置で使用される多面体生成方法であって、前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負であるか否かに応じて、前記多面体生成装置に前記三角ポリゴンの法線ベクトルを変更させる変更工程を有することを特徴とする。また、本発明に係るカラー画像処理装置は、例えば、上記の多面体生成方法を使用することを特徴とする。
【0012】
本発明に係る多面体生成装置は、例えば、三角ポリゴンを用いて多面体を生成する多面体生成装置であって、前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負となる場合は、前記三角ポリゴンの法線ベクトルを変更することを特徴とする。また、本発明に係る他の多面体生成装置は、例えば、三角ポリゴンを用いて多面体を生成する多面体生成装置であって、前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負であるか否かに応じて、前記三角ポリゴンの法線ベクトルを変更することを特徴とする。また、本発明に係るカラー画像処理装置は、例えば、上記の多面体生成装置を有することを特徴とする。
【0013】
本発明に係る記録媒体は、例えば、三角ポリゴンを用いて多面体の生成する工程と、前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負となる場合は、前記三角ポリゴンの法線ベクトルを変更する工程とをコンピュータに実行させるプログラムを記録したことを特徴とする。また、本発明に係る他の記録媒体は、例えば、三角ポリゴンを用いて多面体の生成する工程と、前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負であるか否かに応じて、前記三角ポリゴンの法線ベクトルを変更する工程とをコンピュータに実行させるプログラムを記録したことを特徴とする。
【0030】
【発明の実施の形態】
以下、図面を参照して、本発明を詳細に説明する。
【0031】
本発明の第1の実施の形態を、図1ないし図6に基づいて説明する。
【0032】
まず、本発明の概略構成について説明する。図6は、カラー画像処理装置1における3Dのレンダリング機能を提供する3次元レンダリングシステム10(多面体生成装置)の1例を示す。
【0033】
本3次元レンダリングシステム10は、データ生成手段11と、データ変更手段12と、表示手段13とを具えている。なお、14は、生成した多面体のデータを保存するファイルシステムである。15は、後述する実施の形態で用いるメモリである。
【0034】
ここで、データ生成手段11は、座標空間上に点在する点列を取り込み、検索対象辺から三角形を派生させ、該三角形の頂点を多面体を構成する三角ポリゴンのデータ群として生成する。このような多面体の生成処理によって、各三角ポリゴンの頂点を1組のデータ群としてファイルシステム14に登録してゆく。
【0035】
データ変更手段12は、多面体を構成する各三角ポリゴンの法線ベクトルを計算し、必要に応じて該法線ベクトルを適宜変更することにより、多面体を構成する全ての三角ポリゴンの法線ベクトルを一致させる。すなわち、まず、生成された多面体の内部に点を一つ設定する。通常は三角ポリゴン座標より求めた重心点は該多面体の内部に収まるので、該重心点を内部点として用いるが特に重心点である必要はない。次に、登録された三角ポリゴンの頂点データ1組のデータを取り出す。頂点データは、登録されている順序と該頂点の座標データから外積ベクトルを求め、これを法線ベクトルとする。次に、三角ポリゴンの三角形としての重心点を求め、さらに、前記内部点とのベクトルを求めることにより、内部点と三角形としての重心点とを結ぶベクトルを算出する。次に、その算出したベクトルと、前記法線ベクトルとの内積をとり、該求めたスカラー値を用いて必要に応じて、登録されている頂点データの順序を適宜入れ換える。このような処理によって、全ての三角ポリゴンの法線ベクトルを一致させる。
【0036】
表示手段13は、多面体を構成する三角ポリゴンの頂点の順序を適宜変更した後の法線ベクトルが全て一致した多面体を表示させる。
【0037】
以下、図面を参照しながら、本発明に係わる好適な例について詳細に説明する。
【0038】
図1は、座標空間に点在する点列を取り囲む多面体生成処理を示したフローチャートである。最初に、ステップS11において、初期化処理を行う。ここで最初の三角形の探索を行う。最初の三角形は座標空間上に点在する点列の最大値又は最小値等の極点近傍付近で探索する。次に、ステップS12において、探索対象辺を再編成し、さらに、探索対象となる辺をファイルシステム14に登録してゆく。
【0039】
ステップS13では、前記ステップS12において登録された辺を順に調べることで、検索が終了か否かの判断を行う。検索が終了していない場合はステップS14に進み、検索対象辺のアドレスヘアクセスし、ファイルシステム14に登録された辺の座標データ等を取り出す。
【0040】
ステップS15では、ファイルシステム14から取り出された座標データ等をもとに、検索対象辺からの新たな三角形の派生が可能か検証し、新頂点候補を探索する。ステップS16において、新頂点候補が既に登録されたものと重複しないか等を判定した後に、新たな登録対象であった場合には、ステップS17において、ファイルシステム14に追加登録を行う。このようにして順次探索を行い、各三角形から隣接する新たな三角形を派生させ、これを登録することによって、ポリゴンデータの生成が可能となる。
【0041】
上述した図2の処理によって、図4および図5で示されるように、座標空間上に点在する点列を取り囲む多面体の生成を自動的に実行することが可能となる。次に、3次元レンダリングシステムにおいて、登録する三角ポリゴンの3つ頂点の順番と該三角ポリゴンの法線ベクトルの向きとの関係を、図3に基づいて説明する。
【0042】
三角ポリゴンにおける法線ベクトルを考えると、長さは一意に求められるが、その向きは必要に応じて明確に定義しなければならない。そこで、本発明では、登録されている頂点の順番でみたときに、右ネジの進行方向と同じように進む方向を法線ベクトルの向きとして定義し、多面体を構成する全ての三角ポリゴンの法線ベクトルの方向を揃える処理を行う。
【0043】
前述した図9に示した例では、04→19→05と右回りで登録されている三角ポリゴンの場合は奥方向に法線ベクトルが向いており、2つの三角ポリゴンが隣接しているのに法線ベクトルが互いに全く逆の方向を示している。このような場合において、法線ベクトルの方向を変更する。具体的には、図3に示すように、04→19→05を並び替えて、04→05→19と登録し直すことによって、法線ベクトルの方向を揃える。
【0044】
多面体を構成する三角ポリゴンの法線ベクトルの方向を全て一致させるためには、全ての三角ポリゴンの法線が外向きに設定させる必要がある。そのためには、多面体の内部の点(内部点又は重心点)から各三角形の重心点に向けてベクトルを求め、該ベクトルと法線ベクトルの内積をとり、該内積値が負数になった場合にその三角ポリゴンの頂点データの登録順序を変更するという処理を行なえばよい。
【0045】
図1は、多面体を構成する全ての三角ポリゴンの法線ベクトルを一致させるために、各三角ポリゴンのベクトルを調べて頂点の登録順序を変更するデータ変更処理について説明したフローチャートである。
【0046】
まず、ステップS411において、初期化の処理を適宜行う。ステップS412のデータ読込み処理において、ファイルシステム14に記録されている三角ポリゴンの各データを読み込む。ステップS413では、読込んだ三角ポリゴンのデータの座標をもとに、多面体の重心点を計算する。ステップS421の読み出し処理では、改めて頂点座標の読み出しを行う。
【0047】
ステップS422のベクトル算出処理では、三角形の重心点を求め、前記ステップ413で求めた多面体の重心点から、該三角形の重心点へ向かうベクトルAを算出する。ステップS423の法線ベクトル算出処理では、登録されている頂点の順序に基づいて法線ベクトル成分を算出し、ステップS424の内積計算処理において、該法線ベクトルと前記ベクトルAの内積計算を行う。
【0048】
ステップS425の判定処理では、前記算出された内積値が、負数の時には、ステップS426の並替え処理へ分岐するよう構成する。ステップS426の並替え処理では、ファイルシステム14に登録されている三角ポリゴンの頂点データである2番目と3番目のデータを入れ換える処理を行う。ステップS427の終了判定処理では、ファイル構造体を参照し、読出しが終了したかの判定を行い、読出しが終了していなければステップS421の読出し処理へ戻り、終了していればステップS428の終了処理へ進み、終了処理を行う。
【0049】
以上の処理のように頂点の登録順序を適宜変更することにより、多面体を構成する全ての三角ポリゴンの法線ベクトルを一致させることができる。
【0050】
次に、本発明の第2の実施の形態を、図7に基づいて説明する。
【0051】
本例では、第1の実施の形態の例のように、既にファイルシステム14等に登録されているデータを読出して処理するのではなく、多面体を生成変更する処理の中で、図6に示したメモリ15を用いてデータの読出し処理を実行する。
【0052】
まず、ステップS511の初期化処理511では、適宜初期化処理を行う。ステップS152のデータ読込み処理では、ファイルシステム14に記録されている点列データを読み込む。ステップS513の検索終了判定処理では、図2のステップS13と同様な処理であり、ステップS514の検索登録処理では、図2のS14からS17までの処理とほぼ同様な処理である。
【0053】
本例では、ここでファイルシステム14への登録を行わずに、一旦メモリ15上にデータを保持したまま、次の処理に移行する。
【0054】
ステップS515の重心点算出処理では、メモリ15上に記録されている三角ポリゴンのデータにアクセスし、多面体の重心点を算出する。ステップS521の座標取出し処理では、メモリ15上のデータに再度アクセスし、頂点の座標データを取り出す。ステップS522のベクトル算出処理では、三角形の重心点を求め、前記ステップS515で求めた多面体の重心点から、該三角形の重心点へ向かうベクトルAを算出する。ステップS523の法線ベクトル算出処理では、登録されている頂点の順序に基づいて法線ベクトル成分を算出し、ステップS524の内積計算処理において、該法線ベクトルと前記ベクトルAの内積計算を行う。
【0055】
ステップS525の判定処理では、前記算出された内積値が、負数の時にはステップS526の並替え処理へ分岐する。ステップS526の並替え処理では、メモリ15上に登録されている三角ポリゴンの頂点データである二番目と三番目のデータを入れ換える。ステップS527の終了判定処理では、登録データを参照するポインタ等を参照し、処理が終了したかの判定を行い、終了していなければステップS521の取出し処理へ戻り、終了していればステップS528の終了処理へ進み、メモリ15上のデータの書き出し、保存処理、メモリ15の解放処理等の終了処理を適宜行う。
【0056】
次に、本発明の第3の実施の形態を、図8に基づいて説明する。
【0057】
本例では、図4の点列データを入力した後、図5の多面体を構成する段階で、検索できた三角ポリゴンを表示手段13に順次表示する処理を備えた場合の例である。
【0058】
まず、ステップS611のデータ読込み処理では、ファイルシステム14に記録されている点列データを読み込む。ステップS612の中心点算出処理では、各データにおける各座標成分の最大値、最小値等から多面体が構成されたときの中心点(内部点)を計算する。
【0059】
ステップS613の検索終了判定処理では、図2のS13に相当する処理であって、処理が終了するまで検索終了の判定処理を繰り返す。ステップS621の検索処理では、新たに登録すべき三角ポリゴンを検索し、これを一時領域に仮登録する。ステップS622のベクトル算出処理では、前記ステップS612で求めた多面体の中心点から、三角ポリゴンを形成する3つの頂点のいずれか一つの点へ向かうベクトルAを算出する。
【0060】
ステップS623の法線ベクトル算出処理では、仮登録されている頂点の順序に基づいて法線ベクトル成分を算出し、ステップS624の内積計算処理において、該法線ベクトルと前記ベクトルAの内積計算を行う。
【0061】
ステップS625の判定処理では、前記算出された内積値が、負数の時には、ステップS626の並替え処理へ分岐する。ステップS626の並替え処理では、メモリ15上に登録されている三角ポリゴンの頂点データである二番目と三番目のデータを入れ換える。ステップS627の描画処理では、法線ベクトルが適正化された三角ポリゴンを表示手段13により追加表示し、全ての検索が終了するまで順次追加作業を繰り返す。
【0062】
なお、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。また、本発明はシステム或いは装置にプログラムを供給することによって達成される場合にも適用できることはいうまでもない。この場合、本発明を達成するためのソフトウェアによって表されるプログラムを格納した記憶媒体を該システム或いは装置に読み出すことによって、そのシステム或いは装置が、本発明の効果を享受することが可能となる。
【0063】
【発明の効果】
本発明によれば、三角ポリゴンの法線ベクトルと、多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負であるか否かに応じて、前記三角ポリゴンの法線ベクトルを変更することができるので、法線ベクトルの向きによって生じる不都合を解決することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態である多面体を構成するポリゴンデータの生成時におけるデータ変更処理を示すフローチャートである。
【図2】多面体を構成するポリゴンデータの生成処理を示すフローチャートである。
【図3】三角ポリゴンの登録する頂点の順序と法線ベクトルとの関係において、法線ベクトルの向きが一致する場合の例を示す説明図である。
【図4】座標空間に点在する点列を示す説明図である。
【図5】座標空間に点在する点列を取り囲む多面体の構成を示す説明図である。
【図6】3次元レンダリングシステムの構成例を示すブロック図である。
【図7】本発明の第2の実施の形態である多面体を構成するポリゴンデータの生成時におけるメモリを用いたデータ変更処理を示すフローチャートである。
【図8】本発明の第2の実施の形態である多面体を構成するポリゴンデータの生成時における描画を行うデータ変更処理を示すフローチャートである。
【図9】三角ポリゴンの登録する頂点の順序と法線ベクトルとの関係において、法線ベクトルの向きが互いに異なる1例を示す説明図である。
【符号の説明】
10 多面体生成装置(3次元レンダリングシステム)
11 データ生成手段
12 データ変更手段
13 表示手段
14 ファイル
15 メモリ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a polyhedron generation method, a polyhedron generation device, a recording medium, and a color image processing device .
[0002]
[Prior art]
It is widely known that there are three attributes (brightness, hue, and saturation) as elements constituting a color. As an example of assigning these three attributes to orthogonal coordinates and expressing them in a three-dimensional Euclidean space, the RGB color space, the XYZ color space, and the like are widely used.
[0003]
Among various color spaces, there is a uniform perceptual color space as a combination of distance and color difference in the space. Among them, the CIE 1976-Lab space (hereinafter simply referred to as “Lab color space”) is one of uniform perceptual color spaces often used for analyzing the color mapping state and the color reproduction region of each color device. In order to analyze the color mapping state and the color reproduction area of each color device, it is necessary to measure or calculate the color (Lab value) output from the color device and plot it in the Lab color space. Here, plotting means writing the data on a graph. In the case of a two-variable plot, a point sequence or the like is written at a coordinate position on a plane such as an XY coordinate. However, when the coordinate is configured as a space, a 3D rendering function must be used.
[0004]
The 3D rendering system reproduces an object in space as a two-dimensional image in a pseudo manner by generating an image mapped onto a certain projection plane through a preset observation position. Furthermore, functions such as rotation and enlargement / reduction are often added in order for the operating user to observe the situation in more detail. By using such a function, it has been conventionally performed to visualize color data scattered in a color space.
[0005]
[Problems to be solved by the invention]
There are many types of 3D rendering systems that provide the 3D rendering function described above. Among them, there are some which need to match the normal vectors of the triangular polygons to be drawn for the convenience of hidden surface processing.
[0006]
However, there is no technical disclosure of a technique for matching the normal vectors of the polygon group by automatic processing for a polyhedron composed of triangular polygons. For this reason, in the three-dimensional rendering system in which the normal vectors of the triangular polygons to be drawn must coincide with each other because of hidden surface processing, it has been impossible to draw a polygon group having irregular normal vectors.
[0007]
Here, in the three-dimensional rendering system, the relationship between the order of the three vertices of the registered triangular polygon and the direction of the normal vector of the triangular polygon will be described with reference to FIG.
[0008]
Considering the normal vector in a triangular polygon, the length is uniquely determined, but its direction must be clearly defined as necessary. Therefore, when viewed in the order of the registered vertices, the direction of the normal vector is defined as the direction of advance in the same way as the direction of the right-handed screw. In the case of a triangular polygon registered in the clockwise direction of 04 → 19 → 05, the normal vector is directed in the back direction, which is the same as the case where the right screw advances when it rotates clockwise. On the other hand, in the case of a triangular polygon registered as 04 → 11 → 05, the normal vector is directed in the forward direction, which is the same as the direction that proceeds when the right screw is rotated counterclockwise. From this example, it can be seen that the normal vectors of the triangular polygon registered as 04 → 19 → 05 and the triangular polygon registered as 04 → 11 → 05 do not match.
[0009]
In addition, when such a triangular polygon group whose normal vectors do not match is displayed in the above-described system, there is a problem that a triangular polygon that should be originally drawn may not be displayed.
[0010]
The present invention aims to solve such inconveniences.
[0011]
[Means for Solving the Problems]
The polyhedron generation method according to the present invention is, for example, a polyhedron generation method used in a polyhedron generation apparatus that generates a polyhedron using a triangular polygon, and the normal vector of the triangular polygon and an internal point of the polyhedron are used to generate the polyhedron. If the inner product of the vector into triangles is negative, characterized by having a changing step of Ru is changed normal vectors of the triangles in the polyhedron generating device. Another polyhedron generation method according to the present invention is, for example, a polyhedron generation method used in a polyhedron generation device that generates a polyhedron using a triangular polygon, the normal vector of the triangular polygon, and the polyhedron of the polyhedron According to the present invention, the polyhedron generating device has a changing step of changing a normal vector of the triangular polygon according to whether or not an inner product with a vector from an internal point to the triangular polygon is negative. A color image processing apparatus according to the present invention uses, for example, the above-described polyhedron generation method.
[0012]
Polyhedron generating apparatus according to the present invention, for example, a polyhedron generating unit for generating a polyhedron with triangular polygon, and the normal vector of the triangle polygon, from the internal point of the polyhedron with the vector to the triangles If the inner product is negative, and changes the normal vectors of the triangular polygons. Another polyhedron generating apparatus according to the present invention is a polyhedron generating apparatus that generates a polyhedron using, for example, a triangular polygon, and the normal vector of the triangular polygon and the internal point of the polyhedron to the triangular polygon. The normal vector of the triangular polygon is changed according to whether or not the inner product with the vector is negative. A color image processing apparatus according to the present invention includes, for example, the polyhedron generation apparatus described above.
[0013]
In the recording medium according to the present invention, for example, the inner product of the step of generating a polyhedron using a triangular polygon, the normal vector of the triangular polygon, and the vector from the internal point of the polyhedron to the triangular polygon becomes negative. In this case, a program for causing a computer to execute a step of changing a normal vector of the triangular polygon is recorded. Another recording medium according to the present invention includes, for example, a step of generating a polyhedron using a triangular polygon, an inner product of a normal vector of the triangular polygon, and a vector from an internal point of the polyhedron to the triangular polygon. A program for causing a computer to execute a step of changing a normal vector of the triangular polygon according to whether or not is negative is recorded.
[0030]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in detail with reference to the drawings.
[0031]
A first embodiment of the present invention will be described with reference to FIGS.
[0032]
First, a schematic configuration of the present invention will be described. FIG. 6 shows an example of a three-dimensional rendering system 10 (polyhedron generation device) that provides a 3D rendering function in the color image processing apparatus 1.
[0033]
The three-
[0034]
Here, the data generation means 11 takes in a sequence of points scattered in the coordinate space, derives a triangle from the search target side, and generates the vertex of the triangle as a data group of triangular polygons constituting the polyhedron. Through such polyhedron generation processing, the vertices of each triangular polygon are registered in the
[0035]
The
[0036]
The display means 13 displays the polyhedron in which the normal vectors after matching the order of the vertices of the triangular polygons constituting the polyhedron are all matched.
[0037]
Hereinafter, preferred examples according to the present invention will be described in detail with reference to the drawings.
[0038]
FIG. 1 is a flowchart showing a polyhedron generation process surrounding a sequence of points scattered in a coordinate space. First, in step S11, initialization processing is performed. Here, the first triangle is searched. The first triangle is searched in the vicinity of the extreme point such as the maximum value or the minimum value of the point sequence scattered in the coordinate space. Next, in step S12, the sides to be searched are reorganized, and the sides to be searched are registered in the
[0039]
In step S13, it is determined whether or not the search is completed by sequentially examining the edges registered in step S12. If the search is not completed, the process proceeds to step S14, where the address of the search target side is accessed, and the coordinate data and the like of the side registered in the
[0040]
In step S15, it is verified whether a new triangle can be derived from the search target side based on the coordinate data extracted from the
[0041]
2 described above, as shown in FIGS. 4 and 5, it is possible to automatically generate a polyhedron that surrounds a point sequence scattered in a coordinate space. Next, in the three-dimensional rendering system, the relationship between the order of the three vertices of the registered triangular polygon and the direction of the normal vector of the triangular polygon will be described with reference to FIG.
[0042]
Considering the normal vector in a triangular polygon, the length is uniquely determined, but its direction must be clearly defined as necessary. Therefore, in the present invention, when viewed in the order of the registered vertices, the direction of the normal vector is defined as the direction of the normal vector, and the normal of all the triangular polygons constituting the polyhedron is defined. Performs processing to align vector directions.
[0043]
In the example shown in FIG. 9 described above, in the case of a triangular polygon registered in the clockwise direction of 04 → 19 → 05, the normal vector faces in the back direction, and the two triangular polygons are adjacent to each other. The normal vectors indicate completely opposite directions. In such a case, the direction of the normal vector is changed. Specifically, as shown in FIG. 3, the normal vectors are aligned by rearranging 04 → 19 → 05 and re-registering 04 → 05 → 19.
[0044]
In order to make all the normal vectors of the triangular polygons constituting the polyhedron coincide, the normals of all the triangular polygons need to be set outward. To do this, if a vector is calculated from the point inside the polyhedron (inner point or centroid) to the centroid of each triangle, the inner product of the vector and the normal vector is taken, and the inner product value becomes negative A process of changing the registration order of the vertex data of the triangular polygon may be performed.
[0045]
FIG. 1 is a flowchart for explaining a data change process for examining the vectors of each triangular polygon and changing the registration order of vertices in order to match the normal vectors of all the triangular polygons constituting the polyhedron.
[0046]
First, in step S411, initialization processing is appropriately performed. In the data reading process in step S412, each triangular polygon data recorded in the
[0047]
In the vector calculation process in step S422, the center of gravity of the triangle is obtained, and the vector A directed to the center of gravity of the triangle is calculated from the center of gravity of the polyhedron obtained in step 413. In the normal vector calculation processing in step S423, normal vector components are calculated based on the registered vertex order, and in the inner product calculation processing in step S424, the inner product calculation of the normal vector and the vector A is performed.
[0048]
The determination process in step S425 is configured to branch to the rearrangement process in step S426 when the calculated inner product value is a negative number. In the rearrangement process in step S426, a process of exchanging the second and third data which are the vertex data of the triangular polygon registered in the
[0049]
By appropriately changing the vertex registration order as described above, the normal vectors of all the triangular polygons constituting the polyhedron can be matched.
[0050]
Next, a second embodiment of the present invention will be described with reference to FIG.
[0051]
In this example, as shown in FIG. 6, in the process of generating and changing a polyhedron, instead of reading and processing data already registered in the
[0052]
First, in the
[0053]
In this example, without registering in the
[0054]
In the center-of-gravity point calculation process in step S515, the data of the triangular polygon recorded on the
[0055]
In the determination process of step S525, when the calculated inner product value is a negative number, the process branches to the rearrangement process of step S526. In the rearrangement process in step S526, the second and third data that are the vertex data of the triangular polygons registered in the
[0056]
Next, a third embodiment of the present invention will be described with reference to FIG.
[0057]
In this example, after the point sequence data of FIG. 4 is input, a process for sequentially displaying the retrieved triangular polygons on the display means 13 at the stage of constructing the polyhedron of FIG. 5 is provided.
[0058]
First, in the data reading process in step S611, the point sequence data recorded in the
[0059]
The search end determination process in step S613 is a process corresponding to S13 in FIG. 2, and the search end determination process is repeated until the process ends. In the search process of step S621, a triangular polygon to be newly registered is searched and temporarily registered in a temporary area. In the vector calculation process in step S622, a vector A heading from the center point of the polyhedron obtained in step S612 to any one of the three vertices forming the triangular polygon is calculated.
[0060]
In the normal vector calculation process in step S623, a normal vector component is calculated based on the order of the tentatively registered vertices, and in the inner product calculation process in step S624, an inner product calculation of the normal vector and the vector A is performed. .
[0061]
In the determination process of step S625, when the calculated inner product value is a negative number, the process branches to the rearrangement process of step S626. In the rearrangement process in step S626, the second and third data that are the vertex data of the triangular polygons registered in the
[0062]
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Needless to say, the present invention can also be applied to a case where the present invention is achieved by supplying a program to a system or apparatus. In this case, by reading a storage medium storing a program represented by software for achieving the present invention into the system or apparatus, the system or apparatus can enjoy the effects of the present invention.
[0063]
【The invention's effect】
According to the present invention, the normal vector of the triangular polygon is changed according to whether or not the inner product of the normal vector of the triangular polygon and the vector from the internal point of the polyhedron to the triangular polygon is negative. Therefore, the inconvenience caused by the direction of the normal vector can be solved.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a data change process at the time of generating polygon data constituting a polyhedron according to the first embodiment of the present invention.
FIG. 2 is a flowchart showing generation processing of polygon data constituting a polyhedron.
FIG. 3 is an explanatory diagram showing an example in the case where the directions of normal vectors match in the relationship between the order of vertices registered in a triangular polygon and the normal vectors;
FIG. 4 is an explanatory diagram showing a point sequence scattered in a coordinate space.
FIG. 5 is an explanatory diagram showing a configuration of a polyhedron surrounding a sequence of points scattered in a coordinate space.
FIG. 6 is a block diagram illustrating a configuration example of a three-dimensional rendering system.
FIG. 7 is a flowchart showing a data change process using a memory when generating polygon data constituting the polyhedron according to the second embodiment of the present invention;
FIG. 8 is a flowchart showing a data change process for performing drawing when generating polygon data constituting the polyhedron according to the second embodiment of the present invention;
FIG. 9 is an explanatory diagram showing an example in which the directions of normal vectors are different from each other in the relationship between the order of vertices registered in a triangular polygon and the normal vector.
[Explanation of symbols]
10 Polyhedron generator (3D rendering system)
11 Data generating means 12 Data changing means 13 Display means 14
Claims (23)
前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負となる場合は、前記多面体生成装置に前記三角ポリゴンの法線ベクトルを変更させる変更工程を有することを特徴とする多面体生成方法。 A polyhedron generation method used in a polyhedron generation device that generates a polyhedron using a triangular polygon,
And the normal vector of the triangle polygon, if the inner product between the vector from the internal point of the polyhedron to the triangles is negative, the changing step of Ru is changed normal vectors of the triangles in the polyhedron generating device A polyhedron generation method characterized by comprising:
前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負であるか否かに応じて、前記多面体生成装置に前記三角ポリゴンの法線ベクトルを変更させる変更工程を有することを特徴とする多面体生成方法。Causing the polyhedron generating device to change the normal vector of the triangular polygon according to whether or not the inner product of the normal vector of the triangular polygon and the vector from the internal point of the polyhedron to the triangular polygon is negative A polyhedron generating method comprising a changing step.
前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負となる場合は、前記三角ポリゴンの法線ベクトルを変更することを特徴とする多面体生成装置。A polyhedron generating device that generates a polyhedron using triangular polygons,
An apparatus for generating a polyhedron , wherein the normal vector of the triangular polygon is changed when the inner product of the normal vector of the triangular polygon and the vector from the internal point of the polyhedron to the triangular polygon is negative.
前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負であるか否かに応じて、前記三角ポリゴンの法線ベクトルを変更することを特徴とする多面体生成装置。The normal vector of the triangular polygon is changed according to whether or not the inner product of the normal vector of the triangular polygon and the vector from the internal point of the polyhedron to the triangular polygon is negative. Polyhedron generator.
前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負となる場合は、前記三角ポリゴンの法線ベクトルを変更する工程とをコンピュータに実行させるプログラムを記録したことを特徴とする記録媒体。Creating a polyhedron using triangular polygons;
A program for causing a computer to execute a step of changing the normal vector of the triangular polygon when the inner product of the normal vector of the triangular polygon and the vector from the internal point of the polyhedron to the triangular polygon is negative A recording medium characterized by recording.
前記三角ポリゴンの法線ベクトルと、前記多面体の内部点から前記三角ポリゴンへのベクトルとの内積が負であるか否かに応じて、前記三角ポリゴンの法線ベクトルを変更する工程とをコンピュータに実行させるプログラムを記録したことを特徴とする記録媒体。Changing the normal vector of the triangular polygon according to whether or not the inner product of the normal vector of the triangular polygon and the vector from the internal point of the polyhedron to the triangular polygon is negative. A recording medium on which a program to be executed is recorded.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15895097A JP3733207B2 (en) | 1997-06-16 | 1997-06-16 | Polyhedron generation method, polyhedron generation apparatus, recording medium, and color image processing apparatus |
| US09/095,546 US6556198B1 (en) | 1997-06-16 | 1998-06-11 | Polyhedron generating method and apparatus thereof, and storage medium for storing the method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15895097A JP3733207B2 (en) | 1997-06-16 | 1997-06-16 | Polyhedron generation method, polyhedron generation apparatus, recording medium, and color image processing apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH117540A JPH117540A (en) | 1999-01-12 |
| JP3733207B2 true JP3733207B2 (en) | 2006-01-11 |
Family
ID=15682887
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP15895097A Expired - Fee Related JP3733207B2 (en) | 1997-06-16 | 1997-06-16 | Polyhedron generation method, polyhedron generation apparatus, recording medium, and color image processing apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3733207B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005100176A (en) * | 2003-09-25 | 2005-04-14 | Sony Corp | Image processing apparatus and method |
-
1997
- 1997-06-16 JP JP15895097A patent/JP3733207B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH117540A (en) | 1999-01-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8803879B1 (en) | Omnidirectional shadow texture mapping | |
| US6664962B1 (en) | Shadow mapping in a low cost graphics system | |
| US6980218B1 (en) | Method and apparatus for efficient generation of texture coordinate displacements for implementing emboss-style bump mapping in a graphics rendering system | |
| US6184908B1 (en) | Method and apparatus for co-processing video graphics data | |
| US20200372602A1 (en) | Scheme for compressing vertex shader output parameters | |
| US8068116B2 (en) | Methods, systems, and data structures for generating a rasterizer | |
| US8194083B2 (en) | Color computation of pixels using a plurality of vertex or fragment shader programs | |
| JPH10333889A5 (en) | ||
| US20180174352A1 (en) | Graphics processing employing cube map texturing | |
| CN108701367A (en) | Single pass time enclosure body stratum rasterisation | |
| JP2005506611A (en) | Environment mapping system and method | |
| JP5873683B2 (en) | How to estimate occlusion in a virtual environment | |
| JP3733207B2 (en) | Polyhedron generation method, polyhedron generation apparatus, recording medium, and color image processing apparatus | |
| US7965291B1 (en) | Isosurface extraction utilizing a graphics processing unit | |
| JP4060375B2 (en) | Spotlight characteristic forming method and image processing apparatus using the same | |
| US6590576B1 (en) | Method and apparatus for performing perspective transformation | |
| JP4995827B2 (en) | Image processing apparatus, integrated circuit for image processing, image processing system, input assembler apparatus, integrated circuit for input assembly | |
| JP3683598B2 (en) | Data-driven information processing device | |
| KR100848687B1 (en) | 3D graphics processing device and its operation method | |
| Weiler et al. | Direct volume rendering in OpenSG | |
| US9437031B2 (en) | Virtual memory based noise textures | |
| JP4832152B2 (en) | System used in a three-dimensional computer graphics device for displaying a gaseous object on a two-dimensional display | |
| KR100834374B1 (en) | Model / View inverse matrix conditional generation method and graphic processing device using the same | |
| KR100817237B1 (en) | Graphics accelerator device and cache memory device for three-dimensional graphics calculation, and three-dimensional graphics calculation processing method | |
| JP2002092654A (en) | Image forming method, computer-readable storage medium for realizing it, and game system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050607 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050614 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050815 |
|
| 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: 20051007 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20051017 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091021 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091021 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101021 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101021 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111021 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111021 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121021 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131021 Year of fee payment: 8 |
|
| LAPS | Cancellation because of no payment of annual fees |