1.基本概念
feature line分为flat、concave、convex三种,由integrated curvature的
θ
\theta
θ根据阈值
θ
ˉ
\bar \theta
θˉ判定:
{
f
l
a
t
,
∣
θ
∣
<
θ
ˉ
c
o
n
c
a
v
e
,
θ
<
−
θ
ˉ
c
o
n
v
e
x
,
θ
>
θ
ˉ
\left\{ \begin{aligned} &\mathrm{flat},\ \ \ \ \ \ \ \ \ \ \ |\theta|<\bar\theta \\ &\mathrm{concave},\ \ \ \ \theta<-\bar\theta\\ &\mathrm{convex},\ \ \ \ \ \ \theta>\bar\theta\\ \end{aligned} \right.
⎩⎪⎨⎪⎧flat, ∣θ∣<θˉconcave, θ<−θˉconvex, θ>θˉ
这里
θ
ˉ
=
1
0
∘
\bar \theta=10^{\circ}
θˉ=10∘,例子如下图
标架场采用《Mixed-integer quadrangulation》中的方法建立
2.Field-Coherent Loops
由标架场引导出field-coherent geodesic path:
ℓ
\ell
ℓ切线与p点标架夹角小于
π
4
\frac{\pi}{4}
4π。为了描述其偏离程度使用以下公式
∥
w
∥
X
=
∣
w
∣
(
1
+
α
∠
(
p
θ
,
w
)
π
/
4
)
\|w\|_{\mathrm{X}}=|w|\left(1+\alpha \frac{\angle\left(p_{\theta}, w\right)}{\pi / 4}\right)
∥w∥X=∣w∣(1+απ/4∠(pθ,w))
其中
w
w
w为切向量,
p
θ
p_{\theta}
pθ为标架之一,
α
\alpha
α为惩罚系数。我们的目标是由点沿着field-coherent geodesic path返回点,即得到闭合曲线。而上述公式是为了避免造成过度偏离现象,如下图
定义曲线之间的距离如下:
d
(
ℓ
i
,
ℓ
j
)
=
1
∣
ℓ
j
∣
∫
ℓ
j
dist
(
ℓ
i
,
p
θ
)
d
p
θ
d\left(\ell_{i}, \ell_{j}\right)=\frac{1}{\left|\ell_{j}\right|} \int_{\ell_{j}} \operatorname{dist}\left(\ell_{i}, p_{\theta}\right) d p_{\theta}
d(ℓi,ℓj)=∣ℓj∣1∫ℓjdist(ℓi,pθ)dpθ
其中
dist
(
ℓ
i
,
p
θ
)
\operatorname{dist}\left(\ell_{i}, p_{\theta}\right)
dist(ℓi,pθ)为
p
θ
p_{\theta}
pθ与
ℓ
\ell
ℓ之间的最短field-coherent geodesic path长度。
设loop集合
L
=
{
ℓ
1
…
ℓ
k
}
\mathcal{L}=\{\ell_1 \dots \ell_k \}
L={ℓ1…ℓk} ,而
ℓ
∉
L
\ell \notin \mathcal{L}
ℓ∈/L,
d
(
L
,
ℓ
)
=
1
∣
ℓ
∣
∫
ℓ
min
ℓ
i
∈
L
dist
(
ℓ
i
,
p
θ
)
d
p
θ
d(\mathcal{L}, \ell)=\frac{1}{|\ell|} \int_{\ell} \min _{\ell_{i} \in \mathcal{L}} \operatorname{dist}\left(\ell_{i}, p_{\theta}\right) d p_{\theta}
d(L,ℓ)=∣ℓ∣1∫ℓℓi∈Lmindist(ℓi,pθ)dpθ
则离
L
\mathcal{L}
L最远的
ℓ
ˉ
\bar \ell
ℓˉ为
ℓ
ˉ
=
argmax
ℓ
∈
L
d
(
L
,
ℓ
)
\bar{\ell}=\operatorname{argmax}_{\ell \in \mathrm{L}} d(\mathcal{L}, \ell)
ℓˉ=argmaxℓ∈Ld(L,ℓ)
3.特征loop
维护一个初始队列 Q Q Q用来装loop,feature line ℓ \ell ℓ 分为两类处理,如下:
- 闭合:如果为flat特征则加入 Q Q Q队列;如果为concave,拷贝正反方向两份入队
- 非闭合:如果为flat拓展成一个loop入队,如果为concave,沿两端点分别生成两个loop入队
4.采样最远loop
每次采样最远的loop加入 Q Q Q中,其终止条件需满足以下两个:
- Topological integrity :Q中每个loop至少与其他loop相交三次。
- Geometric fit :path的面积与polyon的面积相差不超过阈值
5. 维护采样池
定义 Q ˉ = Q ∪ C F \bar Q=Q \cup C\mathcal{F} Qˉ=Q∪CF,其中 C F C\mathcal{F} CF为convex feature,通过以下两种方式创建采样池 P \mathcal{P} P:
- 以固定间隔采样 Q ˉ \bar Q Qˉ中loop,对其中每个loop,跟踪一个垂直它自己新loop加入采样池 P \mathcal{P} P,新loop需满足与 Q ˉ \bar Q Qˉ中loop不正切相交
- 在表面进行泊松分布采样(Poisson-Disk Sampling)获得点集 P \mathrm{P} P,对于每个 p ∈ P p\in \mathrm{P} p∈P跟踪两条新的loop,同样的他们需要满足与 Q ˉ \bar Q Qˉ中的不正切相交,加入采样池 P \mathcal{P} P
每当从 P \mathcal{P} P中选择一条最远loop加入 Q Q Q中后,需要对采样池 P \mathcal{P} P用方法1重新装填新的loop进去。
为提高Topological integrity,从采样池中选取loop不再是简单的选择与 Q ˉ \bar Q Qˉ中最远的loop,而使用新的规则:设 Q ^ \hat Q Q^为 Q Q Q的子集且不满足Topological integrity条件,我们使采样池 P \mathcal{P} P中与 Q ^ \hat Q Q^中相交的loop具有更大的优先度被选择,即除了距离因素外加入相交次数作为优先度来快速提高拓扑完整性。根据以上规则在采样池中选择与 Q ˉ \bar Q Qˉ最远的loop ℓ \ell ℓ 加入 Q Q Q,然后在采样池 P \mathcal{P} P中移除所有与 ℓ \ell ℓ正切相交的loop,并重新跟踪它们的源点 p ∈ P p \in \mathrm{P} p∈P的两条正交loop(满足与新更新的 Q ˉ \bar Q Qˉ中的loop不正切相交)
6. 输出
输出由两部分组成:队列 Q Q Q与凸特征 C F C\mathcal{F} CF。其中每个loop都以 ( ( p 1 , n 1 ) … ( p h , n h ) ) ((p_1,n_1)\dots(p_h,n_h)) ((p1,n1)…(ph,nh))形式给出, p p p为点, n n n为法向量。
需要注意不是每个非闭合的feature都可以拓展成闭合loop,在拓展feature loop时也可能产生自相交的loop(这种类型舍弃),而那些无法闭合的feature我们把它们称为incomplete loop并加入 Q Q Q,在下一个阶段进行处理。
附1.Tracing loops
trace loop使用《Tracing Field-Coherent Quad Layouts 》的方法在一个拓展出来的图 G \mathcal{G} G上进行Dijkstra 算法,其中图 G \mathcal{G} G由曲面M上的边和顶点,还有边上的采样得到斯坦纳点(Steiner point)和连接斯坦纳点和顶点的边组成。不同的是,这里的
距离测量:对于集合 L \mathcal{L} L中的每条loop,在每条loop上的每个点作为源点跑Dijkstra,从而找到最远的 ℓ ∉ L \ell \notin \mathcal{L} ℓ∈/L(这里很耗时)
传播限制:在做Dijkstra时,搜索路径不能与 Q ˉ \bar Q Qˉ正切相交
附2.相交说明
- 正切相交判断:曲线相交,标架平行
- 垂直相交判断:曲线相交,标架相交