cell(R): // 部分曲面 R の内部に自己交差があるか
if 単射判定(R) が成立: return // §4:自己交差なし
if R の幅 ≤ ε: 未解決として記録; return // 特異点の近傍
R を 4 分割 → R1..R4
各 Ri について cell(Ri)
6 通りの組 (Ri, Rj) について pair(Ri, Rj)
pair(A, B): // A と B の間に交差があるか
if 包含箱が離れている: return
if A と B が隣接(境界や頂点を共有):
if 単射判定(A ∪ B を含む矩形) が成立: return
A, B を(幅 > ε なら)4 分割し、全組について pair
else:
clipPair(A, B) // §5.3:ベジエクリッピング
clipPair(A, B):
repeat:
B の 3 つのスラブで A の (u,v) をクリップ(空なら return)
A の 3 つのスラブで B の (u,v) をクリップ(空なら return)
if A, B とも幅 ≤ ε: leaf(A, B); return // §5.4
if 縮小が 20% 未満: 大きい方を 4 分割し、各組について clipPair; return
5.2 部分曲面の取り出し
部分領域 [u₀,u₁]×[v₀,v₁] の制御網は、u 方向と v 方向のド・カステリョ分割を各 1 回行えば、元の曲面とまったく同じ形として得られます。
クリッピングや単射判定は、すべてこの制御網に対して行います。
5.3 ベジエクリッピング:向き付き包含箱の 3 つのスラブ
部分曲面 B の制御点 Qkl から、3 つの直交軸 e₁, e₂, e₃ を作ります。e₃ は四隅の対角線の外積(平均法線)、e₁ と e₂ は接平面内の 2 方向です。
各軸 e について、B は凸包性によりスラブ
dmin ≤ e·x ≤ dmax, dmin = min e·Qkl, dmax = max e·Qkl
の中にあります。一方、部分曲面 A の軸方向の座標
g(u,v) = e·SA(u,v) = ΣiΣj (e·Pij) Bim(u) Bjn(v)
は、係数 e·Pij をもつ m×n 次のベジエ関数です。
A が B と交わり得るのは dmin ≤ g ≤ dmax となる (u,v) だけです。そこで、点列 (i/m, e·Pij) の凸包と帯 [dmin, dmax] の交わりから u の範囲を、同様に v の範囲を求めて A を切り詰めます。
3 つの軸で得た範囲の共通部分をとり、A と B の役割を入れ替えて交互に繰り返します。
2 次元の FAT Line による曲線の交差 [2] を 3 次元に広げたもので、曲面とレイの交点 [1] で 2 平面を使ったのと同じ考え方です。
クリップは凸包性だけに基づくので、交差のある部分を切り落とすことはありません。範囲が空になれば、A と B は交差しないことが確定します。
5.4 葉:ガウス・ニュートン法(最小ノルム解)で交点を求める
A と B が十分小さく(幅 ≤ ε)なったら、それぞれの中心 x = (u₁,v₁,u₂,v₂) から、F(x) = S(u₁,v₁) − S(u₂,v₂) = 0 を解きます。
ヤコビ行列 J = [Su(u₁,v₁), Sv(u₁,v₁), −Su(u₂,v₂), −Sv(u₂,v₂)] は 3×4 なので、最小ノルムの修正量
T. Nishita, T. W. Sederberg, M. Kakimoto, "Ray tracing trimmed rational surface patches," ACM SIGGRAPH Computer Graphics, 1990.
T. W. Sederberg, T. Nishita, "Curve intersection using Bézier clipping," Computer-Aided Design, 1990.
T. W. Sederberg, T. Nishita, "Geometric Hermite approximation of surface patch intersection curves," Computer Aided Geometric Design, 1991.
D. Lasser, "Calculating the self-intersections of Bézier curves," Computers in Industry, 1989.
N. M. Patrikalakis, T. Maekawa, Shape Interrogation for Computer Aided Design and Manufacturing, Springer, 2002(ISBN 3-540-42454-7)。§5.10 Self-intersection of curves and surfaces。
T. W. Sederberg, R. J. Meyers, "Loop detection in surface patch intersections," Computer Aided Geometric Design, 5(2), 161–171, 1988.
T. W. Sederberg, H. N. Christiansen, S. Katz, "Improved test for closed loops in surface intersections," Computer-Aided Design, 1989. doi:10.1016/0010-4485(89)90058-4
A. K. Zundel, T. W. Sederberg, "Loop destruction using Bézier clipping," in R. R. Martin (ed.), The Mathematics of Surfaces VII, Oxford University Press, 1996, pp. 463–478.
P. Volino, N. Magnenat-Thalmann, "Efficient self-collision detection on smoothly discretized surface animations using geometrical shape regularity," Computer Graphics Forum, 13(3), 155–166, 1994.
L.-E. Andersson, T. J. Peters, N. F. Stewart, "Selfintersection of composite curves and surfaces," Computer Aided Geometric Design, 15(5), 507–527, 1998.
G. Craciun, L. D. García-Puente, F. Sottile, "Some geometrical aspects of control points for toric patches," in Mathematical Methods for Curves and Surfaces, Springer, 2010(arXiv:0812.1275)。
F. Sottile, C.-G. Zhu, "Injectivity of 2D toric Bézier patches," arXiv:1106.2877, 2011.
I. Selimovic, "On NURBS algorithms using tangent cones," Computer Aided Geometric Design, 2009. doi:10.1016/j.cagd.2009.03.004
Y.-Y. Yu, Y. Ji, C.-G. Zhu, "Sufficient condition for injectivity of NURBS volumes by tangent cones," Journal of Computational and Applied Mathematics, 432, 2023.
D. Pekerman, G. Elber, M.-S. Kim, "Self-intersection detection and elimination in freeform curves and surfaces," Computer-Aided Design, 40(2), 150–159, 2008.
J.-K. Seong, G. Elber, M.-S. Kim, "Trimming local and global self-intersections in offset curves/surfaces using distance maps," Computer-Aided Design, 2006.