JP2011232798A - Graphic processor - Google Patents

Graphic processor Download PDF

Info

Publication number
JP2011232798A
JP2011232798A JP2010099729A JP2010099729A JP2011232798A JP 2011232798 A JP2011232798 A JP 2011232798A JP 2010099729 A JP2010099729 A JP 2010099729A JP 2010099729 A JP2010099729 A JP 2010099729A JP 2011232798 A JP2011232798 A JP 2011232798A
Authority
JP
Japan
Prior art keywords
polygon
vertex
shape
contour shape
shielded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010099729A
Other languages
Japanese (ja)
Inventor
Hiroyasu Negishi
博康 根岸
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2010099729A priority Critical patent/JP2011232798A/en
Publication of JP2011232798A publication Critical patent/JP2011232798A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To obtain a graphic processor which controls an occurrence of operation error in a graphic Boolean operation and can accurately extract a shape of polygon constituting visible parts of object in the three-dimensional shape.SOLUTION: When a shielding determination processing unit 6 determines that a surface of polygon is not shielded by a contour shape, a polygon shape output unit 7 outputs a shape of the polygon, and when the shielding determination processing unit 6 determines that the surface of polygon is partially shielded by the contour shape, the polygon shape output unit 7 generates a polygon excluding a surface shielded by the contour shape upon implementing a graphic Boolean operation between the surface of the polygon and the contour shape, and outputs a shape of the polygon.

Description

この発明は、3次元空間内の視点から複数のポリゴンで構成されている3次元形状のオブジェクトを見たときに、そのオブジェクトの見える部分を構成しているポリゴンの形状を抽出する図形処理装置に関するものである。   BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic processing apparatus that extracts the shape of a polygon that constitutes a visible portion of an object when a three-dimensional object composed of a plurality of polygons is viewed from a viewpoint in a three-dimensional space. Is.

複数のポリゴンで構成されている3次元形状のオブジェクトを描画する一般的な図形処理装置には、3次元空間内の視点(例えば、ユーザにより指定された位置)から3次元形状のオブジェクトを見たときに、そのオブジェクトの見える部分を構成しているポリゴンの形状を抽出する処理を実施する機能が備えられている。
このようなポリゴンの形状抽出処理では、3次元形状のオブジェクトを構成しているポリゴンが、例えば、ポリゴンAとポリゴンBである場合、ポリゴンAとポリゴンBの遮蔽関係を判定する必要がある。
In a general graphic processing apparatus that draws a three-dimensional object composed of a plurality of polygons, the three-dimensional object is viewed from a viewpoint in the three-dimensional space (for example, a position specified by the user). In some cases, a function of performing a process of extracting the shape of a polygon constituting the visible portion of the object is provided.
In such polygon shape extraction processing, for example, when the polygons constituting the three-dimensional object are polygon A and polygon B, it is necessary to determine the shielding relationship between polygon A and polygon B.

視点から3次元形状のオブジェクトを見たときに、ポリゴンAがポリゴンBに完全に遮蔽されている場合、そのオブジェクトの見える部分を構成しているポリゴンはポリゴンBだけであり、ポリゴンAは該当しない。
一方、ポリゴンBがポリゴンAに完全に遮蔽されている場合、そのオブジェクトの見える部分を構成しているポリゴンはポリゴンAだけであり、ポリゴンBは該当しない。
When a three-dimensional object is viewed from the viewpoint, if polygon A is completely occluded by polygon B, polygon B is the only polygon that makes up the visible part of the object, and polygon A does not correspond. .
On the other hand, when the polygon B is completely shielded by the polygon A, the polygon that constitutes the visible portion of the object is only the polygon A, and the polygon B does not correspond.

視点から3次元形状のオブジェクトを見たときに、ポリゴンAの一部がポリゴンBに遮蔽されている場合、ポリゴンBに遮蔽されていない部分のポリゴンAの形状を算出する必要がある。
一方、ポリゴンBの一部がポリゴンAに遮蔽されている場合、ポリゴンAに遮蔽されていない部分のポリゴンBの形状を算出する必要がある。
例えば、ポリゴンBに遮蔽されていない部分のポリゴンAの形状の算出には、図形ブーリアン演算(ポリゴンA−ポリゴンB)などを利用することができる。
When a part of the polygon A is shielded by the polygon B when the object having a three-dimensional shape is viewed from the viewpoint, it is necessary to calculate the shape of the polygon A that is not shielded by the polygon B.
On the other hand, when a part of the polygon B is shielded by the polygon A, it is necessary to calculate the shape of the polygon B which is not shielded by the polygon A.
For example, figure boolean operation (polygon A-polygon B) or the like can be used to calculate the shape of the polygon A that is not shielded by the polygon B.

ここでは、3次元形状のオブジェクトがポリゴンAとポリゴンBから構成されている場合について示したが、3次元形状のオブジェクトがN個のポリゴンから構成されている場合、ポリゴン間の遮蔽関係を判定する処理をN×(N−1)回実施して、一部遮蔽していることが判明すれば、図形ブーリアン演算を実施して、遮蔽されていない部分のポリゴンの形状を算出する必要がある。
以下、ポリゴンの一部が他のポリゴンに遮蔽されている場合に、他のポリゴンに遮蔽されていない部分のポリゴンの形状を算出する処理の具体例を説明する。
Here, the case where the three-dimensional object is composed of polygons A and B has been shown, but when the three-dimensional object is composed of N polygons, the shielding relationship between the polygons is determined. If the processing is performed N × (N−1) times and it is found that a part is shielded, it is necessary to perform a graphic boolean calculation to calculate the shape of the polygon that is not shielded.
Hereinafter, a specific example of processing for calculating the shape of a part of a polygon that is not shielded by another polygon when a part of the polygon is shielded by another polygon will be described.

図10はポリゴンC1,C2,C3,C4によって一部が遮蔽されているポリゴンAの抽出処理を示す説明図である。
この場合、ポリゴンAとポリゴンC1間で図形ブーリアン演算を実施し、その演算結果(ポリゴンC1に遮蔽されていない部分のポリゴンA)とポリゴンC2間で図形ブーリアン演算を実施する。
また、その演算結果(ポリゴンC1,C2に遮蔽されていない部分のポリゴンA)とポリゴンC3間で図形ブーリアン演算を実施し、その演算結果(ポリゴンC1,C2,C3に遮蔽されていない部分のポリゴンA)とポリゴンC4間で図形ブーリアン演算を実施する。
これにより、ポリゴンC1,C2,C3,C4に遮蔽されていない部分のポリゴンAが生成される。
このように、前の図形ブーリアン演算の演算結果が、次の図形ブーリアン演算に用いられる。
FIG. 10 is an explanatory diagram showing the extraction process of the polygon A that is partially blocked by the polygons C1, C2, C3, and C4.
In this case, the graphic Boolean calculation is performed between the polygon A and the polygon C1, and the graphic Boolean calculation is performed between the calculation result (the polygon A that is not shielded by the polygon C1) and the polygon C2.
Further, a graphic boolean calculation is performed between the calculation result (polygon A of the portion not shielded by the polygons C1 and C2) and the polygon C3, and the calculation result (polygon of the portion not shielded by the polygons C1, C2, and C3). A graphic boolean operation is performed between A) and the polygon C4.
Thereby, the polygon A of the part which is not shielded by the polygons C1, C2, C3 and C4 is generated.
In this way, the calculation result of the previous graphic Boolean calculation is used for the next graphic Boolean calculation.

この演算の過程で、ポリゴンとポリゴンの図形ブーリアン演算を実施した結果、非常に小さな形状や極端に細長い形状のポリゴン(他のポリゴンに遮蔽されていない部分のポリゴン)が生成される場合がある。
このとき、非常に小さな形状や極端に細長い形状のポリゴンと、他のポリゴンとの間で図形ブーリアン演算を実施する場合、演算誤差によって、正しい形状のポリゴンを生成することができない場合がある。
例えば、ポリゴンの頂点データは、浮動小数点で表現されることが多いが、微少ポリゴンや極端に細長いポリゴン(例えば、ポリゴンの頂点間が非常に小さい場合など)が図形ブーリアン演算の対象になると、情報落ちなどの誤差が発生して、幾何学的な状態が崩れる場合がある。
In the course of this calculation, polygon and polygon figure boolean operations may be performed, resulting in the generation of extremely small or extremely elongated polygons (polygons that are not shielded by other polygons).
At this time, when a figure Boolean calculation is performed between a very small shape or an extremely long and narrow polygon and another polygon, a polygon having a correct shape may not be generated due to a calculation error.
For example, polygon vertex data is often expressed in floating-point numbers, but information may be generated when a small polygon or extremely long and thin polygon (for example, when the distance between the vertexes of the polygon is very small) is subject to graphic boolean operations. An error such as a drop may occur, and the geometric state may collapse.

具体的には、例えば、図11に示すように、非常に細長い三角形Bが三角形Aにより遮蔽されている場合、点線の丸で囲まれている2つの部分が図形ブーリアン演算(三角形B−三角形A)により求まる。
しかし、頂点1,頂点2,頂点3で構成される三角形Cにおいて、頂点1と頂点2の位置が非常に接近している場合、頂点1及び頂点2を算出する過程の計算で、浮動小数点演算の誤差が発生する。例えば、Ax+Byにおいて、A,Bの値が大きく、x,yが非常に小さい値の場合に誤差が発生する。
Specifically, for example, as shown in FIG. 11, when a very elongated triangle B is shielded by a triangle A, two parts surrounded by a dotted circle are represented by a graphic Boolean operation (triangle B−triangle A). ).
However, in the triangle C composed of vertex 1, vertex 2 and vertex 3, when the positions of vertex 1 and vertex 2 are very close, the calculation of the process of calculating vertex 1 and vertex 2 is a floating point operation. Error occurs. For example, in Ax + By, an error occurs when the values of A and B are large and x and y are very small values.

この演算誤差によって、三角形Cの頂点1と頂点2の位置が逆転するような演算結果になると、三角形Cの形状が崩壊する。
この場合、本来、頂点1,頂点2,頂点3が反時計回りになる形状が、演算誤差によって、時計回りの形状になる。
このような現象によって、ポリゴンの表裏の関係や、ポリゴンの内部・外部の判定を間違うことになる。
If this calculation error results in a calculation result in which the positions of the vertex 1 and the vertex 2 of the triangle C are reversed, the shape of the triangle C collapses.
In this case, the shape in which vertex 1, vertex 2 and vertex 3 are originally counterclockwise becomes a clockwise shape due to a calculation error.
Due to such a phenomenon, the relation between the front and back of the polygon and the inside / outside determination of the polygon are mistaken.

なお、以下の特許文献1には、複数のポリゴン間で共有する辺を削除することで、3次元形状オブジェクトの輪郭形状を抽出する技術が開示されているが、浮動小数点演算の誤差の発生を抑制する技術については開示されていない。   The following Patent Document 1 discloses a technique for extracting a contour shape of a three-dimensional shape object by deleting a side shared by a plurality of polygons. The technology to suppress is not disclosed.

特開平6−266819号公報(段落番号[0006]から[0011]、図1)JP-A-6-266819 (paragraph numbers [0006] to [0011], FIG. 1)

従来の図形処理装置は以上のように構成されているので、3次元形状のオブジェクトを構成しているポリゴン単位で、図形ブーリアン演算を繰り返し実施する場合、その図形ブーリアン演算の途中で、微少ポリゴンや極端に細長いポリゴンが生成されて、そのポリゴンが次の図形ブーリアン演算の対象になると、演算誤差が発生して、3次元形状のオブジェクトの見える部分を構成しているポリゴンの形状を正確に抽出することができなくなる課題があった。   Since the conventional graphic processing apparatus is configured as described above, when a graphic Boolean operation is repeatedly performed for each polygon constituting a three-dimensional shape object, a small polygon or When an extremely long and narrow polygon is generated and the polygon becomes the target of the next figure boolean operation, a calculation error occurs, and the shape of the polygon constituting the visible portion of the three-dimensional object is accurately extracted. There was a problem that made it impossible.

この発明は上記のような課題を解決するためになされたもので、図形ブーリアン演算の演算誤差の発生を抑制して、3次元形状のオブジェクトの見える部分を構成しているポリゴンの形状を正確に抽出することができる図形処理装置を得ることを目的とする。   The present invention has been made to solve the above-described problems, and suppresses the occurrence of calculation errors in figure Boolean operations, so that the shapes of polygons constituting the visible portion of a three-dimensional object can be accurately determined. It is an object of the present invention to obtain a graphic processing apparatus that can be extracted.

この発明に係る図形処理装置は、3次元空間内の視点から、複数のポリゴンで構成されている3次元形状のオブジェクトを見たときに、そのオブジェクトの表面を構成している1以上のポリゴンを抽出する表面ポリゴン抽出手段と、表面ポリゴン抽出手段により抽出された1以上のポリゴンを2次元平面上に投影変換する投影変換手段と、投影変換手段により2次元平面上に投影変換された1以上のポリゴンが構成しているオブジェクトの表面の中で、連続している表面をオブジェクトの輪郭形状として抽出する輪郭形状抽出手段と、表面ポリゴン抽出手段により抽出されたポリゴン毎に、当該ポリゴンの面が輪郭形状抽出手段により抽出された輪郭形状に遮蔽されているか否かを判定する遮蔽判定手段とを設け、ポリゴン形状出力手段が、遮蔽判定手段によりポリゴンの面が輪郭形状により遮蔽されていないと判定された場合、そのポリゴンの形状を出力し、遮蔽判定手段によりポリゴンの面の一部が輪郭形状により遮蔽されていると判定された場合、そのポリゴンの面と輪郭形状間で図形ブーリアン演算を実施することで、その輪郭形状に遮蔽されている面が除かれているポリゴンを生成して、そのポリゴンの形状を出力するようにしたものである。   When the graphics processing apparatus according to the present invention sees a three-dimensional object composed of a plurality of polygons from a viewpoint in a three-dimensional space, one or more polygons constituting the surface of the object are displayed. A surface polygon extracting means for extracting, a projection converting means for projecting and converting one or more polygons extracted by the surface polygon extracting means on a two-dimensional plane; The contour shape extracting means for extracting the continuous surface as the contour shape of the object among the surfaces of the object that the polygons constitute, and the surface of the polygon is contoured for each polygon extracted by the surface polygon extracting means. A shielding determination means for determining whether or not the contour shape extracted by the shape extraction means is shielded, and a polygon shape output means, When the occluding determination means determines that the polygon surface is not shielded by the contour shape, the polygon shape is output, and the shielding determining means determines that a part of the polygon surface is shielded by the contour shape. In such a case, by performing a graphic boolean operation between the surface of the polygon and the contour shape, a polygon from which the surface shielded by the contour shape is removed is generated and the shape of the polygon is output. It is a thing.

この発明によれば、3次元空間内の視点から、複数のポリゴンで構成されている3次元形状のオブジェクトを見たときに、そのオブジェクトの表面を構成している1以上のポリゴンを抽出する表面ポリゴン抽出手段と、表面ポリゴン抽出手段により抽出された1以上のポリゴンを2次元平面上に投影変換する投影変換手段と、投影変換手段により2次元平面上に投影変換された1以上のポリゴンが構成しているオブジェクトの表面の中で、連続している表面をオブジェクトの輪郭形状として抽出する輪郭形状抽出手段と、表面ポリゴン抽出手段により抽出されたポリゴン毎に、当該ポリゴンの面が輪郭形状抽出手段により抽出された輪郭形状に遮蔽されているか否かを判定する遮蔽判定手段とを設け、ポリゴン形状出力手段が、遮蔽判定手段によりポリゴンの面が輪郭形状により遮蔽されていないと判定された場合、そのポリゴンの形状を出力し、遮蔽判定手段によりポリゴンの面の一部が輪郭形状により遮蔽されていると判定された場合、そのポリゴンの面と輪郭形状間で図形ブーリアン演算を実施することで、その輪郭形状に遮蔽されている面が除かれているポリゴンを生成して、そのポリゴンの形状を出力するように構成したので、図形ブーリアン演算の演算誤差の発生を抑制して、3次元形状のオブジェクトの見える部分を構成しているポリゴンの形状を正確に抽出することができる効果がある。   According to the present invention, when a three-dimensional object composed of a plurality of polygons is viewed from a viewpoint in a three-dimensional space, a surface from which one or more polygons constituting the surface of the object are extracted. A polygon extraction unit, a projection conversion unit that projects and converts one or more polygons extracted by the surface polygon extraction unit onto a two-dimensional plane, and one or more polygons that are projected and converted onto a two-dimensional plane by the projection conversion unit A contour shape extracting means for extracting a continuous surface as the contour shape of the object, and a surface of the polygon for each polygon extracted by the surface polygon extracting means. And a shielding determining means for determining whether or not the contour shape extracted by the polygon is output by the polygon shape output means. When it is determined that the polygon surface is not shielded by the contour shape, the polygon shape is output, and when it is determined by the shielding determination means that a part of the polygon surface is shielded by the contour shape, Since the figure Boolean operation is performed between the polygon surface and the contour shape, a polygon from which the surface shielded by the contour shape is removed is generated, and the polygon shape is output. There is an effect that it is possible to accurately extract the shape of the polygon constituting the visible portion of the three-dimensional shape object while suppressing the occurrence of calculation errors in the graphic boolean calculation.

この発明の実施の形態1による図形処理装置を示す構成図である。BRIEF DESCRIPTION OF THE DRAWINGS It is a block diagram which shows the figure processing apparatus by Embodiment 1 of this invention. この発明の実施の形態1による図形処理装置を構成しているコンピュータを示す構成図である。It is a block diagram which shows the computer which comprises the graphics processing apparatus by Embodiment 1 of this invention. この発明の実施の形態1による図形処理装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the graphics processing apparatus by Embodiment 1 of this invention. 複数のポリゴンで構成されている3次元形状のオブジェクトの一例を示す説明図である。It is explanatory drawing which shows an example of the object of the three-dimensional shape comprised by the some polygon. ポリゴンを平行投影変換することで、ポリゴンが2次元平面上に投影変換された例を示す説明図である。It is explanatory drawing which shows the example by which the polygon was projected and converted on the two-dimensional plane by carrying out parallel projection conversion of the polygon. ポリゴン形状出力部7から出力されるポリゴンの形状を示す説明図である。It is explanatory drawing which shows the shape of the polygon output from the polygon shape output part 7. FIG. オブジェクトの輪郭形状の抽出例を示す説明図である。It is explanatory drawing which shows the example of extraction of the outline shape of an object. この発明の実施の形態3による図形処理装置を示す構成図である。It is a block diagram which shows the figure processing apparatus by Embodiment 3 of this invention. オブジェクトの輪郭形状の抽出例を示す説明図である。It is explanatory drawing which shows the example of extraction of the outline shape of an object. ポリゴンC1,C2,C3,C4によって一部が遮蔽されているポリゴンAの抽出処理を示す説明図である。It is explanatory drawing which shows the extraction process of the polygon A in which one part is shielded by polygon C1, C2, C3, C4. 図形ブーリアン演算により求まる三角形の一例を示す説明図である。It is explanatory drawing which shows an example of the triangle calculated | required by figure Boolean calculation.

実施の形態1.
図1はこの発明の実施の形態1による図形処理装置を示す構成図である。
図1において、視点受付部1は例えばキーボードやマウスなどのマンマシンインタフェース等から構成されており、複数のポリゴンで構成されている3次元形状のオブジェクトを見る3次元空間内の視点の位置を受け付ける処理を実施する。
データ記憶部2は3次元形状のオブジェクトを構成している複数のポリゴンのデータを記憶しているメモリである。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a graphic processing apparatus according to Embodiment 1 of the present invention.
In FIG. 1, a viewpoint accepting unit 1 is composed of a man-machine interface such as a keyboard and a mouse, for example, and accepts the position of the viewpoint in a three-dimensional space for viewing a three-dimensional object composed of a plurality of polygons. Perform the process.
The data storage unit 2 is a memory that stores data of a plurality of polygons constituting an object having a three-dimensional shape.

表面ポリゴン抽出部3は視点受付部1により位置が受け付けられた3次元空間内の視点から、3次元形状のオブジェクトを見たときに、そのオブジェクトの表面を構成している1以上のポリゴンを抽出する処理を実施する。なお、表面ポリゴン抽出部3は表面ポリゴン抽出手段を構成している。
投影変換処理部4は表面ポリゴン抽出部3により抽出された1以上のポリゴンを2次元平面上に投影変換する処理を実施する。なお、投影変換処理部4は投影変換手段を構成している。
The surface polygon extraction unit 3 extracts one or more polygons constituting the surface of the object when a three-dimensional object is viewed from the viewpoint in the three-dimensional space where the position is received by the viewpoint reception unit 1 Perform the process. The surface polygon extraction unit 3 constitutes surface polygon extraction means.
The projection conversion processing unit 4 performs a process of projecting and converting one or more polygons extracted by the surface polygon extraction unit 3 onto a two-dimensional plane. Note that the projection conversion processing unit 4 constitutes a projection conversion means.

輪郭形状抽出部5は投影変換処理部4により2次元平面上に投影変換された1以上のポリゴンが構成しているオブジェクトの表面の中で、連続している表面をオブジェクトの輪郭形状として抽出する処理を実施する。なお、輪郭形状抽出部5は輪郭形状抽出手段を構成している。
遮蔽判定処理部6は表面ポリゴン抽出部3により抽出されたポリゴン毎に、当該ポリゴンの面が輪郭形状抽出部5により抽出された輪郭形状に遮蔽されているか否かを判定する処理を実施する。なお、遮蔽判定処理部6は遮蔽判定手段を構成している。
The contour shape extraction unit 5 extracts a continuous surface as the contour shape of the object among the surfaces of the objects formed by one or more polygons projected and converted onto a two-dimensional plane by the projection conversion processing unit 4. Perform the process. Note that the contour shape extraction unit 5 constitutes a contour shape extraction means.
For each polygon extracted by the surface polygon extraction unit 3, the shielding determination processing unit 6 performs a process for determining whether or not the surface of the polygon is shielded by the contour shape extracted by the contour shape extraction unit 5. The shielding determination processing unit 6 constitutes a shielding determination unit.

ポリゴン形状出力部7は遮蔽判定処理部6によりポリゴンの面が輪郭形状により遮蔽されていないと判定された場合、そのポリゴンの形状を出力し、遮蔽判定処理部6によりポリゴンの面の一部が輪郭形状により遮蔽されていると判定された場合、そのポリゴンの面と輪郭形状間で図形ブーリアン演算を実施することで、その輪郭形状に遮蔽されている面が除かれているポリゴンを生成して、そのポリゴンの形状を出力する処理を実施する。なお、ポリゴン形状出力部7はポリゴン形状出力手段を構成している。   When the shielding determination processing unit 6 determines that the polygon surface is not blocked by the contour shape, the polygon shape output unit 7 outputs the polygon shape, and the shielding determination processing unit 6 outputs a part of the polygon surface. If it is determined that the shape is occluded by the contour shape, a polygon is calculated between the surface of the polygon and the contour shape to generate a polygon that excludes the surface shielded by the contour shape. Then, a process for outputting the shape of the polygon is performed. The polygon shape output unit 7 constitutes a polygon shape output means.

図1の例では、図形処理装置の構成要素である視点受付部1、データ記憶部2、表面ポリゴン抽出部3、投影変換処理部4、輪郭形状抽出部5、遮蔽判定処理部6及びポリゴン形状出力部7のそれぞれが専用のハードウェア(例えば、CPUを実装している半導体集積回路、あるいは、ワンチップマイコンなど)で構成されているものを想定しているが、図形処理装置がコンピュータで構成される場合、視点受付部1、データ記憶部2、表面ポリゴン抽出部3、投影変換処理部4、輪郭形状抽出部5、遮蔽判定処理部6及びポリゴン形状出力部7の処理内容を記述しているプログラムをコンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにしてもよい。   In the example of FIG. 1, a viewpoint receiving unit 1, a data storage unit 2, a surface polygon extraction unit 3, a projection conversion processing unit 4, a contour shape extraction unit 5, an occlusion determination processing unit 6, and a polygon shape, which are components of the graphic processing device. Although each of the output units 7 is assumed to be configured with dedicated hardware (for example, a semiconductor integrated circuit on which a CPU is mounted or a one-chip microcomputer), the graphic processing device is configured with a computer. When processing, the processing contents of the viewpoint receiving unit 1, the data storage unit 2, the surface polygon extraction unit 3, the projection conversion processing unit 4, the contour shape extraction unit 5, the occlusion determination processing unit 6 and the polygon shape output unit 7 are described. May be stored in the memory of a computer, and the CPU of the computer may execute the program stored in the memory.

図2はこの発明の実施の形態1による図形処理装置を構成しているコンピュータを示す構成図である。
図2において、アプリケーションメモリ11はコンピュータに内蔵されているRAMやハードディスクなどの記録媒体であり、図形処理装置の構成要素である視点受付部1、データ記憶部2、表面ポリゴン抽出部3、投影変換処理部4、輪郭形状抽出部5、遮蔽判定処理部6及びポリゴン形状出力部7の処理内容を記述しているプログラムであるアプリケーションを格納している。
システムメモリ12は演算プロセッサ13に実行される命令コードや、3次元形状のオブジェクトを構成している複数のポリゴンのデータなどを保持しているRAMやハードディスクなどの記録媒体である。
2 is a block diagram showing a computer constituting the graphic processing apparatus according to Embodiment 1 of the present invention.
In FIG. 2, an application memory 11 is a recording medium such as a RAM or a hard disk built in the computer, and includes a viewpoint receiving unit 1, a data storage unit 2, a surface polygon extraction unit 3, a projection conversion, which are components of the graphic processing apparatus. An application which is a program describing the processing contents of the processing unit 4, the contour shape extraction unit 5, the shielding determination processing unit 6, and the polygon shape output unit 7 is stored.
The system memory 12 is a recording medium such as a RAM or a hard disk that holds instruction codes executed by the arithmetic processor 13 and data of a plurality of polygons constituting a three-dimensional object.

演算プロセッサ13は例えばCPUなどから構成されており、システムメモリ12に保持されている命令コードを参照しながら、アプリケーションメモリ11に格納されているアプリケーションを実行する。
なお、演算プロセッサ13には、OSなどが実装されており、このOS上で、アプリケーションメモリ11に格納されているアプリケーションやタスクが動作することで、3次元形状オブジェクトの見える部分を構成しているポリゴンだけを正確に抽出する処理を実施する。
図3はこの発明の実施の形態1による図形処理装置の処理内容を示すフローチャートである。
The arithmetic processor 13 is composed of a CPU, for example, and executes an application stored in the application memory 11 while referring to an instruction code held in the system memory 12.
Note that an OS or the like is mounted on the arithmetic processor 13, and an application or task stored in the application memory 11 operates on the OS to configure a portion where the three-dimensional shape object can be seen. A process for accurately extracting only polygons is performed.
FIG. 3 is a flowchart showing the processing contents of the graphic processing apparatus according to Embodiment 1 of the present invention.

次に動作について説明する。
ここでは、説明の便宜上、複数のポリゴンで構成されている3次元形状のオブジェクトが、図4に示すように、頂点A,B,C,D,E,F,G,H,I,J,Kを有する物体Aであるものとする。
この3次元形状のオブジェクトは、XZ平面における断面が図4のような形状を有している。
この3次元形状のオブジェクトのY軸は図4の奥行き方向であり、図4の○印の位置が視点であるとすると、その視点から3次元形状のオブジェクトを見た場合、図4の太線で表されている面が見える面になり、細線で表されている面が見えない面になる。
Next, the operation will be described.
Here, for convenience of explanation, an object having a three-dimensional shape composed of a plurality of polygons is represented by vertices A, B, C, D, E, F, G, H, I, J, It is assumed that the object A has K.
This three-dimensional object has a cross section in the XZ plane as shown in FIG.
The Y axis of this three-dimensional object is in the depth direction of FIG. 4. If the position of the circle in FIG. 4 is the viewpoint, when the three-dimensional object is viewed from that viewpoint, the thick line in FIG. The surface represented is visible and the surface represented by the thin line is invisible.

視点受付部1は、3次元形状のオブジェクトを見る視点の位置を受け付けて、その視点の位置を示す位置情報を表面ポリゴン抽出部3に出力する。
表面ポリゴン抽出部3は、視点受付部1から位置情報を受けると、データ記憶部2により記憶されている3次元形状のオブジェクトを構成している複数のポリゴンのデータを取得する。
表面ポリゴン抽出部3は、視点受付部1から出力された位置情報が示す視点の位置から、3次元形状のオブジェクトを見たときに、そのオブジェクトの表面を構成している1以上のポリゴンを抽出する(ステップST1)。
The viewpoint receiving unit 1 receives the position of the viewpoint for viewing the three-dimensional object, and outputs position information indicating the position of the viewpoint to the surface polygon extraction unit 3.
When the surface polygon extraction unit 3 receives the position information from the viewpoint reception unit 1, the surface polygon extraction unit 3 acquires data of a plurality of polygons constituting the three-dimensional shape object stored in the data storage unit 2.
The surface polygon extraction unit 3 extracts one or more polygons constituting the surface of the object when the object of the three-dimensional shape is viewed from the viewpoint position indicated by the position information output from the viewpoint reception unit 1 (Step ST1).

表面を構成しているポリゴンの抽出方法としては、次のような方法を用いることができる。
ポリゴン面の法線が定義されている場合は(例えば、法線ベクトルが、X軸を起点にして、Z軸に平行な方向である場合)、他の面にぶつかることなく、法線ベクトルがあたる面は3次元形状のオブジェクトの表面であり、他の面にぶつかってから、法線ベクトルがあたる面は3次元形状のオブジェクトの裏面であると判断すれば、3次元形状のオブジェクトの表面を構成しているポリゴンを抽出することができる。
一方、ポリゴン面の法線が定義されていない場合は、3次元形状のオブジェクトの形成時に決められた頂点の並び順と表裏の関係を考慮して、3次元形状のオブジェクトの面が表面であるか否かを判定すれば、3次元形状のオブジェクトの表面を構成しているポリゴンを抽出することができる。
The following method can be used as a method for extracting the polygon constituting the surface.
When the normal of the polygonal surface is defined (for example, when the normal vector is in the direction parallel to the Z-axis starting from the X-axis), the normal vector does not collide with other surfaces. If the surface is the surface of a 3D shape object and hits another surface, then the surface hit by the normal vector is determined to be the back surface of the 3D shape object, the surface of the 3D shape object is Constructing polygons can be extracted.
On the other hand, when the normal of the polygonal surface is not defined, the surface of the 3D-shaped object is the surface in consideration of the relationship between the top and bottom of the vertex order determined when the 3D-shaped object is formed If it is determined whether or not, the polygons constituting the surface of the three-dimensional object can be extracted.

図4の例では、頂点F−頂点G、頂点H−頂点I、頂点J−頂点K、頂点K−頂点Aの間のポリゴンの面が3次元形状のオブジェクトの裏面と判定されて削除され、他の頂点間のポリゴンの面が3次元形状のオブジェクトの表面として抽出される。
即ち、頂点A−頂点B−頂点C−頂点D−頂点E−頂点F、頂点G−頂点H、頂点I−頂点Jの間のポリゴンの面が3次元形状のオブジェクトの表面として抽出される。
In the example of FIG. 4, the surface of the polygon between vertex F-vertex G, vertex H-vertex I, vertex J-vertex K, vertex K-vertex A is determined to be the back surface of the three-dimensional object, and is deleted. The surface of the polygon between the other vertices is extracted as the surface of the three-dimensional object.
That is, the surface of the polygon between vertex A-vertex B-vertex C-vertex D-vertex E-vertex F, vertex G-vertex H, vertex I-vertex J is extracted as the surface of the three-dimensional object.

投影変換処理部4は、表面ポリゴン抽出部3が3次元形状のオブジェクトの表面を構成している1以上のポリゴンを抽出すると、それらのポリゴンを2次元平面上に投影変換する(ステップST2)。
ポリゴンを2次元平面上に投影変換する方法としては、一般的に、ポリゴンを平行投影変換する方法や、ポリゴンを透視投影変換する方法などが考えられる。
ポリゴンを平行投影変換する場合、ポリゴンデータの奥行き情報を切り捨てる作業を実施することになる。例えば、図4に示す視点からZ軸方向を見る場合において、Z軸と垂直な面への投影であれば、Z座標の情報を切り捨てることになる。
一方、ポリゴンを透視投影変換する場合、ポリゴンのX座標及びY座標をZ座標で割り算することで変換することができる。
When the surface polygon extraction unit 3 extracts one or more polygons constituting the surface of the object having a three-dimensional shape, the projection conversion processing unit 4 projects and converts these polygons onto a two-dimensional plane (step ST2).
As a method of projecting and converting a polygon onto a two-dimensional plane, generally, a method of performing parallel projection conversion of a polygon, a method of performing perspective projection conversion of a polygon, or the like can be considered.
In the case of parallel projection conversion of a polygon, an operation of truncating the depth information of the polygon data is performed. For example, when viewing the Z-axis direction from the viewpoint shown in FIG. 4, if the projection is on a plane perpendicular to the Z-axis, information on the Z coordinate is discarded.
On the other hand, when performing perspective projection conversion of a polygon, the polygon can be converted by dividing the X coordinate and Y coordinate of the polygon by the Z coordinate.

ここで、図5はポリゴンを平行投影変換することで、ポリゴンが2次元平面上に投影変換された例を示す説明図である。
ポリゴンが平行投影変換されている場合、ポリゴンデータの奥行き情報がなくなっているが、図5の例では、仮想的に奥行きの順番で並べられている。
Here, FIG. 5 is an explanatory diagram showing an example in which a polygon is projected and converted onto a two-dimensional plane by performing parallel projection conversion on the polygon.
When polygons are subjected to parallel projection conversion, the depth information of the polygon data is lost, but in the example of FIG. 5, they are virtually arranged in the depth order.

輪郭形状抽出部5は、投影変換処理部4が1以上のポリゴンを2次元平面上に投影変換すると、それらのポリゴンが構成しているオブジェクトの表面の中で、連続している表面をオブジェクトの輪郭形状として抽出する(ステップST3)。
例えば、投影変換処理部4により投影変換された1以上のポリゴンの面が、頂点A−頂点B−頂点C−頂点D−頂点E−頂点Fの間のポリゴンの面であれば、最初に、頂点A−頂点Bのポリゴンと、頂点Bの位置の辺を共有している隣接のポリゴンである頂点B−頂点Cのポリゴンを調べることで、頂点A−頂点B−頂点Cからなる面は、連続している表面であると認識する。
次に、頂点B−頂点Cのポリゴンと、頂点Cの位置の辺を共有している隣接のポリゴンである頂点C−頂点Dのポリゴンを調べることで、頂点A−頂点B−頂点C−頂点Dからなる面は、連続している表面であると認識する。
次に、頂点C−頂点Dのポリゴンと、頂点Dの位置の辺を共有している隣接のポリゴンである頂点D−頂点Eのポリゴンを調べることで、頂点A−頂点B−頂点C−頂点D−頂点Eからなる面は、連続している表面であると認識する。
最後に、頂点D−頂点Eのポリゴンと、頂点Eの位置の辺を共有している隣接のポリゴンである頂点E−頂点Fのポリゴンを調べることで、頂点A−頂点B−頂点C−頂点D−頂点E−頂点Fからなる面は、連続している表面であると認識する。
これにより、図5の例では、頂点A−頂点B−頂点C−頂点D−頂点E−頂点Fからなる面を輪郭形状(1)として抽出する。
When the projection conversion processing unit 4 projects and converts one or more polygons onto a two-dimensional plane, the contour shape extraction unit 5 converts the continuous surfaces of the objects formed by those polygons to the object's surface. Extract as a contour shape (step ST3).
For example, if one or more polygon surfaces projected and converted by the projection conversion processing unit 4 are polygon surfaces between the vertex A, the vertex B, the vertex C, the vertex D, the vertex E, and the vertex F, first, By examining the polygon of vertex A-vertex B and the polygon of vertex B-vertex C, which is an adjacent polygon sharing the side of the position of vertex B, the surface consisting of vertex A-vertex B-vertex C is Recognize that the surface is continuous.
Next, by checking the polygon of vertex B-vertex C and the polygon of vertex C-vertex D, which is an adjacent polygon sharing the side of the position of vertex C, vertex A-vertex B-vertex C-vertex The surface consisting of D is recognized as a continuous surface.
Next, by examining the polygon of vertex C-vertex D and the polygon of vertex D-vertex E, which is an adjacent polygon sharing the side of the position of vertex D, vertex A-vertex B-vertex C-vertex The surface formed by D-vertex E is recognized as a continuous surface.
Finally, by examining the polygon of vertex D-vertex E and the polygon of vertex E-vertex F, which is an adjacent polygon sharing the side of the position of vertex E, vertex A-vertex B-vertex C-vertex The surface formed by D-vertex E-vertex F is recognized as a continuous surface.
Thereby, in the example of FIG. 5, the surface which consists of the vertex A-vertex B-vertex C-vertex D-vertex E-vertex F is extracted as outline shape (1).

投影変換処理部4により投影変換されたポリゴンの面が、頂点G−頂点Hの間のポリゴンの面であれば、頂点G−頂点Hのポリゴンと、頂点Hの位置の辺を共有している3次元形状のオブジェクトの表面であるポリゴンがなく(頂点H−頂点Iのポリゴンは、頂点Hの位置の辺を共有しているが、3次元形状のオブジェクトの裏面であるため除外される)、また、頂点G−頂点Hのポリゴンと、頂点Gの位置の辺を共有している3次元形状のオブジェクトの表面であるポリゴンがないので(頂点F−頂点Gのポリゴンは、頂点Gの位置の辺を共有しているが、3次元形状のオブジェクトの裏面であるため除外される)、図5の例では、頂点G−頂点Hからなる面を輪郭形状(2)として抽出する。   If the polygon plane projected and converted by the projection conversion processing unit 4 is a polygon plane between the vertex G and the vertex H, the side of the vertex H is shared with the polygon of the vertex G and the vertex H. There is no polygon that is the surface of the three-dimensional object (the vertex H-vertex I polygon shares the side at the position of the vertex H, but is excluded because it is the back surface of the three-dimensional object) Further, since there is no polygon which is the surface of the object of the three-dimensional shape sharing the side of the position of the vertex G with the polygon of the vertex G-vertex H (the polygon of the vertex F-vertex G is the position of the vertex G In the example of FIG. 5, the surface composed of the vertex G and the vertex H is extracted as the contour shape (2).

投影変換処理部4により投影変換されたポリゴンの面が、頂点I−頂点Jの間のポリゴンの面であれば、頂点I−頂点Jのポリゴンと、頂点Iの位置の辺を共有しているオブジェクトの表面であるポリゴンがなく(頂点H−頂点Iのポリゴンは、頂点Iの位置の辺を共有しているが、オブジェクトの裏面であるため除外される)、また、頂点I−頂点Jのポリゴンと、頂点Jの位置の辺を共有しているオブジェクトの表面であるポリゴンがないので(頂点K−頂点Jのポリゴンは、頂点Jの位置の辺を共有しているが、オブジェクトの裏面であるため除外される)、図5の例では、頂点I−頂点Jからなる面を輪郭形状(3)として抽出する。   If the polygon plane projected and converted by the projection conversion processing unit 4 is a polygon plane between the vertex I and the vertex J, the polygon at the vertex I and the vertex I share the side of the vertex I. There is no polygon that is the surface of the object (the polygon of vertex H-vertex I shares the edge at the position of vertex I, but is excluded because it is the back side of the object), and the vertex I-vertex J Since there is no polygon that is the surface of the object sharing the side of the position of the vertex J with the polygon (the vertex K-the polygon of the vertex J shares the side of the position of the vertex J, In the example of FIG. 5, the surface composed of vertex I-vertex J is extracted as the contour shape (3).

遮蔽判定処理部6は、輪郭形状抽出部5がオブジェクトの輪郭形状(1)(2)(3)を抽出すると、表面ポリゴン抽出部3により抽出されたポリゴン毎に、当該ポリゴンの面と輪郭形状抽出部5により抽出された輪郭形状(1)(2)(3)間の遮蔽関係を検証する(ステップST4)。
遮蔽判定処理部6は、当該ポリゴンの面と輪郭形状(1)(2)(3)間の遮蔽関係を検証することで、当該ポリゴンの面の一部が輪郭形状(1)(2)(3)に遮蔽されているか、当該ポリゴンの面が輪郭形状(1)(2)(3)に遮蔽されていないか(または、当該ポリゴンの面が輪郭形状(1)(2)(3)と同一面であるのか)、当該ポリゴンの面が輪郭形状(1)(2)(3)に完全に遮蔽されているかを判別する(ステップST5,ST6)。
When the contour shape extraction unit 5 extracts the contour shapes (1), (2), and (3) of the object, the occlusion determination processing unit 6 extracts the surface of the polygon and the contour shape for each polygon extracted by the surface polygon extraction unit 3. The shielding relationship between the contour shapes (1), (2), and (3) extracted by the extraction unit 5 is verified (step ST4).
The shielding determination processing unit 6 verifies the shielding relationship between the polygon surface and the contour shapes (1), (2), and (3), so that a part of the polygon surface is the contour shape (1) (2) ( 3) or whether the polygon surface is not shielded by the contour shapes (1), (2), and (3) (or the polygon surfaces are contour shapes (1), (2), and (3)). It is determined whether the surfaces of the polygons are completely shielded by the contour shapes (1), (2), and (3) (steps ST5 and ST6).

具体的には、以下の通りである
最初に、遮蔽判定処理部6は、オブジェクトの表面を構成しているポリゴンの中で、頂点A−頂点Bのポリゴンの面と、輪郭形状(1)の間の遮蔽関係を検証する(ステップST4)。
頂点A−頂点Bのポリゴンの面と輪郭形状(1)は同一面であるため、頂点A−頂点Bのポリゴンの面が輪郭形状(1)に遮蔽されていないと判別され(ステップST5,ST6)、遮蔽関係の検証対象が輪郭形状(2)に変更される(ステップST8,ST9)。
Specifically, first, the occlusion determination processing unit 6 includes the surface of the polygon of vertex A-vertex B and the contour shape (1) among the polygons constituting the surface of the object. The shielding relationship between them is verified (step ST4).
Since the vertex A-vertex B polygon surface and the contour shape (1) are the same surface, it is determined that the vertex A-vertex B polygon surface is not shielded by the contour shape (1) (steps ST5, ST6). ) The verification target of the shielding relationship is changed to the contour shape (2) (steps ST8 and ST9).

これにより、遮蔽判定処理部6は、頂点A−頂点Bのポリゴンの面と、輪郭形状(2)の間の遮蔽関係を検証する(ステップST4)。
輪郭形状(2)は頂点A−頂点Bのポリゴンの面の奥側に存在しているため、頂点A−頂点Bのポリゴンの面は、輪郭形状(2)に遮蔽されていないと判別され(ステップST5,ST6)、遮蔽関係の検証対象が輪郭形状(3)に変更される(ステップST8,ST9)。
これにより、遮蔽判定処理部6は、頂点A−頂点Bのポリゴンの面と、輪郭形状(3)の間の遮蔽関係を検証する(ステップST4)。
輪郭形状(3)は頂点A−頂点Bのポリゴンの面の奥側に存在しているため、頂点A−頂点Bのポリゴンの面は、輪郭形状(3)に遮蔽されていないと判別される(ステップST5,ST6)。
Thereby, the shielding determination processing unit 6 verifies the shielding relationship between the surface of the polygon of vertex A-vertex B and the contour shape (2) (step ST4).
Since the contour shape (2) exists on the far side of the polygonal surface of vertex A-vertex B, it is determined that the polygonal surface of vertex A-vertex B is not shielded by the contour shape (2) ( In steps ST5 and ST6), the verification target of the shielding relationship is changed to the contour shape (3) (steps ST8 and ST9).
Thereby, the shielding determination processing unit 6 verifies the shielding relationship between the polygonal surface of vertex A-vertex B and the contour shape (3) (step ST4).
Since the contour shape (3) exists on the far side of the polygonal surface of vertex A-vertex B, it is determined that the polygonal surface of vertex A-vertex B is not shielded by the contour shape (3). (Steps ST5 and ST6).

図5の例では、この段階で、全ての輪郭形状が遮蔽関係の検証対象にされているので(ステップST8,ST9)、頂点A−頂点Bのポリゴンの面に対する遮蔽関係の検証処理を終了する。
以上より、遮蔽判定処理部6によって、頂点A−頂点Bのポリゴンの面が、輪郭形状(1)(2)(3)に遮蔽されていないと判別されているので、ポリゴン形状出力部7が、頂点A−頂点Bのポリゴンの形状を出力する(ステップST10)。
In the example of FIG. 5, at this stage, all the contour shapes have been subjected to the shielding relation verification target (steps ST8 and ST9), and thus the shielding relation verification processing for the polygonal surfaces of vertex A-vertex B is completed. .
As described above, since the shielding determination processing unit 6 determines that the polygonal surfaces of the vertex A and the vertex B are not shielded by the contour shapes (1), (2), and (3), the polygon shape output unit 7 Then, the polygon shape of vertex A-vertex B is output (step ST10).

次に、遮蔽判定処理部6は、オブジェクトの表面を構成しているポリゴンの中で、頂点B−頂点Cのポリゴンの面を遮蔽関係の検証対象に選択し(ステップST11,ST12)、頂点B−頂点Cのポリゴンの面と、輪郭形状(1)の間の遮蔽関係を検証する(ステップST4)。
頂点B−頂点Cのポリゴンの面と輪郭形状(1)は同一面であるため、頂点B−頂点Cのポリゴンの面が輪郭形状(1)に遮蔽されていないと判別され(ステップST5,ST6)、遮蔽関係の検証対象が輪郭形状(2)に変更される(ステップST8,ST9)。
Next, the occlusion determination processing unit 6 selects the surface of the vertex B-vertex C polygon as the occlusion relation verification target among the polygons constituting the surface of the object (steps ST11 and ST12). -The shielding relation between the polygonal surface of the vertex C and the contour shape (1) is verified (step ST4).
Since the polygonal surface of vertex B-vertex C and the contour shape (1) are the same surface, it is determined that the polygonal surface of vertex B-vertex C is not shielded by the contour shape (1) (steps ST5, ST6). ) The verification target of the shielding relationship is changed to the contour shape (2) (steps ST8 and ST9).

これにより、遮蔽判定処理部6は、頂点B−頂点Cのポリゴンの面と、輪郭形状(2)の間の遮蔽関係を検証する(ステップST4)。
輪郭形状(2)は頂点B−頂点Cのポリゴンの面の奥側に存在しているため、頂点B−頂点Cのポリゴンの面は、輪郭形状(2)に遮蔽されていないと判別され(ステップST5,ST6)、遮蔽関係の検証対象が輪郭形状(3)に変更される(ステップST8,ST9)。
これにより、遮蔽判定処理部6は、頂点B−頂点Cのポリゴンの面と、輪郭形状(3)の間の遮蔽関係を検証する(ステップST4)。
輪郭形状(3)は頂点B−頂点Cのポリゴンの面の奥側に存在しているため、頂点B−頂点Cのポリゴンの面は、輪郭形状(3)に遮蔽されていないと判別される(ステップST5,ST6)。
Thereby, the shielding determination processing unit 6 verifies the shielding relationship between the polygonal surface of vertex B-vertex C and the contour shape (2) (step ST4).
Since the contour shape (2) exists on the back side of the polygonal surface of vertex B-vertex C, it is determined that the polygonal surface of vertex B-vertex C is not shielded by the contour shape (2) ( In steps ST5 and ST6), the verification target of the shielding relationship is changed to the contour shape (3) (steps ST8 and ST9).
Thereby, the shielding determination processing unit 6 verifies the shielding relationship between the polygonal surface of vertex B-vertex C and the contour shape (3) (step ST4).
Since the contour shape (3) exists behind the polygonal surface of vertex B-vertex C, it is determined that the polygonal surface of vertex B-vertex C is not shielded by the contour shape (3). (Steps ST5 and ST6).

図5の例では、この段階で、全ての輪郭形状が遮蔽関係の検証対象にされているので(ステップST8,ST9)、頂点B−頂点Cのポリゴンの面に対する遮蔽関係の検証処理を終了する。
以上より、遮蔽判定処理部6によって、頂点B−頂点Cのポリゴンの面が、輪郭形状(1)(2)(3)に遮蔽されていないと判別されているので、ポリゴン形状出力部7が、頂点B−頂点Cのポリゴンの形状を出力する(ステップST10)。
In the example of FIG. 5, at this stage, all the contour shapes are targeted for the shielding relation verification (steps ST8 and ST9), and thus the shielding relation verification processing for the polygonal surfaces of vertex B-vertex C is completed. .
As described above, since it is determined by the shielding determination processing unit 6 that the polygonal surface of the vertex B-vertex C is not shielded by the contour shapes (1), (2), and (3), the polygon shape output unit 7 , The polygonal shape of vertex B-vertex C is output (step ST10).

3次元形状オブジェクトの表面を構成しているポリゴンの中で、頂点C−頂点Dのポリゴンの面、頂点D−頂点Eのポリゴンの面、頂点E−頂点Fのポリゴンの面についても、頂点A−頂点Bのポリゴンの面や、頂点B−頂点Cのポリゴンの面と同様に検証される。
頂点C−頂点Dのポリゴンの面、頂点D−頂点Eのポリゴンの面、頂点E−頂点Fのポリゴンの面についても、輪郭形状(1)(2)(3)によって遮蔽されていないと判別されるので、ポリゴン形状出力部7が、頂点C−頂点Dのポリゴンの形状、頂点D−頂点Eのポリゴンの形状、頂点E−頂点Fのポリゴンの形状を出力する(ステップST10)。
Among the polygons constituting the surface of the three-dimensional shape object, the vertex A-vertex D polygon surface, the vertex D-vertex E polygon surface, and the vertex E-vertex F polygon surface also apply to the vertex A. Verification is performed in the same manner as the polygonal surface of vertex B and the polygonal surface of vertex B-vertex C.
It is determined that the polygonal surface of vertex C-vertex D, the surface of vertex D-polygon of vertex E, and the surface of polygon of vertex E-vertex E are not shielded by the contour shapes (1), (2), and (3). Thus, the polygon shape output unit 7 outputs the shape of the vertex C-vertex D polygon, the shape of the vertex D-vertex E polygon, and the shape of the vertex E-vertex F polygon (step ST10).

次に、遮蔽判定処理部6は、3次元形状オブジェクトの表面を構成しているポリゴンの中で、頂点G−頂点Hのポリゴンの面を遮蔽関係の検証対象に選択し(ステップST11,ST12)、頂点G−頂点Hのポリゴンの面と、輪郭形状(1)の間の遮蔽関係を検証する(ステップST4)。
輪郭形状(1)は頂点G−頂点Hのポリゴンの面の手前側に存在しており、頂点G−頂点Hのポリゴンの面の一部が輪郭形状(1)に遮蔽されていると判別される(ステップST5)。
Next, the shielding determination processing unit 6 selects the polygonal surface of the vertex G-vertex H among the polygons constituting the surface of the three-dimensional shape object as a shielding relation verification target (steps ST11 and ST12). The shielding relationship between the polygonal surface of vertex G-vertex H and the contour shape (1) is verified (step ST4).
The contour shape (1) exists on the near side of the polygonal surface of the vertex G-vertex H, and it is determined that a part of the polygonal surface of the vertex G-vertex H is shielded by the contour shape (1). (Step ST5).

ポリゴン形状出力部7は、遮蔽判定処理部6により頂点G−頂点Hのポリゴンの面の一部が輪郭形状(1)に遮蔽されていると判別されると、頂点G−頂点Hのポリゴンの面と輪郭形状(1)の間で図形ブーリアン演算を実施することで、その輪郭形状(1)に遮蔽されている面が除かれているポリゴンを生成する(ステップST7)。
即ち、ポリゴン形状出力部7は、図形ブーリアン演算として、頂点G−頂点Hのポリゴンの面と輪郭形状(1)の間の差分演算を実施することで、図6に示すように、新たな頂点GHを算出して、頂点GH−頂点Hのポリゴンを生成する。
図形ブーリアン演算の演算方法としては、既存のブーリアン演算方法を適用することができる。例えば、「General Polygon Clipper(GPC)」と呼ばれるライブラリなどを使用することができる。
When the shielding determination processing unit 6 determines that a part of the polygonal surface of the vertex G-vertex H is shielded by the contour shape (1), the polygon shape output unit 7 By performing a graphic boolean operation between the surface and the contour shape (1), a polygon from which the surface shielded by the contour shape (1) is removed is generated (step ST7).
That is, the polygon shape output unit 7 performs a difference calculation between the polygonal surface of the vertex G-vertex H and the contour shape (1) as a graphic boolean operation, thereby creating a new vertex as shown in FIG. GH is calculated and a polygon of vertex GH−vertex H is generated.
An existing Boolean calculation method can be applied as the calculation method of the figure Boolean calculation. For example, a library called “General Polygon Clipper (GPC)” can be used.

ポリゴン形状出力部7は、頂点GH−頂点Hのポリゴンを生成すると、そのポリゴンの形状を出力する(ステップST10)。
ただし、最終的には、頂点GH−頂点Hのポリゴンから3次元形状のオブジェクトを生成するため、新たに算出した頂点GHの奥行き情報を計算する必要がある。
新たに算出した頂点GHは、頂点G−頂点Hのポリゴンの上に存在しているため、ポリゴン形状出力部7は、頂点G−頂点Hのポリゴンの3次元空間の平面方程式を用いて、頂点GHにおける3次元空間内の奥行き情報を計算し、3次元空間のデータに復元する。
After generating the polygon of vertex GH-vertex H, polygon shape output unit 7 outputs the shape of the polygon (step ST10).
However, in the end, since a three-dimensional object is generated from the vertex GH−vertex H polygon, it is necessary to calculate the depth information of the newly calculated vertex GH.
Since the newly calculated vertex GH exists on the vertex G-vertex H polygon, the polygon shape output unit 7 uses the plane equation in the three-dimensional space of the vertex G-vertex H polygon to Depth information in the three-dimensional space in the GH is calculated and restored to data in the three-dimensional space.

なお、遮蔽判定処理部6は、上記のようにして、頂点G−頂点Hのポリゴンの面と輪郭形状(1)の間で遮蔽関係を検証すると、遮蔽関係の検証対象を輪郭形状(2)に変更して(ステップST8,ST9)、頂点G−頂点Hのポリゴンの面と輪郭形状(2)の間で遮蔽関係を検証する。
このとき、輪郭形状(2)は、頂点G−頂点Hのポリゴンの面の一部を遮蔽しているが、頂点GH−頂点Hのポリゴンの面は、輪郭形状(2)に遮蔽されていないので、ポリゴン形状出力部7による図形ブーリアン演算は行われない。
When the shielding determination processing unit 6 verifies the shielding relationship between the polygonal surface of the vertex G-vertex H and the contour shape (1) as described above, the shielding relationship verification target is the contour shape (2). (Steps ST8 and ST9), and the shielding relation is verified between the polygonal surface of vertex G-vertex H and the contour shape (2).
At this time, the contour shape (2) shields a part of the polygonal surface of the vertex G-vertex H, but the polygonal surface of the vertex GH-vertex H is not shielded by the contour shape (2). Therefore, the graphic boolean calculation by the polygon shape output unit 7 is not performed.

また、遮蔽判定処理部6は、遮蔽関係の検証対象を輪郭形状(3)に変更して(ステップST8,ST9)、頂点G−頂点Hのポリゴンの面と輪郭形状(3)の間で遮蔽関係を検証する。
このとき、輪郭形状(3)は、頂点G−頂点Hのポリゴンの面と同一面であるため、ポリゴン形状出力部7による図形ブーリアン演算は行われない。
したがって、頂点G−頂点Hのポリゴンの面が遮蔽関係の検証対象である場合、ポリゴン形状出力部7から出力されるポリゴンの形状は、頂点GH−頂点Hのポリゴンの形状のみとなる。
In addition, the shielding determination processing unit 6 changes the shielding relationship verification target to the contour shape (3) (steps ST8 and ST9) and shields between the polygonal surface of the vertex G-vertex H and the contour shape (3). Verify the relationship.
At this time, since the contour shape (3) is the same surface as the polygonal surface of the vertex G-vertex H, the figure Boolean calculation by the polygon shape output unit 7 is not performed.
Therefore, when the surface of the polygon of vertex G-vertex H is the object to be verified for the shielding relationship, the polygon shape output from the polygon shape output unit 7 is only the shape of the polygon of vertex GH-vertex H.

次に、遮蔽判定処理部6は、3次元形状オブジェクトの表面を構成しているポリゴンの中で、頂点I−頂点Jのポリゴンの面を遮蔽関係の検証対象に選択し(ステップST11,ST12)、頂点I−頂点Jのポリゴンの面と、輪郭形状(1)の間の遮蔽関係を検証する(ステップST4)。
輪郭形状(1)は頂点I−頂点Jのポリゴンの面の手前側に存在しており、頂点I−頂点Jのポリゴンの面の一部が輪郭形状(1)に遮蔽されていると判別される(ステップST5)。
Next, the shielding determination processing unit 6 selects the polygonal surface of vertex I-vertex J among the polygons constituting the surface of the three-dimensional shape object as a shielding relation verification target (steps ST11 and ST12). The shielding relation between the polygonal surface of vertex I-vertex J and the contour shape (1) is verified (step ST4).
The contour shape (1) exists on the near side of the polygon surface of vertex I-vertex J, and it is determined that a part of the polygon surface of vertex I-vertex J is shielded by the contour shape (1). (Step ST5).

ポリゴン形状出力部7は、遮蔽判定処理部6により頂点I−頂点Jのポリゴンの面の一部が輪郭形状(1)に遮蔽されていると判別されると、頂点I−頂点Jのポリゴンの面と輪郭形状(1)の間で図形ブーリアン演算を実施することで、その輪郭形状(1)に遮蔽されている面が除かれているポリゴンを生成する(ステップST7)。
即ち、ポリゴン形状出力部7は、図形ブーリアン演算として、頂点I−頂点Jのポリゴンの面と輪郭形状(1)の間の差分演算を実施することで、図6に示すように、新たな頂点IJを算出して、頂点I−頂点IJのポリゴンを生成する。
When the shielding determination processing unit 6 determines that a part of the polygonal surface of the vertex I-vertex J is shielded by the contour shape (1), the polygon shape output unit 7 By performing a graphic boolean operation between the surface and the contour shape (1), a polygon from which the surface shielded by the contour shape (1) is removed is generated (step ST7).
That is, the polygon shape output unit 7 performs a difference operation between the polygonal surface of the vertex I-vertex J and the contour shape (1) as a graphic boolean operation, thereby creating a new vertex as shown in FIG. IJ is calculated and a polygon of vertex I-vertex IJ is generated.

ポリゴン形状出力部7は、頂点I−頂点IJのポリゴンを生成すると、そのポリゴンの形状を出力する(ステップST10)。
ただし、最終的には、頂点I−頂点IJのポリゴンから3次元形状のオブジェクトを生成するため、新たに算出した頂点IJの奥行き情報を計算する必要がある。
新たに算出した頂点IJは、頂点I−頂点Jのポリゴンの上に存在しているため、ポリゴン形状出力部7は、頂点I−頂点Jのポリゴンの3次元空間の平面方程式を用いて、頂点IJにおける3次元空間内の奥行き情報を計算し、3次元空間のデータに復元する。
After generating the polygon of vertex I-vertex IJ, polygon shape output unit 7 outputs the shape of the polygon (step ST10).
However, finally, since a three-dimensional object is generated from the polygon of vertex I-vertex IJ, it is necessary to calculate the depth information of the newly calculated vertex IJ.
Since the newly calculated vertex IJ exists on the polygon of vertex I-vertex J, the polygon shape output unit 7 uses the plane equation in the three-dimensional space of the polygon of vertex I-vertex J to The depth information in the three-dimensional space in IJ is calculated and restored to the data in the three-dimensional space.

なお、遮蔽判定処理部6は、上記のようにして、頂点I−頂点Jのポリゴンの面と輪郭形状(1)の間で遮蔽関係を検証すると、遮蔽関係の検証対象を輪郭形状(2)に変更して(ステップST8,ST9)、頂点I−頂点Jのポリゴンの面と輪郭形状(2)の間で遮蔽関係を検証する。
このとき、輪郭形状(2)は、頂点I−頂点Jのポリゴンの面と同一面であるため、ポリゴン形状出力部7による図形ブーリアン演算は行われない。
When the shielding determination processing unit 6 verifies the shielding relationship between the polygonal surface of vertex I-vertex J and the contour shape (1) as described above, the shielding relationship verification target is the contour shape (2). (Steps ST8 and ST9), and the shielding relationship is verified between the polygonal surface of vertex I-vertex J and the contour shape (2).
At this time, since the contour shape (2) is the same surface as the polygonal surface of vertex I-vertex J, the graphic Boolean calculation by the polygon shape output unit 7 is not performed.

また、遮蔽判定処理部6は、遮蔽関係の検証対象を輪郭形状(3)に変更して(ステップST8,ST9)、頂点I−頂点Jのポリゴンの面と輪郭形状(3)の間で遮蔽関係を検証する。
このとき、輪郭形状(3)は、頂点I−頂点Jのポリゴンの面の奥側に存在しており、頂点I−頂点Jのポリゴンの面を遮蔽していないので、ポリゴン形状出力部7による図形ブーリアン演算は行われない。
したがって、頂点I−頂点Jのポリゴンの面が遮蔽関係の検証対象である場合、ポリゴン形状出力部7から出力されるポリゴンの形状は、頂点I−頂点IJのポリゴンの形状のみとなる。
In addition, the shielding determination processing unit 6 changes the shielding relationship verification target to the contour shape (3) (steps ST8 and ST9), and shields between the polygonal surface of vertex I-vertex J and the contour shape (3). Verify the relationship.
At this time, the contour shape (3) exists on the back side of the polygon surface of vertex I-vertex J and does not shield the polygon surface of vertex I-vertex J. No figure boolean operation is performed.
Therefore, when the surface of the polygon of vertex I-vertex J is the object to be verified for the shielding relationship, the polygon shape output from the polygon shape output unit 7 is only the shape of the polygon of vertex I-vertex IJ.

これにより、ポリゴン形状出力部7から出力されるポリゴンの形状は下記の通りとなり、一連の処理を終了する(ステップST12)。
頂点A−頂点Bのポリゴンの形状

頂点B−頂点Cのポリゴンの形状

頂点C−頂点Dのポリゴンの形状

頂点D−頂点Eのポリゴンの形状

頂点E−頂点Fのポリゴンの形状

頂点GH−頂点Hのポリゴンの形状

頂点I−頂点IJのポリゴンの形状
As a result, the polygon shape output from the polygon shape output unit 7 is as follows, and the series of processing ends (step ST12).
Vertex shape of vertex A-vertex B

Vertex B-Vertex C polygon shape

Vertex C-Polygon D shape

Vertex D-Vertex E polygon shape

Polygon shape of vertex E-vertex F

Vertex GH-Polygon shape of vertex H

Vertex I-Polygon shape of vertex IJ

以上で明らかなように、この実施の形態1によれば、3次元空間内の視点から、複数のポリゴンで構成されている3次元形状のオブジェクトを見たときに、そのオブジェクトの表面を構成している1以上のポリゴンを抽出する表面ポリゴン抽出部3と、表面ポリゴン抽出部3により抽出された1以上のポリゴンを2次元平面上に投影変換する投影変換処理部4と、投影変換処理部4により2次元平面上に投影変換された1以上のポリゴンが構成しているオブジェクトの表面の中で、連続している表面をオブジェクトの輪郭形状として抽出する輪郭形状抽出部5と、表面ポリゴン抽出部3により抽出されたポリゴン毎に、当該ポリゴンの面が輪郭形状抽出部5により抽出された輪郭形状に遮蔽されているか否かを判定する遮蔽判定処理部6とを設け、ポリゴン形状出力部7が、遮蔽判定処理部6によりポリゴンの面が輪郭形状により遮蔽されていないと判定された場合、そのポリゴンの形状を出力し、遮蔽判定処理部6によりポリゴンの面の一部が輪郭形状により遮蔽されていると判定された場合、そのポリゴンの面と輪郭形状間で図形ブーリアン演算を実施することで、その輪郭形状に遮蔽されている面が除かれているポリゴンを生成して、そのポリゴンの形状を出力するように構成したので、図形ブーリアン演算の演算誤差の発生を抑制して、3次元形状のオブジェクトの見える部分を構成しているポリゴンの形状を正確に抽出することができる効果を奏する。   As is apparent from the above, according to the first embodiment, when an object having a three-dimensional shape composed of a plurality of polygons is viewed from a viewpoint in the three-dimensional space, the surface of the object is formed. A surface polygon extraction unit 3 that extracts one or more polygons, a projection conversion processing unit 4 that projects and converts one or more polygons extracted by the surface polygon extraction unit 3 on a two-dimensional plane, and a projection conversion processing unit 4 A contour shape extraction unit 5 for extracting a continuous surface as the contour shape of the object among the surfaces of the object formed by one or more polygons projected and converted onto the two-dimensional plane by the surface polygon extraction unit A shielding determination processing unit 6 for determining whether or not the surface of the polygon is shielded by the contour shape extracted by the contour shape extraction unit 5 for each polygon extracted by 3; If the polygon shape output unit 7 determines that the polygon surface is not blocked by the contour shape by the shielding determination processing unit 6, the polygon shape output unit 7 outputs the polygon shape, and the shielding determination processing unit 6 outputs the polygon surface. When it is determined that a part is shielded by the contour shape, a polygon with the surface shielded by the contour shape is removed by performing figure boolean operation between the surface of the polygon and the contour shape. Generated and configured to output the shape of the polygon, suppresses the occurrence of calculation errors in figure Boolean operations, and accurately extracts the shape of the polygon that makes up the visible part of the three-dimensional object The effect which can be done is produced.

即ち、この実施の形態1によれば、遮蔽関係の検証対象が、ポリゴンの面×ポリゴンの面ではなく、ポリゴンの面×輪郭形状としているので、遮蔽判定処理部6によりポリゴンの面が輪郭形状により遮蔽されていないと判定された場合、図形ブーリアン演算を実施する必要がない。このため、図形ブーリアン演算を実施する回数を大幅に削減することができるので、図形ブーリアン演算の演算誤差の発生を抑制して、3次元形状のオブジェクトの見える部分を構成しているポリゴンの形状を正確に抽出することができる。   In other words, according to the first embodiment, the object to be shielded is not the polygon surface × polygon surface, but the polygon surface × contour shape. If it is determined that the image is not occluded, there is no need to perform a graphic boolean operation. For this reason, the number of times that the graphic Boolean calculation is performed can be significantly reduced, so that the occurrence of calculation error in the graphic Boolean calculation is suppressed, and the shape of the polygon that forms the visible portion of the three-dimensional object can be reduced. It can be extracted accurately.

実施の形態2.
上記実施の形態1では、輪郭形状抽出部5が1以上のポリゴンが構成しているオブジェクトの表面の中で、連続している表面をオブジェクトの輪郭形状として抽出するものについて示したが、輪郭形状抽出部5が投影変換処理部4により2次元平面上に投影変換された1以上のポリゴンの中で、他のポリゴンと辺を共有しているポリゴンが存在する場合、その辺を削除する処理を順次繰り返すことで、オブジェクトの輪郭形状を抽出するようにしてもよい。
具体的には、以下の通りである。
Embodiment 2. FIG.
In the first embodiment, the contour shape extracting unit 5 extracts the continuous surface as the contour shape of the object among the surfaces of the objects formed by one or more polygons. If there is a polygon that shares an edge with another polygon among one or more polygons that are projected and converted onto a two-dimensional plane by the projection conversion processor 4, the extraction unit 5 deletes the edge. The contour shape of the object may be extracted by repeating it sequentially.
Specifically, it is as follows.

図7はオブジェクトの輪郭形状の抽出例を示す説明図である。
輪郭形状抽出部5は、投影変換処理部4が1以上のポリゴンを2次元平面上に投影変換すると、2次元平面上に投影変換された1以上のポリゴンの中で、他のポリゴンと辺を共有しているポリゴンを検索し、2つのポリゴンが共有している辺を削除して、新たなポリゴンを生成する。
図7の例では、ポリゴン(1)とポリゴン(2)が1つの辺を共有しており、ポリゴン(1)とポリゴン(2)が共有している辺を削除して、新たなポリゴン(12)を生成している。
FIG. 7 is an explanatory diagram showing an example of extracting the contour shape of an object.
When the projection conversion processing unit 4 projects and converts one or more polygons onto a two-dimensional plane, the contour shape extraction unit 5 selects other polygons and sides from the one or more polygons projected and converted onto the two-dimensional plane. A shared polygon is searched, a side shared by two polygons is deleted, and a new polygon is generated.
In the example of FIG. 7, the polygon (1) and the polygon (2) share one side, the side shared by the polygon (1) and the polygon (2) is deleted, and a new polygon (12 ) Is generated.

輪郭形状抽出部5は、新たなポリゴンを生成すると、更に、他のポリゴンと辺を共有しているポリゴンを検索し、2つのポリゴンが共有している辺を削除して、新たなポリゴンを生成する。
新たなポリゴンを生成する処理は、2つのポリゴンが共有している辺がなくなるまで繰り返し実施する。
2つのポリゴンが共有している辺がなくなると、残っているポリゴンの輪郭形状が、オブジェクトの輪郭形状となる。
When the contour shape extraction unit 5 generates a new polygon, it further searches for a polygon that shares a side with another polygon, deletes a side shared by the two polygons, and generates a new polygon. To do.
The process of generating a new polygon is repeated until there is no side shared by the two polygons.
When there is no side shared by the two polygons, the remaining polygon outline shape becomes the object outline shape.

実施の形態3.
図8はこの発明の実施の形態3による図形処理装置を示す構成図であり、図において、図1と同一符号は同一又は相当部分を示すので説明を省略する。
輪郭形状抽出部8は3次元形状のオブジェクトが閉ループで覆われている場合、そのオブジェクトの表面と裏面が共有している辺を検索し、表面と裏面が共有している辺の中で、頂点で結合されている辺を輪郭形状として抽出する処理を実施する。なお、輪郭形状抽出部8は輪郭形状抽出手段を構成している。
Embodiment 3 FIG.
8 is a block diagram showing a graphic processing apparatus according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG.
When a three-dimensional object is covered with a closed loop, the contour shape extraction unit 8 searches for a side shared by the front surface and the back surface of the object, and among the sides shared by the front surface and the back surface, The process which extracts the edge | side couple | bonded by (5) as an outline shape is implemented. Note that the contour shape extraction unit 8 constitutes a contour shape extraction means.

図8の例では、図形処理装置の構成要素である視点受付部1、データ記憶部2、表面ポリゴン抽出部3、遮蔽判定処理部6、ポリゴン形状出力部7及び輪郭形状抽出部8のそれぞれが専用のハードウェア(例えば、CPUを実装している半導体集積回路、あるいは、ワンチップマイコンなど)で構成されているものを想定しているが、図形処理装置がコンピュータで構成される場合、視点受付部1、データ記憶部2、表面ポリゴン抽出部3、遮蔽判定処理部6、ポリゴン形状出力部7及び輪郭形状抽出部8の処理内容を記述しているプログラムをコンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにしてもよい。   In the example of FIG. 8, each of the viewpoint receiving unit 1, the data storage unit 2, the surface polygon extraction unit 3, the occlusion determination processing unit 6, the polygon shape output unit 7, and the contour shape extraction unit 8 which are components of the graphic processing device. It is assumed that it is configured with dedicated hardware (for example, a semiconductor integrated circuit on which a CPU is mounted, or a one-chip microcomputer). A program describing the processing contents of the unit 1, the data storage unit 2, the surface polygon extraction unit 3, the occlusion determination processing unit 6, the polygon shape output unit 7 and the contour shape extraction unit 8 is stored in the memory of the computer. The CPU may execute a program stored in the memory.

次に動作について説明する。
上記実施の形態1では、輪郭形状抽出部5が1以上のポリゴンが構成しているオブジェクトの表面の中で、連続している表面をオブジェクトの輪郭形状として抽出するものについて示したが、3次元形状のオブジェクトが閉ループで覆われている場合、輪郭形状抽出部8が、3次元形状のオブジェクトの表面と裏面が共有している辺を検索し、表面と裏面が共有している辺の中で、頂点で結合されている辺を輪郭形状として抽出するようにしてもよい。
具体的には、以下の通りである。
Next, the operation will be described.
In the first embodiment, the contour shape extraction unit 5 has shown a case where a continuous surface is extracted as the contour shape of an object among the surfaces of objects formed by one or more polygons. When the shape object is covered with a closed loop, the contour shape extraction unit 8 searches for a side shared by the front surface and the back surface of the three-dimensional shape object, and among the sides shared by the front surface and the back surface. The sides connected at the vertices may be extracted as the contour shape.
Specifically, it is as follows.

図9はオブジェクトの輪郭形状の抽出例を示す説明図である。
図9では、3次元形状のオブジェクトが閉ループで覆われている物体形状として、3次元形状のオブジェクトが立方体である例を示している。
3次元形状のオブジェクトが閉ループで覆われている物体形状である場合、3次元形状のオブジェクトの全ての面は結合されており、3次元形状のオブジェクトの輪郭形状は表面と裏面の境界部分になる。
FIG. 9 is an explanatory diagram showing an example of extracting the contour shape of an object.
FIG. 9 shows an example in which a three-dimensional object is a cube as a three-dimensional object covered with a closed loop.
When the 3D object is an object shape covered with a closed loop, all the surfaces of the 3D object are connected, and the outline shape of the 3D object becomes the boundary between the front surface and the back surface. .

図9の例では、ポリゴン(1)、ポリゴン(2)及びポリゴン(3)は、3次元形状のオブジェクトの表面となる。
一方、ポリゴン(4)(ポリゴン(2)の反対側のポリゴン)、ポリゴン(5)(ポリゴン(3)の反対側のポリゴン)及びポリゴン(6)(ポリゴン(1)の反対側のポリゴン)は、3次元形状のオブジェクトの裏面となる。
In the example of FIG. 9, the polygon (1), the polygon (2), and the polygon (3) are the surfaces of a three-dimensional object.
On the other hand, polygon (4) (polygon on the opposite side of polygon (2)), polygon (5) (polygon on the opposite side of polygon (3)) and polygon (6) (polygon on the opposite side of polygon (1)) This is the back surface of the three-dimensional object.

まず、輪郭形状抽出部8は、3次元形状のオブジェクトの裏面であるポリゴン(4)が、辺を共有しているポリゴン(1)、ポリゴン(3)、ポリゴン(5)及びポリゴン(6)を検索し、ポリゴン(1)、ポリゴン(3)、ポリゴン(5)及びポリゴン(6)の中で、3次元形状のオブジェクトの表面であるポリゴンを判別する。この場合、ポリゴン(1)とポリゴン(3)がオブジェクトの表面である。
輪郭形状抽出部8は、ポリゴン(1)とポリゴン(3)が3次元形状のオブジェクトの表面であると判別すると、ポリゴン(4)とポリゴン(1)が共有する辺(1)が、3次元形状のオブジェクトの輪郭形状を形成している辺であると認識する。
また、ポリゴン(4)とポリゴン(3)が共有する辺(2)が、3次元形状のオブジェクトの輪郭形状を形成している辺であると認識する。
First, the contour shape extraction unit 8 selects the polygon (1), polygon (3), polygon (5), and polygon (6) sharing the sides of the polygon (4) that is the back surface of the three-dimensional object. A search is performed to determine a polygon that is the surface of a three-dimensional object among the polygon (1), the polygon (3), the polygon (5), and the polygon (6). In this case, polygon (1) and polygon (3) are the surfaces of the object.
When the contour shape extraction unit 8 determines that the polygon (1) and the polygon (3) are the surfaces of an object having a three-dimensional shape, the side (1) shared by the polygon (4) and the polygon (1) is three-dimensional. It is recognized as a side forming the contour shape of the object having a shape.
Further, the side (2) shared by the polygon (4) and the polygon (3) is recognized as the side forming the contour shape of the three-dimensional object.

次に、輪郭形状抽出部8は、3次元形状のオブジェクトの裏面であるポリゴン(5)が、辺を共有しているポリゴン(1)、ポリゴン(2)、ポリゴン(4)及びポリゴン(6)を検索し、ポリゴン(1)、ポリゴン(2)、ポリゴン(4)及びポリゴン(6)の中で、3次元形状のオブジェクトの表面であるポリゴンを判別する。この場合、ポリゴン(1)とポリゴン(2)がオブジェクトの表面である。
輪郭形状抽出部8は、ポリゴン(1)とポリゴン(2)が3次元形状のオブジェクトの表面であると判別すると、ポリゴン(5)とポリゴン(1)が共有する辺(3)が、3次元形状のオブジェクトの輪郭形状を形成している辺であると認識する。
また、ポリゴン(5)とポリゴン(2)が共有する辺(4)が、3次元形状のオブジェクトの輪郭形状を形成している辺であると認識する。
Next, the contour shape extraction unit 8 has the polygon (5), which is the back surface of the three-dimensional object, sharing the sides with the polygon (1), the polygon (2), the polygon (4), and the polygon (6). And polygons that are the surfaces of the three-dimensional object among the polygon (1), polygon (2), polygon (4), and polygon (6) are determined. In this case, polygon (1) and polygon (2) are the surfaces of the object.
When the contour shape extraction unit 8 determines that the polygon (1) and the polygon (2) are the surfaces of an object having a three-dimensional shape, the side (3) shared by the polygon (5) and the polygon (1) is three-dimensional. It is recognized as a side forming the contour shape of the object having a shape.
Further, the side (4) shared by the polygon (5) and the polygon (2) is recognized as the side forming the contour shape of the three-dimensional object.

次に、輪郭形状抽出部8は、3次元形状のオブジェクトの裏面であるポリゴン(6)が、辺を共有しているポリゴン(2)、ポリゴン(3)、ポリゴン(4)及びポリゴン(5)を検索し、ポリゴン(2)、ポリゴン(3)、ポリゴン(4)及びポリゴン(5)の中で、3次元形状のオブジェクトの表面であるポリゴンを判別する。この場合、ポリゴン(2)とポリゴン(3)がオブジェクトの表面である。
輪郭形状抽出部8は、ポリゴン(2)とポリゴン(3)が3次元形状のオブジェクトの表面であると判別すると、ポリゴン(6)とポリゴン(2)が共有する辺(5)が、3次元形状のオブジェクトの輪郭形状を形成している辺であると認識する。
また、ポリゴン(6)とポリゴン(3)が共有する辺(6)が、3次元形状のオブジェクトの輪郭形状を形成している辺であると認識する。
以上より、輪郭形状抽出部8は、辺(1)、辺(2)、辺(3)、辺(4)、辺(5)、辺(6)を3次元形状オブジェクトの輪郭形状として抽出する。
Next, the contour shape extraction unit 8 has the polygon (6) which is the back surface of the object having the three-dimensional shape sharing the sides with the polygon (2), the polygon (3), the polygon (4), and the polygon (5). To determine the polygon which is the surface of the object having a three-dimensional shape among the polygon (2), polygon (3), polygon (4) and polygon (5). In this case, polygon (2) and polygon (3) are the surfaces of the object.
When the contour shape extraction unit 8 determines that the polygon (2) and the polygon (3) are the surfaces of an object having a three-dimensional shape, the side (5) shared by the polygon (6) and the polygon (2) is three-dimensional. It is recognized as a side forming the contour shape of the object having a shape.
Further, the side (6) shared by the polygon (6) and the polygon (3) is recognized as the side forming the outline shape of the three-dimensional object.
As described above, the contour shape extraction unit 8 extracts the side (1), the side (2), the side (3), the side (4), the side (5), and the side (6) as the contour shape of the three-dimensional shape object. .

1 視点受付部、2 データ記憶部、3 表面ポリゴン抽出部(表面ポリゴン抽出手段)、4 投影変換処理部(投影変換手段)、5,8 輪郭形状抽出部(輪郭形状抽出手段)、6 遮蔽判定処理部(遮蔽判定手段)、7 ポリゴン形状出力部(ポリゴン形状出力手段)、11 アプリケーションメモリ、12 システムメモリ、13 演算プロセッサ。   DESCRIPTION OF SYMBOLS 1 Viewpoint reception part, 2 Data storage part, 3 Surface polygon extraction part (surface polygon extraction means), 4 Projection conversion process part (projection conversion means), 5, 8 Contour shape extraction part (contour shape extraction means), 6 Shielding determination Processing unit (shielding determination unit), 7 Polygon shape output unit (polygon shape output unit), 11 Application memory, 12 System memory, 13 Arithmetic processor.

Claims (3)

3次元空間内の視点から、複数のポリゴンで構成されている3次元形状のオブジェクトを見たときに、上記オブジェクトの表面を構成している1以上のポリゴンを抽出する表面ポリゴン抽出手段と、上記表面ポリゴン抽出手段により抽出された1以上のポリゴンを2次元平面上に投影変換する投影変換手段と、上記投影変換手段により2次元平面上に投影変換された1以上のポリゴンが構成しているオブジェクトの表面の中で、連続している表面を上記オブジェクトの輪郭形状として抽出する輪郭形状抽出手段と、上記表面ポリゴン抽出手段により抽出されたポリゴン毎に、当該ポリゴンの面が上記輪郭形状抽出手段により抽出された輪郭形状に遮蔽されているか否かを判定する遮蔽判定手段と、上記遮蔽判定手段によりポリゴンの面が輪郭形状により遮蔽されていないと判定された場合、上記ポリゴンの形状を出力し、上記遮蔽判定手段によりポリゴンの面の一部が輪郭形状により遮蔽されていると判定された場合、上記ポリゴンの面と上記輪郭形状間で図形ブーリアン演算を実施することで、上記輪郭形状に遮蔽されている面が除かれているポリゴンを生成して、上記ポリゴンの形状を出力するポリゴン形状出力手段とを備えた図形処理装置。   A surface polygon extracting means for extracting one or more polygons constituting the surface of the object when a three-dimensional object composed of a plurality of polygons is viewed from a viewpoint in the three-dimensional space; Projection converting means for projecting and converting one or more polygons extracted by the surface polygon extracting means onto a two-dimensional plane, and an object comprising one or more polygons projected and converted onto the two-dimensional plane by the projection converting means For each polygon extracted by the surface polygon extraction means, the surface of the polygon is extracted by the contour shape extraction means. Shielding determining means for determining whether or not the extracted contour shape is shielded, and the polygonal surface is contoured by the shielding determining means. When it is determined that the polygon is not shielded by the shape, the polygon shape is output. When the shielding determination unit determines that a part of the polygon surface is shielded by the contour shape, A figure provided with polygon shape output means for generating a polygon from which the surface shielded by the outline shape is removed by performing figure boolean operation between the outline shapes and outputting the shape of the polygon Processing equipment. 輪郭形状抽出手段は、投影変換手段により2次元平面上に投影変換された1以上のポリゴンの中で、他のポリゴンと辺を共有しているポリゴンが存在する場合、上記辺を削除する処理を順次繰り返すことで、オブジェクトの輪郭形状を抽出することを特徴とする請求項1記載の図形処理装置。   The contour shape extraction unit performs processing for deleting the side when there is a polygon that shares a side with another polygon among one or more polygons projected and converted onto the two-dimensional plane by the projection conversion unit. The graphic processing apparatus according to claim 1, wherein the contour shape of the object is extracted by repeating sequentially. 3次元空間内の視点から、複数のポリゴンで構成されている3次元形状のオブジェクトを見たときに、上記オブジェクトの表面を構成している1以上のポリゴンを抽出する表面ポリゴン抽出手段と、上記オブジェクトが閉ループで覆われている場合、上記オブジェクトの表面と裏面が共有している辺を検索し、表面と裏面が共有している辺の中で、頂点で結合されている辺を輪郭形状として抽出する輪郭形状抽出手段と、上記表面ポリゴン抽出手段により抽出されたポリゴン毎に、当該ポリゴンの面が上記輪郭形状抽出手段により抽出された輪郭形状に遮蔽されているか否かを判定する遮蔽判定手段と、上記遮蔽判定手段によりポリゴンの面が輪郭形状により遮蔽されていないと判定された場合、上記ポリゴンの形状を出力し、上記遮蔽判定手段によりポリゴンの面の一部が輪郭形状により遮蔽されていると判定された場合、上記ポリゴンの面と上記輪郭形状間で図形ブーリアン演算を実施することで、上記輪郭形状に遮蔽されている面が除かれているポリゴンを生成して、上記ポリゴンの形状を出力するポリゴン形状出力手段とを備えた図形処理装置。   A surface polygon extracting means for extracting one or more polygons constituting the surface of the object when a three-dimensional object composed of a plurality of polygons is viewed from a viewpoint in the three-dimensional space; When the object is covered with a closed loop, the side that the front and back sides of the object are shared is searched, and the side that is connected at the vertex among the sides that the front and back sides are shared is used as the outline shape. Contour shape extracting means for extracting, and shielding determination means for determining whether the surface of the polygon is shielded by the contour shape extracted by the contour shape extracting means for each polygon extracted by the surface polygon extracting means And when the shielding determining means determines that the polygon surface is not shielded by the contour shape, the polygon shape is output and the shielding determination is performed. When it is determined that a part of the polygonal surface is shielded by the contour shape by the step, a surface that is shielded by the contour shape by performing a graphic boolean operation between the polygonal surface and the contour shape And a polygon shape output means for generating a polygon from which the polygon is removed and outputting the shape of the polygon.
JP2010099729A 2010-04-23 2010-04-23 Graphic processor Pending JP2011232798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010099729A JP2011232798A (en) 2010-04-23 2010-04-23 Graphic processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010099729A JP2011232798A (en) 2010-04-23 2010-04-23 Graphic processor

Publications (1)

Publication Number Publication Date
JP2011232798A true JP2011232798A (en) 2011-11-17

Family

ID=45322077

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010099729A Pending JP2011232798A (en) 2010-04-23 2010-04-23 Graphic processor

Country Status (1)

Country Link
JP (1) JP2011232798A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115018697A (en) * 2022-08-08 2022-09-06 中科星图测控技术(合肥)有限公司 Earth surface polygon Boolean operation algorithm and computer system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115018697A (en) * 2022-08-08 2022-09-06 中科星图测控技术(合肥)有限公司 Earth surface polygon Boolean operation algorithm and computer system
CN115018697B (en) * 2022-08-08 2022-11-22 中科星图测控技术(合肥)有限公司 Earth surface polygon Boolean operation algorithm and computer system

Similar Documents

Publication Publication Date Title
EP2880633B1 (en) Animating objects using the human body
Macklin et al. Local optimization for robust signed distance field collision
US8154544B1 (en) User specified contact deformations for computer graphics
US8665267B2 (en) System and method for generating 3D surface patches from unconstrained 3D curves
JP2018537755A (en) Foveal geometry tessellation
US10303156B2 (en) Detecting cut-outs
US9978176B2 (en) Simplifying small mesh components with redundant backs
US11263802B2 (en) Method and apparatus for splitting three-dimensional volumes
US20150088474A1 (en) Virtual simulation
JP5498437B2 (en) Information processing device, information processing method, information processing program, computer-readable recording medium storing information processing program, thickness region setting device, thickness region setting method, thickness region setting program, computer readable storing thickness region setting program Data structure related to various recording media and surfaces in virtual space
Weller et al. A brief overview of collision detection
US9489756B2 (en) Graph based degree of freedom counter for two dimensional drawings
Chentanez et al. Fast grid-free surface tracking
CN114730349A (en) Dual mode post-processing
JP2011232798A (en) Graphic processor
KR20110051315A (en) Image processing apparatus and method
EP4089562A1 (en) Designing garment using style line
KR102005492B1 (en) Apparatus and method for simplification of 3d mesh data
CN115222895A (en) Image generation method, device, equipment and storage medium
KR101132308B1 (en) Collision detection method of polygon model using OBBTree and subdivision
US20150103072A1 (en) Method, apparatus, and recording medium for rendering object
US10599787B2 (en) Sweeping a profile along small circular arcs of a path
US10223824B2 (en) Information processing apparatus, simulator result display method, and computer-readable recording medium
US20150186288A1 (en) Apparatus and method of operating cache memory
US11508083B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium