JP3643237B2 - Approximate polygon surface smoothing method - Google Patents

Approximate polygon surface smoothing method Download PDF

Info

Publication number
JP3643237B2
JP3643237B2 JP10748298A JP10748298A JP3643237B2 JP 3643237 B2 JP3643237 B2 JP 3643237B2 JP 10748298 A JP10748298 A JP 10748298A JP 10748298 A JP10748298 A JP 10748298A JP 3643237 B2 JP3643237 B2 JP 3643237B2
Authority
JP
Japan
Prior art keywords
vertex
original
normal vector
value
vertices
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP10748298A
Other languages
Japanese (ja)
Other versions
JPH11306392A (en
Inventor
直樹 阿部
克則 下村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP10748298A priority Critical patent/JP3643237B2/en
Publication of JPH11306392A publication Critical patent/JPH11306392A/en
Application granted granted Critical
Publication of JP3643237B2 publication Critical patent/JP3643237B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、与えられた曲面をポリゴン化して近似的に表現する複数の元の三角形を細分化することにより、それら複数の元の三角形の集合により形成される近似ポリゴン表面をスムース化する技術に関するものである。
【0002】
【従来の技術】
特開平8−263692号公報には、細分化に先立ち、その細分化により発生させるべき複数の三角形の頂点であって元の三角形にはない新規頂点を、その元の三角形の各辺の両端における2つの頂点と、それら2つの頂点の各々における法線ベクトルである2つの頂点法線ベクトルとに基づき、その辺上にではなく、その辺が近似すべき曲線要素上に発生させる技術が記載されている。
また、この公報には、頂点法線ベクトルを決定する方法に関し、『例えば、CT X線断層撮影装置又はMR装置のような画像補捉測定装置1は、検査されるべき対象物の多数の断層画像又は3次元画像を形成する。上記画像に基づいて、画像処理装置2は、多数の三角形によって対象物の面を近似的に表す物体モデルを形成する。上記三角形の頂点の位置情報と、上記頂点における上記対象物の面に対する法線は、画像メモリ3に記憶される。』と記載されている。
【0003】
【発明が解決しようとする課題,課題解決手段,作用および発明の効果】
しかし、この公報は、『上記頂点における上記対象物の面に対する法線』、すなわち、前記頂点法線ベクトルを決定する方法を具体的に教えてはいない。
一方、頂点法線ベクトルを利用する近似ポリゴン表面スムース化方法においては、頂点法線ベクトルが、容易に決定できるとともに、真のもの、すなわち、与えられた曲面に対する法線ベクトルであって頂点を通過するものにできる限り一致するように精度よく決定できることが望ましい。
【0004】
本発明は、以上の事情を背景として、頂点法線ベクトルを容易にかつ精度よく決定することにより、与えられた曲面を容易にかつ精度よく再現し得る近似ポリゴン表面スムース化方法を提供することを課題としてなされたものである。
【0005】
その課題は下記態様によって解決される。なお、以下の説明において、本発明の各態様を、それぞれに項番号を付して請求項と同じ形式で記載する。
【0006】
(1) 与えられた曲面をポリゴン化して近似的に表現する複数の元の三角形を細分化することにより、それら複数の元の三角形の集合により形成される近似ポリゴン表面をスムース化する方法であって、細分化に先立ち、その細分化により発生させるべき複数の三角形の複数の頂点であって元の三角形にはない新規頂点を、その元の三角形の各辺の両端における2つの頂点と、それら2つの頂点の各々における法線ベクトルである2つの頂点法線ベクトルとに基づき、その辺上にではなく、その辺が近似すべき曲線要素上に発生させる近似ポリゴン表面スムース化方法であって、
メモリが、前記複数の元の三角形のデータを記憶し、
プロセッサが、そのメモリに記憶されているデータに基づいて、前記2つの頂点の各々に関し、前記複数の元の三角形のうちそれら各頂点を共有するものを抽出するステップと、
プロセッサが、その抽出した複数の元の三角形に関し、元の三角形の3つの頂点に基づいてその元の三角形の面に対する法線ベクトルを複数の面法線ベクトルとして取得するステップと、
プロセッサが、その取得した複数の面法線ベクトルに基づいて前記頂点法線ベクトルを、前記2つの頂点についてそれぞれ決定し、その決定に際して、各面法線ベクトルの影響を頂点法線ベクトルに、各面法線ベクトルに対応する前記元の三角形の前記共有頂点における角度が大きいほど強く及ぼさせるステップと、
プロセッサが、その決定した2つの頂点法線ベクトルと前記2つの頂点とに基づいて前記曲線要素を取得するステップと、
プロセッサが、その取得した曲線要素上に前記新規頂点を発生させるステップと
を含むことを特徴とする近似ポリゴン表面スムース化方法〔請求項1〕。
本発明者らは、元の三角形の3つの頂点の位置が判れば元の三角形の面に対する法線ベクトルである面法線ベクトルを取得でき、また、同じ頂点を共有する複数の元の三角形について面法線ベクトルが分かれば頂点法線ベクトルを決定できることに気がついた。また、面法線ベクトルは、与えられた曲面のうち元の三角形が近似すべき曲面要素に対する代表的な法線ベクトルと十分に一致すると考えられるため、面法線ベクトルを用いて頂点法線ベクトルを決定することは、結果的に曲面要素に対する法線ベクトルであってその頂点を通過するものを考慮して頂点法線ベクトルが決定されることになることにも気がついた。
以上の知見に基づき、本項に記載の方法においては、同じ頂点を共有する複数の元の三角形に関し、元の三角形の3つの頂点に基づいてその元の三角形の面法線ベクトルが取得され、それら複数の元の三角形について取得された複数の面法線ベクトルに基づいてその頂点における頂点法線ベクトルが決定される。
したがって、この方法によれば、頂点法線ベクトルを容易にかつ精度よく決定でき、その結果、与えられた曲面を容易にかつ精度よく再現できる。
しかも、各面法線ベクトルの影響が、決定すべき頂点法線ベクトルに、同じ頂点を共有する複数の元の三角形の間で常に互いに等しい強さで及ぼされるのではなく、その共有頂点の角度が大きい三角形ほど、その三角形に対応する面法線ベクトルの影響が、決定すべき頂点法線ベクトルに強く及ぼされる。そのため、頂点法線ベクトルを真のもの、すなわち、与えられた曲面に対する法線ベクトルであって頂点を通過するものにより近いものとして決定できる。
(2) 前記プロセッサが、前記複数の面法線ベクトルに基づいて前記複数の元の三角形について前記2つの頂点法線ベクトルを決定した後に、それら決定した2つの頂点法線ベクトルの各々を、それら各頂点法線ベクトルと同様にして決定されてそれら各頂点法線ベクトルに隣接する他の複数の頂点法線ベクトルの少なくとも一つに基づいて修正するステップを含む (1)項に記載の近似ポリゴン表面スムース化方法〔請求項2〕。
この方法によれば、隣接する他の複数の頂点法線ベクトルを全く考慮しないで頂点法線ベクトルを決定する場合に比較して、互いに近接する複数の頂点法線ベクトルが向きが互いにより連続性を有するように決定できる。
(3) 前記プロセッサが、前記複数の元の三角形の各辺が互いに接続されることによって構成される複数の構成線の少なくとも一つを特徴線として取得するステップを含み、かつ、前記プロセッサが前記頂点法線ベクトルを2つの頂点についてそれぞれ決定するステップが、前記頂点法線ベクトルを決定すべき頂点がその取得した特徴線上にない場合には、その頂点を共有するすべての元の三角形の面法線ベクトルに基づいて前記頂点法線ベクトルを決定し、一方、その取得した特徴線上にある場合には、その特徴線の一側に位置する少なくとも一つの元の三角形の面法線ベクトルに基づいて第1の頂点法線ベクトル、他側に位置する少なくとも一つの元の三角形の面法線ベクトルに基づいて第2の頂点法線ベクトルをそれぞれ決定するステップを含む (1)項または (2)項に記載の近似ポリゴン表面スムース化方法(請求項3〕。
与えられた曲面においてある線を境界とする2部分の面の向きが互いに大きく異なる場合、その境界上の頂点における頂点法線ベクトルを、境界の両側に位置する複数の面法線ベクトルに基づいて決定すると、最終的に、それら2部分の面間の角度が小さくなるように近似ポリゴン表面のスムース化が行われてしまう。このような事態を容認したのでは、近似ポリゴン表面の再現性を低下させることになる。
これに対して、本項に記載の方法においては、境界上の頂点については、境界の一側と他側とで互いに独立して頂点法線ベクトルがそれぞれ決定される。
したがって、この方法によれば、曲面のうち2部分の面の向きが互いに大きく異なる部分についても、頂点法線ベクトルを適正に決定できる。
(4) 前記複数の元の三角形のうち同じ辺を共有する2つの元の三角形を抽出し、その抽出した2つの元の三角形がその共有辺において接続される角度が基準値より小さい場合には、その共有辺を前記特徴線として抽出する一方、基準値以上である場合には、抽出しない工程を含む (3)項に記載の近似ポリゴン表面スムース化方法〔請求項4〕。
この方法において「特徴線の抽出」は、作業者により行っても、コンピュータにより行ってもよい。
(5) 前記プロセッサが2つの頂点法線ベクトルと2つの頂点とに基づいて曲線要素を取得するステップが、
(a) 取得すべき前記曲線要素に対応する前記辺に対して、それの両端点の一方である第1端点を始点、他方である第2端点を終点とする第1関数と、第2端点を始点、第1端点を終点とする第2関数とを定義するステップと、
(b) 前記第1関数と、前記第1端点における前記頂点法線ベクトルである第1頂点法線ベクトルとの積を第1端点から辺上の任意点まで積分した値を、第1関数の下で前記辺に対応する第1曲線要素を取得するために辺上の任意点を移動させる向きと量とを表す第1移動ベクトルとするステップと、
(c) 前記第2関数と、前記第2端点における前記頂点法線ベクトルである第2頂点法線ベクトルとの積を第2端点から辺上の任意点まで積分した値を、第2関数の下で前記辺に対応する第2曲線要素を取得するために辺上の任意点を移動させる向きと量とを表す第2移動ベクトルとするステップと、
(d) それら第1および第2移動ベクトルの和として、前記辺に対応する最終曲線要素を取得するステップであって、前記第1関数および前記第2関数の各々が、
(i) 前記辺上を始点から終点まで移動するにつれて0から辺の長さLまで変化する変数tを有し、
(ii) その変数tに関して0から辺の長さLまで積分した値が0となり、
(iii) 前記変数tが0のときに値h、変数tが辺の長さの半値L/2のときに大きさが値hの半分であって符号が値hとは逆である値−h/2、変数tが辺の長さLのときに0となり、
(iv) 前記値hが、前記最終曲線要素が第1および第2端点において前記第1および第2頂点法線ベクトルとそれぞれ直交するように設定されているステップと
を含む (1)項ないし (4)項のいずれかに記載の近似ポリゴン表面スムース化方法〔請求項5〕。
この方法によれば、曲線要素を、その形状の種類を問わず、同じ種類の関数によって表現でき、よって、曲線要素の形状の種類に対して汎用性が高い近似ポリゴン表面スムース化方法が得られる。
(6) 前記第1関数および前記第2関数の各々が、横軸に前記変数t、縦軸に各関数の値が取られた座標面において、変数tが0であり、かつ、関数値が前記値hである点と、変数tが前記半値L/2であり、かつ、関数値が前記値−h/2である点と、変数tが前記長さLであり、かつ、関数値が0である点とを相互に1本の直線でつないだグラフで表される関係を定義するものである (5)項に記載の近似ポリゴン表面スムース化方法〔請求項6〕。
この方法によれば、前項の記載の関数として使い勝手のよいものを使用できる。
(7) 前記プロセッサが、前記細分化に先立ち、前記元の三角形の各辺とそれに対応する前記曲線要素との隔たりが基準値より大きい場合には、その辺に関して前記新規頂点を発生させる一方、基準値以下である場合には、発生させない (1)項ないし (6)項のいずれかに記載の近似ポリゴン表面スムース化方法〔請求項7〕。
この方法においては、複数の元の三角形の複数の辺のうち、辺の細分化(新規頂点の発生)が必要でないものについては辺の細分化が省略される。したがって、この方法によれば、無駄な辺の細分化を回避できる。
この方法において「元の三角形」は、細分化の対象となる三角形を意味する。よって、「元の三角形」は、最初の細分化に際しては最初の三角形を意味し、再度の細分化に際してはその細分化の直前に存在する三角形を意味することとなる。
(8) 前記プロセッサが、前記細分化に先立ち、前記曲面のうち作業者により指定された領域内においては、前記元の三角形の各辺とそれに対応する前記曲線要素との隔たりが第1基準値より大きい場合には、その辺に関して前記新規頂点を発生させる一方、第1基準値以下である場合には、発生させず、指定された領域外においては、前記隔たりが第2基準値より大きいか否かを問わず、すべての前記辺に関して前記新規頂点を発生させる (1)項ないし (6)項のいずれかに記載の近似ポリゴン表面スムース化方法〔請求項8〕。
この方法によれば、例えば、第1基準値を第2基準値より小さく設定し、それにより、指定領域の内側において外側におけるより細かな辺の細分化を行おうとする場合に、指定領域内において、細かな辺の細分化が無駄に行われてしまうことを回避できる。
(9) 前記プロセッサが、前記細分化を、前記曲面のうち作業者により指定された領域内においてのみ行う (1)項ないし (6)項のいずれかに記載の近似ポリゴン表面スムース化方法〔請求項9〕。
(10) (1)項ないし (9)項のいずれかに記載の近似ポリゴン表面スムース化方法を実施するためにコンピュータにより実行されるプログラムが記録されたことを特徴とするコンピュータ読み取り可能な記録媒体〔請求項10〕。
ここにおける「記録媒体」には例えば、フレキシブルディスク,磁気テープ,磁気ディスク,磁気ドラム,磁気カード,光ディスク,光磁気ディスク,ROM,CD−ROM,ICカード,穿孔テープ等がある。
【0007】
【発明の実施の形態】
以下、本発明のいくつかの実施の形態である近似ポリゴン表面スムース化方法を図面に基づいて詳細に説明する。
【0008】
まず、第1実施形態を説明する。
図1には、本実施形態を実施するのに使用されるデータ処理システムが示されている。このシステムにおいては、コンピュータ10に入力装置12,出力装置14,表示装置16および外部記憶装置18が接続されている。コンピュータ10は、プロセッサ20およびメモリ22を備えている。入力装置12は、キーボード,マウス,デジタイザ等により構成される。出力装置14は、プリンタ,プロッタ等により構成される。表示装置16は、CRT,液晶ディスプレイ等により構成される。外部記憶装置18は、可搬な記録媒体24に対してデータの読み込みと書き込みとを行う部分を含むように構成される。記録媒体24には、コンピュータ10により実行されるアプリケーションプログラムとしての近似ポリゴン表面スムース化プログラム(以下、単に「スムース化プログラム」という)が記録されるとともに、そのスムース化プログラムが実行される対象としてのSTL(ステレオリソグラフィ)データが記録されている。
【0009】
STLデータは、光造形方法により製造すべき3次元モデルの形状を表現するための標準的なデータとして知られている。STLデータは、与えられた曲面を複数の三角形の集合により近似的に表現するデータであり、各々三角形に関する情報を表す複数の三角形データを含んでいる。各三角形データは、属性として、
▲1▼三角形の番号である三角形番号を表すデータと、
▲2▼三角形の3辺の各々の番号である辺番号を表すデータと、
▲3▼各辺の両端点の座標値である端点座標値を表すデータと、
▲4▼それら三角形番号,辺番号および端点座標値間の関連を表すデータと
を有している。ただし、STLデータは、各三角形とそれが隣接する他の三角形との関係である隣接関係を直接に規定する隣接関係規定データを有してはいない。
【0010】
作業者は、コンピュータ10の電源を投入した後、近似ポリゴン表面スムース化の実行指令を入力するとともに、その実行対象であるSTLデータを指定する。それに応じて、外部記憶装置18が記録媒体24から、上記スムース化プログラムとSTLデータとを読み出してメモリ22にストアする。その後、プロセッサ20はスムース化プログラムをメモリ22から読み出してSTLデータを対象として実行する。
【0011】
スムース化プログラムが実行されると、まず、図2のステップS1(以下、単に「S1」で表す。他のステップについても同じ)において、STLデータに上記隣接関係規定データが付加される。具体的には、まず、複数の元の三角形の各々がそれの三角形番号に従って順に対象三角形とされ、次に、その対象三角形がそれの各辺において隣接する他の元の三角形である隣接三角形が求められ、続いて、対象三角形の各辺の辺番号と、隣接三角形の三角形番号と、その隣接三角形の3辺のうち対象三角形と共有する共有辺の辺番号とが互いに関連付けられたデータが隣接関係規定データとしてメモリ22にストアされる。隣接関係規定データの付加によってSTLデータの構造が変化する様子を概念的に可視化して説明すれば、隣接関係規定データの付加前は、図3の(a) に示すように、複数の三角形データが直接には互いに関連付けられずにばらばらに存在していたが、隣接関係規定データの付加後は、同図の(b) に示すように、複数の三角形データが直接に互いに関連付けられることになる。
【0012】
次に、S2において、複数の元の三角形の複数の辺の中から、STLデータにより表現すべき曲面の形状を特徴付けるものが特徴線として抽出される。具体的には、同じ辺において互いに接続される2つの元の三角形の面が成す角度が基準値より小さい場合に、その辺が特徴線として抽出される。図4の例では、辺100において互いに接続される2つの元の三角形102,104の接続角度が基準値より小さいため、辺100が特徴線として抽出される。同様にして、辺106において互いに接続される2つの元の三角形108,110の接続角度が基準値より小さいため、辺106が特徴線として抽出される。結局、この例においては、2本の閉じた太い実線で示す複数の辺が特徴線として抽出される。なお、2つの元の三角形の接続角度は、それら2つの元の三角形の内側における角度として定義でき、また、その場合、基準値を100〜120度に設定できる。
【0013】
続いて、S3において、複数の元の三角形の複数の頂点の各々について頂点法線ベクトルが決定される。このステップの詳細が図5に頂点法線ベクトル決定ルーチンとしてフローチャートで表されている。
【0014】
本ルーチンにおいては、まず、S11において、複数の元の三角形の複数の頂点の各々が順に対象頂点に決定され、次に、S12において、複数の元の三角形の中から、その決定された対象頂点を共有する複数の元の三角形が抽出される。続いて、S13において、抽出された複数の元の三角形の各々の3つの頂点の位置データがメモリ22から読み込まれ、その読み込まれた位置データに基づき、その複数の元の三角形の各々の面に対する法線ベクトルである面法線ベクトルが取得される。具体的には、元の三角形の3つの頂点を含む一平面が取得され、その取得された一平面に直交する単位ベクトルとして面法線ベクトルが取得される。
【0015】
その後、S14において、今回の対象頂点が、前記抽出された特徴線上にないか否かが判定される。今回はないと仮定すれば、判定がYESとなり、S15において、その対象頂点について1つの頂点法線ベクトルが決定される。具体的には、抽出された複数の元の三角形に対応する複数の面法線ベクトルの加重平均が1つの頂点法線ベクトルに決定される。加重平均における重みは、各面法線ベクトルが対応する元の三角形の3つの頂点のうち対象頂点と一致するものの角度が大きいほど、大きく設定されている。
【0016】
図6の(a) には、対象頂点が特徴線上にない場合の一例が示されている。この場合、対象頂点120を共有する複数の元の三角形122,124,126,128,130の全ての面法線ベクトル132,134,136,138,140の加重平均として1つの頂点法線ベクトル142が決定される。
【0017】
これに対して、今回の対象頂点が、前記抽出された特徴線上にある場合には、S14の判定がNOとなり、S16において、その対象頂点について2つの頂点法線ベクトル、すなわち、第1および第2頂点法線ベクトルが決定される。具体的には、対象頂点を共有する複数の元の三角形が、その特徴線に関して一側にあるグループと他側にあるグループとに分けられ、各グループ毎に頂点法線ベクトルが、S15におけると同様にして決定される。第1頂点法線ベクトルは、特徴線の一側にある元の三角形のグループ、第2頂点法線ベクトルは、特徴線の他側にある元の三角形のグループにそれぞれ対応して決定される。
【0018】
図6の(b) には、対象頂点が特徴線上にある場合の一例が示されている。この場合、特徴線150上にある対象頂点152に関して、元の三角形154,156,158が第1グループ、元の三角形160,162が第2グループを構成する。そして、第1グループに属する3つの元の三角形154,156,158の3つの面法線ベクトルの加重平均として第1頂点法線ベクトル164が決定され、一方、第2グループに属する2つの元の三角形160,162の2つの面法線ベクトルの加重平均として第2頂点法線ベクトル166が決定される。
【0019】
いずれの場合にも、その後、S17において、全ての頂点について頂点法線ベクトルが決定されたか否かが判定される。今回は、そうではないと仮定すれば、判定がNOとなり、S11に戻り、新たな頂点が対象頂点に決定されて以下のステップが前記の場合と同様に実行される。これに対して、全ての頂点について頂点法線ベクトルが決定されたと仮定すれば、S17の判定がYESとなり、S18に移行する。
【0020】
S18においては、決定された複数の頂点法線ベクトルが順に対象頂点法線ベクトルに決定されるとともに、対象頂点法線ベクトルの向きが、隣接する他の少なくとも一つの頂点法線ベクトルの向きを考慮して修正される。隣接する他の少なくとも一つの頂点法線ベクトルは、他の複数の頂点法線ベクトルのうち、通過する頂点が、対象頂点法線ベクトルが通過する頂点を中心として半径が設定値である球内に存在するものとして抽出される。また、隣接する他の少なくとも一つの頂点法線ベクトルのうち、それが通過する頂点と対象頂点法線ベクトルが通過する頂点との距離が短いものほど、対象頂点法線ベクトルに強い影響を及ぼすように修正される。このようにすることにより、複数の頂点法線ベクトル間で向きの連続性が向上させられることになる。以上で本ルーチンの一回の実行が終了する。
【0021】
以上のようにしてS3が終了すれば、続いて、図2のS4において、三角形が細分化される。本ステップの詳細が図7に三角形細分化ルーチンとしてフローチャートで表されている。
【0022】
まず、S31において、複数の元の三角形の複数の辺が順に対象辺とされるとともに、その対象辺について山谷関数f(t) が定義される。山谷関数f(t) は、図8に示すように、下に凸の折れ線のグラフで表される。図において、「L」は、対象辺の長さを表しており、また、「t」は、対象辺上を始点P0 から終点PL まで移動するにつれて0からLまで変化する変数である。この山谷関数f(t) は、上記長さLと値hとが設定されれば、唯一に特定される。長さLは、その対象辺の両端における2つの頂点に基づいて設定される。値hの設定については後述する。
【0023】
この山谷関数f(t) は、t=0〜Lを積分区間として積分すると、0になるように定義される。また、その山谷関数f(t) と頂点法線ベクトルNとの積をt=0〜t(0≦t≦L)を積分区間として積分したもの、すなわち、
∫N・f(t) dt
は、図9に示すように、対象辺S上の任意点Pt が、対象辺Sから曲線要素Cに到達するまでに移動する向きおよび量を示す移動ベクトルXt である。その向きはもちろん、頂点法線ベクトルNに平行である。図の例においては、Xt1は任意点Pt1の移動ベクトル、Xt2は任意点Pt2の移動ベクトルを示している。
【0024】
山谷関数f(t) は、対象辺Sの第1端点Q1 を始点P0 、第2端点Q2 を終点PL とする第1山谷関数f1 (t) と、第2端点Q2 を始点P0 、第1端点Q1 を終点PL とする第2山谷関数f2 (t) とを含んでいる。図10には、それら第1および第2山谷関数f1 (t) ,f2 (t) により表される第1および第2曲線要素C1 ,C2 がそれぞれ示されている。
【0025】
そして、第1山谷関数f1 (t) による第1移動ベクトルXt と、第2山谷関数f2 (t) による第2移動ベクトルYt との和を対象辺S全体について取得すれば、第1および第2曲線要素C1 ,C2 の合成が取得され、これが対象辺Sに対応する最終曲線要素CFNL となる。この最終曲線要素CFNL は、対象辺Sの両端点において各頂点法線ベクトルN1 ,N2 と直交する。図11は、変数tの同じ値に関する第1移動ベクトルXt と第2移動ベクトルYt とのベクトル和が、対象辺S上の、変数tに対応する任意点Pt を始点として最終曲線要素CFNL 上に終点を有する移動ベクトルZt を意味することを示している。図には、変数tがt1 ,t2 ,t3 であるときの3つの移動ベクトルZt1,Zt2,Zt3が示されている。
【0026】
ここで、値hの設定方法について説明する。
値hは、対象辺Sに対応する最終曲線要素CFNL がその対象辺Sの両端点Q1 ,Q2 において各頂点法線ベクトルN1 ,N2 と直交することとなるように設定される。
【0027】
対象辺S上の任意点Pt の位置ベクトルをP(t) とすれば、第1曲線要素C1 上の任意点R1tであって対象辺S上の任意点Pt に対応するものの位置ベクトルR1 (t) は、
1 (t) =P(t) +∫N1 ・f1(t) dt
で表される。一方、第2曲線要素C2 上の任意点R2tであって対象辺S上の任意点Pt に対応するものの位置ベクトルR2 (L-t) は、
2(L-t)=P(L-t) +∫N2 ・f2(L-t) dt
で表される。よって、最終曲線要素CFNL の第1端点Q1 における位置ベクトルR(0) は、
1(0)+R2 (L)
={P(0) +∫N1 ・f1(t) dt }+{P(L) +∫N2 ・f2(L-t) dt }
=P(0) +N1 ・h1 +P(L) +0
となる。ここで、第1端点Q1 を始点、第2端点Q2 を終点とするベクトルをUと定義すれば、位置ベクトルR(0) は、
U+N1 ・h1
となる。この位置ベクトルR(0) が0となるように、第1山谷関数f1(t)の値h1 が設定される。
同様にして、最終曲線要素CFNL の第2端点Q2 における位置ベクトルR(L) は、
1(L)+R2 (0)
={P(L) +∫N1 ・f1(t) dt }+{P(0) +∫N2 ・f2(L-t) dt }
=P(L) +0+P(0) +N2 ・h2
となる。この位置ベクトルR(L) は結局、
U+N2 ・h2
となる。この位置ベクトルR(L) が0となるように、第2山谷関数f2(t)の値h2 が設定される。
【0028】
次に、図7のS32において、最終曲線要素CFNL (以下、単に「曲線要素C」という)上において、対象辺Sの中点PM (t=L/2)に対応する点RM が取得される。その対応点RM と中点PM との間の移動ベクトルZM は、上述の説明から明らかなように、
M =∫N1 ・f1(L/2) dt +∫N2 ・f2(L/2) dt
で表される。図12には、その移動ベクトルZM の一例が示されている。
【0029】
続いて、図7のS33において、複数の元の三角形が順に対象三角形とされるとともに、対象三角形が4つの三角形に細分化される。対象三角形の3つの頂点と上記S32において取得された3つの対応点RM とからなる6つの点を相互に複数の直線要素でつなぐことによって複数の三角形に分割されるのである。図13には、3つの頂点Q1 ,Q2 ,Q3 を有する元の三角形170が示されるとともに、その元の三角形170が、3つの頂点Q1 ,Q2 ,Q3 と3つの対応点RM1,RM2,RM3とからなる6つの点を複数の直線要素に互いにつなぐことにより、4つの新たな三角形172,174,176,178に分割される様子が示されている。なお、図13以後の各図において、「C1 」,「C2 」,「C3 」はそれぞれ、辺S1 ,S2 ,S3 に対応する最終曲線要素を示す。
【0030】
その後、S34において、上記S32において取得された複数の対応点、すなわち、細分化のために発生させられた新規頂点における頂点法線ベクトルが決定される。その頂点法線ベクトルは、元の三角形の3辺のうち、その新規頂点が位置する辺の両端点における既知の2つの頂点法線ベクトルを平均化して正規化する(ベクトルの長さを1とする)ことにより、決定される。図14に例示するように、新規頂点RM11 については、それの対応する辺S1 の両端点Q1 ,Q2 における頂点法線ベクトルN1 ,N2 を平均化して正規化したベクトル、すなわち、
(N1 +N2 )/|N1 +N2
が取得される。他の新規頂点RM2,RM3についても同様である。
【0031】
続いて、図7のS35において、三角形の細分化を終了させるべきであるか否かが判定される。具体的には、元の三角形の各辺とそれに対応する曲線要素との隔たりとして、元の三角形の各辺の中点PM (t=L/2)に対応する前記移動ベクトルZM の大きさ(以下、「移動量M」という)が用いられるとともに、元の三角形の3辺全てについて、その移動量Mが、作業者により指定された誤差以下であるか否かが判定される。図15には、辺S1 と曲線要素C1 との隔たりとして移動量M1 、辺S2 と曲線要素C2 との隔たりとして移動量M2 、辺S3 と曲線要素C3 との隔たりとして移動量M3 が用いられる様子が示されている。
【0032】
元の三角形の3辺全てについて、移動量Mが指定誤差以下である場合には、細分化を終了させるべきであると判定される。これに対して、少なくとも一つの辺についての移動量Mが指定誤差より大きい場合には、細分化を終了させるべきでないと判定される。この場合には、その後、S36において、細分化された各三角形が次回に細分化すべき元の三角形に選ばれ、その後、S31〜S35が前記の場合と同様にして実行される。
【0033】
以上のようにしてスムース化プログラムの一回の実行が終了すれば、図13および図14に示す元の三角形170は、図16に示すように、複数の三角形に細分化されることになる。
【0034】
次に、本発明の第2実施形態を説明する。ただし、本実施形態は、先の第1実施形態と対象三角形を分割する点について異なり、他の点については共通であるため、異なる点についてのみ詳細に説明し、共通の点については同一の符号を使用することによって詳細な説明を省略する。
【0035】
第1実施形態においては、元の三角形の各辺とそれに対応する曲線要素との隔たりが大きいか否かを問わず、全ての辺に対応する全ての曲線要素が2分割されてその分割点が新規頂点として発生させられるようになっている。なお、曲線要素を2分割することと各辺を2分割することとは厳密には一致しないが、曲線要素が各辺に関連付けて発生させられるものであることに着目するとともに、元の三角形の各辺との関係を重視するため、以下、曲線要素の2分割を各辺の2分割ともいう。そして、本実施形態においては、隔たりが大きい辺に限り、2分割が行われるようになっている。
【0036】
図17には、本実施形態における三角形細分化ルーチンがフローチャートで表されている。以下、本ルーチンを説明するが、図7のルーチンと共通するステップについては簡単に説明する。
【0037】
まず、S51において、第1実施形態におけると同様にして山谷関数f(t) が定義される。次に、S52において、対象辺Sの中点PM に対応する移動量Mが取得される。この取得は、第1実施形態におけると同様にして行われる。その後、S53において、対象三角形の3辺全てにつき、取得された移動量Mが指定誤差(基準値)より大きいか否かが判定される。
【0038】
3辺全てについて移動量Mが指定誤差より大きい場合には、判定がYESとなり、S54において、それら3辺がそれぞれ2分割され、それにより、3辺全てについて3つの新規頂点が発生させられる。その後、S55において、その発生させられた3つの新規頂点と対象三角形の3つの頂点とからなる6つの点を複数の直線要素でつなぐことによって対象三角形が細分化される。その一例が図18の(a) に示されている。
【0039】
これに対して、2辺についてのみ移動量Mが指定誤差より大きい場合には、S53の判定はNO、S56の判定はYESとなり、S57において、その2辺がそれぞれ2分割され、それにより、その2辺について2つの新規頂点が発生させられる。その後、S56において、その発生させられた2つの新規頂点と対象三角形の3つの頂点とからなる5つの点を複数の直線要素でつなぐことによって対象三角形が細分化される。
【0040】
5つの点を複数の直線要素でつなぐ方法には2つ存在する。5つの点を1本の閉じた折れ線でつなぐと、1つの五角形が発生し、その五角形を1本の直線要素で分割すると、1つの三角形と1つの四角形とが発生する。その四角形を1本の直線要素で2つの三角形に分割する際に、その分割線に四角形の2本の対角線のいずれを選ぶかによって2つの方法が存在するのである。本実施形態においては、2本の対角線のうち、その四角形の4つの頂点のうち角度が最大であるものを通過する対角線が分割線に選ばれるようになっていて、四角形の分割によって鈍角三角形ができる限り発生しないようになっている。図18の(b) には、その一例が示されている。
【0041】
また、対象三角形の1辺についてのみ移動量Mが指定誤差より大きい場合には、S53およびS56の判定は共にNOとなり、S59の判定はYESとなる。その後、S60において、その1辺が2分割され、それにより、1つの新規頂点が発生させられる。続いて、S61において、その発生させられた1つの新規頂点と対象三角形の3つの頂点とからなる4つの点を複数の直線要素でつなぐことにより、対象三角形が分割される。図18の(c) には、その一例が示されている。
【0042】
いずれの場合にも、その後、S62において、細分化された各三角形(細分化により発生した新たな三角形)が次回にも細分化させるべき三角形に選ばれ、続いて、S51に戻り、新たな対象三角形について前記の場合と同様な処理が行われる。
【0043】
以上、対象三角形の3辺のいずれかの移動量Mが指定誤差より大きい場合を説明したが、いずれの辺の移動量Mも指定誤差以下である場合には、S53とS56とS59との判定がいずれもNOとなり、新規頂点の発生も対象三角形の細分化も行われることなく、本ルーチンの一回の実行が終了する。
【0044】
次に、本発明の第3実施形態を説明する。ただし、本実施形態は、先の第1および第2実施形態と共通する点が多いため、異なる点についてのみ詳細に説明する。
【0045】
先の第2実施形態については、作業者がコンピュータ10に対して近似ポリゴン表面スムース化の実行指令を出したならば、自動的に曲面全体が細分化領域となって、実行対象である複数の元の三角形の全てが細分化の対象となる。これに対して、本実施形態においては、曲面のうち作業者がその細分化を行いたい領域を指定可能となっている。
【0046】
図19には、本実施形態における近似ポリゴン表面スムース化プログラムがフローチャートで表されている。以下、本プログラムを説明するが、最先の第1実施形態における近似ポリゴン表面スムース化プログラムと共通するステップと、直前の第2実施形態における三角形細分化ルーチンと共通するステップとが存在するため、それら共通するステップについては簡単に説明する。
【0047】
まず、S71において、作業者が入力装置12を操作することにより、複数の元の三角形に対して、細分化すべき領域を指定することが行われたか否かが判定される。今回は行われていないと仮定すれば、判定がNOとなり、本プログラムの一回の実行が終了するが、行われたと仮定すれば、判定がYESとなり、S72に移行する。
【0048】
図20の(a) には、細分化領域を指定する様子が示されている。作業者は、表示装置16の画面に表示されている図形の一部を閉じた線200(折れ線または曲線)で囲むことにより、細分化領域を指定する。
【0049】
S72においては、複数の元の三角形のうち細分化領域内に存在するものが抽出される。図20の(b) には、細分化領域内に存在するものとして抽出された複数の元の三角形が示されている。その後、S73〜S75において、第1実施形態におけると同様にして、隣接関係規定データの付加,特徴線の抽出および頂点法線ベクトルの決定が行われる。続いて、S76において、第2実施形態におけると同様にして、三角形細分化が行われる。図20の(c) には、細分化領域内の複数の元の三角形が細分化される様子が拡大して示されている。以上で本プログラムの一回の実行が終了する。
【0050】
なお、図20に示す例のように、閉じた線200で囲まれた領域内に閉じた特徴線202で存在する場合には、閉じた線200で囲まれた領域全体を細分化領域として定義したり、閉じた線200と特徴線202とで囲まれた領域を細分化領域として定義することができる。
【0051】
以上、本発明のいくつかの実施形態を図面に基づいて詳細に説明したが、これらの他にも、特許請求の範囲を逸脱することなく、当業者の知識に基づいて種々の変形,改良を施した形態で本発明を実施することができる。
【図面の簡単な説明】
【図1】本発明の第1実施形態である近似ポリゴン曲面スムース化方法を実施するためのデータ処理システムを示すブロック図である。
【図2】図1の記録媒体に記録されている近似ポリゴン曲面スムース化プログラムを示すフローチャートである。
【図3】図2のS1を説明するための斜視図である。
【図4】図2のS2を説明するための斜視図である。
【図5】図2のS3の詳細を頂点法線ベクトル決定ルーチンとして示すフローチャートである。
【図6】その頂点法線ベクトル決定ルーチンを説明するための斜視図である。
【図7】図2のS4の詳細を三角形細分化ルーチンとして示すフローチャートである。
【図8】図7のS31における山谷関数を示すグラフである。
【図9】そのS31における移動ベクトルを説明するための斜視図である。
【図10】上記山谷関数を2つ重ね合わせることによって曲線要素を取得する様子を示す斜視図である。
【図11】上記S31における移動ベクトルを説明するための斜視図である。
【図12】図7のS32を説明するための斜視図である。
【図13】図7のS33を説明するための斜視図である。
【図14】図7のS34を説明するための斜視図である。
【図15】図7のS35を説明するための斜視図である。
【図16】上記近似ポリゴン表面スムース化プログラムの一実行結果を示す斜視図である。
【図17】本発明の第2実施形態である近似ポリゴン表面スムース化方法において使用される三角形細分化ルーチンを示すフローチャートである。
【図18】その三角形細分化ルーチンを説明するための斜視図である。
【図19】本発明の第3実施形態である近似ポリゴン表面スムース化方法において使用される近似ポリゴン表面スムース化ルーチンを示すフローチャートである。
【図20】その近似ポリゴン表面スムース化ルーチンを説明するための斜視図である。
【符号の説明】
10:コンピュータ
24:記録媒体
100,106:辺
102,104,108,110,122,124,126,128,130,154,156,158,160,162,170:元の三角形
120,152:対象頂点
132,134,136,138,140:面法線ベクトル
142:頂点法線ベクトル
150:特徴線
164:第1頂点法線ベクトル
166:第2頂点法線ベクトル
172,174,176,178:新たな三角形
1 ,N2 ,N3 :頂点法線ベクトル
1 ,C2 ,C3 :曲線要素
1 ,S2 ,S3 :辺
1 ,Q2 ,Q3 :端点
M1,RM2,RM3:対応点
M :中点
1 ,M2 ,M3 :移動量
t1,Zt2,Zt3:移動ベクトル
t :辺S上の任意点
t :曲線要素C上の任意点
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for smoothing an approximate polygon surface formed by a set of a plurality of original triangles by subdividing a plurality of original triangles that are approximately expressed by polygonizing a given curved surface. Is.
[0002]
[Prior art]
In Japanese Patent Laid-Open No. 8-263692, prior to subdivision, vertices of a plurality of triangles to be generated by the subdivision and not existing in the original triangle are displayed at both ends of each side of the original triangle. Describes a technique based on two vertices and two vertex normal vectors that are normal vectors at each of the two vertices, but not on the sides but on the curved elements that the sides should approximate. ing.
This publication also relates to a method for determining a vertex normal vector: “For example, an image acquisition measuring apparatus 1 such as a CT X-ray tomography apparatus or an MR apparatus is capable of producing a number of tomographic objects to be inspected. An image or a three-dimensional image is formed. Based on the image, the image processing apparatus 2 forms an object model that approximately represents the surface of the object by a large number of triangles. The position information of the vertices of the triangle and the normal to the surface of the object at the vertices are stored in the image memory 3. Is described.
[0003]
[Problems to be Solved, Problem Solving Means, Actions and Effects of Invention]
However, this publication does not specifically teach “a normal to the surface of the object at the vertex”, that is, a method for determining the vertex normal vector.
On the other hand, in the approximate polygon surface smoothing method using the vertex normal vector, the vertex normal vector can be easily determined, and is true, that is, a normal vector for a given curved surface and passes through the vertex. It is desirable to be able to determine with high accuracy so as to match as much as possible.
[0004]
In view of the above circumstances, the present invention provides an approximate polygon surface smoothing method that can easily and accurately reproduce a given curved surface by determining vertex normal vectors easily and accurately. It was made as an issue.
[0005]
  The problem is solved by the following aspect. In the following description, each aspect of the present invention is described in the same format as the claims, with each item numbered.
[0006]
  (1) A method of smoothing an approximate polygon surface formed by a set of a plurality of original triangles by subdividing a plurality of original triangles that are approximated by polygonizing a given curved surface. Prior to subdivision, a plurality of vertices of a plurality of triangles that should be generated by the subdivision and not new vertices, two vertices at both ends of each side of the original triangle, and An approximate polygon surface smoothing method based on two vertex normal vectors, which are normal vectors at each of two vertices, and generated on a curved element whose side should be approximated instead of on that side,
  A memory stores data of the plurality of original triangles;
  A processor, for each of the two vertices based on data stored in its memory, extracting the plurality of original triangles sharing each of the vertices;
  A processor, with respect to the extracted plurality of original triangles, obtaining a normal vector for the surface of the original triangle based on the three vertices of the original triangle as a plurality of surface normal vectors;
  The processor determines the vertex normal vector for each of the two vertices based on the obtained plurality of surface normal vectors, and determines the influence of each surface normal vector to the vertex normal vector in each determination. Exerting more strongly as the angle at the shared vertex of the original triangle corresponding to the surface normal vector increases;
  A processor obtaining the curve element based on the determined two vertex normal vectors and the two vertices;
  Generating a new vertex on the obtained curve element;
An approximate polygon surface smoothing method characterized by comprising:
  The present inventors can obtain a surface normal vector that is a normal vector with respect to the surface of the original triangle if the positions of the three vertices of the original triangle are known, and also about a plurality of original triangles sharing the same vertex. I noticed that if the surface normal vector is known, the vertex normal vector can be determined. In addition, the surface normal vector is considered to be sufficiently coincident with the typical normal vector for the curved surface element to be approximated by the original triangle of the given curved surface. It has also been found that the determination of 頂点 results in the determination of the vertex normal vector in consideration of the normal vector for the curved surface element that passes through the vertex.
  Based on the above knowledge, in the method described in this section, for a plurality of original triangles sharing the same vertex, the surface normal vector of the original triangle is acquired based on the three vertices of the original triangle, A vertex normal vector at the vertex is determined based on the plurality of surface normal vectors acquired for the plurality of original triangles.
  Therefore, according to this method, the vertex normal vector can be easily and accurately determined, and as a result, a given curved surface can be easily and accurately reproduced.
  Moreover, the influence of each surface normal vector is not always exerted on the vertex normal vector to be determined with the same strength between the original triangles sharing the same vertex, but the angle of the shared vertex. The larger the triangle is, the stronger the influence of the surface normal vector corresponding to the triangle is on the vertex normal vector to be determined. Therefore, the vertex normal vector can be determined to be true, that is, closer to the normal vector for a given curved surface that passes through the vertex.
  (2) The processor performs the plurality of original triangles based on the plurality of surface normal vectors.The two verticesAfter determining the normal vector,The two peaksPoint normal vectorAt least one of a plurality of other vertex normal vectors determined in the same manner as each vertex normal vector and adjacent to each vertex normal vector.The method for smoothing an approximate polygon surface according to item (1), including a step of correcting based on the method (Claim 2).
  According to this method,Multiple other adjacentCompared to the case where the vertex normal vector is determined without considering the vertex normal vector at all, the plurality of vertex normal vectors adjacent to each other can be determined such that the directions are more continuous with each other.
  (3) The processor includes a step of acquiring at least one of a plurality of constituent lines configured by connecting sides of the plurality of original triangles as a feature line, and the processor The step of determining a vertex normal vector for each of two vertices is such that if the vertex for which the vertex normal vector is to be determined is not on the acquired feature line, all the original triangular face methods that share the vertex Determining the vertex normal vector based on a line vector, and, if on the acquired feature line, based on the surface normal vector of at least one original triangle located on one side of the feature line Determining a second vertex normal vector based on the first vertex normal vector and the surface normal vector of at least one original triangle located on the other side; The approximate polygon surface smoothing method according to item (1) or (2), including: (Claim 3).
  When the orientations of two parts of a given curved surface with a line as a boundary are greatly different from each other, the vertex normal vectors at the vertices on the boundary are based on a plurality of surface normal vectors located on both sides of the boundary. When the decision is made, the surface of the approximate polygon is smoothed so that the angle between the surfaces of the two portions is finally reduced. Accepting such a situation would reduce the reproducibility of the approximate polygon surface.
  On the other hand, in the method described in this section, for the vertices on the boundary, vertex normal vectors are determined independently from each other on one side and the other side of the boundary.
  Therefore, according to this method, the vertex normal vector can be appropriately determined even for the portion of the curved surface where the directions of the two portions are greatly different from each other.
  (4) When two original triangles sharing the same side among the plurality of original triangles are extracted, and the angle at which the extracted two original triangles are connected at the shared side is smaller than a reference value The approximate polygon surface smoothing method according to (3), wherein the shared side is extracted as the feature line, and if it is equal to or larger than a reference value, the step of not extracting is included.
  In this method, “feature line extraction” may be performed by an operator or a computer.
  (5) The processor obtains a curve element based on two vertex normal vectors and two vertices;
  (a) For the side corresponding to the curve element to be acquired, a first function having a first end point which is one of both end points thereof and a second end point which is the other end point, and a second end point Defining a second function having a start point and a first end point as an end point;
  (b) A value obtained by integrating the product of the first function and the first vertex normal vector, which is the vertex normal vector at the first end point, from the first end point to an arbitrary point on the side is expressed as A first movement vector representing a direction and an amount for moving an arbitrary point on the side in order to obtain a first curve element corresponding to the side below;
  (c) a value obtained by integrating the product of the second function and the second vertex normal vector, which is the vertex normal vector at the second end point, from the second end point to an arbitrary point on the side, A second movement vector representing a direction and an amount for moving an arbitrary point on the side in order to obtain a second curve element corresponding to the side below;
  (d) obtaining a final curve element corresponding to the side as the sum of the first and second movement vectors, wherein each of the first function and the second function is:
    (i) having a variable t that varies from 0 to the length L of the side as it moves from the start point to the end point on the side;
    (ii) The value integrated from 0 to the side length L is 0 for the variable t,
    (iii) a value h when the variable t is 0, and a value whose magnitude is half the value h when the variable t is a half value L / 2 of the side length and whose sign is opposite to the value h − h / 2, 0 when the variable t is the side length L,
    (iv) the value h is set such that the final curve element is orthogonal to the first and second vertex normal vectors at first and second endpoints, respectively.
The approximate polygon surface smoothing method according to any one of items (1) to (4), including: [Claim 5].
  According to this method, a curved element can be expressed by the same type of function regardless of the type of shape, and thus an approximate polygon surface smoothing method having high versatility with respect to the type of shape of the curved element can be obtained. .
  (6) In each of the first function and the second function, in the coordinate plane in which the horizontal axis represents the variable t and the vertical axis represents the value of each function, the variable t is 0, and the function value is A point where the value is h, a variable t is the half value L / 2, and a function value is the value −h / 2, a variable t is the length L, and a function value is The approximate polygon surface smoothing method according to item (5), which defines a relationship represented by a graph in which points that are 0 are connected to each other by a single straight line.
  According to this method, a user-friendly function can be used as the function described in the previous section.
  (7) Prior to the subdivision, when the distance between each side of the original triangle and the corresponding curve element is larger than a reference value, the processor generates the new vertex for the side, The approximate polygon surface smoothing method according to any one of items (1) to (6), which is not generated when the value is equal to or less than a reference value.
  In this method, among the plurality of sides of the plurality of original triangles, the side segmentation is omitted for those that do not require side segmentation (generation of new vertices). Therefore, according to this method, useless segmentation of sides can be avoided.
  In this method, “original triangle” means a triangle to be subdivided. Therefore, the “original triangle” means the first triangle at the time of the first subdivision, and means the triangle that exists immediately before the subdivision at the time of the second subdivision.
  (8) Prior to the subdivision, the processor determines that a distance between each side of the original triangle and the corresponding curve element is a first reference value in an area of the curved surface designated by an operator. If it is larger, the new vertex is generated with respect to the side, while if it is less than or equal to the first reference value, it is not generated, and if the gap is larger than the second reference value outside the specified area. Whether or notAllThe approximate polygon surface smoothing method according to any one of (1) to (6), wherein the new vertex is generated with respect to the side.
  According to this method, for example, when the first reference value is set to be smaller than the second reference value, and when it is attempted to subdivide the finer sides outside on the inside of the designated area, Thus, it is possible to avoid that fine side segmentation is performed wastefully.
  (9) The approximate polygon surface smoothing method according to any one of (1) to (6), wherein the processor performs the subdivision only in an area of the curved surface designated by an operator. Item 9].
  (10) A computer-readable recording medium on which a program executed by a computer for performing the approximate polygon surface smoothing method according to any one of (1) to (9) is recorded [Claim 10].
  Examples of the “recording medium” herein include a flexible disk, a magnetic tape, a magnetic disk, a magnetic drum, a magnetic card, an optical disk, a magneto-optical disk, a ROM, a CD-ROM, an IC card, and a punched tape.
[0007]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an approximate polygon surface smoothing method according to some embodiments of the present invention will be described in detail with reference to the drawings.
[0008]
First, the first embodiment will be described.
FIG. 1 shows a data processing system used to implement this embodiment. In this system, an input device 12, an output device 14, a display device 16 and an external storage device 18 are connected to a computer 10. The computer 10 includes a processor 20 and a memory 22. The input device 12 includes a keyboard, a mouse, a digitizer, and the like. The output device 14 is configured by a printer, a plotter, or the like. The display device 16 is configured by a CRT, a liquid crystal display, or the like. The external storage device 18 is configured to include a portion that reads and writes data from and to the portable recording medium 24. The recording medium 24 records an approximate polygon surface smoothing program (hereinafter simply referred to as “smoothing program”) as an application program executed by the computer 10, and the smoothing program is executed as an object to be executed. STL (stereolithography) data is recorded.
[0009]
STL data is known as standard data for expressing the shape of a three-dimensional model to be manufactured by an optical modeling method. The STL data is data that approximately represents a given curved surface by a set of a plurality of triangles, and includes a plurality of triangle data each representing information about the triangles. Each triangle data is attributed as
(1) Data representing a triangle number that is a triangle number;
(2) Data representing edge numbers that are numbers of the three sides of the triangle;
(3) Data representing end point coordinate values that are the coordinate values of both end points of each side;
(4) Data indicating the relationship between the triangle number, side number and end point coordinate value
have. However, the STL data does not have adjacent relationship defining data that directly defines an adjacent relationship that is a relationship between each triangle and another triangle that is adjacent to the triangle.
[0010]
After turning on the computer 10, the operator inputs an execution command for smoothing the approximate polygon surface and specifies STL data that is the execution target. In response, the external storage device 18 reads the smoothing program and the STL data from the recording medium 24 and stores them in the memory 22. Thereafter, the processor 20 reads the smoothed program from the memory 22 and executes it on the STL data.
[0011]
When the smoothing program is executed, first, in step S1 in FIG. 2 (hereinafter, simply expressed as “S1”, the same applies to other steps), the adjacency defining data is added to the STL data. Specifically, first, each of a plurality of original triangles is set as a target triangle in order according to its triangle number, and next, an adjacent triangle whose target triangle is another original triangle adjacent to each side of the target triangle is displayed. Next, the data obtained by associating the side number of each side of the target triangle, the triangle number of the adjacent triangle, and the side number of the shared side shared with the target triangle among the three sides of the adjacent triangle are adjacent to each other. It is stored in the memory 22 as the relationship defining data. If the state in which the structure of the STL data changes due to the addition of the adjacency relationship definition data is described conceptually, before the addition of the adjacency relationship definition data, as shown in FIG. Are not directly related to each other but exist separately, but after the adjacency definition data is added, multiple triangle data are directly related to each other as shown in (b) of the figure .
[0012]
Next, in S2, what characterizes the shape of the curved surface to be expressed by STL data is extracted as a feature line from a plurality of sides of a plurality of original triangles. Specifically, when an angle formed by two original triangular surfaces connected to each other on the same side is smaller than a reference value, the side is extracted as a feature line. In the example of FIG. 4, since the connection angle of the two original triangles 102 and 104 connected to each other at the side 100 is smaller than the reference value, the side 100 is extracted as a feature line. Similarly, since the connection angle of the two original triangles 108 and 110 connected to each other at the side 106 is smaller than the reference value, the side 106 is extracted as a feature line. After all, in this example, a plurality of sides indicated by two closed thick solid lines are extracted as feature lines. The connection angle between the two original triangles can be defined as an angle inside the two original triangles. In this case, the reference value can be set to 100 to 120 degrees.
[0013]
Subsequently, in S3, a vertex normal vector is determined for each of a plurality of vertices of the plurality of original triangles. Details of this step are shown in a flowchart in FIG. 5 as a vertex normal vector determination routine.
[0014]
In this routine, first, in S11, each of a plurality of vertices of a plurality of original triangles is sequentially determined as a target vertex, and then in S12, the determined target vertices are selected from among the plurality of original triangles. A plurality of original triangles that share are extracted. Subsequently, in S13, the position data of the three vertices of each of the extracted plurality of original triangles is read from the memory 22, and based on the read position data, the surface of each of the plurality of original triangles is read. A surface normal vector that is a normal vector is acquired. Specifically, a plane including three vertices of the original triangle is acquired, and a surface normal vector is acquired as a unit vector orthogonal to the acquired one plane.
[0015]
Thereafter, in S14, it is determined whether or not the current target vertex is not on the extracted feature line. If it is assumed that this is not the case, the determination is yes, and one vertex normal vector is determined for the target vertex in S15. Specifically, a weighted average of a plurality of surface normal vectors corresponding to the extracted plurality of original triangles is determined as one vertex normal vector. The weight in the weighted average is set to be larger as the angle of the three vertices of the original triangle to which each surface normal vector corresponds matches the target vertex.
[0016]
FIG. 6A shows an example where the target vertex is not on the feature line. In this case, one vertex normal vector 142 is used as a weighted average of all surface normal vectors 132, 134, 136, 138, and 140 of the plurality of original triangles 122, 124, 126, 128, and 130 that share the target vertex 120. Is determined.
[0017]
On the other hand, when the current target vertex is on the extracted feature line, the determination in S14 is NO, and in S16, two vertex normal vectors for the target vertex, that is, the first and first vectors are used. A two-vertex normal vector is determined. Specifically, a plurality of original triangles sharing the target vertex are divided into a group on one side and a group on the other side with respect to the feature line, and the vertex normal vector for each group is It is determined in the same way. The first vertex normal vector is determined to correspond to the original triangle group on one side of the feature line, and the second vertex normal vector is determined to correspond to the original triangle group on the other side of the feature line.
[0018]
FIG. 6B shows an example in which the target vertex is on the feature line. In this case, with respect to the target vertex 152 on the feature line 150, the original triangles 154, 156, and 158 constitute the first group, and the original triangles 160 and 162 constitute the second group. Then, the first vertex normal vector 164 is determined as a weighted average of the three surface normal vectors of the three original triangles 154, 156, 158 belonging to the first group, while the two original elements belonging to the second group A second vertex normal vector 166 is determined as a weighted average of the two surface normal vectors of the triangles 160 and 162.
[0019]
In any case, thereafter, in S17, it is determined whether or not the vertex normal vectors have been determined for all the vertices. If it is assumed that this is not the case, the determination is no, the process returns to S11, a new vertex is determined as the target vertex, and the following steps are executed as in the above case. On the other hand, if it is assumed that the vertex normal vectors have been determined for all the vertices, the determination in S17 is YES, and the process proceeds to S18.
[0020]
In S18, the determined plurality of vertex normal vectors are sequentially determined as the target vertex normal vector, and the direction of the target vertex normal vector considers the direction of at least one other adjacent vertex normal vector To be corrected. At least one other vertex normal vector adjacent to one another is a sphere whose radius is a set value centered on the vertex through which the target vertex normal vector passes among other vertex normal vectors. Extracted as existing. In addition, among the at least one other vertex normal vectors adjacent to each other, the shorter the distance between the vertex that passes through and the vertex through which the target vertex normal vector passes, the stronger the influence is exerted on the target vertex normal vector. To be corrected. By doing so, the continuity of the direction between the plurality of vertex normal vectors is improved. This completes one execution of this routine.
[0021]
If S3 is completed as described above, then the triangle is subdivided in S4 of FIG. Details of this step are shown in a flowchart in FIG. 7 as a triangle segmentation routine.
[0022]
First, in S31, a plurality of sides of a plurality of original triangles are set as target sides in order, and a Yamatani function f (t) is defined for the target side. As shown in FIG. 8, the Yamatani function f (t) is represented by a downwardly convex line graph. In the figure, “L” represents the length of the target side, and “t” represents the start point P on the target side.0To end point PLIs a variable that changes from 0 to L as it moves to. This Yamatani function f (t) is uniquely specified if the length L and the value h are set. The length L is set based on two vertices at both ends of the target side. The setting of the value h will be described later.
[0023]
This Yamatani function f (t) is defined to be 0 when integration is performed using t = 0 to L as an integration interval. Further, the product of the Yamatani function f (t) and the vertex normal vector N is integrated with t = 0 to t (0 ≦ t ≦ L) as an integration interval, that is,
∫N ・ f (t) dt
Is an arbitrary point P on the target side S as shown in FIG.tIs a movement vector X indicating the direction and amount of movement from the target side S to the curved element CtIt is. The direction is of course parallel to the vertex normal vector N. In the example shown, Xt1Is an arbitrary point Pt1Vector of movement, Xt2Is an arbitrary point Pt2The movement vector of is shown.
[0024]
The Yamatani function f (t) is the first end point Q of the target side S1Starting point P0, Second end point Q2To end point PLThe first Yamatani function f1(t) and the second end point Q2Starting point P0, First end point Q1To end point PLThe second Yamatani function f2(t) and FIG. 10 shows the first and second Yamatani functions f.1(t), f2first and second curve elements C represented by (t)1, C2Are shown respectively.
[0025]
And the first Yamatani function f1First movement vector X by (t)tAnd the second Yamatani function f2Second movement vector Y by (t)tAre obtained for the entire target side S, the first and second curve elements C are obtained.1, C2Is obtained, and this is the final curve element C corresponding to the target side SFNLIt becomes. This final curve element CFNLAre the vertex normal vectors N at both end points of the object side S1, N2Orthogonal to FIG. 11 shows the first movement vector X for the same value of the variable t.tAnd the second movement vector YtIs the arbitrary point P on the target side S corresponding to the variable t.tIs the last curve element CFNLMovement vector Z with end point on ittIt means that. In the figure, the variable t is t1, T2, TThreeThree movement vectors Z whent1, Zt2, Zt3It is shown.
[0026]
Here, a method for setting the value h will be described.
The value h is the final curve element C corresponding to the target side SFNLIs the end point Q of the target side S1, Q2Each vertex normal vector N1, N2Is set to be orthogonal to each other.
[0027]
Arbitrary point P on target side StLet P (t) be the position vector of the first curve element C1Arbitrary point R above1tAnd an arbitrary point P on the target side StA position vector R corresponding to1(t) is
R1(t) = P (t) + ∫N1・ F1(t) dt
It is represented by On the other hand, the second curve element C2Arbitrary point R above2tAnd an arbitrary point P on the target side StA position vector R corresponding to2(L-t) is
R2(L-t) = P (L-t) + ∫N2・ F2(L-t) dt
It is represented by Therefore, the final curve element CFNLFirst end point Q1The position vector R (0) at
R1(0) + R2(L)
= {P (0) + ∫N1・ F1(t) dt} + {P (L) + ∫N2・ F2(L-t) dt}
= P (0) + N1・ H1+ P (L) +0
It becomes. Here, the first end point Q1Starting point, second end point Q2Is defined as U, the position vector R (0) is
U + N1・ H1
It becomes. The first valley function f is set so that the position vector R (0) becomes zero.1the value h of (t)1Is set.
Similarly, the final curve element CFNL2nd end point Q2The position vector R (L) at
R1(L) + R2(0)
= {P (L) + ∫N1・ F1(t) dt} + {P (0) + ∫N2・ F2(L-t) dt}
= P (L) + 0 + P (0) + N2・ H2
It becomes. This position vector R (L) is
U + N2・ H2
It becomes. The second valley function f is set so that the position vector R (L) becomes zero.2the value h of (t)2Is set.
[0028]
Next, in S32 of FIG.FNL(Hereinafter simply referred to as “curve element C”)MPoint R corresponding to (t = L / 2)MIs acquired. The corresponding point RMAnd midpoint PMVector Z betweenMAs is clear from the above description,
ZM= ∫N1・ F1(L / 2) dt + ∫N2・ F2(L / 2) dt
It is represented by In FIG. 12, the movement vector ZMAn example is shown.
[0029]
Subsequently, in S33 of FIG. 7, a plurality of original triangles are sequentially set as target triangles, and the target triangles are subdivided into four triangles. Three vertices of the target triangle and the three corresponding points R acquired in S32 aboveMAre divided into a plurality of triangles by connecting the six points consisting of FIG. 13 shows three vertices Q1, Q2, QThreeIs shown, and the original triangle 170 has three vertices Q1, Q2, QThreeAnd three corresponding points RM1, RM2, RM3A state is shown in which six new dots 172 are connected to a plurality of linear elements and divided into four new triangles 172, 174, 176, and 178. In each figure after FIG. 13, “C1"," C2"," CThree"Is the side S1, S2, SThreeThe final curve element corresponding to is shown.
[0030]
Thereafter, in S34, a plurality of corresponding points acquired in S32, that is, vertex normal vectors at new vertices generated for subdivision are determined. The vertex normal vector is normalized by averaging two known vertex normal vectors at both end points of the side where the new vertex is located among the three sides of the original triangle (the length of the vector is 1). Determined). As illustrated in FIG. 14, the new vertex RM1Z1For, its corresponding edge S1Both end points Q1, Q2Vertex normal vector N1, N2Is a normalized vector, i.e.,
(N1+ N2/ N1+ N2
Is acquired. Other new vertex RM2, RM3The same applies to.
[0031]
Subsequently, in S35 of FIG. 7, it is determined whether or not the triangle subdivision should be terminated. Specifically, as the distance between each side of the original triangle and the corresponding curve element, the midpoint P of each side of the original triangleMThe movement vector Z corresponding to (t = L / 2)MIs used (hereinafter referred to as “movement amount M”), and it is determined whether or not the movement amount M is less than or equal to the error designated by the operator for all three sides of the original triangle. . In FIG. 15, side S1And curve element C1Travel distance M1, Side S2And curve element C2Travel distance M2, Side SThreeAnd curve element CThreeTravel distance MThreeIs shown.
[0032]
If the movement amount M is less than the specified error for all three sides of the original triangle, it is determined that the subdivision should be terminated. On the other hand, if the movement amount M for at least one side is larger than the specified error, it is determined that the subdivision should not be terminated. In this case, thereafter, in S36, each subdivided triangle is selected as an original triangle to be subdivided next time, and then S31 to S35 are executed in the same manner as described above.
[0033]
When one execution of the smoothing program is completed as described above, the original triangle 170 shown in FIGS. 13 and 14 is subdivided into a plurality of triangles as shown in FIG.
[0034]
Next, a second embodiment of the present invention will be described. However, the present embodiment is different from the previous first embodiment in that the target triangle is divided, and the other points are the same. Therefore, only the different points will be described in detail, and the common points are denoted by the same reference numerals. Detailed description will be omitted by using.
[0035]
In the first embodiment, regardless of whether the distance between each side of the original triangle and the corresponding curve element is large, all the curve elements corresponding to all the sides are divided into two, and the division points are It can be generated as a new vertex. Note that dividing a curve element into two parts and dividing each side into two do not exactly match, but note that the curve element is generated in association with each side, and the original triangle In order to emphasize the relationship with each side, the two divisions of the curve element are also referred to as two divisions of each side. In the present embodiment, only two sides with a large distance are divided into two parts.
[0036]
FIG. 17 is a flowchart showing the triangle subdivision routine in the present embodiment. Hereinafter, this routine will be described, but steps common to the routine of FIG. 7 will be briefly described.
[0037]
First, in S51, the mountain-valley function f (t) is defined in the same manner as in the first embodiment. Next, in S52, the midpoint P of the target side SMIs obtained. This acquisition is performed in the same manner as in the first embodiment. Thereafter, in S53, it is determined whether or not the acquired movement amount M is larger than the specified error (reference value) for all three sides of the target triangle.
[0038]
If the movement amount M is greater than the specified error for all three sides, the determination is yes, and in S54, each of these three sides is divided into two, thereby generating three new vertices for all three sides. Thereafter, in S55, the target triangle is subdivided by connecting six points including the generated three new vertices and the three vertices of the target triangle with a plurality of linear elements. An example of this is shown in FIG.
[0039]
On the other hand, when the movement amount M is larger than the specified error for only two sides, the determination in S53 is NO and the determination in S56 is YES. In S57, the two sides are each divided into two parts. Two new vertices are generated for two sides. Thereafter, in S56, the target triangle is subdivided by connecting five points including the generated two new vertices and the three vertices of the target triangle with a plurality of linear elements.
[0040]
There are two methods for connecting five points with a plurality of linear elements. When five points are connected by one closed broken line, one pentagon is generated, and when the pentagon is divided by one linear element, one triangle and one quadrangle are generated. When dividing the quadrilateral into two triangles by one linear element, there are two methods depending on which of the two diagonal lines of the quadrangle is selected as the dividing line. In the present embodiment, the diagonal line that passes through the four vertices of the quadrilateral having the maximum angle among the two diagonal lines is selected as the dividing line. It is designed not to occur as much as possible. An example is shown in FIG. 18 (b).
[0041]
If the movement amount M is larger than the specified error for only one side of the target triangle, the determinations in S53 and S56 are both NO, and the determination in S59 is YES. Thereafter, in S60, the one side is divided into two, thereby generating one new vertex. Subsequently, in S61, the target triangle is divided by connecting four points formed by the generated new vertex and the three vertices of the target triangle by a plurality of linear elements. An example is shown in FIG. 18 (c).
[0042]
In any case, after that, in S62, each subdivided triangle (a new triangle generated by subdivision) is selected as a triangle to be subdivided next time. The same processing as described above is performed for the triangle.
[0043]
In the above, the case where the movement amount M of any one of the three sides of the target triangle is larger than the specified error has been described. Both of these are NO, and one execution of this routine ends without generating new vertices or subdividing the target triangle.
[0044]
Next, a third embodiment of the present invention will be described. However, since this embodiment has many points in common with the previous first and second embodiments, only different points will be described in detail.
[0045]
As for the second embodiment, if the operator issues an execution command for smoothing the approximate polygon surface to the computer 10, the entire curved surface automatically becomes a subdivided region, and a plurality of execution targets are set. All of the original triangles are subject to subdivision. On the other hand, in the present embodiment, it is possible to specify an area of the curved surface that the operator wants to subdivide.
[0046]
FIG. 19 is a flowchart showing the approximate polygon surface smoothing program according to this embodiment. Hereinafter, this program will be described, but there are steps common to the approximate polygon surface smoothing program in the first embodiment and the steps common to the triangle segmentation routine in the immediately preceding second embodiment. These common steps will be briefly described.
[0047]
First, in S71, it is determined whether or not an area to be subdivided has been specified for a plurality of original triangles by the operator operating the input device 12. If it is assumed that it has not been performed this time, the determination is NO and one execution of this program ends. If it is assumed that the determination has been made, the determination is YES and the process proceeds to S72.
[0048]
FIG. 20A shows a state in which a subdivided area is designated. The operator designates a subdivided region by surrounding a part of the graphic displayed on the screen of the display device 16 with a closed line 200 (a broken line or a curved line).
[0049]
In S72, a plurality of original triangles that are present in the subdivision area are extracted. FIG. 20B shows a plurality of original triangles extracted as existing in the subdivision area. Thereafter, in S73 to S75, adjacency defining data is added, feature lines are extracted, and vertex normal vectors are determined in the same manner as in the first embodiment. Subsequently, in S76, triangular segmentation is performed in the same manner as in the second embodiment. FIG. 20 (c) shows an enlarged view of how a plurality of original triangles in the subdivision area are subdivided. This completes one execution of this program.
[0050]
In addition, as in the example illustrated in FIG. 20, when the feature line 202 is present within the region surrounded by the closed line 200, the entire region surrounded by the closed line 200 is defined as a subdivided region. Or a region surrounded by the closed line 200 and the feature line 202 can be defined as a subdivided region.
[0051]
Although some embodiments of the present invention have been described in detail with reference to the drawings, various modifications and improvements can be made based on the knowledge of those skilled in the art without departing from the scope of the claims. The present invention can be carried out in the applied form.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a data processing system for implementing an approximate polygon curved surface smoothing method according to a first embodiment of the present invention.
FIG. 2 is a flowchart showing an approximate polygon curved surface smoothing program recorded on the recording medium of FIG. 1;
FIG. 3 is a perspective view for explaining S1 of FIG. 2;
FIG. 4 is a perspective view for explaining S2 of FIG.
FIG. 5 is a flowchart showing details of S3 of FIG. 2 as a vertex normal vector determination routine;
FIG. 6 is a perspective view for explaining the vertex normal vector determination routine;
FIG. 7 is a flowchart showing details of S4 of FIG. 2 as a triangle segmentation routine.
FIG. 8 is a graph showing a valley function in S31 of FIG.
FIG. 9 is a perspective view for explaining a movement vector in S31.
FIG. 10 is a perspective view illustrating a state in which a curve element is acquired by superimposing two of the above-mentioned Yamatani functions.
FIG. 11 is a perspective view for explaining a movement vector in S31.
12 is a perspective view for explaining S32 in FIG. 7; FIG.
FIG. 13 is a perspective view for explaining S33 of FIG.
14 is a perspective view for explaining S34 in FIG. 7; FIG.
FIG. 15 is a perspective view for explaining S35 in FIG. 7;
FIG. 16 is a perspective view showing an execution result of the approximate polygon surface smoothing program.
FIG. 17 is a flowchart showing a triangle segmentation routine used in the approximate polygon surface smoothing method according to the second embodiment of the present invention;
FIG. 18 is a perspective view for explaining the triangular subdivision routine.
FIG. 19 is a flowchart showing an approximate polygon surface smoothing routine used in the approximate polygon surface smoothing method according to the third embodiment of the present invention;
FIG. 20 is a perspective view for explaining the approximate polygon surface smoothing routine;
[Explanation of symbols]
10: Computer
24: Recording medium
100, 106: side
102, 104, 108, 110, 122, 124, 126, 128, 130, 154, 156, 158, 160, 162, 170: original triangle
120, 152: Target vertex
132, 134, 136, 138, 140: surface normal vector
142: Vertex normal vector
150: Feature line
164: first vertex normal vector
166: second vertex normal vector
172, 174, 176, 178: New triangle
N1, N2, NThree: Vertex normal vector
C1, C2, CThree: Curve element
S1, S2, SThree: Side
Q1, Q2, QThree: Endpoint
RM1, RM2, RM3: Corresponding point
PM: Midpoint
M1, M2, MThree:Amount of movement
Zt1, Zt2, Zt3: Movement vector
Pt: Arbitrary point on side S
Rt: Arbitrary point on curve element C

Claims (10)

与えられた曲面をポリゴン化して近似的に表現する複数の元の三角形を細分化することにより、それら複数の元の三角形の集合により形成される近似ポリゴン表面をスムース化する方法であって、細分化に先立ち、その細分化により発生させるべき複数の三角形の複数の頂点であって元の三角形にはない新規頂点を、その元の三角形の各辺の両端における2つの頂点と、それら2つの頂点の各々における法線ベクトルである2つの頂点法線ベクトルとに基づき、その辺上にではなく、その辺が近似すべき曲線要素上に発生させる近似ポリゴン表面スムース化方法であって、
メモリが、前記複数の元の三角形のデータを記憶し、
プロセッサが、そのメモリに記憶されているデータに基づいて、前記2つの頂点の各々に関し、前記複数の元の三角形のうちそれら各頂点を共有するものを抽出するステップと、
プロセッサが、その抽出した複数の元の三角形に関し、元の三角形の3つの頂点に基づいてその元の三角形の面に対する法線ベクトルを複数の面法線ベクトルとして取得するステップと、
プロセッサが、その取得した複数の面法線ベクトルに基づいて前記頂点法線ベクトルを、前記2つの頂点についてそれぞれ決定し、その決定に際して、各面法線ベクトルの影響を頂点法線ベクトルに、各面法線ベクトルに対応する前記元の三角形の前記共有頂点における角度が大きいほど強く及ぼさせるステップと、
プロセッサが、その決定した2つの頂点法線ベクトルと前記2つの頂点とに基づいて前記曲線要素を取得するステップと、
プロセッサが、その取得した曲線要素上に前記新規頂点を発生させるステップと
を含むことを特徴とする近似ポリゴン表面スムース化方法。
A method of smoothing an approximate polygon surface formed by a set of a plurality of original triangles by subdividing a plurality of original triangles that are approximated by polygonizing a given curved surface. Prior to conversion, a plurality of vertices of a plurality of triangles to be generated by subdividing, and new vertices that are not in the original triangle, two vertices at both ends of each side of the original triangle, and the two vertices An approximate polygon surface smoothing method based on two vertex normal vectors that are normal vectors in each of the above, and that is generated on a curved element whose side should be approximated instead of on that side,
A memory stores data of the plurality of original triangles;
A processor, for each of the two vertices based on data stored in its memory, extracting the plurality of original triangles sharing each of the vertices;
A processor, with respect to the extracted plurality of original triangles, obtaining a normal vector for the surface of the original triangle based on the three vertices of the original triangle as a plurality of surface normal vectors;
The processor determines the vertex normal vector for each of the two vertices based on the obtained plurality of surface normal vectors, and determines the influence of each surface normal vector to the vertex normal vector in each determination. Exerting more strongly as the angle at the shared vertex of the original triangle corresponding to the surface normal vector increases;
A processor obtaining the curve element based on the determined two vertex normal vectors and the two vertices;
Generating a new vertex on the obtained curve element; and a method for smoothing an approximate polygon surface.
前記プロセッサが、前記複数の面法線ベクトルに基づいて前記複数の元の三角形について前記2つの頂点法線ベクトルを決定した後に、それら決定した2つの頂点法線ベクトルの各々を、それら各頂点法線ベクトルと同様にして決定されてそれら各頂点法線ベクトルに隣接する他の複数の頂点法線ベクトルの少なくとも一つに基づいて修正するステップを含む請求項1に記載の近似ポリゴン表面スムース化方法。Wherein the processor, after determining the two vertices normal vectors for the plurality of original triangles based on the plurality of surface normal vector, each of the two vertex normals vectors that they determine their respective 2. The approximate polygon surface smooth of claim 1 including the step of modifying based on at least one of a plurality of other vertex normal vectors determined in the same manner as the vertex normal vectors and adjacent to each of the vertex normal vectors. Method. 前記プロセッサが、前記複数の元の三角形の各辺が互いに接続されることによって構成される複数の構成線の少なくとも一つを特徴線として取得するステップを含み、かつ、前記プロセッサが前記頂点法線ベクトルを2つの頂点についてそれぞれ決定するステップが、前記頂点法線ベクトルを決定すべき頂点がその取得した特徴線上にない場合には、その頂点を共有するすべての元の三角形の面法線ベクトルに基づいて前記頂点法線ベクトルを決定し、一方、その取得した特徴線上にある場合には、その特徴線の一側に位置する少なくとも一つの元の三角形の面法線ベクトルに基づいて第1の頂点法線ベクトル、他側に位置する少なくとも一つの元の三角形の面法線ベクトルに基づいて第2の頂点法線ベクトルをそれぞれ決定するステップを含む請求項1または2に記載の近似ポリゴン表面スムース化方法。The processor includes a step of acquiring at least one of a plurality of constituent lines configured by connecting sides of the plurality of original triangles as a feature line, and the processor includes the vertex normal The step of determining a vector for each of the two vertices is such that if the vertex for which the vertex normal vector is to be determined is not on the acquired feature line, all the original triangle surface normal vectors sharing the vertex The vertex normal vector based on the first feature based on the surface normal vector of at least one original triangle located on one side of the feature line if the vertex normal vector is on the acquired feature line. Respectively determining a second vertex normal vector based on the vertex normal vector and the surface normal vector of at least one original triangle located on the other side. Approximation polygon surface Smoothing method according to no claim 1 or 2. 前記複数の元の三角形のうち同じ辺を共有する2つの元の三角形を抽出し、その抽出した2つの元の三角形がその共有辺において接続される角度が基準値より小さい場合には、その共有辺を前記特徴線として抽出する一方、基準値以上である場合には、抽出しない工程を含む請求項3に記載の近似ポリゴン表面スムース化方法。If two original triangles that share the same side among the plurality of original triangles are extracted and the angle at which the extracted two original triangles are connected at the shared side is smaller than a reference value, The approximate polygon surface smoothing method according to claim 3, further comprising a step of extracting an edge as the feature line and not extracting the edge when the edge is equal to or greater than a reference value. 前記プロセッサが2つの頂点法線ベクトルと2つの頂点とに基づいて曲線要素を取得するステップが、
(a) 取得すべき前記曲線要素に対応する前記辺に対して、それの両端点の一方である第1端点を始点、他方である第2端点を終点とする第1関数と、第2端点を始点、第1端点を終点とする第2関数とを定義するステップと、
(b) 前記第1関数と、前記第1端点における前記頂点法線ベクトルである第1頂点法線ベクトルとの積を第1端点から辺上の任意点まで積分した値を、第1関数の下で前記辺に対応する第1曲線要素を取得するために辺上の任意点を移動させる向きと量とを表す第1移動ベクトルとするステップと、
(c) 前記第2関数と、前記第2端点における前記頂点法線ベクトルである第2頂点法線ベクトルとの積を第2端点から辺上の任意点まで積分した値を、第2関数の下で前記辺に対応する第2曲線要素を取得するために辺上の任意点を移動させる向きと量とを表す第2移動ベクトルとするステップと、
(d) それら第1および第2移動ベクトルの和として、前記辺に対応する最終曲線要素を取得するステップであって、前記第1関数および前記第2関数の各々が、
(i) 前記辺上を始点から終点まで移動するにつれて0から辺の長さLまで変化する変数tを有し、
(ii) その変数tに関して0から辺の長さLまで積分した値が0となり、
(iii) 前記変数tが0のときに値h、変数tが辺の長さの半値L/2のときに大きさが値hの半分であって符号が値hとは逆である値−h/2、変数tが辺の長さLのときに0となり、
(iv) 前記値hが、前記最終曲線要素が第1および第2端点において前記第1および第2頂点法線ベクトルとそれぞれ直交するように設定されているステップと
を含む請求項1ないし4のいずれかに記載の近似ポリゴン表面スムース化方法。
The processor obtaining a curve element based on two vertex normal vectors and two vertices;
(a) For the side corresponding to the curve element to be acquired, a first function having a first end point which is one of both end points thereof and a second end point which is the other end point, and a second end point Defining a second function having a start point and a first end point as an end point;
(b) A value obtained by integrating the product of the first function and the first vertex normal vector, which is the vertex normal vector at the first end point, from the first end point to an arbitrary point on the side is expressed as A first movement vector representing a direction and an amount for moving an arbitrary point on the side in order to obtain a first curve element corresponding to the side below;
(c) a value obtained by integrating the product of the second function and the second vertex normal vector, which is the vertex normal vector at the second end point, from the second end point to an arbitrary point on the side, A second movement vector representing a direction and an amount for moving an arbitrary point on the side in order to obtain a second curve element corresponding to the side below;
(d) obtaining a final curve element corresponding to the side as the sum of the first and second movement vectors, wherein each of the first function and the second function is:
(i) having a variable t that varies from 0 to the length L of the side as it moves from the start point to the end point on the side;
(ii) The value integrated from 0 to the side length L is 0 for the variable t,
(iii) a value h when the variable t is 0, and a value whose magnitude is half the value h when the variable t is a half value L / 2 of the side length and whose sign is opposite to the value h − h / 2, 0 when the variable t is the side length L,
(iv) The value h includes a step in which the final curve element is set to be orthogonal to the first and second vertex normal vectors at first and second endpoints, respectively. The approximate polygon surface smoothing method according to any one of the above.
前記第1関数および前記第2関数の各々が、横軸に前記変数t、縦軸に各関数の値が取られた座標面において、変数tが0であり、かつ、関数値が前記値hである点と、変数tが前記半値L/2であり、かつ、関数値が前記値−h/2である点と、変数tが前記長さLであり、かつ、関数値が0である点とを相互に1本の直線でつないだグラフで表される関係を定義するものである請求項5に記載の近似ポリゴン表面スムース化方法。Each of the first function and the second function has a variable t of 0 on the coordinate plane in which the horizontal axis represents the variable t and the vertical axis represents the value of each function, and the function value is the value h. A point where the variable t is the half-value L / 2, a function value is the value −h / 2, a variable t is the length L, and the function value is 0. 6. The approximate polygon surface smoothing method according to claim 5, wherein a relationship represented by a graph in which points are connected to each other by a single straight line is defined. 前記プロセッサが、前記細分化に先立ち、前記元の三角形の各辺とそれに対応する前記曲線要素との隔たりが基準値より大きい場合には、その辺に関して前記新規頂点を発生させる一方、基準値以下である場合には、発生させない請求項1ないし6のいずれかに記載の近似ポリゴン表面スムース化方法。Prior to the subdivision, when the distance between each side of the original triangle and the curve element corresponding thereto is larger than a reference value, the processor generates the new vertex for the side, while not exceeding the reference value. 7. The method for smoothing an approximate polygon surface according to any one of claims 1 to 6, wherein the smoothing is not generated. 前記プロセッサが、前記細分化に先立ち、前記曲面のうち作業者により指定された領域内においては、前記元の三角形の各辺とそれに対応する前記曲線要素との隔たりが第1基準値より大きい場合には、その辺に関して前記新規頂点を発生させる一方、第1基準値以下である場合には、発生させず、指定された領域外においては、前記隔たりが第2基準値より大きいか否かを問わず、すべての前記辺に関して前記新規頂点を発生させる請求項1ないし6のいずれかに記載の近似ポリゴン表面スムース化方法。Prior to the subdivision, the processor has a gap between each side of the original triangle and the corresponding curve element larger than a first reference value in an area of the curved surface designated by an operator. In the case of generating the new vertex with respect to the side, if it is less than or equal to the first reference value, it is not generated, and whether or not the gap is larger than the second reference value outside the specified region. 7. The approximate polygon surface smoothing method according to claim 1, wherein the new vertex is generated for all the sides. 前記プロセッサが、前記細分化を、前記曲面のうち作業者により指定された領域内においてのみ行う請求項1ないし6のいずれかに記載の近似ポリゴン表面スムース化方法。The approximate polygon surface smoothing method according to claim 1, wherein the processor performs the subdivision only in an area of the curved surface designated by an operator. 請求項1ないし9のいずれかに記載の近似ポリゴン表面スムース化方法を実施するためにコンピュータにより実行されるプログラムが記録されたことを特徴とするコンピュータ読み取り可能な記録媒体。10. A computer-readable recording medium on which a program executed by a computer for executing the approximate polygon surface smoothing method according to claim 1 is recorded.
JP10748298A 1998-04-17 1998-04-17 Approximate polygon surface smoothing method Expired - Fee Related JP3643237B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10748298A JP3643237B2 (en) 1998-04-17 1998-04-17 Approximate polygon surface smoothing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10748298A JP3643237B2 (en) 1998-04-17 1998-04-17 Approximate polygon surface smoothing method

Publications (2)

Publication Number Publication Date
JPH11306392A JPH11306392A (en) 1999-11-05
JP3643237B2 true JP3643237B2 (en) 2005-04-27

Family

ID=14460346

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10748298A Expired - Fee Related JP3643237B2 (en) 1998-04-17 1998-04-17 Approximate polygon surface smoothing method

Country Status (1)

Country Link
JP (1) JP3643237B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4595805B2 (en) * 2005-12-20 2010-12-08 トヨタ自動車株式会社 Design data generation apparatus and design data generation program
JP4631001B2 (en) * 2006-02-02 2011-02-16 学校法人金沢工業大学 3D shape data generation method and 3D shape data generation device
JP2008032489A (en) * 2006-07-27 2008-02-14 Kanazawa Inst Of Technology Three-dimensional shape data creation method and apparatus for human body
KR101434380B1 (en) * 2013-03-19 2014-08-27 배재대학교 산학협력단 Method and Apparatus for Feature Line Extraction from 3D polygonal Model based on Graphic Accelerator
JP6565495B2 (en) * 2015-08-28 2019-08-28 大日本印刷株式会社 Data separation device for three-dimensional object modeling

Also Published As

Publication number Publication date
JPH11306392A (en) 1999-11-05

Similar Documents

Publication Publication Date Title
US6396491B2 (en) Method and apparatus for reproducing a shape and a pattern in a three-dimensional scene
US7586488B2 (en) Multi-chart geometry images
US5936628A (en) Three-dimensional model processing method, and apparatus therefor
US20050068317A1 (en) Program, method, and device for comparing three-dimensional images in voxel form
JP3466661B2 (en) Image processing apparatus and method
JP2000163590A (en) Conversion device and method for three-dimensional model
US5666472A (en) Image processing apparatus and method for generating polygons for use in rendering an object
JP6880618B2 (en) Image processing program, image processing device, and image processing method
US10891787B2 (en) Apparatus and method for creating biological model
CN108510536A (en) The depth estimation method and estimation of Depth equipment of multi-view image
US5771341A (en) Graphics apparatus and method for dividing parametric surface patches defining an object into polygons
JP2003115042A (en) Method for evaluating three-dimensional shape model and method and device for generating the model
US6914601B2 (en) Method, apparatus, and computer program for generating three-dimensional shape data or volume data
JP3643237B2 (en) Approximate polygon surface smoothing method
Huang Detecting color boundaries on 3D surfaces by applying edge‐detection image filters on a quad‐remeshing
JP3945524B2 (en) Key signal generation apparatus and method, image composition apparatus, and recording medium
JPH1196372A (en) Method and device for processing image and recording medium of control program for image processing
US6346949B1 (en) Three-dimensional form data processor retaining information on color boundaries of an object when thinning coordinate data
JPH06176107A (en) Method and device for processing distance picture
JP3332511B2 (en) Image data processing method and apparatus and graphic system
JP3013593B2 (en) Image display method
JP2000057376A (en) Method for generating new viewpoint image
US11557056B2 (en) Image-capturing control apparatus, image-capturing control method, and storage medium for evaluating appearance of object
WO2022130534A1 (en) Information processing device, information processing method, program, and recording medium
JP2003271684A (en) Method, program and recording medium for sewing triangle mesh

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040720

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040921

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041109

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050127

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090204

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110204

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees