JP4325469B2 - Object surface flattening apparatus and program - Google Patents
Object surface flattening apparatus and program Download PDFInfo
- Publication number
- JP4325469B2 JP4325469B2 JP2004113257A JP2004113257A JP4325469B2 JP 4325469 B2 JP4325469 B2 JP 4325469B2 JP 2004113257 A JP2004113257 A JP 2004113257A JP 2004113257 A JP2004113257 A JP 2004113257A JP 4325469 B2 JP4325469 B2 JP 4325469B2
- Authority
- JP
- Japan
- Prior art keywords
- polygon
- object surface
- polygons
- vertex
- shape
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Processing Or Creating Images (AREA)
- Image Generation (AREA)
Description
本発明は、物体表面平坦化装置、物体表面平坦化方法およびプログラムに関する。 The present invention relates to an object surface flattening apparatus, an object surface flattening method, and a program.
コンピュータ上で現実感を持った画像を生成する手法としてコンピュータグラフィック(以下、CG)技術が広く利用されている。CG技術において、サーフェスモデル、あるいは、ポリゴングラフィックスと呼ばれる手法がある。これらは、物体の表面形状を多角形の集合体として近似するものである。このように多角形の集合体で表現された物体表面を展開することによって、たとえば、以下に示すような応用例が考えられる。 Computer graphic (hereinafter, CG) technology is widely used as a method for generating a realistic image on a computer. In the CG technology, there is a method called surface model or polygon graphics. These approximate the surface shape of an object as an aggregate of polygons. For example, the following application examples can be considered by developing the object surface expressed by a polygonal aggregate.
画像スキャナーの歪み補正方法の応用例として、たとえば、非特許文献1記載の技術(従来例1)を挙げることができる。非特許文献1記載の方法は、撮影された湾曲物体の表面形状を計算機上で平面形状に変換するものである。本の表面形状のように、もともとは平面であるにもかかわらず、画像のスキャン入力時の制約によって湾曲したまま画像入力せざるを得ない場合等に応用することができる。
As an application example of the distortion correction method of the image scanner, for example, the technique described in Non-Patent Document 1 (Conventional Example 1) can be cited. The method described in Non-Patent
また、複雑な形状の表面に対して、できるだけ歪みの少ないテクスチャマッピングを行うことを目的とした方式として、たとえば、非特許文献2記載の方式(従来例2)が提案されている。非特許文献2に示されるように、展開不可能な表面を平面に展開することで、歪みをできるだけ小さくしたテクスチャマッピングを行うことができる。ここで、任意の2点間の距離を変化させずに、3次元空間内の物体表面を2次元平面に変換することができる場合、その物体表面は展開可能と定義し、2次元平面に変換できない場合、展開不可能と定義する。
For example, a method described in Non-Patent Document 2 (conventional example 2) has been proposed as a method for performing texture mapping with as little distortion as possible on a complex-shaped surface. As shown in Non-Patent
一般にガウス曲率が全面にわたって0の曲面は平面に展開可能であり、ガウス曲率が0ではない曲面は平面に展開不可能であることが知られている。たとえば、円筒の側面は平面に展開できるが、球面はガウス曲率が0ではないため、平面に展開することはできない。 In general, it is known that a curved surface having a Gaussian curvature of 0 over the entire surface can be developed on a plane, and a curved surface having a non-Gaussian curvature of 0 cannot be developed on a plane. For example, the side surface of a cylinder can be developed on a plane, but a spherical surface cannot be developed on a plane because the Gaussian curvature is not zero.
非特許文献2記載の方法では、まず、3次元形状の表面から抽出した点の間の距離(測地線の長さ)を計測し、その距離の変化の大きさができるだけ小さくなるように平面に展開する。次に、展開された平面にテクスチャをマッピングする。最後に曲面から平面への展開を逆に行って、平面テクスチャマップを元の3次元形状に変換する。このように、3次元形状を2次元平面に展開する手法は、見た目の歪みが小さなテクスチャマッピング手法として用いることができる。
In the method described in Non-Patent
次に、展開不可能な曲面を平面に展開する方式の他の例として、平面に展開可能な物体表面(可展体面)を媒介として展開を行う方式(特許文献1)を示す。特許文献1記載の方式は、テクスチャ表面を展開することによって、テクスチャマッピングを効率的に行おうとする方式である。特許文献1記載の方式では、撮影した2次元データから3次元形状復元処理を用いた任意視点の画像を表示する方式に関するものである。
Next, as another example of a method of developing a non-developable curved surface into a plane, a method of performing development using an object surface (developable body surface) that can be developed into a plane as a medium (Patent Document 1) is shown. The method described in
さらに、特許文献1記載の方式は、この表示方式において、テクスチャ画像情報のデータ量を削減する手法に関するものである。この表示方式においては、2次元データから得られた各微小平面のテクスチャを個々の微小平面ごとに保持するのではなく、3次元形状を平面に展開して、隙間のできるだけ少ない展開図のテクスチャを保持することによって効率的に画像データを保持することを目的としている。
Further, the method described in
特許文献1記載の方式は、3次元オブジェクトの特徴点を可展体面である既知形状面(円筒、柱体、錐体等)の投影面に投影して平面に展開し、各特徴点を頂点とする多角形に対して、この展開平面上でテクスチャマッピングをするものである。このように、一度、展開可能な物体表面に投影することによって、複雑な3次元形状を平面に展開することが可能となる。以上、3つの従来例から、以下の3つの応用例を示した。
(1)画像スキャナーで画像をスキャンインした後で、スキャン時の条件により歪んでしまった画像を補正する。たとえば書物の表面を平面化する。
(2)複雑な3次元曲面を2次元平面に変換することにより、2次元平面上で簡易にテクスチャマッピングが可能になる。
(3)複雑な3次元曲面を2次元平面に変換することにより、保持するテクスチャ情報量を削減することができる。
The method described in
(1) After an image is scanned in by an image scanner, an image distorted due to scanning conditions is corrected. For example, the surface of a book is flattened.
(2) By converting a complicated three-dimensional curved surface to a two-dimensional plane, texture mapping can be easily performed on the two-dimensional plane.
(3) By converting a complex three-dimensional curved surface into a two-dimensional plane, the amount of texture information to be held can be reduced.
しかしながら、(1)非特許文献1記載の方法では、適用する物体表面を書物の表面に限定しており、一般の展開不可能な物体表面には適用できないという問題点があった。
However, (1) The method described in Non-Patent
(2)非特許文献2記載の方法では、3次元形状から測地線を求める計算量が非常に大きいという問題点があった。
(2) The method described in Non-Patent
(3)一方、特許文献1記載の方法では、厳密に測地線の距離を求めずに、3次元空間上にある物体表面を一旦可展体面に投影することで展開を行う方式を用いているため、計算量が少なくて済む。しかし、特許文献1記載の方法では、元の物体の3次元形状が平面に展開不可能な場合、できるだけ元の物体の表面に近い可展体面を選んでも、結局は、可展体面に投影する段階で歪みが発生してしまうという問題点があった。
(3) On the other hand, the method described in
そこで、本発明は、上記従来例の問題点に鑑み、3次元空間内の物体表面が多角形の集合体として表されている場合に、物体表面が展開不可能な場合であっても、多角形を平面上でできるだけ歪みが小さくなるように並べることができる物体表面平坦化装置、物体表面平坦化方法およびプログラムを提供することを目的とする。 Therefore, in view of the problems of the conventional example described above, the present invention has many cases where the object surface cannot be expanded when the object surface in the three-dimensional space is represented as a polygonal aggregate. An object of the present invention is to provide an object surface flattening apparatus, an object surface flattening method, and a program capable of arranging squares so that distortion is minimized on a plane.
上記課題を解決するために、本発明は、請求項1に記載のように、コンピュータ上に多角形の集合体として表現された3次元空間内の物体表面を平面上に展開する物体表面平坦化装置であって、入力データから多角形の形状情報を抽出する手段と、前記多角形と辺を共有する周辺多角形の形状情報を抽出する手段と、前記多角形の形状情報および前記周辺多角形の形状情報から、前記平面上において前記多角形と前記周囲多角形との間で共有する辺間の距離についての関数を求め、前記関数に前記共有する辺間の距離が最小になるという条件を適用することにより、前記各多角形毎に、前記各多角形の位置を決定するための一次方程式を作成する係数取得手段と、前記各多角形を決定するための一次方程式を解くことにより、前記各多角形の位置を算出する多角形位置算出手段と、前記位置が算出された多角形を並べる手段とを具備することを特徴とする。 In order to solve the above-described problems, the present invention provides an object surface flattening that develops on a plane an object surface in a three-dimensional space expressed as a polygonal aggregate on a computer. A device for extracting polygon shape information from input data; a means for extracting shape information of a peripheral polygon sharing a side with the polygon; and shape information of the polygon and the peripheral polygon From the shape information, the function for the distance between the sides shared between the polygon and the surrounding polygon on the plane is obtained, and the condition that the distance between the shared sides is minimized in the function. By applying the coefficient acquisition means for creating a linear equation for determining the position of each polygon for each of the polygons, and solving the linear equation for determining the polygons, For each polygon Characterized by comprising a polygonal position calculating means for calculating a location, and means for arranging the polygon the position is calculated.
請求項1記載の発明によれば、入力多角形の位置は多角形の位置に関する式を解くことにより決定し、入力多角形を平面上に並べることができる。これにより、3次元空間内の物体表面が多角形の集合体として表されている場合に、物体表面が展開不可能な場合であっても、多角形を平面上でできるだけ歪みが小さくなるように並べることができる。また、歪みの小さな展開図を作成するのに必要な測地線の距離を求める必要が無いため、測地線の距離を求めるための計算量を削減できる。 According to the first aspect of the present invention, the position of the input polygon can be determined by solving an expression relating to the position of the polygon, and the input polygon can be arranged on a plane. As a result, when the object surface in the three-dimensional space is represented as a collection of polygons, even if the object surface cannot be expanded, the distortion of the polygon on the plane is minimized. Can be lined up. In addition, since it is not necessary to obtain the geodesic distance required to create a development with a small distortion, the amount of calculation for obtaining the geodesic distance can be reduced.
また、本発明は、請求項2に記載のように、請求項1記載の物体表面平坦化装置において、更に、前記並べられた各多角形の形状を補正する手段を具備することを特徴とする。請求項2記載の発明によれば、並べられた多角形間に重なりや隙間がある場合に、その多角形の形を補正して、重なりや隙間のない平面を作ることが可能になる。
Further, according to the present invention, as described in
また、本発明は、請求項3に記載のように、請求項1または請求項2記載の物体表面平坦化装置において、更に、多角形の頂点以外の辺上に他の多角形の頂点が存在している場合に、前記多角形の辺上にある頂点から線分あるいは半直線を引くことにより、その頂点と辺の交点を新たな頂点とする多角形分割手段を具備することを特徴とする。請求項3記載の発明によれば、多角形の辺上の頂点をなくすことができるので、入力多角形の辺上に頂点がある場合でも、入力多角形の辺上に頂点がない場合と同様に物体表面を平面に展開できるようになる。
Further, according to the present invention, as described in
また、本発明は、請求項4に記載のように、請求項1から請求項3の何れか一項に記載の物体表面平坦化装置において、前記入力データは、3次元空間内の物体表面を構成する多角形の形状を表すデータを含み、前記多角形の形状を表すデータは、共通の始点から多角形の各頂点への2次元ベクトルであり、前記共通の始点へのベクトルは多角形の位置を表すベクトルであることを特徴とする。請求項4記載の発明によれば、多角形の形状を表すデータを、共通の始点を表すベクトルと、共通の始点から頂点への2次元ベクトルとによって表現することにより、多角形の位置と形状を別々に操作できるようになる。
Further, according to the present invention, as described in
また、本発明は、請求項5に記載のように、請求項1から請求項4の何れか一項に記載の物体表面平坦化装置において、前記入力データは、3次元空間内の物体表面を構成する多角形の相対位置を表すデータを含み、前記相対位置を表すデータは、3次元空間内の物体表面を構成する多角形の各辺に対し、該各辺をどの多角形が共有しているかを示す情報、および/または、3次元空間内の物体表面を構成する多角形にはどの辺が存在しているかを示す情報、および、各辺の両端の頂点インデクスのデータであることを特徴とする。請求項5記載の発明によれば、周辺多角形を効率的に抽出できる。
Further, according to the present invention, as described in
また、本発明は、請求項6に記載のように、請求項1から請求項5の何れか一項に記載の物体表面平坦化装置において、前記係数取得手段は、ある中心多角形と、該中心多角形と辺を共有する周囲多角形との間で、共有すべき辺間の距離の和が最小になるような、中心多角形と周囲多角形との相対位置を示す一次方程式を作成することを特徴とする。請求項6記載の発明によれば、共有すべき辺間の距離の和が最小になるような、中心多角形と周囲多角形との相対位置を示す式の係数を取得することで、多角形を隙間無く、かつ重複無く並べることができる。
Further, according to the present invention, as described in
また、本発明は、請求項7に記載のように、請求項6記載の物体表面平坦化装置において、前記辺間の距離は、共有すべき頂点間の距離の2乗和に辺の長さを乗じたものであることを特徴とする。請求項7記載の発明によれば、同じ位置にあるべき頂点間の距離の2乗和を、共有すべき辺の長さで重み付けすることができる。
Further, according to the present invention, in the object surface flattening device according to
また、本発明は、請求項8に記載のように、請求項1から請求項7の何れか一項に記載の物体表面平坦化装置において、前記多角形位置算出手段は、最小二乗法で連立一次方程式を解くことで前記各多角形の位置を算出することを特徴とする。請求項8記載の発明によれば、最小二乗法を用いて連立一次式を解くことにより各多角形の位置を算出する。これにより、多角形の位置は、連立一次方程式を最小二乗法で解くという公知の手法を用いて計算することができる。
Further, according to the present invention, as described in
また、本発明は、請求項9に記載のように、請求項1から請求項3の何れか一項に記載の物体表面平坦化装置において、前記入力データに含まれる多角形は、2次元行列にマッピングされるように配置された四角形であり、前記多角形の形状を抽出する手段は、前記四角形の配置場所に対応した多角形インデクスから前記3次元空間内の物体表面を構成する多角形の相対位置を表すデータを決定し、前記係数取得手段は、前記多角形の相対位置から、前記各多角形の位置に関する式の係数を決定することを特徴とする。請求項9記載の発明によれば、入力多角形が2次元行列にマッピングされるように配置された四角形である場合には、入力データの情報量と、展開処理のための計算量を削減することができる。
Further, according to the present invention, as described in
また、本発明は、請求項10に記載のように、請求項4記載の物体表面平坦化装置において、前記共通の始点は、多角形の頂点のうちの一つであることを特徴とする。請求項10記載の発明によれば、多角形の形状を表すデータから、この頂点に関する2次元ベクトルのデータを一つ省略することができる。 According to a tenth aspect of the present invention, in the object surface flattening apparatus according to the fourth aspect, the common starting point is one of polygonal vertices. According to the tenth aspect of the present invention, one piece of two-dimensional vector data relating to this vertex can be omitted from the data representing the polygonal shape.
また、本発明は、請求項11に記載のように、多角形の集合体として表現された3次元空間内の物体表面を平面上に展開するためにコンピュータに、入力データから多角形の形状情報を抽出するステップと、前記多角形と辺を共有する周辺多角形の形状情報を抽出するステップと、前記多角形の形状情報および前記周辺多角形の形状情報から、前記平面上において前記多角形と前記周囲多角形との間で共有する辺間の距離についての関数を求め、前記関数に前記共有する辺間の距離が最小になるという条件を適用することにより、前記各多角形毎に、前記各多角形の位置を決定するための一次方程式を作成するステップと、前記各多角形の位置を決定するための一次方程式を解くことにより、前記各多角形の位置を算出するステップと、前記位置が算出された多角形を並べるステップとを有することを特徴とする。 Further, according to the present invention, the polygon shape information is input from the input data to the computer in order to develop the object surface in the three-dimensional space expressed as a collection of polygons on a plane. Extracting the shape information of the surrounding polygon that shares an edge with the polygon, the shape information of the polygon and the shape information of the surrounding polygon, and the polygon on the plane. By obtaining a function for the distance between sides shared with the surrounding polygon, and applying the condition that the distance between the shared sides is minimized to the function, and creating an equation for determining the position of each polygon by solving linear equations to determine the position of each polygon, and calculating the position of each polygon, the Characterized by a step of arranging a polygon location is calculated.
また、本発明のプログラムは、請求項11に記載のように、3次元空間内の物体表面を平面上に展開するためにコンピュータに、入力データから多角形の形状情報を抽出するステップと、前記多角形と辺を共有する周辺多角形の形状情報を抽出するステップと、前記多角形の形状情報および前記周辺多角形の形状情報から、前記各多角形毎に、前記各多角形の位置に関する式の係数を取得するステップと、前記各多角形の位置に関する式を解くことにより、前記各多角形の位置を算出するステップと、前記位置が算出された多角形を並べるステップとを実行させる。
The program of the present invention, as described in
請求項11記載の発明によれば、入力多角形の位置は多角形の位置に関する式を解くことにより決定し、入力多角形を平面上に並べることができる。これにより、3次元空間内の物体表面が多角形の集合体として表されている場合に、物体表面が展開不可能な場合であっても、多角形を平面上でできるだけ歪みが小さくなるように並べることができる。また、歪みの小さな展開図を作成するのに必要な測地線の距離を求める必要が無いため、測地線の距離を求めるための計算量を削減できる。 According to the eleventh aspect of the present invention, the position of the input polygon can be determined by solving a formula relating to the position of the polygon, and the input polygon can be arranged on a plane. As a result, when the object surface in the three-dimensional space is represented as a collection of polygons, even if the object surface cannot be expanded, the distortion of the polygon on the plane is minimized. Can be lined up. In addition, since it is not necessary to obtain the geodesic distance required to create a development with a small distortion, the amount of calculation for obtaining the geodesic distance can be reduced.
また、本発明は、請求項12に記載のように、請求項11記載のプログラムにおいて、更に、前記並べられた各多角形の形状を補正するステップを前記コンピュータに実行させることを特徴とする。請求項12記載の発明によれば、並べられた多角形間に重なりや隙間がある場合に、その多角形の形を補正して、重なりや隙間のない平面を作ることが可能になる。このプログラムは、通信回線や記録媒体を用いてコンピュータに提供することが可能である。 Further, according to a twelfth aspect of the present invention, in the program according to the eleventh aspect , the computer further causes the computer to execute a step of correcting the shapes of the arranged polygons. According to the twelfth aspect of the present invention, when there is an overlap or a gap between the arranged polygons, it is possible to correct the shape of the polygon to create a plane without the overlap or the gap. This program can be provided to a computer using a communication line or a recording medium.
また、請求項13記載の発明によれば、上記プログラムを記録したコンピュータ読み取り可能な記録媒体が提供される。 According to a thirteenth aspect of the present invention, there is provided a computer-readable recording medium on which the program is recorded.
本発明によれば、3次元空間内の物体表面が多角形の集合体として表されている場合に、物体表面が展開不可能な場合であっても、多角形を平面上でできるだけ歪みが小さくなるように並べることができる物体表面平坦化装置、物体表面平坦化方法およびプログラムを提供できる。 According to the present invention, when the object surface in the three-dimensional space is represented as an aggregate of polygons, even if the object surface cannot be expanded, the polygon is reduced as much as possible on the plane. It is possible to provide an object surface flattening apparatus, an object surface flattening method, and a program that can be arranged as follows.
以下、本発明を実施するための最良の形態について説明する。最初に、図1と図2を用いて本発明の原理を説明する。図1は多角形の辺共有を説明する図である。図2は多角形の頂点が2点に分割される場合を説明する図である。発明においては、3次元空間内の物体表面が多面体の集合で形成されているものとし、その多面体を構成する多角形の形状は予め分かっているものとする。上記多角形を2次元平面上に並べるときには、多角形間の重複や隙間が少なくなるように各多角形を回転したほうが良い場合がある。 Hereinafter, the best mode for carrying out the present invention will be described. First, the principle of the present invention will be described with reference to FIGS. FIG. 1 is a diagram for explaining side sharing of a polygon. FIG. 2 is a diagram for explaining a case where a vertex of a polygon is divided into two points. In the invention, it is assumed that the surface of an object in a three-dimensional space is formed by a set of polyhedrons, and the shape of a polygon constituting the polyhedron is known in advance. When arranging the polygons on a two-dimensional plane, there are cases where it is better to rotate the polygons so that there is less overlap or gap between the polygons.
しかしながら、本発明では、この多角形の回転の最適化は行わず、各多角形の平行移動のみの最適化を行うものである。図1に示すように、3次元曲面上で隣接する多角形は、辺を共有している。ここでは、一つの辺は、最大2つの多角形のみに共有されているものとする。たとえば図1においては辺511は多角形512および多角形513に共有されている。これらの多角形を平面に展開して並べたときも、この辺511は隣接する多角形間512および513で共有されるのが望ましい。 However, in the present invention, this polygon rotation is not optimized, and only the parallel movement of each polygon is optimized. As shown in FIG. 1, polygons adjacent on a three-dimensional curved surface share sides. Here, it is assumed that one side is shared only by a maximum of two polygons. For example, in FIG. 1, the side 511 is shared by the polygon 512 and the polygon 513. Even when these polygons are developed and arranged on a plane, the side 511 is preferably shared between the adjacent polygons 512 and 513.
しかしながら、展開不可能な表面の場合、2次元に展開する段階で、各多角形の相対的な位置関係が変化するため、多角形を隙間無く、かつ、重複無く並べることが不可能となる。その場合、図2に示されるように、この共有されるべき辺の位置が辺5110と辺5111の二つに分割してしまう。 However, in the case of a non-developable surface, the relative positional relationship between the polygons changes at the stage of two-dimensional development, making it impossible to arrange the polygons without gaps and without overlapping. In this case, as shown in FIG. 2, the position of the side to be shared is divided into two sides 5110 and 5111.
本発明は、これらの分割された二つの辺間の距離をできるだけ小さくするように多角形を並べることによって、歪みの小さな展開画像を作成しようとするものである。上記のように、本発明においては、測地線を求めたり、頂点を他の可展開面に投影したりすることなく、出力多角形から直接平面テクスチャ画像を生成することができる。以下、図面を用いて本発明の実施例について説明する。 The present invention intends to create a developed image with small distortion by arranging polygons so that the distance between the two divided sides is as small as possible. As described above, in the present invention, a planar texture image can be generated directly from an output polygon without obtaining a geodesic line or projecting a vertex onto another developable surface. Embodiments of the present invention will be described below with reference to the drawings.
図3は実施例1に係る物体表面平坦化装置100のブロック図である。図3に示されるように、物体表面平坦化装置100は、多角形スキャン部102、周囲多角形抽出部103、一次方程式作成部104、多角形位置演算部105、並べ合わせ部106、多角形形状補正部107を備える。
FIG. 3 is a block diagram of the object surface flattening apparatus 100 according to the first embodiment. As shown in FIG. 3, the object surface flattening device 100 includes a
物体表面平坦化装置100は、コンピュータ上に表現された3次元空間内の物体表面を平面上に展開するものである。この物体表面平坦化装置100は、3次元形状モデリング装置(図示せず)などの外部装置から3次元空間内の物体表面の多角形を表現する入力データ101を受け取る。 The object surface flattening apparatus 100 develops an object surface in a three-dimensional space expressed on a computer on a plane. The object surface flattening device 100 receives input data 101 representing a polygon of an object surface in a three-dimensional space from an external device such as a three-dimensional shape modeling device (not shown).
多角形スキャン部102は、入力データ101から中心多角形の形状情報を抽出する。周囲多角形抽出部103は、多角形スキャン部102で抽出された中心多角形の周囲の多角形、すなわち、中心多角形と辺を共有する周辺多角形の形状情報を抽出する。一次方程式作成部104は、多角形スキャン部102で抽出された多角形の形状情報と周囲多角形抽出部103で抽出された周辺多角形の形状情報を基に、各多角形毎に、各多角形の位置に関する係数を含む一次方程式を作成する。一次方程式作成部104が特許請求の範囲における係数取得手段に相当する。
The
多角形位置演算部105は、この一次方程式を解くことにより、全多角形の位置を算出する。並べ合わせ部106は、多角形位置演算部105で算出された多角形位置に基づき、各多角形を並べる。多角形形状補正部107は、隙間や重複が無いように、並べられた各多角形の形状を補正し、最終的な出力データ108を出力する。
The polygon
次に、各構成の動作を詳しく述べる。まず、入力データ101について説明する。入力データ101は、3次元空間内の物体表面を構成する多角形の形状および多角形の相対位置情報を表すデータである。ここで、物体表面を構成する各多角形を示すインデクスをiとする。総数P個の多角形がある場合、例えば、その多角形に1からPまでの番号をインデクスとして付与することができる。また、物体表面の多角形の各辺を示すインデクスをhとする。総数Q個の辺がある場合、例えば、各辺に1からQまでの番号をインデクスとして付与することができる。通常、各辺は複数の多角形から共有されている。 Next, the operation of each component will be described in detail. First, the input data 101 will be described. The input data 101 is data representing the shape of a polygon forming the object surface in the three-dimensional space and the relative position information of the polygon. Here, an index indicating each polygon constituting the object surface is i. When there are a total of P polygons, for example, numbers from 1 to P can be assigned to the polygons as indexes. In addition, an index indicating each side of the polygon on the object surface is set as h. When there are a total of Q sides, for example, numbers from 1 to Q can be assigned to each side as an index. Normally, each side is shared from a plurality of polygons.
ここで、実施例1においては、物体表面の多角形に関して、以下の条件を持つものとする。図7の(a)は、ある多角形の頂点以外の辺上には、他の多角形の頂点が存在していない様子を示している。図7の(b)は、ある多角形の頂点以外の辺上に、他の多角形の頂点が存在している様子を示している。本実施例においては、全ての多角形の頂点以外の辺上には、他の多角形の頂点の存在を認めないという条件を課している。この条件は、一つの辺が最大2つの多角形にのみ共有されるという条件に等しい。 Here, in the first embodiment, it is assumed that the polygons on the object surface have the following conditions. FIG. 7A shows a state in which vertices of other polygons do not exist on sides other than the vertices of a certain polygon. FIG. 7B shows a state in which vertices of other polygons exist on sides other than the vertices of a certain polygon. In the present embodiment, a condition is imposed that the existence of vertices of other polygons is not allowed on sides other than the vertices of all polygons. This condition is equivalent to the condition that one side is shared only by a maximum of two polygons.
本実施例においては、まず、並べ合わせ部106で、各多角形の形状を保存したまま、多角形を平行移動し、2次元平面状で並べる。次に、多角形形状補正部107で、多角形の形状の補正を行う。すなわち、多角形形状補正部107の前までは、入力された多角形の形状は保存される。そのため、多角形の形状を示す部分と、多角形の位置を示す部分とに分割してデータを保持することが望ましい。そこで、今、多角形iは、N個の頂点k1,k2,…,kNを持つものとする。
In this embodiment, first, the arranging
さらに、本実施例では、多角形iの形状を、共通の始点から多角形の各頂点へのN個の2次元ベクトルaik(k=k1,k2,…,kN)を用いて表す。また、多角形iの位置は、2次元ベクトルviを用いて表す。共通の始点ベクトルが多角形の位置を表すベクトルに相当する。 Furthermore, in the present embodiment, the shape of the polygon i is represented using N two-dimensional vectors a ik (k = k1, k2,..., KN) from the common starting point to each vertex of the polygon. The position of the polygon i is expressed using a two-dimensional vector v i . The common starting point vector corresponds to a vector representing the position of the polygon.
図4は多角形形状および位置の説明図である。これら2種類のベクトルを用いることにより、図4に示されるように、2次元平面上で多角形iを並べたときの多角形iの各頂点の座標を、
vi+aik(k=k1,k2,…,kN)
で表すこととする。
FIG. 4 is an explanatory diagram of polygonal shapes and positions. By using these two types of vectors, as shown in FIG. 4, the coordinates of each vertex of the polygon i when the polygon i is arranged on a two-dimensional plane are
v i + a ik (k = k1, k2,..., kN)
It shall be expressed as
これらの頂点kは、3次元空間内では複数の多角形で共有されていたものである。しかしながら、2次元平面上では、同じ頂点kであっても、多角形iの頂点kの位置は、
vi+aik
であり、多角形jの頂点kの位置は、
vj+ajk
となり、別の位置に存在することになる。同様に各頂点を端点とする各辺も、3次元空間内では共有されていても、2次元平面上では共有されず、別の辺となる。
These vertices k are shared by a plurality of polygons in the three-dimensional space. However, on the two-dimensional plane, the position of the vertex k of the polygon i is the same vertex k.
v i + a ik
And the position of the vertex k of the polygon j is
v j + a jk
And will be in a different location. Similarly, each side having each vertex as an end point is not shared on the two-dimensional plane but is another side even if shared in the three-dimensional space.
さて、このように、多角形の各頂点の座標を指定することにより、多角形の形状を保存しながら多角形の位置だけを平行移動させたい場合には、多角形iの形状を示すベクトルaikは変化させないで、多角形iの位置を示すベクトルviのみを変化させれば良い。入力データ101は、このようにして定めた多角形形状に関するデータ、すなわち、aikを持つものとする。さらに、入力データ101内には、3次元空間内の物体表面を構成する多角形の相対位置情報を表すデータが含まれる。この相対位置情報に関するデータは、周囲多角形抽出部103において使用されるものである。上記相対位置情報は、以下に示す(情報1)、(情報2)、および、(情報3)である。
Now, by designating the coordinates of each vertex of the polygon as described above, when it is desired to translate only the position of the polygon while preserving the shape of the polygon, a vector a indicating the shape of the polygon i. It is only necessary to change the vector v i indicating the position of the polygon i without changing ik . It is assumed that the input data 101 has data regarding the polygonal shape thus determined, that is, a ik . Further, the input data 101 includes data representing the relative position information of polygons constituting the object surface in the three-dimensional space. The data regarding the relative position information is used in the surrounding
(情報1)3次元空間内の物体表面を構成する多角形の各辺に対し、各辺をどの多角形が共有しているかを示す、辺を共有する多角形のインデクスのデータである。例えば、各辺を示すインデクスをhとするとき、辺hを共有する多角形の集合Fhである。
(情報2)各辺の両端の頂点インデクスのデータである。例えば、各辺を示すインデクスをhとするとき、辺hの両端の頂点インデクスの集合Ghである。
(情報3)3次元空間内の物体表面を構成する各多角形にはどの辺が存在しているかを示す、多角形の辺のインデクスのデータである。例えば、各多角形を示すインデクスをiとするとき、多角形iの辺のインデクスの集合Hiである。
(Information 1) Polygon index data sharing sides indicating which polygons share each side with respect to each side of the polygon forming the object surface in the three-dimensional space. For example, when the index indicating each side is h, it is a polygon set Fh sharing the side h.
(Information 2) Data of vertex indexes at both ends of each side. For example, when the index indicating each side is h, it is a set Gh of vertex indexes at both ends of the side h.
(Information 3) Polygon side index data indicating which side exists in each polygon constituting the object surface in the three-dimensional space. For example, when the index indicating each polygon is i, it is a set Hi of the indices of the sides of the polygon i.
(情報1)と(情報3)は相互に変換可能であるため、どちらか一つだけを保持すればよい。しかしながら、上記の相互変換の計算量が多い場合には、(情報1)と(情報3)の両方を保持してももちろん良い。あるいは、多角形が規則的に並んでいて、多角形インデクスから、多角形の相対位置情報、すなわち、上記の(情報1)や(情報2)や(情報3)が容易に求められる場合には、上記相対位置情報は特に入力データ101に含まれる必要は無い。 Since (Information 1) and (Information 3) can be converted to each other, only one of them needs to be held. However, when the amount of calculation of the above mutual conversion is large, it is of course possible to hold both (information 1) and (information 3). Alternatively, when polygons are regularly arranged and the relative position information of the polygon, that is, (Information 1), (Information 2), and (Information 3) described above can be easily obtained from the polygon index. The relative position information need not be included in the input data 101.
さらに、図4に示されるように、各頂点の位置は、ベクトルviの終点から、各ベクトルaikを伸ばすことによって得られる。ベクトルviの終点と、多角形iの位置関係は任意であるため、多角形iの位置とベクトルviの終点の位置を予め固定しておくことにより、aik(k=k1,k2,…,kN)のうち、一つのベクトルを入力データ101として持つことを省略することが可能である。例えば、多角形iの位置を示すベクトルaikの共通の始点を、多角形iの頂点k1であるとする。つまり、常に、aik1=0とする。このようにすることで、aik1を入力データとして保持する必要が無くなる。よって、頂点に関する2次元ベクトルのデータを一つ省略することができる。これは一つの例であり、他の例として、例えば、多角形iの重心をベクトルviの終点とする、といった規定をとってももちろん良い。以上で入力データ101の説明を終わる。 Further, as shown in FIG. 4, the position of each vertex is obtained by extending each vector a ik from the end point of the vector v i . Since the positional relationship between the end point of the vector v i and the polygon i is arbitrary, by fixing the position of the polygon i and the end point of the vector v i in advance, a ik (k = k1, k2, .., KN), it is possible to omit having one vector as input data 101. For example, it is assumed that the common starting point of the vector a ik indicating the position of the polygon i is the vertex k1 of the polygon i. In other words, a ik1 = 0 is always set. In this way, it is not necessary to hold a ik1 as input data. Therefore, one piece of two-dimensional vector data related to the vertex can be omitted. This is one example, and as another example, for example, it may of course be provided that the centroid of the polygon i is the end point of the vector v i . This is the end of the description of the input data 101.
次に、多角形スキャン部102および周囲多角形抽出部103の説明を行う。多角形スキャン部102では、入力された多角形を一つ一つ全て抽出する。ここで、多角形スキャン部102で多角形iが抽出されたとする。周囲多角形抽出部103では、多角形iと辺を共有する多角形を全て抽出する。これで、多角形スキャン部102および周囲多角形抽出部103の説明を終わる。
Next, the
次に、一次方程式作成部104の説明を行う。一次方程式作成部104は、多角形を2次元平面上に並べたとき、ある中心多角形と、この中心多角形と辺を共有する周辺多角形との間で、共有すべき辺間の距離の和が最小になるような中心多角形と周辺多角形との相対位置を示す一次方程式の係数を作成する。ここでは、以下の距離関数を定義し、この距離関数が最小になるような多角形位置ベクトルviを求めることによって、多角形位置を決定する。
Next, the linear
まず、各頂点を示すインデクスをk、各辺を示すインデクスをh、各多角形を示すインデクスをiとする。さらに、(情報1)、(情報2)、および、(情報3)に示されるように、辺hを共有する多角形のインデクスの集合(多角形インデクス集合)をFh、辺hの両端の頂点のインデクスの集合(頂点インデクス集合)をGh、多角形iの辺のインデクスの集合(辺インデクス集合)をHiとする。 First, an index indicating each vertex is k, an index indicating each side is h, and an index indicating each polygon is i. Furthermore, as shown in (Information 1), (Information 2), and (Information 3), Fh is a set of polygonal indexes sharing the side h (polygonal index set), and vertices at both ends of the side h A set of indices (vertex index set) is Gh, and a set of indexes on the sides of the polygon i (side index set) is Hi.
ここで、辺hを共有する多角形のインデクスの集合Fhについて図5を用いて説明する。図5は多角形インデクス集合Fhの説明図である。例えば、3次元空間内の物体表面で、図5に示すように、辺hを多角形1と多角形2が共有しているとする。このとき、多角形インデクス集合は、
Fh={1,2}
である。また、図5のように、辺hの両端の頂点のインデクスが4と5であるとき、頂点インデクス集合は、
Gh={4,5}
である。
Here, a set Fh of polygonal indexes sharing the side h will be described with reference to FIG. FIG. 5 is an explanatory diagram of the polygonal index set Fh. For example, assume that
Fh = {1, 2}
It is. Also, as shown in FIG. 5, when the indices of the vertices at both ends of the side h are 4 and 5, the vertex index set is
Gh = {4,5}
It is.
次に、多角形iの辺のインデクスの集合をHiについて図6を用いて説明する。図6は、辺インデクス集合Hiの説明図である。図6に示すように、多角形iが辺1、2、3、4、5、6を持ち、その他の辺や頂点は持っていないとする。このとき、辺インデクス集合は、
Hi={1,2,3,4,5,6}
である。
Next, a set of indexes on the side of the polygon i will be described with reference to FIG. FIG. 6 is an explanatory diagram of the edge index set Hi. As shown in FIG. 6, it is assumed that the polygon i has
Hi = {1, 2, 3, 4, 5, 6}
It is.
ここで、ある辺hが、2次元平面上で、辺h1と辺h2に分割されたときの、辺h1、辺h2間の距離関数を図8を用いて説明する。図8は距離関数を説明するための図である。図8において、多角形1と多角形2は、3次元空間内では隣接しており、そのときの、頂点k11とk21は同じ位置に存在していた。かつ、頂点k12と頂点k22も同じ位置に存在していたとする。2次元平面上では、辺h1と辺h2が一致しない場合がある。その場合の辺h1と辺h2の距離を以下の式(1)で定義する。
(頂点k11と頂点k21間の距離の2乗+頂点k12と頂点k22の距離の2乗)×(辺h1の長さ+辺h2の長さ)/2 (1)
この辺間の距離は、共有すべき頂点間の距離の2乗和に辺の長さを乗じたものであり、同じ位置にあるべき頂点間の距離の2乗和を、共有すべき辺の長さで重み付けした距離であるということができる。上記の頂点k11とk21や、頂点k12とk22が離れた位置にあるときの影響は、辺h1や辺h2の長さに比例すると考えられるからである。
Here, a distance function between the side h1 and the side h2 when a side h is divided into the side h1 and the side h2 on the two-dimensional plane will be described with reference to FIG. FIG. 8 is a diagram for explaining the distance function. In FIG. 8,
(Square of distance between vertex k11 and vertex k21 + square of distance between vertex k12 and vertex k22) × (length of side h1 + length of side h2) / 2 (1)
The distance between the sides is obtained by multiplying the square sum of the distances between the vertices to be shared by the length of the side, and the square sum of the distances between the vertices that should be at the same position is the length of the side to be shared. It can be said that the distance is weighted by the distance. This is because the influence when the vertices k11 and k21 and the vertices k12 and k22 are separated is considered to be proportional to the lengths of the side h1 and the side h2.
さらに、以下、上記で述べた距離関数を定式化する。辺hを共有する多角形の集合はFhである。Fhの各要素である多角形インデクスをiとする。すなわち、i∈Fhとする。さらに、辺hの両端の頂点インデクスをkとすると、k∈Ghである。また、2次元平面に展開したときの多角形iの頂点kの位置を示す位置ベクトルは、
vi+aik
である。
Furthermore, the distance function described above is formulated below. A set of polygons sharing side h is Fh. Let i be the polygon index which is each element of Fh. That is, iεFh. Further, kεGh, where k is the vertex index at both ends of the side h. The position vector indicating the position of the vertex k of the polygon i when expanded on a two-dimensional plane is
v i + a ik
It is.
全てのi(i∈Fh)、k(k∈Gh)で、上記の位置ベクトルが同じになることが理想であるが、展開不可能な物体表面では誤差が生じる。すなわち、多角形i(i∈Fh)の頂点k(k∈Gh)の位置ベクトルvi+aikと、多角形j(j∈Fh,j≠i)の頂点k(k∈Gh)の位置ベクトルvj+ajkは、異なる場合がある。ここで、頂点k(k∈Gh)に関する誤差の2乗和を、辺hの長さで重み付けした値を辺hの距離関数Ehとする。この辺hの距離関数Ehは以下の式(2)のように表すことができる。 Ideally, the position vector is the same for all i (i∈Fh) and k (k∈Gh), but an error occurs on the surface of an object that cannot be developed. That is, the position vector v i + a ik of the vertex k (k∈Gh) of the polygon i (i∈Fh) and the position vector of the vertex k (k∈Gh) of the polygon j (j∈Fh, j ≠ i). v j + a jk may be different. Here, a value obtained by weighting the sum of squares of the error regarding the vertex k (kεGh) by the length of the side h is defined as a distance function Eh of the side h. The distance function Eh of the side h can be expressed as the following formula (2).
一次方程式作成部104では、多角形スキャン部102で抽出された多角形mおよび、周囲多角形抽出部103で抽出された多角形mの周囲の多角形j(h∈Hm、かつ、j∈Fh)の形状情報から、一次方程式(9)の係数を作成する。上記で示される形状情報とは、amk(k∈Gh、h∈Hm)および、ajk(j∈Fh、k∈Gh、h∈Hm)のことである。また、上記(9)式は、2次元ベクトルの式ではあるが、2次元ベクトルの各要素ごとに演算をすることによって、通常のスカラー値と同じように方程式を作ることができる。
In the primary
以上のように、多角形mに関する一次方程式を作ることができた。多角形スキャン部102では、全ての多角形をスキャンする。その結果、一次方程式作成部104では、全ての多角形iに関する一次方程式を作ることができる。
As described above, a linear equation related to the polygon m could be made. The
ここで、我々が求めようとしている未知情報は、viである。ここで、多角形の数をNとすると、未知数は、v1,v2,…,vNのN個である。(実際には、viは2次元ベクトルであるので、未知スカラー値は2×Nであるが、ここではベクトルを一つの数として扱い、未知数をNとして表記した)。また、一つの多角形mに対して、(9)式に示される一次方程式を作ることができる。多角形数はNであるので、N個の一次方程式を作成することができる。この連立一次方程式を以下のように行列を用いて表すことができる。
Ax=b (10)
Aは係数行列であり、(9)式のうち以下に示す部分から計算できる。
Here, the unknown information that we are seeking is v i . Here, if the number of polygons is N, there are N unknowns v 1 , v 2 ,..., V N. (In fact, since v i is a two-dimensional vector, the unknown scalar value is 2 × N, but here the vector is treated as one number and the unknown is represented as N). In addition, a linear equation represented by equation (9) can be created for one polygon m. Since the number of polygons is N, N linear equations can be created. This simultaneous linear equation can be expressed using a matrix as follows.
Ax = b (10)
A is a coefficient matrix, and can be calculated from the following part of equation (9).
xはN行1列の未知ベクトルであり、(v1(u),v2(u),…,vN(u))Tである。
x is an unknown vector of N rows and 1 column, and is (v 1 (u), v 2 (u),..., v N (u)) T.
ここで、vi(u)はベクトルviの第u成分を示す(u=1,2)。さらに、bは、以下に示すN行1列の既知ベクトルである。これを式(12)に示す。 Here, v i (u) represents the u-th component of vector v i (u = 1, 2). Further, b is a known vector of N rows and 1 column shown below. This is shown in equation (12).
Bx=b (13)
となる。
以上で、一次方程式作成部104の説明を終える。
It becomes.
This is the end of the description of the primary
次に、多角形位置演算部105で式(13)の解を求める。多角形位置演算部105では、未知数がN−1で式の数がNの連立一次方程式(13)を解くことになる。方程式(13)は、最小二乗法を用いて解けばよい。例えば、
x=(BTB)-1BTb
などとして解くことができる。
Next, the polygon
x = (B T B) −1 B T b
And so on.
これにより、多角形の位置は、連立一次方程式を最小二乗法で解くという公知の手法を用いて計算することができる。以上で多角形位置演算部105の説明を終える。
Thereby, the position of the polygon can be calculated using a known method of solving simultaneous linear equations by the least square method. This is the end of the description of the polygon
次に並べ合わせ部106の説明を行う。並べ合わせ部106では、多角形位置演算部105で求められた多角形位置viと、既知である多角形形状aik、および、多角形の相対位置情報を基に、多角形の並べ合わせを行う。ここで、多角形相対位置情報として、既に述べた(情報2)を保持しているものとする。すなわち、各多角形インデクスiに対して、多角形iの頂点インデクスの集合Giが分かっているものとする。このような条件の下で、各多角形の各頂点の座標は、(i=1,2,…,N)として、
vi+aik (i=1,2,…,N、かつ、k∈Gi)
として求めることができる。以上で並べ合わせ部106の説明を終える。
Next, the
v i + a ik (i = 1, 2,..., N and kεGi)
Can be obtained as This completes the description of the
次に、多角形形状補正部107の動作および出力データ108を説明する。ある頂点kは、複数の多角形で共有されるべきであるにも関わらず、並べ合わせ部106で多角形を並べた結果、各多角形の頂点kの座標が異なる場合が存在する。このままでは、並べ合わせた多角形の隙間や重複が存在するので、その隙間や重複を無くすように、多角形形状を補正する。実際には、頂点座標の補正を行う。各頂点kに対して、以下の処理を行う。すなわち、頂点kの座標ベクトルxkを各多角形に属する頂点kの重心として、以下のように決定する。
Next, the operation of the polygon
a’ik=xk−vi
以上で、多角形形状補正部107の動作および出力データ108の説明を終える。これで、実施例1の動作の説明を終える。
a ′ ik = x k −v i
This is the end of the description of the operation of the polygonal
実施例1によれば、入力多角形の位置は多角形の位置に関する式を解くことにより決定し、入力多角形を平面上に並べることができる。これにより、3次元空間内の物体表面が多角形の集合体として表されている場合に、物体表面が展開不可能な場合であっても、多角形を平面上でできるだけ歪みが小さくなるように並べることができる。また、歪みの小さな展開図を作成するのに必要な測地線の距離を求める必要が無いため、測地線の距離を求めるための計算量を削減できる。 According to the first embodiment, the position of the input polygon can be determined by solving an expression related to the position of the polygon, and the input polygon can be arranged on a plane. As a result, when the object surface in the three-dimensional space is represented as a collection of polygons, even if the object surface cannot be expanded, the distortion of the polygon on the plane is minimized. Can be lined up. In addition, since it is not necessary to obtain the geodesic distance required to create a development with a small distortion, the amount of calculation for obtaining the geodesic distance can be reduced.
次に、実施例2について説明する。実施例1では、物体表面が一般の多角形で構成されている場合について説明した。実施例2では、特に、物体表面が凸四角形で構成されている場合に関して、説明を行う。また、実施例2は、多角形が規則的に並んでいて、多角形インデクスから、多角形の相対位置情報、すなわち、前記の(情報1)、(情報2)、あるいは(情報3)が容易に求められる場合の例を述べるものである。 Next, Example 2 will be described. In the first embodiment, the case where the object surface is formed of a general polygon has been described. In the second embodiment, the case where the object surface is formed of a convex quadrangle will be described. Further, in the second embodiment, polygons are regularly arranged, and the relative position information of the polygons, that is, the above (Information 1), (Information 2), or (Information 3) is easy from the polygon index. An example in the case where it is required is described.
さらに、本実施例2は、多角形iの座標と多角形iの位置ベクトルviの終点との位置関係を明確にした例を示すものである。さらに、本実施例2でも、実施例1と同様に、全ての多角形の頂点以外の辺上には、他の多角形の頂点の存在を認めないという条件を課す。以下、本実施例の説明を具体的に行う。 Further, the second embodiment shows an example in which the positional relationship between the coordinates of the polygon i and the end point of the position vector v i of the polygon i is clarified. Furthermore, also in the second embodiment, as in the first embodiment, a condition is imposed that the existence of vertices of other polygons is not allowed on sides other than the vertices of all polygons. Hereinafter, the present embodiment will be specifically described.
図9は、物体の表面の四角形が規則正しく並んでいる様子の説明図である。本実施例では、図9に示されるように、物体表面を構成する四角形が、2次元配列の行と列に対応するように、規則正しく並んでいることを前提とする。図9の四角形内に書かれた数字はその四角形(多角形)のインデクスを示す。例えば多角形(四角形)1、2、3、4は第1行、多角形(四角形)2、6、10、14は第2列などといった、2次元配列へのマッピングが可能なように配列されている。 FIG. 9 is an explanatory diagram showing a state in which the rectangles on the surface of the object are regularly arranged. In the present embodiment, as shown in FIG. 9, it is assumed that the rectangles forming the object surface are regularly arranged so as to correspond to the rows and columns of the two-dimensional array. The numbers written in the rectangle in FIG. 9 indicate the index of the rectangle (polygon). For example, polygons (squares) 1, 2, 3, 4 are arranged in a first row, polygons (squares) 2, 6, 10, 14 are arranged in a two-dimensional array such that they can be mapped into a second column, etc. ing.
この場合、多角形スキャン部102は、四角形の配置場所に対応した多角形インデクスが分かれば、その多角形の周囲多角形のインデクスや、その多角形の頂点インデクスを簡単に求めることができるため、実施例1で述べたような3次元空間内の物体表面を構成する多角形の相対位置を表すデータ、すなわち、(情報1)や、(情報2)や、(情報3)を決定することができるため、これらの情報を入力データとして特に持つ必要がない。これらの情報を持ってももちろん構わない。
In this case, if the
図10は、物体表面の四角形が規則正しく並んでいない様子の説明図である。ところが、図10に示されるような四角形の位置関係では、各四角形を2次元配列にマッピングすることができないため、本実施例の適用外となる。すなわち、本実施例2は、実施例1の条件を狭くし、さらに具体的にして、分かりやすいように説明するものである。 FIG. 10 is an explanatory diagram showing a state in which the rectangles on the object surface are not regularly arranged. However, in the positional relationship of the quadrangle as shown in FIG. 10, each quadrangle cannot be mapped to a two-dimensional array, and thus this example is not applicable. That is, in the second embodiment, the conditions of the first embodiment are narrowed, more specifically, and will be described in an easy-to-understand manner.
さて、本実施例2においても、式(9)を用いて一次方程式を作成する。図11は実施例2の動作説明図である。ここで、簡単のために、図11に示されるように、多角形スキャン部102で抽出された多角形インデクスが0、周囲多角形抽出部103で抽出された多角形インデクスが1〜4であるとする。また、図11に示すように、辺インデクスを1〜4、頂点インデクスを1〜4とする。このとき、式(9)において、m=0、Hm=H0={1,2,3,4}、F1={0,1}、F2={0,2}、F3={0,3}、F4={0,4}となり、また、G1={1,3}、G2={2,4}、G3={1,2}、G4={3,4}となる。
Now, also in the present Example 2, a linear equation is created using Formula (9). FIG. 11 is a diagram for explaining the operation of the second embodiment. Here, for simplicity, as shown in FIG. 11, the polygon index extracted by the
図12は実施例2の他の動作例を説明する図である。さらに、図12に示すように、2次元平面にマッピングするときの、各多角形1〜5の辺の長さを測定する。図12に示すように、多角形0の辺1の長さをL1、多角形1の辺1の長さをL1’とする。同様に、多角形0の辺2の長さをL2、多角形2の辺2の長さをL2’多角形0の辺3の長さをL3、多角形3の辺3の長さをL3’多角形0の辺4の長さをL4、多角形4の辺4の長さをL4’とする。ここで、LiとLi’の値は異なる値でも構わない。以上の条件下で、各辺の長さは、
L(1)=(L1+L1’)/2、
L(2)=(L2+L2’)/2、
L(3)=(L3+L3’)/2、
L(4)=(L4+L4’)/2
となる。このとき(9)式は、以下の(15)式に示すようになる。
2×{L(1)+L(2)+L(3)+L(4)}×v1
-2×L(1)×v1
-2×L(2)×v2
-2×L(3)×v3
-2×L(4)×v4
=
-{L(1)+L(3)}×a01-{L(3)+L(2)}×a02-{L(4)+L(1)}×a03-{L(2)+L(4)}×a04
+L(1)×(a11+a13)+L(2)×(a22+a24)+L(3)×(a31+a32)+L(4)×(a44+a43) (15)
となる。
FIG. 12 is a diagram for explaining another operation example of the second embodiment. Further, as shown in FIG. 12, the lengths of the sides of the
L (1) = (L1 + L1 ') / 2
L (2) = (L2 + L2 ') / 2,
L (3) = (L3 + L3 ') / 2,
L (4) = (L4 + L4 ') / 2
It becomes. At this time, the equation (9) becomes as shown in the following equation (15).
2 × {L (1) + L (2) + L (3) + L (4)} × v 1
-2 × L (1) × v 1
-2 × L (2) × v 2
-2 × L (3) × v 3
-2 × L (4) × v 4
=
-{L (1) + L (3)} × a 01- {L (3) + L (2)} × a 02- {L (4) + L (1)} × a 03- {L (2 ) + L (4)} × a 04
+ L (1) × (a 11 + a 13 ) + L (2) × (a 22 + a 24 ) + L (3) × (a 31 + a 32 ) + L (4) × (a 44 + a 43 ) (15)
It becomes.
係数行列Aは、各行の所定の列(各ベクトルviに相当する位置)に、係数2×{L(1)+L(2)+L(3)+L(4)}、あるいは、−2×L(h)を入れ、その他の位置に0を入れることによって作ることができる。本実施例2においては、上記の係数2×{L(1)+L(2)+L(3)+L(4)}、あるいは、−2×L(h)は、多角形に限らず同じであるため(どのベクトルの係数になるかは異なるが)、中心の多角形と周囲の多角形の相対位置さえわかれば、直ぐに選択することができるので、その都度計算を行う必要はない。このため、多角形位置演算部105は、多角形の相対位置から、各多角形の位置に関する一次方程式の係数を決定することができる。
The coefficient matrix A has a
また、実施例1でも述べたが、ベクトルviの終点と各多角形の位置関係は任意であるため、各四角形iの左下の頂点の座標をベクトルviの終点に一致させても良い。この場合、a01=a22=a43=0のように固定することができるので、入力データ101のデータ量を省略できる。このとき、式(15)は、以下の式(16)に示すようになる。
2×{L(1)+L(2)+L(3)+L(4)}×v1
-2×L(1)×v1
-2×L(2)×v2
-2×L(3)×v3
-2×L(4)×v4
=
-{L(3)+L(2)}×a02-{L(4)+L(1)}×a03-{L(2)+L(4)}×a04
+L(1)×(a11+a13)+L(2)×(a24)+L(3)×(a31+a32)+L(4)×(a44) (16)
となる。
As described in the first embodiment, since the positional relationship between the end point of the vector v i and each polygon is arbitrary, the coordinates of the lower left vertex of each quadrilateral i may be matched with the end point of the vector v i . In this case, since it can be fixed as a 01 = a 22 = a 43 = 0, the data amount of the input data 101 can be omitted. At this time, Expression (15) is as shown in Expression (16) below.
2 × {L (1) + L (2) + L (3) + L (4)} × v1
-2 × L (1) × v 1
-2 × L (2) × v 2
-2 × L (3) × v 3
-2 × L (4) × v 4
=
-{L (3) + L (2)} × a 02- {L (4) + L (1)} × a 03- {L (2) + L (4)} × a 04
+ L (1) × (a 11 + a 13 ) + L (2) × (a 24 ) + L (3) × (a 31 + a 32 ) + L (4) × (a 44 ) (16)
It becomes.
さらに、入力四角形が平行四辺形に限定する場合を考える。この場合、四角形の形状は二つのベクトルで表すことができるので、さらに入力データ101のデータ量を省略できる。他の部分は実施例1と同様に動作する。以上で実施例2の説明を終わる。 Further, consider a case where the input rectangle is limited to a parallelogram. In this case, since the quadrangular shape can be represented by two vectors, the data amount of the input data 101 can be further omitted. The other parts operate in the same manner as in the first embodiment. This is the end of the description of the second embodiment.
実施例2によれば、入力多角形が2次元行列にマッピングされるように配置された四角形である場合には、入力データの情報量と、展開処理のための計算量を削減することができる。 According to the second embodiment, when the input polygon is a quadrangle arranged so as to be mapped to a two-dimensional matrix, the information amount of input data and the calculation amount for the expansion process can be reduced. .
次に、実施例3について説明する。実施例1および実施例2では、全ての多角形の頂点以外の辺上には、他の多角形の頂点の存在を認めないという条件を課していたが、実施例3では、この条件を取り外し、多角形の頂点以外の辺上に、他の多角形の頂点の存在する場合に対しても本発明を適用可能にするものである。実施例3は、実施例1の物体表面平坦装置100と同じ構成で実現可能なであるため、図3を用いて説明する。まず、一般の多角形の場合に関して示す。 Next, Example 3 will be described. In Example 1 and Example 2, the condition that the existence of vertices of other polygons is not allowed on the sides other than the vertices of all polygons is imposed. The present invention can also be applied to the case where vertices of other polygons exist on the sides other than the removed vertices. Since the third embodiment can be realized with the same configuration as the object surface flattening device 100 of the first embodiment, it will be described with reference to FIG. First, the case of a general polygon will be described.
図13は実施例3の動作説明図である。図13に示されるように、多角形1の辺STに、他の多角形2および3の頂点Vが存在している場合を考える。この場合、実施例1に示された方式を適用することはできない。本実施例では、多角形1を、頂点Vの位置を新たな頂点とする二つの多角形に分割することによって、実施例1の手法を適用しようとするものである。多角形の分割は、多角形の形状情報および周辺多角形の形状情報に基づき多角形スキャン部102により行われる。したがって、多角形スキャン部102が特許請求の範囲における多角形分割手段に相当する。
FIG. 13 is a diagram for explaining the operation of the third embodiment. As shown in FIG. 13, consider a case in which vertices V of
適用の方法には以下の2種類がある。図14は多角形分割方式を説明する図である。図15は多角形分割方式の他の例を説明する図である。
(1)多角形1の頂点以外の辺上に他の多角形2、3の頂点Vが存在している場合に、頂点Vから、頂点S、T以外の一つの頂点に線を引くことによって多角形1を分割する。この方式の分割の様子を図14に示す。
(2)多角形1の頂点以外の辺上に他の多角形2、3の頂点Vが存在している場合に、頂点Vから、半直線を多角形1の内部の方向に引く。
There are the following two methods of application. FIG. 14 is a diagram for explaining the polygon division method. FIG. 15 is a diagram for explaining another example of the polygon division method.
(1) By drawing a line from the vertex V to one vertex other than the vertices S and T when the vertices V of the
(2) When the vertices V of the
このように直線を引くことにより、頂点Vを多角形の辺上の頂点ではなくすることができる。さらに、上記(2)の場合、半直線の方向を、図15における多角形2と多角形3の間の線分と同じにすることによって、より妥当な分割が可能になる。
By drawing a straight line in this way, the vertex V can be made not a vertex on the side of the polygon. Furthermore, in the case of (2) above, by making the direction of the half straight line the same as the line segment between the
実施例3によれば、多角形の頂点以外の辺上に他の多角形の頂点が存在している場合に、多角形の辺上にある頂点から線分あるいは半直線を引くことにより、その頂点と辺の交点を新たな頂点することで、多角形の辺上の頂点ではなくすことができるので、入力多角形の辺上に頂点がない場合と同様に物体表面を平面に展開できる。 According to Example 3, when a vertex of another polygon exists on a side other than the vertex of the polygon, the line segment or the half line is drawn from the vertex on the side of the polygon. By making the intersection of the vertex and the side a new vertex, it is possible to eliminate the vertex on the side of the polygon, so that the object surface can be developed on a plane as in the case where there is no vertex on the side of the input polygon.
なお、上記図3で説明した物体表面平坦化装置または物体表面平坦化方法は、例えば、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)等を用いて実現され、プログラムをハードディスク装置や、CD−ROM、DVDまたはフレキシブルディスクなどの可搬型記憶媒体等からインストールし、または通信回路からダウンロードし、CPUがこのプログラムを実行することで、図3に示した各機能を実現する。 Note that the object surface flattening apparatus or the object surface flattening method described in FIG. 3 is realized using, for example, a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. The program is installed from a hard disk drive, a portable storage medium such as a CD-ROM, a DVD, or a flexible disk, or downloaded from a communication circuit, and the CPU executes the program, so that each function shown in FIG. Realize.
以上本発明の好ましい実施例について詳述したが、本発明は係る特定の実施例に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形、変更が可能である。 Although the preferred embodiments of the present invention have been described in detail above, the present invention is not limited to the specific embodiments, and various modifications, within the scope of the gist of the present invention described in the claims, It can be changed.
100 物体表面平坦化装置
102 多角形スキャン部
103 周囲多角形抽出部
104 一次方程式作成部
105 多角形位置演算部
106 並べ合わせ部
107 多角形形状補正部
DESCRIPTION OF SYMBOLS 100 Object
Claims (13)
入力データから多角形の形状情報を抽出する手段と、
前記多角形と辺を共有する周辺多角形の形状情報を抽出する手段と、
前記多角形の形状情報および前記周辺多角形の形状情報から、前記平面上において前記多角形と前記周囲多角形との間で共有する辺間の距離についての関数を求め、前記関数に前記共有する辺間の距離が最小になるという条件を適用することにより、前記各多角形毎に、前記各多角形の位置を決定するための一次方程式を作成する係数取得手段と、
前記各多角形を決定するための一次方程式を解くことにより、前記各多角形の位置を算出する多角形位置算出手段と、
前記位置が算出された多角形を並べる手段とを具備することを特徴とする物体表面平坦化装置。 An object surface flattening device that develops on a plane an object surface in a three-dimensional space represented as a collection of polygons on a computer,
Means for extracting polygon shape information from input data;
Means for extracting shape information of a peripheral polygon sharing a side with the polygon;
From the shape information of the polygon and the shape information of the surrounding polygon , a function is calculated for a distance between sides shared between the polygon and the surrounding polygon on the plane, and the function is shared with the function Applying the condition that the distance between sides is minimized, for each polygon, coefficient acquisition means for creating a linear equation for determining the position of each polygon;
Polygon position calculating means for calculating the position of each polygon by solving a linear equation for determining each polygon;
An object surface flattening apparatus comprising: means for arranging the polygons whose positions are calculated.
前記多角形の形状を表すデータは、共通の始点から多角形の各頂点への2次元ベクトルであり、
前記共通の始点へのベクトルは多角形の位置を表すベクトルであることを特徴とする請求項1から請求項3の何れか一項に記載の物体表面平坦化装置。 The input data includes data representing the shape of a polygon constituting the object surface in a three-dimensional space;
The data representing the shape of the polygon is a two-dimensional vector from a common starting point to each vertex of the polygon,
The object surface flattening device according to any one of claims 1 to 3, wherein the vector to the common starting point is a vector representing a polygonal position.
前記相対位置を表すデータは、
3次元空間内の物体表面を構成する多角形の各辺に対し、該各辺をどの多角形が共有しているかを示す情報、および/または、3次元空間内の物体表面を構成する多角形にはどの辺が存在しているかを示す情報、
および、各辺の両端の頂点インデクスのデータであることを特徴とする請求項1から請求項4の何れか一項に記載の物体表面平坦化装置。 The input data includes data representing the relative positions of polygons constituting the object surface in a three-dimensional space;
The data representing the relative position is
Information indicating which polygon shares each side of the polygon constituting the object surface in the three-dimensional space and / or the polygon constituting the object surface in the three-dimensional space Contains information about which side is present,
5. The object surface flattening device according to claim 1, wherein the data is vertex index data at both ends of each side. 6.
前記多角形の形状を抽出する手段は、前記四角形の配置場所に対応した多角形インデクスから前記3次元空間内の物体表面を構成する多角形の相対位置を表すデータを決定し、
前記係数取得手段は、前記多角形の相対位置から、前記各多角形の位置に関する式の係数を決定することを特徴とする請求項1から請求項3の何れか一項に記載の物体表面平坦化装置。 The polygon included in the input data is a quadrangle arranged so as to be mapped to a two-dimensional matrix,
The means for extracting the shape of the polygon determines data representing a relative position of the polygon constituting the object surface in the three-dimensional space from the polygon index corresponding to the location of the quadrangle,
The object surface flatness according to any one of claims 1 to 3, wherein the coefficient acquisition unit determines a coefficient of an expression related to a position of each polygon from a relative position of the polygon. Device.
入力データから多角形の形状情報を抽出するステップと、
前記多角形と辺を共有する周辺多角形の形状情報を抽出するステップと、
前記多角形の形状情報および前記周辺多角形の形状情報から、前記平面上において前記多角形と前記周囲多角形との間で共有する辺間の距離についての関数を求め、前記関数に前記共有する辺間の距離が最小になるという条件を適用することにより、前記各多角形毎に、前記各多角形の位置を決定するための一次方程式を作成するステップと、
前記各多角形の位置を決定するための一次方程式を解くことにより、前記各多角形の位置を算出するステップと、
前記位置が算出された多角形を並べるステップとを実行させるためのプログラム。 In order to expand the surface of an object in a three-dimensional space represented as a collection of polygons on a plane,
Extracting polygon shape information from input data;
Extracting shape information of a surrounding polygon that shares a side with the polygon; and
From the shape information of the polygon and the shape information of the surrounding polygon , a function is calculated for a distance between sides shared between the polygon and the surrounding polygon on the plane, and the function is shared with the function Creating a linear equation for determining the position of each polygon for each polygon by applying the condition that the distance between sides is minimized ;
Calculating the position of each polygon by solving a linear equation for determining the position of each polygon;
A program for executing the step of arranging the polygons whose positions are calculated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004113257A JP4325469B2 (en) | 2004-04-07 | 2004-04-07 | Object surface flattening apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004113257A JP4325469B2 (en) | 2004-04-07 | 2004-04-07 | Object surface flattening apparatus and program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2005301426A JP2005301426A (en) | 2005-10-27 |
JP2005301426A5 JP2005301426A5 (en) | 2007-05-24 |
JP4325469B2 true JP4325469B2 (en) | 2009-09-02 |
Family
ID=35332922
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004113257A Expired - Fee Related JP4325469B2 (en) | 2004-04-07 | 2004-04-07 | Object surface flattening apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4325469B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2915605B1 (en) * | 2007-04-26 | 2009-09-11 | Airbus France Sas | METHOD AND DIPOSITIVE FOR MODELING PREDECOUTS OR PONCIFS FOR THREE-DIMENSIONAL OBJECTS WITH UNDEVELOPPED SURFACES AND FOR ASSISTING THE TRANSFER OF TWO-DIMENSIONAL PATTERNS ON THESE OBJECTS |
-
2004
- 2004-04-07 JP JP2004113257A patent/JP4325469B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005301426A (en) | 2005-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4845147B2 (en) | Perspective editing tool for 2D images | |
US7664312B2 (en) | Information input and output method using dot pattern | |
JP4119529B2 (en) | Virtual environment generation method and apparatus, and recording medium on which virtual environment generation program is recorded | |
TW200537393A (en) | Graphic processing apparatus, graphic processing system, graphic processing method and graphic processing program | |
US20140267252A1 (en) | Using curves to emulate soft body deformation | |
JPH0771936A (en) | Device and method for processing image | |
CN111583381B (en) | Game resource map rendering method and device and electronic equipment | |
JP3630934B2 (en) | Texture recording method | |
JP4325469B2 (en) | Object surface flattening apparatus and program | |
JP5356711B2 (en) | Map information correction apparatus, map information correction method, and program | |
Inoue | A new construction method for circle cartograms | |
US9532071B2 (en) | Resampling apparatus, method, and recording medium having resampling program recorded therein for digital image | |
JP4541537B2 (en) | Drawing device | |
JP3993423B2 (en) | Electronic publication browsing apparatus, electronic publication browsing program, and computer-readable recording medium recording the program | |
JP2007282906A (en) | Method, apparatus, and program of medical image processing | |
JP4325395B2 (en) | Method, apparatus, and program for expanding object surface in three-dimensional space on plane | |
US10878610B1 (en) | Generating an animation feature from line deformations | |
JP4177017B2 (en) | Orthophoto generation method, orthophoto generation system, and orthophoto generation program | |
JPH10198824A (en) | Video generation and processing device, and structure data preparing device for preparing structured data to be used for the same | |
JP6697573B2 (en) | Hairstyle simulation device, hairstyle simulation method, and computer program | |
JP3679347B2 (en) | Pattern change simulation system | |
JP6441032B2 (en) | Corresponding point search device, corresponding point search program, and corresponding point search method | |
CN112488909A (en) | Multi-face image processing method, device, equipment and storage medium | |
JP7281782B2 (en) | video projection system | |
JP6800363B1 (en) | program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070326 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070326 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090224 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090422 |
|
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: 20090519 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090601 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120619 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120619 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130619 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140619 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |