JP2001148028A - Device and method for displaying graphic - Google Patents

Device and method for displaying graphic

Info

Publication number
JP2001148028A
JP2001148028A JP33259199A JP33259199A JP2001148028A JP 2001148028 A JP2001148028 A JP 2001148028A JP 33259199 A JP33259199 A JP 33259199A JP 33259199 A JP33259199 A JP 33259199A JP 2001148028 A JP2001148028 A JP 2001148028A
Authority
JP
Japan
Prior art keywords
intersection
convex
polygon
convex polygon
zero
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.)
Granted
Application number
JP33259199A
Other languages
Japanese (ja)
Other versions
JP3703073B2 (en
Inventor
Kazuhiko Morita
一彦 森田
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP33259199A priority Critical patent/JP3703073B2/en
Publication of JP2001148028A publication Critical patent/JP2001148028A/en
Application granted granted Critical
Publication of JP3703073B2 publication Critical patent/JP3703073B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a graphic display device which performs a rendering by especially using a ray tracing method about a processing display device mainly for a three- dimensional graphic such as a CAD and a CG. SOLUTION: By using the configuration of an intersection distance detecting part 11, an intersection calculating part 12, an intersection deciding part 13, a hidden surface eliminating part 14 and a distance deciding part 15, inside/outside area judgement that performs the position judgement of an intersection Q between a convex n-sided polygon on the same surface and a sight line existing on the same surface is performed, and the intersection judging part 13 consists of a 1st judging part 21 that judging whether the vector outer product between two adjacent vertexes is zero or not, a 2nd judges part 22 which judges that an intersection exists outside the convex polygon when the vector inner product between the two adjacent vertexes is larger than zero and judges that the intersection exists on the boundary line between the two vertexes when the inner product is smaller than zero, and a 3rd deciding part 23 which judges that the intersection exists inside the polygon when all signs are the same between the two vertexes from the inner product of the vector outer product between the two vertexes and the normal vector of the convex polygon and judges that the intersection exists outside the polygon when the signs are different.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はCADやCG(コン
ピュータグラフィックス)などの図形表示装置など、主
に3次元図形の処理表示装置に係り、特にレイトレーシ
ング法を用いてレンダリングを行なう図形表示装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a three-dimensional graphic processing and display device such as a graphic display device such as CAD and CG (computer graphics), and more particularly to a graphic display device for rendering using a ray tracing method. About.

【0002】[0002]

【従来の技術】一般に、3次元図形をコンピュータ画面
等の2次元平面上に表示するには、視点から見て図形が
奥行き方向に相互に重なっている中から、画像の画素毎
に最も手前にある図形を選択して表示する隠面消去処理
が必要になる。この隠面消去処理の方法の1つにレイト
レーシング法が知られており、これについて以下に簡単
に説明する。
2. Description of the Related Art Generally, in order to display a three-dimensional figure on a two-dimensional plane such as a computer screen or the like, from the viewpoint that the figures overlap each other in the depth direction, each pixel of the image is brought to the foreground. Hidden surface elimination processing for selecting and displaying a certain figure is required. A ray tracing method is known as one of the methods for the hidden surface elimination processing, and this will be briefly described below.

【0003】図3のレイトレーシング法の原理図に示さ
れるように、3次元空間に視点Rを設定し、この視点R
に対しスクリーンSを設定する。そして、このスクリー
ンS上の縦横一定間隔おきに画素Mを配置し、視点Rか
らこれらの各画素Mを通過する視線(レイ)Lを順次発生
させる。これらの各視線Lは対象とする3次元図形と交
差するかどうかを判定し、視線L上において最も視点R
側にある図形との交点Qを検索する方法である。
As shown in the principle diagram of the ray tracing method in FIG. 3, a viewpoint R is set in a three-dimensional space.
Is set to the screen S. Pixels M are arranged at regular intervals in the vertical and horizontal directions on the screen S, and a line of sight (ray) L passing through each of the pixels M from the viewpoint R is sequentially generated. It is determined whether each line of sight L intersects with the target three-dimensional figure, and the viewpoint R
This is a method of searching for an intersection Q with a figure on the side.

【0004】図5はそのレイトレーシング法による隠面
消去処理装置の一例を示すブロック構成図である。この
隠面消去処理装置は、視線(レイ)発生部51、交差判
定・交点検出部52、及び輝度算出部53で構成されて
いる。視線発生部51は与えられた視野データから、視
線データとなる視点座標及び視線ベクトルを発生させ
る。
FIG. 5 is a block diagram showing an example of a hidden surface elimination processing apparatus using the ray tracing method. This hidden surface elimination processing device includes a line-of-sight (ray) generation unit 51, an intersection determination / intersection detection unit 52, and a luminance calculation unit 53. The line-of-sight generation unit 51 generates viewpoint coordinates and line-of-sight vectors serving as line-of-sight data from the given visual field data.

【0005】ここで、視線ベクトルは図3に示すよう
に、予め定めたスクリーンSの大きさの中で、スクリー
ンSを通過する視線Lを水平・垂直方向とも一定間隔お
きに発生させた時の視線Lの方向をベクトルで表わした
ものである。視線Lの間隔は一般的にはスクリーンSの
画素Bの間隔とする場合が多いが、それより細かくする
場合もある。
Here, as shown in FIG. 3, the line-of-sight vector is obtained when line-of-sight L passing through the screen S is generated at regular intervals in both the horizontal and vertical directions within a predetermined size of the screen S. The direction of the line of sight L is represented by a vector. In general, the interval between the lines of sight L is often the interval between the pixels B on the screen S, but may be smaller than that.

【0006】つぎの交差判定・交点検出部52は、供給
される視線データと図形データとより、対象となる3次
元図形に対し、各視線Lが(スクリーンSの向こう側で)
視点Rに最も近い点(Q)で交差する図形を特定し、そ
の交点座標・法線ベクトルを検出する。
The next intersection determination / intersection detection unit 52 determines, based on the supplied line-of-sight data and graphic data, that each line-of-sight L for the target three-dimensional figure (on the other side of the screen S).
A figure which intersects at a point (Q) closest to the viewpoint R is specified, and the coordinates of the intersection and the normal vector are detected.

【0007】更に輝度算出部53は前記交差判定・交点
検出部52で検出された交点座標・法線ベクトルと供給
される図形データとより得られる物体の色・反射率など
の交差した図形の特性、光源データなどから、予め定め
た方法に基づいて、この視線LのスクリーンSの画素B
上での輝度値を求める。
[0007] Further, the luminance calculator 53 calculates the characteristics of the intersecting figures such as the color and reflectance of the object obtained from the intersection coordinates / normal vectors detected by the intersection judging / intersection detector 52 and the supplied figure data. , The light source data, etc., based on a predetermined method, the pixel B of the screen S of this line of sight L
Obtain the above luminance value.

【0008】従来の隠面消去処理装置の交差判定・交点
検出部52の構成の一例を図6に示す。図6では視線デ
ータとして視点座標及び視線ベクトルが視線発生部51
より供給されると共に、別に対象となる各図形の位置・
形状を示す図形データが供給される。この図形データは
球・円筒・直方体など、特定の形状に関するデータの場
合もあるが、多くの場合は複数の凸多角形で構成され、
各凸多角形の図形データはその頂点座標で示される。よ
って、ここでは凸多角形の場合について以下に説明す
る。
FIG. 6 shows an example of the configuration of the intersection judging / intersection detecting unit 52 of the conventional hidden surface elimination processing apparatus. In FIG. 6, the viewpoint coordinates and the line-of-sight vector are used as the line-of-sight data.
As well as the position of each target figure separately
Graphic data indicating a shape is supplied. This graphic data may be data related to a specific shape, such as a sphere, a cylinder, or a rectangular parallelepiped, but in many cases it is composed of multiple convex polygons.
The graphic data of each convex polygon is indicated by its vertex coordinates. Therefore, the case of a convex polygon will be described below.

【0009】この交差判定・交点検出部52は、交点距
離検出部61、交点座標算出部62、交差判定部63、
及び隠面消去部64より構成される。交点距離検出部6
1は、凸多角形を順に取り出し、この凸多角形が含まれ
る無限平面と前記視線との交点Qから視点Rまでの距離
を検出する処理を行なう。
The intersection determining / intersection detecting section 52 includes an intersection distance detecting section 61, an intersection coordinate calculating section 62, an intersection determining section 63,
And a hidden surface erasing unit 64. Intersection distance detector 6
In step 1, a convex polygon is sequentially extracted, and a process of detecting a distance from an intersection Q between an infinite plane including the convex polygon and the line of sight to the viewpoint R is performed.

【0010】つぎの交点座標算出部62は、交点Qから
視点Rまでの距離を、視点Rと視線ベクトルで示される
直線(実際には半直線)の式に代入して交点Qの座標を算
出する処理を行なう。更に交差判定部63は、前記交点
Qが対象となる凸多角形の内部にあるか外部にあるか、
すなわち、視線Lがこの凸多角形と前記交点Qで交差す
るか否かの判定を行なう。
A next intersection coordinate calculation unit 62 calculates the coordinates of the intersection Q by substituting the distance from the intersection Q to the viewpoint R into an equation of a straight line (actually, a half line) indicated by the viewpoint R and the line-of-sight vector. Is performed. Further, the intersection determination unit 63 determines whether the intersection Q is inside or outside the target convex polygon,
That is, it is determined whether or not the line of sight L intersects the convex polygon at the intersection Q.

【0011】更につぎの隠面消去部64は、前記交点距
離検出部61、交点座標算出部62、及び交差判定部6
3の処理の結果、この凸多角形が視線Lと交差する場合
には、それまでに処理した凸多角形で得られた交点Qか
ら視点Rまでの距離とここで得られた距離とを比較し
て、より距離が短いと判定された場合には、この凸多角
形を現時点での交差図形とする。
The next hidden surface removing unit 64 includes the intersection distance detecting unit 61, the intersection coordinate calculating unit 62, and the intersection determining unit 6.
If the convex polygon intersects the line of sight L as a result of the process 3, the distance from the intersection Q obtained by the convex polygon processed so far to the viewpoint R is compared with the distance obtained here. Then, when it is determined that the distance is shorter, the convex polygon is set as the current intersection figure.

【0012】前記の交点距離検出部61乃至隠面消去部
64の処理を全ての凸多角形に対して行なうことによ
り、各視線Lに対する交差図形が確定し、結果である交
点座標・法線ベクトルと、交差した交差図形・凸多角形
の位置情報(どの図形のどの凸多角形に交差したか)など
が輝度算出部53に送られる。
By performing the processing of the intersection distance detecting section 61 through the hidden surface removing section 64 on all the convex polygons, the intersection figure for each line of sight L is determined, and the resulting intersection coordinate / normal vector The position information of the intersecting intersecting figure / convex polygon (which figure intersects which convex polygon) and the like are sent to the luminance calculation unit 53.

【0013】従来の交差判定部63における判定原理の
一例を図7に示す。交点座標算出部62において座標が
算出された凸多角形を含む無限平面と視線Lとの交点Q
から、凸多角形の各頂点Pnへ半直線を引き、各半直線
が、対象となる頂点と隣接しない凸多角形の辺と交差す
るか否かを判定する。全ての半直線が該当する辺と交差
しなければ、前記交点Qは凸多角形の内部に存在すると
判定する(図7(a))。
FIG. 7 shows an example of the principle of judgment in the conventional intersection judgment section 63. As shown in FIG. The intersection Q between the line of sight L and the infinite plane including the convex polygon whose coordinates have been calculated by the intersection coordinate calculation unit 62
, A half line is drawn to each vertex Pn of the convex polygon, and it is determined whether each half line intersects a side of the convex polygon that is not adjacent to the target vertex. If all the half lines do not intersect the corresponding side, it is determined that the intersection point Q exists inside the convex polygon (FIG. 7A).

【0014】1つの半直線でも前記凸多角形の辺と交差
すると判定されれば、前記交点Qは凸多角形の外部に存
在すると判定する(図7(b))。すなわち、全ての半直線
が該当する辺と交差しない場合は視線がこの凸多角形と
前記交点Qで交差し、1つの半直線でも前記凸多角形の
辺と交差した場合は、視線はこの凸多角形と交差しない
と判定される。
If it is determined that even one half line intersects with the side of the convex polygon, it is determined that the intersection Q exists outside the convex polygon (FIG. 7B). That is, when all the half lines do not intersect with the corresponding side, the line of sight intersects with this convex polygon at the intersection Q. When even one half line intersects with the side of the convex polygon, the line of sight becomes convex. It is determined that they do not intersect the polygon.

【0015】[0015]

【発明が解決しようとする課題】しかし、図7の例で
は、各半直線と該当する凸多角形の辺との交点を求め、
この交点と前記交点Qとの位置関係から、この交点が凸
多角形上にあるか否かを判定する処理を全ての半直線−
辺の組合わせで行なわなければならず、処理が大変に複
雑になってしまうという問題があった。
However, in the example of FIG. 7, the intersection between each half line and the side of the corresponding convex polygon is obtained.
The process of determining whether or not this intersection is on a convex polygon based on the positional relationship between this intersection and the intersection Q is performed for all half-lines.
There has been a problem that the processing has to be performed by a combination of sides, and the processing becomes very complicated.

【0016】また、従来例においては、図8に示すよう
に2つの凸多角形の境界に視線との交点Qが位置するよ
うな場合、境界を凸多角形の外部と判定する処理では、
境界の位置関係によっては、一部の境界部分が本来なら
凸多角形と交差しているにもかかわらず交差しないと判
定されて、背景の色がこの境界部分に出てしまうという
問題があった。
In the conventional example, when the intersection Q with the line of sight is located at the boundary between two convex polygons as shown in FIG. 8, the processing for determining that the boundary is outside the convex polygon is as follows:
Depending on the positional relationship of the borders, there was a problem that it was determined that some of the borders did not intersect with the convex polygon even though they originally intersected, and the background color appeared at this border. .

【0017】また、境界を凸多角形の内部と判定する処
理では、境界部分は多角形Eと多角形Fの2つの多角形
に重複して隠面消去処理が行なわれるが、視点Rと交点
Qとの距離が多角形Eと多角形Fでほぼ同じため、演算
誤差によってこの境界部分における隠面消去処理の交点
−視点間距離判定が、部分的に多角形Eと多角形Fでば
らついてしまい、境界部分で2つの多角形が入り組んで
見苦しくなってしまうことがあるといった問題があっ
た。
In the process of determining that the boundary is inside the convex polygon, the boundary portion overlaps the two polygons E and F, and the hidden surface elimination process is performed. Since the distance from Q to the polygons E and F is almost the same, the calculation of the intersection-viewpoint distance of the hidden surface removal processing at this boundary due to the calculation error may partially vary between the polygons E and F. As a result, there has been a problem that two polygons are intricately formed at the boundary portion, which makes it difficult to see.

【0018】[0018]

【課題を解決するための手段】そこで上記問題点を解決
するために、請求項1の発明は、同一平面上に頂点P
1、P2、・・・、Pnを有する凸n角形(n>2の整
数)と同じ平面上に存在する視線との交点Qが、前記凸
n角形の内部に存在するか、前記凸n角形の境界に存在
するか、または前記凸n角形の外部に存在するかの判定
を行なう領域内外判定を、交点距離検出部11と、交点
座標算出部12と、交差判定部13と、隠面消去部14
と、距離判定条件設定部15とを有する構成で行なう図
形表示装置において、前記交差判定部13を、前記交点
座標算出部より前記凸多角形の各頂点と交点を結んで形
成される各頂点ベクトルが順次供給され、隣接する2頂
点間のベクトルの外積がゼロかどうかの判定を行なう第
1の交差判定部21と、前記第1の交差判定部の外積が
ゼロであるとの出力情報と前記頂点ベクトルとが供給さ
れ、前記隣接する2頂点間の外積がゼロであるベクトル
における内積がゼロより大の場合は前記交点は前記凸多
角形の外部にあり、前記内積がゼロより小の場合は前記
交点は前記凸多角形の2頂点間の境界線上にあると判定
を行なう第2の交差判定部22と、前記第1の交差判定
部の外積が前記凸多角形においてすべてゼロでないとの
出力情報と前記交点座標算出部よりの凸多角形の法線ベ
クトルとが供給され、前記2頂点間のベクトルの外積と
前記凸多角形の法線ベクトルとの間の内積がゼロより大
の場合はsign=1とし、ゼロより小の場合はsign=−1と
判定して、前記隣接するすべての2頂点間で前記signが
すべて同一の場合は前記交点は前記凸多角形の内部にあ
り、前記signに異なるものがある場合は前記交点は前記
凸多角形の外部にあると判定を行なう第3の交差判定部
23とより構成したことを特徴とする図形表示装置を提
供し、請求項2の発明は、請求項1に記載された図形表
示装置において、前記隠面消去部は、前記交点が境界線
上にあると判定された場合に限り、前記距離判定条件設
定部より前記凸多角形の交点から視点までの距離に一定
値を加算する指示が供給され、前記隠面消去部におい
て、それまでに処理した凸多角形における距離とで大小
の比較を行ない、より距離の短い前記凸多角形の交点を
選択することを特徴とする図形表示装置を提供し、請求
項3の発明は、同一平面上に頂点P1、P2、・・・、
Pnを有する凸n角形(n>2の整数)と同じ平面上に存
在する視線との交点Qが、前記凸n角形の内部に存在す
るか、前記凸n角形の境界に存在するか、または前記凸
n角形の外部に存在するかの判定を行なう領域内外判定
を、交点距離検出ステップと、交点座標算出ステップ
と、交差判定ステップと、隠面消去ステップと、距離判
定条件設定ステップとを有する構成で行なう図形表示方
法において、前記交差判定ステップを、前記交点座標算
出ステップより前記凸多角形の各頂点と交点を結んで形
成される各頂点ベクトルが順次供給され、隣接する2頂
点間のベクトルの外積がゼロかどうかの判定を行なう第
1の交差判定ステップと、前記第1の交差判定ステップ
の外積がゼロであるとの出力情報と前記頂点ベクトルと
が供給され、前記隣接する2頂点間の外積がゼロである
ベクトルにおける内積がゼロより大の場合は前記交点は
前記凸多角形の外ステップにあり、前記内積がゼロより
小の場合は前記交点は前記凸多角形の2頂点間の境界線
上にあると判定を行なう第2の交差判定ステップと、前
記第1の交差判定ステップの外積が前記凸多角形におい
てすべてゼロでないとの出力情報と前記交点座標算出ス
テップよりの凸多角形の法線ベクトルとが供給され、前
記2頂点間のベクトルの外積と前記凸多角形の法線ベク
トルとの間の内積がゼロより大の場合はsign=1とし、ゼ
ロより小の場合はsign=−1と判定して、前記隣接する
すべての2頂点間で前記signがすべて同一の場合は前記
交点は前記凸多角形の内部にあり、前記signに異なるも
のがある場合は前記交点は前記凸多角形の外部にあると
判定を行なう第3の交差判定ステップとより構成したこ
とを特徴とする図形表示方法を提供し、請求項4の発明
は、請求項3に記載された図形表示方法において、前記
隠面消去ステップは、前記交点が境界線上にあると判定
された場合に限り、前記距離判定条件設定ステップより
前記凸多角形の交点から視点までの距離に一定値を加算
する指示が供給され、前記隠面消去ステップにおいて、
それまでに処理した凸多角形における距離とで大小の比
較を行ない、より距離の短い前記凸多角形の交点を選択
することを特徴とする図形表示方法を提供するものであ
る。
Therefore, in order to solve the above-mentioned problem, the present invention according to claim 1 employs a method in which a vertex P is located on the same plane.
An intersection Q between a convex n-sided polygon having 1, 1, P2,..., Pn (an integer of n> 2) and a line of sight existing on the same plane exists inside the convex n-sided polygon or the convex n-sided polygon The intersection distance detection unit 11, the intersection coordinate calculation unit 12, the intersection determination unit 13, the hidden surface elimination Part 14
And a distance determination condition setting unit 15 in the graphic display device, wherein the intersection determination unit 13 is formed by connecting each vertex vector formed by connecting each vertex of the convex polygon to the intersection from the intersection coordinate calculation unit. Are sequentially supplied, and a first intersection determination unit 21 that determines whether the outer product of vectors between two adjacent vertices is zero, output information indicating that the outer product of the first intersection determination unit is zero, A vertex vector is supplied, and if the inner product in a vector where the outer product between the two adjacent vertices is zero is greater than zero, the intersection is outside the convex polygon; if the inner product is less than zero, A second intersection determination unit that determines that the intersection is on a boundary between two vertices of the convex polygon, and an output that the outer product of the first intersection determination unit is not all zero in the convex polygon Information and said exchange When the normal vector of the convex polygon is supplied from the coordinate calculation unit, and the inner product between the outer product of the vector between the two vertices and the normal vector of the convex polygon is larger than zero, sign = 1 is set. , If it is smaller than zero, it is determined that sign = −1, and if the signs are all the same between all the two adjacent vertices, the intersection is inside the convex polygon and different from the sign. In the case where there is a graphic display device, a third intersection determining unit 23 that determines that the intersection is outside the convex polygon is provided. Item 1. In the graphic display device according to Item 1, the hidden surface elimination unit determines the distance from the intersection of the convex polygon to the viewpoint by the distance determination condition setting unit only when it is determined that the intersection is on a boundary line. An instruction to add a constant value to the distance is supplied, and the hidden surface 4. The graphic display device according to claim 3, wherein the unit compares the magnitude with the distance of the convex polygon processed so far, and selects an intersection of the convex polygon having a shorter distance. The invention uses the vertices P1, P2,.
The intersection Q with the line of sight existing on the same plane as the convex n-gon having Pn (an integer of n> 2) exists inside the convex n-gon, at the boundary of the convex n-gon, or The area inside / outside determination for determining whether or not the area exists outside the convex n-gon includes an intersection distance detection step, an intersection coordinate calculation step, an intersection determination step, a hidden surface removal step, and a distance determination condition setting step. In the graphic display method performed by the configuration, in the intersection determining step, each vertex vector formed by connecting each vertex of the convex polygon and the intersection from the intersection coordinate calculating step is sequentially supplied, and a vector between two adjacent vertices is provided. A first intersection determination step of determining whether the outer product of the first intersection determination is zero, output information indicating that the outer product of the first intersection determination step is zero and the vertex vector are supplied, and If the inner product in the vector whose outer product between the two vertices is zero is greater than zero, the intersection is at the outer step of the convex polygon, and if the inner product is less than zero, the intersection is the convex polygon. A second intersection determination step of determining that the intersection is on the boundary line between the two vertices, output information indicating that the outer product of the first intersection determination step is not all zero in the convex polygon, and an intersection coordinate calculation step. A normal vector of a convex polygon is supplied, and if the inner product between the outer product of the vector between the two vertices and the normal vector of the convex polygon is larger than zero, sign = 1 and smaller than zero. In this case, it is determined that sign = −1, and when the signs are all the same between all the adjacent two vertices, the intersection is inside the convex polygon, and when there is a different sign, the intersection is The intersection is outside the convex polygon And a third intersection determining step of determining that the hidden surface is located in the hidden surface of the graphic display method according to the third aspect. In the erasing step, only when it is determined that the intersection is on the boundary line, an instruction to add a fixed value to the distance from the intersection of the convex polygon to the viewpoint is supplied from the distance determination condition setting step, and the hidden In the face erase step,
It is another object of the present invention to provide a graphic display method characterized in that the magnitude is compared with the distances of the convex polygons processed up to that point, and an intersection of the convex polygons having a shorter distance is selected.

【0019】( 作 用 )本発明は、図2に示すように、
まず、凸多角形の頂点P1、P2、・・・、Pnを同一平面上
に一定向き(時計回りまたは反時計回り)に定義し、この
凸多角形を含む無限平面と視線Lが交点Qで交差すると
き、前記交点Qと前記各頂点Pnを結ぶベクトルを順次
求め、隣接する2頂点間のベクトル(P1QとP2Q、P2
QとP3Q、・・・、PnQとP1Q)の外積及び内積を求め
る。前記2頂点間ベクトルの外積は、これらの2ベクト
ルの位置関係によって向きが決まる、2ベクトルに垂直
なベクトルを示している。
(Operation) As shown in FIG.
First, the vertices P1, P2,..., Pn of the convex polygon are defined on the same plane in a fixed direction (clockwise or counterclockwise), and the infinite plane including the convex polygon and the line of sight L at the intersection Q. At the time of intersection, vectors connecting the intersection Q and the vertices Pn are sequentially obtained, and vectors between adjacent two vertices (P1Q, P2Q, P2
The outer product and inner product of Q and P3Q,..., PnQ and P1Q) are obtained. The cross product of the vectors between the two vertices indicates a vector perpendicular to the two vectors whose direction is determined by the positional relationship between these two vectors.

【0020】すなわち、図2でP1Q×P2QとP2Q×
P1Qの向きは逆であり、P1Q×P2QとP3Q×P4Q
の向きは図2(a)では同じ向きであるが、図2(b)では逆
向きとなる。各2頂点間の外積ベクトルと、予め求めた
凸多角形の法線ベクトルとの間の内積の符号を隣接する
各頂点間について調べることにより、前記外積ベクトル
と前記法線ベクトルの方向(内積が正なら同方向、負な
ら逆方向)の同一性が判る。
That is, in FIG. 2, P1Q × P2Q and P2Q ×
The direction of P1Q is opposite, P1Q × P2Q and P3Q × P4Q
Are the same in FIG. 2 (a) but opposite in FIG. 2 (b). By examining the sign of the inner product between the outer product vector between each two vertices and the previously obtained normal vector of the convex polygon between adjacent vertices, the direction of the outer product vector and the normal vector (the inner product is Positive direction indicates the same direction, negative direction indicates the opposite direction).

【0021】前記法線ベクトルは共通であり、前記した
ように外積ベクトルの向きは2頂点間ベクトルの位置関
係によって異なるので、全ての組合わせで、2頂点間の
外積ベクトルと法線ベクトルとの内積の符号の同一性を
調べることにより、交点Qと該当する凸多角(四角)形
の位置関係を知ることが出来る。
Since the normal vectors are common and the direction of the outer product vector differs depending on the positional relationship between the two vertices, as described above, the combination of the outer product vector between the two vertices and the normal vector is obtained in all combinations. By examining the identity of the sign of the inner product, the positional relationship between the intersection Q and the corresponding convex polygon (square) can be known.

【0022】すなわち、前記2頂点間の外積ベクトルと
法線ベクトルとの内積の符号が同一ならば交点Qは凸多
角形の内部にあると判定(図2(a))する。また、前記2
頂点間の外積ベクトルと法線ベクトルとの内積の符号に
異なるものがある場合は交点Qは凸多角形の外部にある
と判定(図2(b))する。
That is, if the sign of the inner product between the outer product vector and the normal vector between the two vertices is the same, it is determined that the intersection Q is inside the convex polygon (FIG. 2 (a)). The above 2
If there is a difference in the sign of the inner product between the outer product vector and the normal vector between the vertices, it is determined that the intersection Q is outside the convex polygon (FIG. 2B).

【0023】一方、2頂点間ベクトルの外積がほぼ0
(誤差の影響を見込んだ0に近い値)の場合は、前記法線
ベクトルとの内積の符号で内外判定をすることが出来な
い。この場合には該当する2頂点を通る直線上に交点Q
が存在しているので、前記2頂点間ベクトルの内積で判
定する。
On the other hand, the outer product of the vector between two vertices is almost 0
In the case of (a value close to 0 in consideration of the influence of the error), it is not possible to make the inner / outer judgment based on the sign of the inner product with the normal vector. In this case, the intersection Q
Is determined by the inner product of the vector between the two vertices.

【0024】すなわち、2頂点間ベクトルの内積が0よ
り大きい場合(2頂点間ベクトルの成す角=0)は、交点
Qはこの2頂点の外側に存在する(図2(d))ため、前記
交点Qは凸多角形の外部にあると判定する。
That is, when the inner product of the vector between the two vertices is greater than 0 (the angle formed by the vector between the two vertices = 0), the intersection Q exists outside these two vertices (FIG. 2 (d)). The intersection Q is determined to be outside the convex polygon.

【0025】また、2頂点間ベクトルの内積が0より小
さい場合(2頂点間ベクトルの成す角=π)は交点Qはこ
の2頂点の内側に存在する(図2(c))ため、前記交点Q
は凸多角形の境界上にあると判定する。
When the inner product of the vector between the two vertices is smaller than 0 (the angle formed by the vector between the two vertices = π), the intersection Q exists inside the two vertices (FIG. 2 (c)). Q
Is determined to be on the boundary of the convex polygon.

【0026】交点Qが凸多角形の境界上にあると判定さ
れた時は凸多角形の内部にある場合と同様に、当該凸多
角形が視線と交差すると判定して隠面消去部において、
それまでに処理した凸多角形で得られた交点から視点ま
での距離と当該凸多角形における距離とを比較する。
When it is determined that the intersection Q is on the boundary of the convex polygon, it is determined that the convex polygon intersects with the line of sight, and the hidden surface elimination unit determines
The distance from the intersection obtained by the convex polygon processed up to that point to the viewpoint is compared with the distance in the convex polygon.

【0027】この際に、境界上にあると判定された場合
に限り、距離の差が一定範囲内の場合は先に判定した凸
多角形を優先して、交差図形の更新を行なわないことに
より、境界線上で判定交差図形が同一になり、2つの多
角形が入り組んで見苦しくなってしまうことが解消され
る。
At this time, only when it is determined that they are on the boundary, if the difference in distance is within a certain range, the previously determined convex polygon is prioritized and the intersection figure is not updated. Thus, the determination intersection graphic becomes the same on the boundary line, and the two polygons become complicated and unsightly.

【0028】[0028]

【発明の実施の形態】図1に本発明の図形表示装置の交
差判定・交点検出部の一実施例のブロック構成図を示
す。図1に示される本発明の交差判定・交点検出部の実
施例は、交点距離検出部11、交点座標算出部12、交
差判定部13、隠面消去部14、及び 距離判定条件設
定部15より構成される。
FIG. 1 is a block diagram showing an embodiment of an intersection judging / intersection detecting unit of a graphic display device according to the present invention. The embodiment of the intersection judging / intersection detecting unit of the present invention shown in FIG. 1 includes an intersection distance detecting unit 11, an intersection coordinate calculating unit 12, an intersection judging unit 13, a hidden surface removing unit 14, and a distance judging condition setting unit 15. Be composed.

【0029】まず、視線データ(視点の座標、視線ベク
トル)及び、各凸多角形のデータ(頂点座標・法線ベクト
ル)が交点距離検出部11に入力される。交点距離検出
部11は凸多角形を順に取り出し、凸多角形の含まれる
無限平面と視線Lとの交点Qから視点Rまでの距離を検
出する処理を行なう。
First, the line-of-sight data (viewpoint coordinates, line-of-sight vectors) and data of each convex polygon (vertex coordinates / normal vectors) are input to the intersection distance detecting unit 11. The intersection distance detecting unit 11 performs a process of sequentially extracting the convex polygons and detecting a distance from the intersection Q between the infinity plane including the convex polygon and the line of sight L to the viewpoint R.

【0030】なお、視線ベクトルと前記無限平面が平行
な場合、及び無限平面と視線との交点が予め定めだ図形
領域をはみ出すなど、有効な値でない場合は、この凸多
角形は視線と交差しないと判断して、当該視線のこの凸
多角形に関する以降の判定処理は行なわない。
The convex polygon does not intersect the line of sight if the line of sight vector is parallel to the infinite plane, or if the intersection of the line of infinity and the line of sight is not a valid value such as protruding from a predetermined graphic area. Therefore, the subsequent determination processing regarding this convex polygon of the line of sight is not performed.

【0031】つぎに、交点座標算出部12は交点Qから
視点Rまでの距離を、視点Rと視線ベクトルで示される
直線(実際には半直線)の式に代入して交点Qの座標を計
算し、視線データ、凸多角形のデータと共に交差判定部
13に送られる。
Next, the intersection coordinate calculation unit 12 calculates the coordinates of the intersection Q by substituting the distance from the intersection Q to the viewpoint R into the equation of the line (actually, a half line) indicated by the viewpoint R and the line-of-sight vector. Then, it is sent to the intersection determining unit 13 together with the line-of-sight data and the data of the convex polygon.

【0032】本発明の従来例と異なる部分は交差判定部
13乃至距離判定条件設定部15である。交差判定部1
3は、頂点外積判定部21、頂点内積判定部22、及び
法線内積判定部23より構成されている。
The parts different from the conventional example of the present invention are an intersection judging unit 13 to a distance judging condition setting unit 15. Intersection determination unit 1
Reference numeral 3 includes a vertex outer product determining unit 21, a vertex inner product determining unit 22, and a normal inner product determining unit 23.

【0033】交差判定部13には交点座標算出部12で
計算された凸多角形と視線の交点Qの座標と、合わせて
送られる凸多角形の頂点座標から頂点−交点間(図2の
Pk−Q間、k=1・・・n)のベクトル(図2の頂点V)が求め
られ、頂点外積判定部21及び頂点内積判定部22にお
いて隣接する2頂点間のベクトル(図2のP1QとP2
Q、P2QとP3Q、・・・、PnQとP1Q)の外積及び内積
を求める。
The intersection judging unit 13 calculates the coordinates between the vertex and the intersection (Pk in FIG. 2) from the coordinates of the intersection Q of the convex polygon and the line of sight calculated by the intersection coordinate calculating unit 12 and the vertex coordinates of the convex polygon sent together. −Q, k = 1... N) (vertex V in FIG. 2) is obtained, and the vector between two adjacent vertices (P1Q and FIG. P2
Q, P2Q and P3Q,..., PnQ and P1Q).

【0034】頂点外積判定部(第1の交差判定部)21
において、2頂点間のベクトルの外積がほぼ0の場合
は、次に頂点内積判定部(第2の交差判定部)22にお
いて2頂点間の外積がほぼ0であるベクトルに対して内
積による判定が行なわれ、内積が0より大きい場合は、
交点Qは凸多角形の外部にあると判定される。内積が0
より小さい場合は、交点Qは凸多角形の2頂点間の境界
上にあると判定される。
A vertex cross product determination unit (first intersection determination unit) 21
In the case where the outer product of the vectors between two vertices is substantially zero, the inner product determination unit (second intersection determining unit) 22 then determines the vector whose outer product between the two vertices is substantially zero by the inner product. And if the dot product is greater than 0,
The intersection Q is determined to be outside the convex polygon. Dot product is 0
If smaller, the intersection Q is determined to be on the boundary between the two vertices of the convex polygon.

【0035】一方、2頂点間のベクトルの外積が当該凸
多角形についてすべてほぼ0ではない場合は、次に法線
内積判定部(第3の交差判定部)23において、2頂点
間のベクトルの外積と凸多角形の法線ベクトルとの間で
内積が取られる。内積が0より大きい場合はsign=1と
し、0より小さい場合はsign=‐1であると判別する。
On the other hand, when the outer product of the vectors between the two vertices is not substantially zero for the convex polygon, the normal inner product determining unit (third intersection determining unit) 23 next calculates the vector of the two vertices. An inner product is taken between the outer product and the normal vector of the convex polygon. If the inner product is larger than 0, sign = 1 is set. If the inner product is smaller than 0, sign = 1 is determined.

【0036】以上の処理を全ての隣接する2頂点間につ
いて行ない、 (A) 2頂点間のベクトルの外積がすべて0でない場合
で、 (a) 2頂点間で前記signがすべて同一(1または−
1)である場合・・・ 交点Qは凸多角形の内部にあり、 (b) 2頂点間でsignに異なるものがある場合・・・ 交点Qは凸多角形の外部にあり、 (B) 2頂点間のベクトルの外積が0となるものがある
場合で、 (c) 2頂点間のベクトル内積が0より小の場合・・・ 交点Qは凸多角形の境界上にあり、 (d) 2頂点間のベクトル内積が0より大の場合・・・ 交点Qは凸多角形の外部にある とした区分条件によって交点Qの内外判定を行なう。
The above processing is performed for all adjacent two vertices. (A) When the cross product of the vectors between the two vertices is not all zero, (a) the sign is the same between the two vertices (1 or −
1) If the intersection Q is inside the convex polygon, (b) if there is a difference in sign between the two vertices ... The intersection Q is outside the convex polygon, (B) (C) When the vector inner product between the two vertices is 0, the intersection Q is on the boundary of the convex polygon, and (d) When vector inner product between two vertices is greater than 0: Intersection Q is determined to be outside of the convex polygon.

【0037】なお、1回でも交点Qが凸多角形の外部に
あると判定した場合は、その時点で当該視線はこの凸多
角形と交差しないと判断して、当該視線のこの凸多角形
に関する以降の判定処理は行なわない。
If it is determined that the intersection point Q is outside the convex polygon at least once, it is determined that the line of sight does not intersect with the convex polygon at that time, and the line of sight is not related to the convex polygon. The subsequent determination processing is not performed.

【0038】交点Qが凸多角形の境界上にあると判定さ
れた時は凸多角形の内部にある場合と同様に、当該凸多
角形が視線と交差するという判定を視線データ、凸多角
形のデータと共に隠面消去部14に送る。
When it is determined that the intersection Q is on the boundary of the convex polygon, the determination that the convex polygon intersects with the line of sight is made in the same manner as when the intersection Q is inside the convex polygon. Is sent to the hidden surface erasing unit 14 together with the data.

【0039】この隠面消去部14は従来例と同様に、当
該多角形における交点から視点までの距離の計算を行な
い、ここで得られた距離と、それまでに処理した凸多角
形で得られた交点から視点までの距離とを比較すること
によって、視点に最も近い、すなわち距離の一番短いも
のを選択する。
The hidden surface elimination unit 14 calculates the distance from the intersection to the viewpoint in the polygon in the same manner as in the conventional example, and calculates the distance obtained here and the convex polygon processed up to that point. By comparing the distance from the intersection to the viewpoint, the one closest to the viewpoint, that is, the one with the shortest distance is selected.

【0040】ただし、従来例と異なるのは、通常の交差
図形に対しては単純な大小判定で距離の比較を行なう
が、交点Qが境界線上にあると判定された場合に限り、
距離判定条件設定部15より当該凸多角形の交点から視
点までの距離に一定値を加算する指示を行ない、それと
それまでに処理した凸多角形における距離とで大小の比
較を行なう。
However, the difference from the conventional example is that the distance is compared by a simple magnitude judgment for a normal intersection figure, but only when it is determined that the intersection Q is on the boundary line.
The distance determination condition setting unit 15 issues an instruction to add a constant value to the distance from the intersection of the convex polygon to the viewpoint, and compares the magnitude with the distance of the convex polygon processed up to that time.

【0041】これにより、距離の差が一定範囲内の場合
は先に判定した前記の一定値を加算しなかった方の凸多
角形が優先され、交差図形の更新を行なわないようにす
ることにより、これまであつた境界線上で判定交差図形
が同一になり、2つの多角形が入り組んで見苦しくなっ
てしまうことが解消される。
Thus, when the difference between the distances is within a certain range, the convex polygon which has not been added with the above-mentioned predetermined value is given priority and the intersection figure is not updated. Thus, it is possible to solve the problem that the determined intersection graphic is the same on the boundary line thus far, and the two polygons become complicated and unsightly.

【0042】なお、以上の説明では対象とする凸多角形
は同一平面上に定義された凸n角形(n>2の整数)を仮
定しているが、凸多角形が同一平面上にない場合は、平
面を確定出来る三角形に分割して、各々の三角形につい
て同様の処理を行なうことになる。
In the above description, the target convex polygon is assumed to be a convex n-gon (an integer of n> 2) defined on the same plane, but the convex polygon is not on the same plane. Will divide the plane into triangles that can be determined, and perform the same processing for each triangle.

【0043】レイトレーシング法によるレンダリングで
は、以上の説明のような視点から発生された視線が最も
視点側にある図形との交点を求めてその交点における輝
度値を求めるだけでなく、図3に示したように、視線が
交差した図形の性質によって、前記交点から視線の反射
光・屈折光に相当するレイを飛ばし、各交点の反射光・
屈折光に相当するレイについて各々、新たに図形の交点
を求めていき、新たな交点における輝度値を求め、更に
その交点から反射光・屈折光に相当するレイを飛ばして
いく・・・という二分木処理を繰り返し、二分木を構成す
るレイの各々の交点における輝度値を所定の割合で加算
していってスクリーン上の各画素における輝度値を求め
ていく方法がある。
In the rendering by the ray tracing method, not only is the intersection between the line of sight generated from the viewpoint as described above and the figure closest to the viewpoint determined, and the luminance value at the intersection is determined. As described above, due to the nature of the figure in which the line of sight intersects, rays corresponding to the reflected light / refractive light of the line of sight are skipped from the intersection, and the reflected light /
For each ray corresponding to the refracted light, a new intersection point of the figure is obtained, a luminance value at the new intersection point is obtained, and rays corresponding to the reflected light / refracted light are skipped from the intersection point. There is a method in which the tree processing is repeated, and the luminance value at each intersection of the rays forming the binary tree is added at a predetermined ratio to obtain the luminance value at each pixel on the screen.

【0044】さらに、各交点における輝度値を求める際
に、与えられた光源からの光線ベクトルを遮る図形があ
るかどうかを判定することにより、表示された図形に影
付けを行なって、よりリアルなレンダリングを行なう方
法もある。そうした反射光・屈折光に相当するレイに対
する図形の交差判定や、影付けの際の光源からの光線ベ
クトルを遮る図形に対する交差判定に対しても、本発明
を適応することが出来る。
Further, when determining the luminance value at each intersection, it is determined whether or not there is a figure that blocks the light vector from the given light source, so that the displayed figure is shaded to provide a more realistic display. There is also a method of rendering. The present invention can be applied to the determination of intersection of a figure with a ray corresponding to such reflected light or refracted light, and the determination of intersection of a figure that blocks a light vector from a light source at the time of shadowing.

【0045】また、これまでの説明ではレイトレーシン
グ法における隠面消去処理に限って説明したが、本発明
の交差判定部13における処理方法はそれに限ったもの
ではなく、凸n角形(n>2の整数)における領域内外判
定手段を必要とするシステム全般に適応可能なものであ
る。
In the above description, only the hidden surface elimination processing in the ray tracing method has been described. However, the processing method in the intersection determination unit 13 of the present invention is not limited to this, and a convex n-gon (n> 2) ) Can be applied to all systems that require the inside / outside determination means.

【0046】[0046]

【発明の効果】本発明によると、レイトレーシング法に
よる隠面消去における視線と凸多角形との間の交差判定
などにおいて、凸多角形の頂点を一定向き(時計回りま
たは反時計回り)に定義し、凸多角形が存在する平面と
視線が交点で交差する場合、交点と頂点を結ぶベクトル
を順次求め、隣接する2頂点間のベクトルの内積及び外
積、及びその外積と凸多角形の法線ベクトルとの内積に
よって交点が凸多角形の内部に存在するか、境界に存在
するか、外部に存在するかを判定し、交点が凸多角形の
内部または境界に存在する場合は当該凸多角形が視線と
交差すると判定して隠面消去部による処理を行なうが、
境界に存在すると判定された場合には隠面消去処理にお
ける距離判定を変更することにより、交差判定の簡略化
と、図形表示時における多角形の境界付近における問題
を解消することを可能にした。
According to the present invention, the vertices of a convex polygon are defined in a fixed direction (clockwise or counterclockwise) in determining the intersection between the line of sight and the convex polygon in the hidden surface elimination by the ray tracing method. When the line of sight intersects with the plane at which the convex polygon exists, vectors connecting the intersection and the vertices are sequentially obtained, and the inner and outer products of the vectors between two adjacent vertices and the normal of the outer product and the convex polygon are obtained. Judge whether the intersection exists inside the convex polygon, the boundary, or the outside by the inner product with the vector, and if the intersection exists inside or on the boundary of the convex polygon, the convex polygon Is determined to intersect with the line of sight, and processing by the hidden surface removing unit is performed.
By changing the distance judgment in the hidden surface elimination processing when it is judged that the object exists at the boundary, it is possible to simplify the intersection judgment and to solve the problem near the boundary of the polygon at the time of graphic display.

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

【図1】本発明の図形表示装置の交差判定・交点検出部
の一実施例のブロック構成図を示す。
FIG. 1 is a block diagram showing an embodiment of an intersection determination / intersection detection unit of a graphic display device according to the present invention.

【図2】本発明の図形表示装置の交差判定部の判定原理
を示した図である。
FIG. 2 is a diagram illustrating a principle of determination by an intersection determining unit of the graphic display device of the present invention.

【図3】レイトレーシング法の原理を示した図である。FIG. 3 is a diagram illustrating the principle of a ray tracing method.

【図4】反射・屈折及び光源との影判定も考慮したレイ
トレーシング法の原理を示した図である。
FIG. 4 is a diagram illustrating the principle of a ray tracing method that also takes into account reflection / refraction and shadow determination with a light source.

【図5】レイトレーシングシステムのブロック構成を示
した図である。
FIG. 5 is a diagram showing a block configuration of a ray tracing system.

【図6】従来の交差判定・交点検出部のブロック構成の
一例を示した図である。
FIG. 6 is a diagram illustrating an example of a block configuration of a conventional intersection determination / intersection detection unit.

【図7】従来の交差判定部における判定原理の一例を示
した図である。
FIG. 7 is a diagram illustrating an example of a determination principle in a conventional intersection determination unit.

【図8】2つの凸多角形の境界に視線との交点がある場
合の一例を示した図である。
FIG. 8 is a diagram illustrating an example of a case where there is an intersection with a line of sight at a boundary between two convex polygons.

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

11 交点距離検出部 12 交点座標算出部 13 交差判定部 14 隠面消去部 15 距離判定条件設定部 21 頂点外積判定部(第1の交差判定部) 22 頂点内積判定部(第2の交差判定部) 23 法線内積判定部(第3の交差判定部) L 視線 M 画素 P1、P2、・・・、Pn 凸多角形の頂点(n>2の整数) Q 交点 R 視点 S スクリーン DESCRIPTION OF SYMBOLS 11 Intersection distance detection part 12 Intersection coordinate calculation part 13 Intersection judgment part 14 Hidden surface elimination part 15 Distance judgment condition setting part 21 Vertex outer product judgment part (first intersection judgment part) 22 Vertex inner product judgment part (Second intersection judgment part) 23) Normal inner product determination unit (third intersection determination unit) L line of sight M pixels P1, P2,..., Pn Vertices of convex polygons (n> 2 integers)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】同一平面上に頂点P1、P2、・・・、P
nを有する凸n角形(n>2の整数)と同じ平面上に存在
する視線との交点Qが、前記凸n角形の内部に存在する
か、前記凸n角形の境界に存在するか、または前記凸n
角形の外部に存在するかの判定を行なう領域内外判定
を、交点距離検出部と、交点座標算出部と、交差判定部
と、隠面消去部と、距離判定条件設定部とを有する構成
で行なう図形表示装置において、 前記交差判定部を、 前記交点座標算出部より前記凸多角形の各頂点と交点を
結んで形成される各頂点ベクトルが順次供給され、隣接
する2頂点間のベクトルの外積がゼロかどうかの判定を
行なう第1の交差判定部と、 前記第1の交差判定部の外積がゼロであるとの出力情報
と前記頂点ベクトルとが供給され、前記隣接する2頂点
間の外積がゼロであるベクトルにおける内積がゼロより
大の場合は前記交点は前記凸多角形の外部にあり、前記
内積がゼロより小の場合は前記交点は前記凸多角形の2
頂点間の境界線上にあると判定を行なう第2の交差判定
部と、 前記第1の交差判定部の外積が前記凸多角形においてす
べてゼロでないとの出力情報と前記交点座標算出部より
の凸多角形の法線ベクトルとが供給され、前記2頂点間
のベクトルの外積と前記凸多角形の法線ベクトルとの間
の内積がゼロより大の場合はsign=1とし、ゼロより小の
場合はsign=−1と判定して、前記隣接するすべての2
頂点間で前記signがすべて同一の場合は前記交点は前記
凸多角形の内部にあり、前記signに異なるものがある場
合は前記交点は前記凸多角形の外部にあると判定を行な
う第3の交差判定部とより構成したことを特徴とする図
形表示装置。
1. Vertices P1, P2,..., P on the same plane
an intersection Q with a line of sight existing on the same plane as a convex n-sided polygon having n (n> 2) is present inside the convex n-sided polygon, at a boundary of the convex n-sided polygon, or The convex n
The inside / outside determination for determining whether the region exists outside the polygon is performed by a configuration including an intersection distance detection unit, an intersection coordinate calculation unit, an intersection determination unit, a hidden surface removal unit, and a distance determination condition setting unit. In the graphic display device, the intersection determination unit is sequentially supplied with each vertex vector formed by connecting each vertex of the convex polygon with the intersection from the intersection coordinate calculation unit, and an outer product of vectors between two adjacent vertices is obtained. A first intersection determination unit for determining whether the cross product is zero, output information indicating that the outer product of the first intersection determination unit is zero and the vertex vector are supplied, and a cross product between the two adjacent vertices is provided. If the dot product in a vector that is zero is greater than zero, the intersection is outside the convex polygon; if the dot product is less than zero, the intersection is two of the convex polygon.
A second intersection determination unit that determines that the intersection is on the boundary between vertices, output information indicating that the outer product of the first intersection determination unit is not all zero in the convex polygon, and a convexity obtained by the intersection coordinate calculation unit. A normal vector of a polygon is supplied, sign = 1 if the inner product between the outer product of the vector between the two vertices and the normal vector of the convex polygon is greater than zero, and sign = 1 if less than zero. Is determined to be sign = -1, and all adjacent 2
When the signs are all the same between the vertices, the intersection is inside the convex polygon, and when there is a different sign, the intersection is determined to be outside the convex polygon. A graphic display device comprising an intersection determining unit.
【請求項2】請求項1に記載された図形表示装置におい
て、 前記隠面消去部は、前記交点が境界線上にあると判定さ
れた場合に限り、前記距離判定条件設定部より前記凸多
角形の交点から視点までの距離に一定値を加算する指示
が供給され、前記隠面消去部において、それまでに処理
した凸多角形における距離とで大小の比較を行ない、よ
り距離の短い前記凸多角形の交点を選択することを特徴
とする図形表示装置。
2. The graphic display device according to claim 1, wherein the hidden surface elimination unit is configured to determine the convex polygon by the distance determination condition setting unit only when it is determined that the intersection is on a boundary line. An instruction to add a constant value to the distance from the intersection to the viewpoint is supplied, and the hidden surface elimination unit compares the magnitude with the distance in the convex polygon processed so far, and the convex polygon having a shorter distance is used. A graphic display device for selecting an intersection of polygons.
【請求項3】同一平面上に頂点P1、P2、・・・、P
nを有する凸n角形(n>2の整数)と同じ平面上に存在
する視線との交点Qが、前記凸n角形の内部に存在する
か、前記凸n角形の境界に存在するか、または前記凸n
角形の外部に存在するかの判定を行なう領域内外判定
を、交点距離検出ステップと、交点座標算出ステップ
と、交差判定ステップと、隠面消去ステップと、距離判
定条件設定ステップとを有する構成で行なう図形表示方
法において、 前記交差判定ステップを、 前記交点座標算出ステップより前記凸多角形の各頂点と
交点を結んで形成される各頂点ベクトルが順次供給さ
れ、隣接する2頂点間のベクトルの外積がゼロかどうか
の判定を行なう第1の交差判定ステップと、 前記第1の交差判定ステップの外積がゼロであるとの出
力情報と前記頂点ベクトルとが供給され、前記隣接する
2頂点間の外積がゼロであるベクトルにおける内積がゼ
ロより大の場合は前記交点は前記凸多角形の外ステップ
にあり、前記内積がゼロより小の場合は前記交点は前記
凸多角形の2頂点間の境界線上にあると判定を行なう第
2の交差判定ステップと、 前記第1の交差判定ステップの外積が前記凸多角形にお
いておべてゼロでないとの出力情報と前記交点座標算出
ステップよりの凸多角形の法線ベクトルとが供給され、
前記2頂点間のベクトルの外積と前記凸多角形の法線ベ
クトルとの間の内積がゼロより大の場合はsign=1とし、
ゼロより小の場合はsign=−1と判定して、前記隣接す
るすべての2頂点間で前記signがすべて同一の場合は前
記交点は前記凸多角形の内部にあり、前記signに異なる
ものがある場合は前記交点は前記凸多角形の外部にある
と判定を行なう第3の交差判定ステップとより構成した
ことを特徴とする図形表示方法。
3. Vertices P1, P2,..., P on the same plane
an intersection Q with a line of sight existing on the same plane as a convex n-sided polygon having n (n> 2) is present inside the convex n-sided polygon, at a boundary of the convex n-sided polygon, or The convex n
The inside / outside determination for determining whether the region exists outside the polygon is performed by a configuration including an intersection distance detection step, an intersection coordinate calculation step, an intersection determination step, a hidden surface elimination step, and a distance determination condition setting step. In the graphic display method, in the intersection determination step, each vertex vector formed by connecting each vertex of the convex polygon and the intersection from the intersection coordinate calculation step is sequentially supplied, and an outer product of vectors between two adjacent vertices is calculated. A first intersection determination step of determining whether the value is zero, output information indicating that the outer product of the first intersection determination step is zero and the vertex vector are supplied, and the outer product between the adjacent two vertices is calculated. If the dot product in a vector that is zero is greater than zero, the intersection is at the outer step of the convex polygon; if the dot product is less than zero, the intersection is A second intersection determination step of determining that the intersection is on the boundary between two vertices of the convex polygon, and output information that the cross product of the first intersection determination step is not all zero in the convex polygon The normal vector of the convex polygon from the intersection coordinate calculation step is supplied,
If the inner product between the outer product of the vectors between the two vertices and the normal vector of the convex polygon is greater than zero, sign = 1,
If it is smaller than zero, it is determined that sign = −1, and if all of the signs are the same between all the two adjacent vertices, the intersection is inside the convex polygon, And a third intersection determination step of determining that the intersection is outside the convex polygon in some cases.
【請求項4】請求項3に記載された図形表示方法におい
て、 前記隠面消去ステップは、前記交点が境界線上にあると
判定された場合に限り、前記距離判定条件設定ステップ
より前記凸多角形の交点から視点までの距離に一定値を
加算する指示が供給され、前記隠面消去ステップにおい
て、それまでに処理した凸多角形における距離とで大小
の比較を行ない、より距離の短い前記凸多角形の交点を
選択することを特徴とする図形表示方法。
4. The graphic display method according to claim 3, wherein the hidden surface removing step is performed by the distance determination condition setting step only when the intersection is determined to be on a boundary line. An instruction to add a constant value to the distance from the intersection to the viewpoint is supplied. In the hidden surface elimination step, the magnitude is compared with the distance in the convex polygon processed so far, and the convex polygon having a shorter distance is used. A graphic display method characterized by selecting intersections of polygons.
JP33259199A 1999-11-24 1999-11-24 Graphic display device and method thereof Expired - Fee Related JP3703073B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33259199A JP3703073B2 (en) 1999-11-24 1999-11-24 Graphic display device and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33259199A JP3703073B2 (en) 1999-11-24 1999-11-24 Graphic display device and method thereof

Publications (2)

Publication Number Publication Date
JP2001148028A true JP2001148028A (en) 2001-05-29
JP3703073B2 JP3703073B2 (en) 2005-10-05

Family

ID=18256661

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33259199A Expired - Fee Related JP3703073B2 (en) 1999-11-24 1999-11-24 Graphic display device and method thereof

Country Status (1)

Country Link
JP (1) JP3703073B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010505164A (en) * 2006-09-27 2010-02-18 インターナショナル・ビジネス・マシーンズ・コーポレーション Pixel color determination method and image processing system in ray tracing image processing system
KR20150107466A (en) * 2014-03-14 2015-09-23 삼성전자주식회사 Method and apparatus for removing false-intersection in ray tracing
JP2017076295A (en) * 2015-10-16 2017-04-20 富士フイルム株式会社 Augmented reality provision system, information processing device and program
JP2017534976A (en) * 2014-10-17 2017-11-24 クアルコム,インコーポレイテッド Ray-box intersection test using inner product based fixed function logic
CN111090355A (en) * 2018-10-23 2020-05-01 发那科株式会社 Touch panel device, control method thereof, and storage medium storing program
CN111599018A (en) * 2019-02-21 2020-08-28 浙江宇视科技有限公司 Target tracking method and system, electronic equipment and storage medium
GB2607350A (en) * 2021-06-04 2022-12-07 Advanced Risc Mach Ltd Graphics processing

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010505164A (en) * 2006-09-27 2010-02-18 インターナショナル・ビジネス・マシーンズ・コーポレーション Pixel color determination method and image processing system in ray tracing image processing system
KR20150107466A (en) * 2014-03-14 2015-09-23 삼성전자주식회사 Method and apparatus for removing false-intersection in ray tracing
KR102159262B1 (en) 2014-03-14 2020-09-23 삼성전자 주식회사 Method and apparatus for removing false-intersection in ray tracing
JP2017534976A (en) * 2014-10-17 2017-11-24 クアルコム,インコーポレイテッド Ray-box intersection test using inner product based fixed function logic
JP2017076295A (en) * 2015-10-16 2017-04-20 富士フイルム株式会社 Augmented reality provision system, information processing device and program
CN111090355A (en) * 2018-10-23 2020-05-01 发那科株式会社 Touch panel device, control method thereof, and storage medium storing program
CN111090355B (en) * 2018-10-23 2023-05-09 发那科株式会社 Touch panel device, control method thereof, and storage medium storing program
CN111599018A (en) * 2019-02-21 2020-08-28 浙江宇视科技有限公司 Target tracking method and system, electronic equipment and storage medium
CN111599018B (en) * 2019-02-21 2024-05-28 浙江宇视科技有限公司 Target tracking method and system, electronic equipment and storage medium
GB2607350A (en) * 2021-06-04 2022-12-07 Advanced Risc Mach Ltd Graphics processing
GB2607350B (en) * 2021-06-04 2023-12-13 Advanced Risc Mach Ltd Graphics processing

Also Published As

Publication number Publication date
JP3703073B2 (en) 2005-10-05

Similar Documents

Publication Publication Date Title
RU2679964C1 (en) Image rendering of laser scan data
US8059119B2 (en) Method for detecting border tiles or border pixels of a primitive for tile-based rendering
JP3840014B2 (en) Scan conversion execution apparatus for graphics display system
EP3340183B1 (en) Graphics processing employing cube map texturing
US10127711B2 (en) Method and apparatus rendering caustics
CN104025180A (en) Five-dimensional rasterization with conservative bounds
JP5624457B2 (en) Three-dimensional data processing apparatus, method and program
KR100723422B1 (en) Apparatus and method for rendering image data using sphere splating and computer readable media for storing computer program
US6741248B2 (en) Rendering geometric features of scenes and models by individual polygons
JP4584956B2 (en) Graphics processor and drawing processing method
JP3703073B2 (en) Graphic display device and method thereof
Yu Efficient visibility processing for projective texture mapping
CN110874858B (en) System and method for rendering reflections
US20050231533A1 (en) Apparatus and method for performing divide by w operations in a graphics system
KR100372901B1 (en) Ray-tracing acceleration method using ZF-buffer
CN114445579A (en) Object labeling information presentation method and device, electronic equipment and storage medium
US20110074777A1 (en) Method For Displaying Intersections And Expansions of Three Dimensional Volumes
JPH05128274A (en) Graphic display device
JP5321385B2 (en) Image processing program and computer-readable recording medium
CN117237472A (en) Map rendering method and device, electronic equipment and readable storage medium
Tanaka et al. Precise rendering method for edge highlighting
JPH11296694A (en) Image generation method
KR20070034413A (en) Efficient Processing Method and Apparatus for Query for 3D Display
Murai et al. Development of polygon shift method for generating 3D view map of buildings
JPH0223479A (en) Picture display method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050323

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050405

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050603

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: 20050701

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050714

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

Free format text: PAYMENT UNTIL: 20080729

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090729

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090729

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100729

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110729

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120729

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120729

Year of fee payment: 7

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20120729

Year of fee payment: 7

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120729

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130729

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees