JP3679436B2 - Method and apparatus for extracting points inside and outside region in three-dimensional upper region, and method and device for determining arrangement order of points on same curve - Google Patents
Method and apparatus for extracting points inside and outside region in three-dimensional upper region, and method and device for determining arrangement order of points on same curve Download PDFInfo
- Publication number
- JP3679436B2 JP3679436B2 JP32442494A JP32442494A JP3679436B2 JP 3679436 B2 JP3679436 B2 JP 3679436B2 JP 32442494 A JP32442494 A JP 32442494A JP 32442494 A JP32442494 A JP 32442494A JP 3679436 B2 JP3679436 B2 JP 3679436B2
- Authority
- JP
- Japan
- Prior art keywords
- region
- point
- outside
- vector
- curve
- 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
Description
【0001】
【産業上の利用分野】
本発明は、CAD等の図形処理装置に適応する、3次元上領域における領域内外の点の抽出方法及び装置、及び、同一曲線上の点の並び順判定方法及び装置に関するものである。
【0002】
【従来の技術】
2次元の領域における領域外の点の算出法としては、図6のようにxy平面で考えた場合、x値またはy値が領域の大きさに対して十分大きい座標を持つ点を考えれば、実用的に領域外の点を得られる。
【0003】
また2次元の場合、乱数を使ってx値及びy値を算出し、その点が領域内にあるか領域外にあるかを判定し、領域外にあればその点を領域外の点とし、領域内にある場合、再び乱数を使って任意の点を求め領域外と判定されるまで、繰り返し行うという方法が知られている。
【0004】
3次元の場合も図7のように領域が乗っている面が平面や円筒面、円錐面等、ある方向に関して、始終点が無限遠点となるような曲線が面上に存在するような面である場合は、その様な曲線上にある、領域を代表する点から十分離れた点を算出することによって領域外の点を得る方法が知られている。
【0005】
【発明が解決しようとする課題】
従来CAD等で計算機を使って、3次元上の領域外の点を求める場合、例えば領域の乗っている面が球のように閉じた曲面の場合、領域から十分離れた点が領域ののっている面に存在しないので、領域から十分離れた点を領域外の点とする手法は使えないという問題点がある。
【0006】
また、領域ののっている面が円筒面や円錐面等、ある方向に関して、始終点が無限遠点となるような曲線が面上に存在する場合でも、内外判定等、領域ののっている面上の円や楕円等の閉曲線上にのっている領域外の点を求める必要がある時、領域から十分離れた点を領域外の点とする手法は使えないという問題点がある。
【0007】
また、一般にある曲線上の点の並び順を判定する場合、これまではその曲線の幾何的特徴に基づいて判定しており、あらゆる曲線に対して適応することは難しかった。
【0008】
【課題を解決するための手段】
及び
【作用】
本第1の発明は、かかる問題点に鑑みなされたものであり、領域の乗っている面の種類に依存せず、その領域外の点を求めることを可能ならしめる方法及び装置を提供しようとするものである。
【0009】
この課題を解決するため、例えば、本発明の3次元上領域における内外の点の抽出方法は、以下の工程を備える。すなわち、
記憶手段に記憶されている3次元上領域の境界を形成している所定の稜線上において、その端点から長さに関する幾何的許容誤差に比べ十分離れた基準点を算出手段により算出する算出工程と、
該基準点を通り、当該基準点から前記幾何的許容誤差以内の距離に前記稜線と交点を持たないような面を設定手段により設定する設定工程と、
前記設定手段で設定された面と前記領域の面で交差する曲線を求める曲線工程と、
前記曲線工程で求めた交差曲線の前記基準点における、前記幾何的許容誤差に比べ十分小さい2本の接線ベクトルを求める接線ベクトル工程と、
前記接線ベクトル工程で求めた接線ベクトルのどちらが領域の外側に向かっているかを判定手段により判定して、外側に向かっている方を領域外方向ベクトルとする外ベクトル工程と、
前記基準点と前記領域外ベクトルで特定されたベクトルの終点から、前記領域がのっている面に垂線を下ろし、当該垂線に対する交点を前記領域外の点として前記記憶手段に記憶する記憶工程とを備える。
【0012】
【実施例】
以下、添付図面に従って本発明に係る実施例を詳細に説明する。
【0013】
図1は、本発明の実施例の動作の流れを説明するフローチャートである。
【0014】
図2は、本発明の利用する図形処理装置のブロック図であり、バス1(制御線、データ、アドレス及び制御バスを含む)には、中央処理装置(以下、CPU)2、リード・オンリ・メモリ(以下、ROM)3、ランダム・アクセス・メモリ(以下、RAM)4、入力インターフエース5を介して入力装置6、CRTインターフエース7を介してCRT8、外部記憶装置インターフエース9を介して、磁気ディスク、磁気テープ等の外部記憶装置10が接続されている。
【0015】
CPU2は、ROM3に記憶されたプログラムに応じ、RAM4を一時記憶装置として種々の処理及び制御、例えば図形入力制御、図形表示、ピック処理、隠面処理、内外判定等を行う。
【0016】
入力装置6はキーボード、タブレット、マウス等であり、図形データの入力を行うが、この図形データはホスト・コンピュータから受けてもよい。CRT8は必要に応じて複数のビット・マップ・プレーン等を含んでおり図形や各種メニュー等を表示する。
【0017】
次に図1及び図3,4,5を参照して本発明の好適な実施例を説明するが、以下に述べる処理及び判断はCPU2がROM3のプログラムに従って行うものである。
【0018】
<領域の定義>
本実施例では、図3のような平面及び円筒面、円錐面、球等の2次曲面及びトーラス、Bezier曲面、NURBS(Non Uniformed Rational B-spline )曲面等の自由曲面等の幾何形状を持つ面上にあり、線分及び円弧、楕円弧、放物線、双曲線等の2次曲線、Bezier曲線、NURBS(Non Uniformed Rational B-spline )曲線等の幾何形状を持つ稜線からなる境界線によって囲まれた領域内に、ある空間上の点がその領域内にあるかどうかを判定するものである。尚、ここで言う稜線とは、領域の境界を特定するエッジ部位を意味する。
【0019】
ここで図4のように境界は稜線の集合で構成され、更にそれぞれの稜線は外周ループと内周ループよりなる。外周ループは領域の最外周を表現するループで、内周ループは領域における「穴」を表現するループである。外周ループは、反時計周りを正方向とし、内周ループは時計周りを正方向とし、その順番に稜線が並んでいるものとする。換言すれば、稜線上をループをそれぞれ正方向に進んでいったとき、その左側に領域の実体があるものとする。
【0020】
以下に図1の本実施例の流れを示すフローチャートのステップS1〜S13の順番に従って3次元領域における領域外の点の算出処理の説明を行う。
【0021】
<S1:3次元領域の境界Bの任意の稜線E0を取り出す>
対象となる3次元上の領域のデータ(予め、入力装置6より入力されているものとする)を外部記憶装置10またはRAM4から取り出し、境界Bを構成する稜線の中から任意、例えば着目しているループを構成している最初の稜線E0を選択する。この稜線E0の長さの幾何的許容誤差をεとしたとき、2εより大きいかどうかを中央処理装置で判定し、2εより大きいものを取り出し、RAM4に格納する(図5参照)。尚、2εより小さい稜線に対しては、その長さが十分小さく無視できるものとして以下の処理を省略する。また、εの2倍の値を考慮したのは、以下に説明するように、その稜線E0の中央点を基準にするからであり、それを中心とした場合に両側の線部分の幾何学的許容誤差をそれぞれεにできるからでもある。
【0022】
<S2:稜線E0上の中点P0を算出>
稜線E0のデータを外部記憶装置10またはRAM4から取り出し、稜線E0上の中点P0をCPU2により算出して、RAM4に格納する(図5参照)。
【0023】
<S3:点P0を通る切断面の算出>
ここでは、切断面として平面を考える。RAM4から取り出した点P0のデータ、予め固定した任意の1点と、CPU2により発生した乱数を使って求めた一点が同一直線に並んでいるかどうかをCPU2により判定し、並んでいなかったら、それら3点で平面が特定できるので、その3点を通る平面を切断面としてRAM4に格納する。また、平面が特定できなかった場合、すなわち、同一直線に並んでいると判定されたら、並ばなくなるまで、CPU2により発生した乱数を使って点を求める。ここで乱数を使い切断面を求めることによって点P0とε以内にE0と交点を持つような切断面が求まる確率が低くなる。点P0とε以内にE0と交点を持つと正しく領域外の点が求まらないことがある。
【0024】
<S4:切断面と領域の乗っている面Sとの交線Cの算出>
上記求めた切断平面と領域の乗っている面SをRAM4から取り出し、その交線CをCPU2により算出する。
【0025】
<S5:点P0における面Sの法線ベクトルn0を算出>
点P0及び面SのデータをRAM4より取り出し、点P0における領域の乗っている面S法線ベクトルn0をCPU2により算出して、それをRAM4に格納する(図5参照)。
【0026】
<S6:点P0における稜線E0の接線ベクトルTE1,TE2の算出>
点P0及び稜線E0のデータを外部記憶装置10またはRAM4より取り出し、点P0における稜線E0の接線の単位方向ベクトルTE1,TE2をCPU2により算出し、RAM4に格納する。尚、この時点では、TE1、TE2のいずれが領域外を向いているのか特定できていない。
【0027】
<S7:TE1,TE2のうち境界の回り向きと同方向のものをTEとする>上記求めた接線ベクトルTE1,TE2のデータをRAM4より取り出し、どちらが境界の回り向きと同一方向かをCPU2により判定し、同一のものをTEとしRAM4に格納する(図5参照)。
【0028】
<S8:点P0における曲線Cの接線ベクトルTC1,TC2を算出>
上記ステップS4で求めた曲線CのデータをRAM4より取り出し、点P0における接線の方向ベクトルで、大きさが幾何的許容誤差εより十分に小さいベクトルをCPU2により算出し、TC1,TC2としてRAM4に格納する(図5参照)。
【0029】
<S9:TC1とTEの外積n1及びTC2とTEの外積n2の算出>
TC1,TC2,TEのデータをRAM4より取り出し、
n1=TC1×TE … (1)
n2=TC2×TE … (2)
よりTC1とTEの外積n1、及びTC2とTE2の外積n2をCPU2によって算出し、それをRAM4に格納する。
【0030】
<S10:n0とn1のなす各θ1及びn0とn2のなす角θ2の算出>
n0,n1,n2のデータをRAM4より取り出し、
θ1=(n0とn1のなす角)(0≦θ1≦π) (3)
θ2=(n0とn2のなす角)(0≦θ2≦π) (4)
としてθ1,θ2をCPU2により算出し、RAM4に格納する。
【0031】
<S11:θi(i=1,2)< π/2のときTC=TCi とする>
θ1,θ2のデータをRAM4より取り出すと、θ1,θ2のいずれかがπ/2より小さくなり、他方がπ/2より大きくなるはずなのでその判定をCPU2により行う。θi(i=1,2)<π/2のときTC=TCiとして、RAM4に格納する。すなわち、これによってベクトルTCが領域の外に向かうものとして特定できたことになる。
【0032】
<S12:Pout0=P0+TC>
P0,TCのデータをRAM4より取り出し、Pout0=P0+TCをCPU2により算出し、RAM4に格納する(図5参照)。
【0033】
<S13:Pout0から交線Cにおろした垂線の足を領域外の点とする>
上記S12で求めたPout0及び上記S4で求めた交線Cのデータをランダムアクセスメモリから取り出し、Pout0から曲線(交線)Cにおろした垂線の足をCPUにより求め、これを領域外の点としてRAM4または外部記憶装置10に格納する(図5参照)。
【0034】
以上のようにすることで、例えば領域の乗っている面が球のような面であっても、一義的に、領域外の点を得ることが可能になる。つまり、任意の種類の面にのり、任意の種類の境界に囲まれた、3次元以上領域における領域外の点を求めることにより、3次元領域における内外判定等の、3次元の図形処理を許容誤差の範囲で安定的に行うことができるという効果がある。
【0035】
また、上記実施例では、領域外の点を求める例を示したが、領域内の点を求める場合にも適応できることは言うまでもない。
【0036】
尚、上記実施例において、点P0からε以内の距離にE0と交点を持たない、着目している領域の同一面上にある曲線Cを求める方法として、P0と与点と乱数を使って発生された点を通る平面と領域の乗っている面との交線として求めるのではなく、P0と固定点と適当なばらつきのある予め準備された複数の点のうちの1個から平面を作り、求めた交線が点P0からε以内の距離にE0と交点を持っていたら別の点を使って平面を生成して、交線を求めるという方法でもよい。この場合、処理効率は若干落ちるが確実性の高い点P0からε以内の距離にE0と交点を持たない交線を求める方法によって、領域外の1点の算出を行えるようになる。
【0037】
また、上記実施例において、3次元上領域の境界上の任意の稜線E0上の、端点から長さに関する幾何的許容誤差εに比べ十分離れた任意の点P0を算出するステップ点P0を求めるのに、稜線E0上の中点を取るのではなく、領域外の内外判定等のように、特定の交線上の点をP0とする必要がある場合は、その特定の交線とE0の交点をP0として端点との距離がεより大きいかをチェックする方法で領域外の1点の算出を行える。
【0038】
<第2の実施例の説明>
次に、第2の実施例を説明する。
【0039】
一般に、同一曲線上の点の並び順を認識する手法としては、いくつかある。例えば直線上の場合には、ある基準点からの距離により点の並びを識別できる。また、円上の場合には、その円の中心と結ぶ線分と基準線(基準点と円の中心を結ぶ線分)との角度に基づいて、点の並びを識別できる。
【0040】
しかしながら、点の並び順を識別、もしくは認識する手法は、その曲線(直線も含む)毎の個別の幾何的特徴にたよっていたので、汎用性がないという問題点がある。
【0041】
本第2の実施例では、かかる問題点を一掃しようとする。
【0042】
以下、図8〜図11に基づいて説明する。尚、装置構成としては、上記第1の実施例における図2と同じとし、その詳細は省略する。但し、ROM3には図8のフローチャートに基づくプログラムが格納されることになる。
【0043】
<S21:与えられた曲線をパラメトリック>
2次元または3次元の空間における曲線のデータを外部記憶装置10或いはRAM4から取り出し、CPU2によりパラメトリック表現に変換する。そして、変換した結果をRAM4に格納する。但し、パラメータが曲線Cの進む方向に従って単調に増減するようなパラメトリック表現に変換する必要がある(図9〜図11の→方向を参照)。パラメトリックの例としては、次のようになろう。
【0044】
(1)直線の場合
P=P0+tV(−∝≦t≦∝)
ここで、P0:直線上の任意の一点
V :直線の方向ベクトル
t :パラメータ
である。
【0045】
(2)円の場合
P=C+r(u・cos(t)+v・sin(t)) (0≦t≦2π)
ここで、C :円の中心
r :円の半径
u :基準ベクトル1(円と同じ平面上の単位ベクトル)
v :基準ベクトル2(円と同じ平面上の単位ベクトル)
但し、u・v=0、 |u|=|v|=1
t :パラメータ
である。
【0046】
(3)楕円の場合
P=C+a・cos(t)+b・sin(t) (0≦t≦2π)
ここで、C :楕円の中心
a :長軸ベクトル
b :短軸ベクトル
但し、a・b=0
t :パラメータ
である。
【0047】
尚、ここでは3種類の曲線について示したが、種類はこれに限るものではない。要は、曲線をパラメトリック表現することにその意味があるからである。
【0048】
<S22:曲線上の各点のパラメトリック値を算出>
上記パラメトリック表現をもとに、曲線上の各点の座標値を外部記憶装置10またはRAM4から取り出し、CPU2により上記パラメトリック表現におけるパラメトリック値を求め、元の点と対応づけてRAM4に格納する。
【0049】
例えば、直線の場合、
t=(P−P0)・V/(V・V)
となる。
【0050】
円の場合、
cos(t)=((P−C)・u)/r
sin(t)=((P−C)・u)/r
ここで、0≦t≦2πの範囲なのでパラメータが一意に決まる。
【0051】
楕円の場合、
cos(t)=((P−C)・a)/|a|^2
sin(t)=((P−C)・b)/|b|^2
ここで、0≦t≦2πの範囲なので、パラメータが一意に決まる。また、|x|はxの絶対値を、x^yはxのy乗を示している。
【0052】
<S23:パラメトリック値をソート>
上記ステップS22で求めたパラメータをRAM4より取り出し、パラメータとそれに対応する点を算出し、その算出した点をCPU2によりクイックソート、バブルソート等を使用してソートし、ソートした結果をRAM4に格納する。尚、ソートの手法には、様々なものがあって、これ以外のものを採用しても良いのは勿論である。
【0053】
<S24:パラメトリック値でソートされた順番によって点をソート>
上記ステップS23でソートされたパラメータの順番とパラメータとの点の対応をRAM4より取り出し、参照して、CPU2により点の順番を認識する。
【0054】
以上説明したように本第2の実施例によれば、同一曲線上の点の並びを認識することにより、CAD等における領域内外判定等の幾何学処理等を、汎用的にしかも簡単に行うことが可能になる。
【0055】
尚、上述した第1、第2の実施例では、1つの装置に適応した例を説明したが、本発明は複数の機器から構成されるシステムに適用しても良い。また、本発明は、システム或は装置にプログラムを供給することによって達成される場合にも適用できることはいうまでもない。
【0056】
【発明の効果】
以上説明したように本発明によれば、領域の乗っている面の種類に依存せず、その領域外の点を求めることが可能になる。
【0057】
また、他の第2の発明によれば、与えられた曲線上の点の並びを、その曲線を表現している関数から、パラメトリック表現という共通な表現に変換し、曲線の幾何的表現に依存せず、一意にその曲線上の点の並び順を判定することが可能になる。
【0058】
【図面の簡単な説明】
【図1】本発明の好適な一実施例を示す流れ図である。
【図2】本発明を利用する図形処理装置のブロック図である。
【図3】本実施例で扱う、領域の構成を示す図である。
【図4】外周ループと内周ループを説明する図である。
【図5】領域外の点を求める方法を示す図である。
【図6】xy平面での領域外の点を求める従来の方法を説明する図である。
【図7】3次元の領域において、領域から十分離れた点を選ぶことにより領域外の点が算出できる場合を示す図である。
【図8】第2の実施例における処理手順を示すフローチャートである。
【図9】第2の実施例における直線のパラメータの増減方向と点の並び順の関係を示す図である。
【図10】第2の実施例における円のパラメータの増減方向と点の並び順の関係を示す図である。
【図11】第2の実施例における楕円のパラメータの増減方向と点の並び順の関係を示す図である。
【符号の説明】
1 バス
2 中央演算処理装置(CPU)
3 リードオンリーメモリ(ROM)
4 ランダムアクセスメモリ(RAM)
5 入力インターフェース
6 入力装置
7 CRTインターフェース
8 CRT装置
9 外部記憶装置インターフェース
10 外部記憶装置[0001]
[Industrial application fields]
The present invention is adapted to the graphics processing apparatus such as CAD, extraction method and apparatus of the points in the region and outside in a three-dimensional region, and are those related to ordering determination method and apparatus of the points on the same curve.
[0002]
[Prior art]
As a method for calculating a point outside the region in the two-dimensional region, when considering the point where the x value or the y value is sufficiently large with respect to the size of the region when considered on the xy plane as shown in FIG. A point outside the range can be obtained practically.
[0003]
In the two-dimensional case, the x value and the y value are calculated using random numbers, it is determined whether the point is inside or outside the region, and if it is outside the region, the point is set as a point outside the region. In the case of being within the area, a method is known in which an arbitrary point is obtained again using a random number and is repeated until it is determined that the area is out of the area.
[0004]
Even in the three-dimensional case, the surface on which the region rides is a plane, a cylindrical surface, a conical surface, etc., such as FIG. In such a case, a method is known in which a point outside the region is obtained by calculating a point on such a curve that is sufficiently away from a point representing the region.
[0005]
[Problems to be solved by the invention]
When a point outside a three-dimensional area is obtained by using a computer such as a conventional CAD, for example, when the surface on which the area is placed is a curved surface closed like a sphere, a point sufficiently away from the area is added to the area. However, there is a problem that a method of using a point that is sufficiently away from the region as a point outside the region cannot be used.
[0006]
Even if there is a curve on the surface where the start and end points are at infinity in a certain direction, such as a cylindrical surface or a conical surface, the area is When it is necessary to find a point outside the region that is on a closed curve such as a circle or ellipse on the surface, it is not possible to use a method that uses a point far from the region as a point outside the region.
[0007]
In general, when the arrangement order of points on a curve is determined, the determination is based on the geometric characteristics of the curve, and it has been difficult to adapt to any curve.
[0008]
[Means for Solving the Problems]
And [Action]
The first aspect of the present invention has been made in view of such a problem, and intends to provide a method and an apparatus that make it possible to obtain a point outside the region without depending on the type of the surface on which the region is mounted. To do.
[0009]
In order to solve this problem, for example, a method for extracting internal and external points in a three-dimensional upper region of the present invention includes the following steps. That is,
A calculation step of calculating, by a calculation unit, a reference point that is sufficiently far from a geometrical tolerance regarding the length from the end point on a predetermined ridge line that forms a boundary of the three-dimensional upper region stored in the storage unit; ,
A setting step of setting a plane that does not have an intersection with the ridge line at a distance within the geometric tolerance from the reference point through the reference point;
And curves obtaining a curve that intersects a plane of the set plane as in the setting unit area,
A tangent vector step for obtaining two tangent vectors that are sufficiently smaller than the geometric tolerance at the reference point of the cross curve obtained in the curve step;
An outer vector step of determining which one of the tangent vectors obtained in the tangent vector step is directed to the outside of the region by using a determination unit, and setting the direction toward the outside as an out-of-region direction vector;
A storage step of dropping a perpendicular from the end point of the vector specified by the reference point and the out-of-region vector to a surface on which the region is located, and storing an intersection with the perpendicular as a point outside the region in the storage unit; Is provided.
[0012]
【Example】
Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.
[0013]
FIG. 1 is a flowchart for explaining the operation flow of the embodiment of the present invention.
[0014]
FIG. 2 is a block diagram of a graphics processing apparatus used by the present invention. A bus 1 (including control lines, data, addresses, and control buses) includes a central processing unit (hereinafter referred to as CPU) 2, a read-only A memory (hereinafter referred to as ROM) 3, a random access memory (hereinafter referred to as RAM) 4, an
[0015]
The
[0016]
The
[0017]
Next, a preferred embodiment of the present invention will be described with reference to FIGS. 1, 3, 4, and 5. Processing and determination described below are performed by the
[0018]
<Definition of area>
In the present embodiment, there are geometric shapes such as flat surfaces and cylindrical surfaces, conical surfaces, spheres, and other free-form surfaces such as torus, Bezier surfaces, and NURBS (Non Uniform Rational B-spline) surfaces as shown in FIG. A region that is on a surface and surrounded by a boundary line consisting of ridge lines having geometric shapes such as line segments, circular arcs, elliptical arcs, parabolas, hyperbolic curves, Bezier curves, NURBS (Non Uniformed Rational B-spline) curves, etc. It is determined whether or not a point on a certain space is within the region. The ridge line referred to here means an edge part that specifies the boundary of the region.
[0019]
Here, as shown in FIG. 4, the boundary is composed of a set of ridge lines, and each ridge line is composed of an outer peripheral loop and an inner peripheral loop. The outer periphery loop is a loop that represents the outermost periphery of the region, and the inner periphery loop is a loop that represents a “hole” in the region. It is assumed that the outer circumferential loop has a counterclockwise direction as a positive direction, and the inner circumferential loop has a clockwise direction as a positive direction, and ridge lines are arranged in that order. In other words, it is assumed that when the loop is advanced in the positive direction on the ridge line, there is a region entity on the left side.
[0020]
In the following, the calculation processing of points outside the region in the three-dimensional region will be described according to the order of steps S1 to S13 in the flowchart showing the flow of the present embodiment in FIG.
[0021]
<S1: Extract an arbitrary ridge line E0 of the boundary B of the three-dimensional region>
Data of a target three-dimensional area (assumed to be input from the
[0022]
<S2: Calculate midpoint P0 on ridgeline E0>
The data of the ridge line E0 is taken out from the
[0023]
<S3: Calculation of cutting plane passing through the point P0>
Here, a plane is considered as the cut surface. The
[0024]
<S4: Calculation of intersection line C between cut surface and surface S where region is on>
The obtained cutting plane and the surface S on which the region is placed are taken out from the
[0025]
<S5: Calculate normal vector n0 of surface S at point P0>
The data of the point P0 and the surface S are extracted from the
[0026]
<S6: Calculation of tangent vectors TE1 and TE2 of edge E0 at point P0>
The data of the point P0 and the ridgeline E0 are taken out from the
[0027]
<S7: TE1 and TE2 having the same direction as the direction of the boundary are set as TE> The data of the obtained tangent vectors TE1 and TE2 are extracted from the
[0028]
<S8: Calculate tangent vectors TC1 and TC2 of curve C at point P0>
The data of the curve C obtained in the above step S4 is extracted from the
[0029]
<S9: Calculation of outer product n1 of TC1 and TE and outer product n2 of TC2 and TE>
The data of TC1, TC2, TE is taken out from RAM4,
n1 = TC1 × TE (1)
n2 = TC2 × TE (2)
The
[0030]
<S10: Calculation of θ1 formed by n0 and n1 and angle θ2 formed by n0 and n2>
The data of n0, n1, n2 is taken out from the
θ1 = (angle formed by n0 and n1) (0 ≦ θ1 ≦ π) (3)
θ2 = (angle formed by n0 and n2) (0 ≦ θ2 ≦ π) (4)
Θ1 and θ2 are calculated by the
[0031]
<S11: θi (i = 1, 2) <When π / 2, TC = TCi>
When the data of θ1 and θ2 are extracted from the
[0032]
<S12: Pout0 = P0 + TC>
The data of P0 and TC are extracted from the
[0033]
<S13: A perpendicular foot from Pout0 to the intersection line C is a point outside the region>
The data of Pout0 obtained in S12 and the intersection line C obtained in S4 is taken out from the random access memory, and the vertical line extending from Pout0 to the curve (intersection line) C is obtained by the CPU, and this is used as a point outside the region. The data is stored in the
[0034]
By doing so, for example, even if the surface on which the region is placed is a sphere-like surface, it is possible to uniquely obtain points outside the region. In other words, 3D graphics processing, such as inside / outside determination in 3D areas, is allowed by finding points outside the area in 3D or higher areas that are on any type of surface and surrounded by any type of boundary. There is an effect that it can be performed stably within a range of errors.
[0035]
Moreover, although the example which calculates | requires the point outside an area | region was shown in the said Example, it cannot be overemphasized that it is applicable also when calculating | requiring the point in an area | region.
[0036]
In the above embodiment, as a method for obtaining the curve C on the same plane of the region of interest that does not intersect with E0 at a distance within ε from the point P0, it is generated using P0, the given point, and a random number. Rather than obtaining as a line of intersection between the plane passing through the specified point and the plane on which the region is located, a plane is created from one of a plurality of points prepared in advance with P0 and a fixed point and appropriate variations, If the obtained intersection line has an intersection point with E0 at a distance within ε from the point P0, a plane may be generated using another point to obtain the intersection line. In this case, one point outside the region can be calculated by a method of obtaining an intersection line having no intersection with E0 at a distance within ε from the point P0 with high reliability, although the processing efficiency is slightly reduced.
[0037]
Further, in the above-described embodiment, the step point P0 for calculating an arbitrary point P0 on the arbitrary ridge line E0 on the boundary of the three-dimensional upper area and sufficiently separated from the geometrical tolerance ε regarding the length from the end point is obtained. In addition, when it is necessary to set a point on a specific intersection line to P0 instead of taking the middle point on the ridge line E0, as in the inside / outside determination outside the region, the intersection point between the specific intersection line and E0 is set. One point outside the region can be calculated by checking whether the distance from the end point is larger than ε as P0.
[0038]
<Description of the second embodiment>
Next, a second embodiment will be described.
[0039]
In general, there are several methods for recognizing the arrangement order of points on the same curve. For example, on a straight line, the arrangement of points can be identified by the distance from a certain reference point. In the case of a circle, the arrangement of points can be identified based on the angle between a line segment connecting the center of the circle and a reference line (line segment connecting the reference point and the center of the circle).
[0040]
However, the method for identifying or recognizing the arrangement order of the points depends on individual geometric features for each curve (including straight lines), and thus has a problem that it is not versatile.
[0041]
In the second embodiment, an attempt is made to eliminate such a problem.
[0042]
Hereinafter, a description will be given with reference to FIGS. The apparatus configuration is the same as that shown in FIG. 2 in the first embodiment, and details thereof are omitted. However, the
[0043]
<S21: A given curve is parametric>
Curve data in a two-dimensional or three-dimensional space is extracted from the
[0044]
(1) In the case of a straight line P = P0 + tV (−∝ ≦ t ≦ ∝)
Here, P0: any one point on the straight line V: straight line direction vector t: parameter.
[0045]
(2) In the case of a circle P = C + r (u · cos (t) + v · sin (t)) (0 ≦ t ≦ 2π)
Here, C: circle center r: circle radius u: reference vector 1 (unit vector on the same plane as the circle)
v: reference vector 2 (unit vector on the same plane as the circle)
However, u · v = 0, | u | = | v | = 1
t: parameter.
[0046]
(3) In the case of an ellipse P = C + a · cos (t) + b · sin (t) (0 ≦ t ≦ 2π)
Here, C: center of ellipse a: major axis vector b: minor axis vector where a · b = 0
t: parameter.
[0047]
Although three types of curves are shown here, the types are not limited thereto. The point is that it makes sense to parametrically represent a curve.
[0048]
<S22: Calculate the parametric value of each point on the curve>
Based on the parametric expression, the coordinate value of each point on the curve is taken out from the
[0049]
For example, in the case of a straight line,
t = (P−P0) · V / (V · V)
It becomes.
[0050]
For a circle,
cos (t) = ((P−C) · u) / r
sin (t) = ((P−C) · u) / r
Here, since the range is 0 ≦ t ≦ 2π, the parameter is uniquely determined.
[0051]
For an ellipse,
cos (t) = ((P−C) · a) / | a | ^ 2
sin (t) = ((P−C) · b) / | b | ^ 2
Here, since the range is 0 ≦ t ≦ 2π, the parameter is uniquely determined. | X | indicates the absolute value of x, and x ^ y indicates x to the power of y.
[0052]
<S23: Sort parametric values>
The parameter obtained in step S22 is extracted from the
[0053]
<S24: Sort points by order sorted by parametric value>
The correspondence between the order of the parameters sorted in step S23 and the points of the parameters is retrieved from the
[0054]
As described above, according to the second embodiment, by recognizing the arrangement of points on the same curve, geometric processing such as area inside / outside determination in CAD etc. can be performed generically and easily. Is possible.
[0055]
In the above-described first and second embodiments, the example applied to one apparatus has been described, but the present invention may be applied to a system constituted by a plurality of devices. Needless to say, the present invention can also be applied to a case where the present invention is achieved by supplying a program to a system or apparatus.
[0056]
【The invention's effect】
As described above, according to the present invention, a point outside the region can be obtained without depending on the type of the surface on which the region is placed.
[0057]
According to another second invention, a sequence of points on a given curve is converted from a function expressing the curve into a common expression called a parametric expression, and depends on a geometric expression of the curve. It is possible to uniquely determine the order of the points on the curve.
[0058]
[Brief description of the drawings]
FIG. 1 is a flowchart illustrating a preferred embodiment of the present invention.
FIG. 2 is a block diagram of a graphics processing apparatus using the present invention.
FIG. 3 is a diagram illustrating a configuration of an area handled in the present embodiment.
FIG. 4 is a diagram illustrating an outer peripheral loop and an inner peripheral loop.
FIG. 5 is a diagram illustrating a method for obtaining a point outside an area;
FIG. 6 is a diagram for explaining a conventional method for obtaining a point outside a region on an xy plane.
FIG. 7 is a diagram illustrating a case where a point outside a region can be calculated by selecting a point sufficiently away from the region in a three-dimensional region.
FIG. 8 is a flowchart showing a processing procedure in the second embodiment.
FIG. 9 is a diagram illustrating a relationship between an increasing / decreasing direction of a straight line parameter and an arrangement order of points in the second embodiment.
FIG. 10 is a diagram illustrating a relationship between an increase / decrease direction of a circle parameter and an arrangement order of points in the second embodiment.
FIG. 11 is a diagram illustrating a relationship between an increase / decrease direction of an ellipse parameter and an arrangement order of points in the second embodiment.
[Explanation of symbols]
1
3 Read-only memory (ROM)
4 Random access memory (RAM)
5
Claims (2)
該基準点を通り、当該基準点から前記幾何的許容誤差以内の距離に前記稜線と交点を持たないような面を設定手段により設定する設定工程と、
前記設定手段で設定された面と前記領域の面で交差する曲線を求める曲線工程と、
前記曲線工程で求めた交差曲線の前記基準点における、前記幾何的許容誤差に比べ十分小さい2本の接線ベクトルを求める接線ベクトル工程と、
前記接線ベクトル工程で求めた接線ベクトルのどちらが領域の外側に向かっているかを判定手段により判定して、外側に向かっている方を領域外方向ベクトルとする外ベクトル工程と、
前記基準点と前記領域外ベクトルで特定されたベクトルの終点から、前記領域がのっている面に垂線を下ろし、当該垂線に対する交点を前記領域外の点として前記記憶手段に記憶する記憶工程と
を備えることを特徴とする3次元上領域における領域内外の点の抽出方法。A calculation step of calculating, by a calculation unit, a reference point sufficiently separated from an end point of the predetermined ridge line forming the boundary of the three-dimensional upper region stored in the storage unit as compared to a geometric tolerance regarding the length; ,
A setting step of setting a plane that passes through the reference point and does not have an intersection with the ridge line at a distance within the geometric tolerance from the reference point;
And curves obtaining a curve that intersects a plane of the set plane as in the setting unit area,
A tangent vector step for obtaining two tangent vectors that are sufficiently smaller than the geometric tolerance at the reference point of the cross curve obtained in the curve step;
An outer vector step of determining which one of the tangent vectors obtained in the tangent vector step is directed to the outside of the region by the determining means, and setting the direction toward the outside as an out-of-region direction vector;
A storage step of dropping a perpendicular from the end point of the vector specified by the reference point and the out-of-region vector to a surface on which the region is located, and storing an intersection with the perpendicular as a point outside the region in the storage unit; A method for extracting points inside and outside the three-dimensional upper region.
該基準点を通り、当該基準点から前記幾何的許容誤差以内の距離に前記稜線と交点を持たないような面を設定する設定手段と、
前記設定手段で設定された面と前記領域の面で交差する曲線を求める曲線手段と、
前記曲線手段で求めた交差曲線の前記基準点における、前記幾何的許容誤差に比べ十分小さい2本の接線ベクトルを求める接線ベクトル手段と、
前記接線ベクトル手段で求めた接線ベクトルのどちらが領域の外側に向かっているかを判定して、外側に向かっている方を領域外方向ベクトルとする外ベクトル手段と、
前記基準点と前記領域外ベクトルで特定されたベクトルの終点から、前記領域がのっている面に垂線を下ろし、当該垂線に対する交点を前記領域外の点として前記記憶手段に記憶する記憶制御手段と
を備えることを特徴とする3次元上領域における領域内外の点の抽出装置。Calculating means for calculating a reference point sufficiently separated from the geometric tolerance of the length from the end point on a predetermined ridge line forming the boundary of the three-dimensional upper region stored in the storage means;
Setting means for setting a surface that passes through the reference point and does not have an intersection with the ridgeline at a distance within the geometric tolerance from the reference point;
And the curve means for obtaining a curve that intersects a plane of the set plane as in the setting unit area,
Tangent vector means for obtaining two tangent vectors that are sufficiently smaller than the geometric tolerance at the reference point of the cross curve obtained by the curve means;
Determining which one of the tangent vectors determined by the tangent vector means is directed to the outside of the region;
Storage control means for dropping a perpendicular line from the end point of the vector specified by the reference point and the out-of-area vector to the surface on which the area is located, and storing the intersection with the perpendicular line as a point outside the area in the storage means An apparatus for extracting points inside and outside a three-dimensional upper region, characterized by comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP32442494A JP3679436B2 (en) | 1994-12-27 | 1994-12-27 | Method and apparatus for extracting points inside and outside region in three-dimensional upper region, and method and device for determining arrangement order of points on same curve |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP32442494A JP3679436B2 (en) | 1994-12-27 | 1994-12-27 | Method and apparatus for extracting points inside and outside region in three-dimensional upper region, and method and device for determining arrangement order of points on same curve |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08180209A JPH08180209A (en) | 1996-07-12 |
JP3679436B2 true JP3679436B2 (en) | 2005-08-03 |
Family
ID=18165649
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP32442494A Expired - Fee Related JP3679436B2 (en) | 1994-12-27 | 1994-12-27 | Method and apparatus for extracting points inside and outside region in three-dimensional upper region, and method and device for determining arrangement order of points on same curve |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3679436B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103238170B (en) | 2010-12-02 | 2015-11-25 | Dipro株式会社 | Display processing method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0375885A (en) * | 1989-08-17 | 1991-03-29 | Ricoh Co Ltd | Interference line generating system |
JPH0778192A (en) * | 1993-06-30 | 1995-03-20 | Canon Inc | Method and device for processing picture |
-
1994
- 1994-12-27 JP JP32442494A patent/JP3679436B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH08180209A (en) | 1996-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ding et al. | Oriented bounding box and octree based global interference detection in 5-axis machining of free-form surfaces | |
Jiménez et al. | 3D collision detection: a survey | |
KR900003123B1 (en) | Method for evaluating free surface and n.c. system | |
Tang | Algorithms for collision detection and avoidance for five-axis NC machining: a state of the art review | |
US4797842A (en) | Method of generating finite elements using the symmetric axis transform | |
Casale | Free-form solid modeling with trimmed surface patches | |
Jensen et al. | Tool selection for five-axis curvature matched machining | |
US6532304B1 (en) | Matching geometric objects | |
EP1710720B1 (en) | Method of computer-aided design of a modeled object having several faces | |
Gan et al. | Spherical maps: their construction, properties, and approximation | |
Chen et al. | Separating and intersecting spherical polygons: Computing machinability on three-, four-, and five-axis numerically controlled machines | |
Mi et al. | Tool orientation optimization for 5-axis machining with C-space method | |
Zhiwei et al. | Approximate tool posture collision-free area generation for five-axis CNC finishing process using admissible area interpolation | |
Kim et al. | Region-expansion for the Voronoi diagram of 3D spheres | |
Aras et al. | Vector model-based workpiece update in multi-axis milling by moving surface of revolution | |
Maeng et al. | A Z-map update method for linearly moving tools | |
Xú et al. | STEP-NC based reverse engineering of in-process model of NC simulation | |
Veron et al. | Shape preserving polyhedral simplification with bounded error | |
Wang et al. | Graphics-assisted approach to rapid collision detection for multi-axis machining | |
Van Dang et al. | Enhanced vector flow of significant directions for five-axis machining of STL surfaces | |
US7439987B2 (en) | Vector graphic normalizer | |
JP3679436B2 (en) | Method and apparatus for extracting points inside and outside region in three-dimensional upper region, and method and device for determining arrangement order of points on same curve | |
Joonghyun et al. | Computation of molecular surface using Euclidean Voronoi Diagram | |
US5805858A (en) | Apparatus and method of automatically creating supplemental segment in two-dimensional drawings, and CAD/CAM system having function of automatically creating supplemental segment in two-dimensional drawings | |
JP4095120B2 (en) | Inside / outside determination method and apparatus in region |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Effective date: 20041105 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A521 | Written amendment |
Effective date: 20041228 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A131 | Notification of reasons for refusal |
Effective date: 20050201 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050401 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Effective date: 20050422 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: 20050513 |
|
R150 | Certificate of patent (=grant) or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090520 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Year of fee payment: 5 Free format text: PAYMENT UNTIL: 20100520 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100520 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Year of fee payment: 6 Free format text: PAYMENT UNTIL: 20110520 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Year of fee payment: 7 Free format text: PAYMENT UNTIL: 20120520 |
|
LAPS | Cancellation because of no payment of annual fees |