06.08.2013 Views

Paper - Geometric Algorithms for Modeling, Motion, and Animation ...

Paper - Geometric Algorithms for Modeling, Motion, and Animation ...

Paper - Geometric Algorithms for Modeling, Motion, and Animation ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

a0<br />

a1<br />

P0<br />

n1<br />

T0<br />

T1<br />

P<br />

t<br />

b0<br />

Tt<br />

b1<br />

n0<br />

P1<br />

nt<br />

c1<br />

c0<br />

(a) De<strong>for</strong>ming triangle ( T)<br />

&<br />

de<strong>for</strong>ming vertex ( P)<br />

at<br />

Pt<br />

( P a ) n<br />

t<br />

t<br />

nt<br />

(b) Projected distance<br />

between Pt <strong>and</strong> t T<br />

Figure3:VFtestfilter:Toper<strong>for</strong>maVFtestbetweenade<strong>for</strong>ming<br />

triangle(definedby a0, b0, c0at t = 0,<strong>and</strong> a1, b1, c1at t = 1)<br />

<strong>and</strong>amovingvertex(definedby P0at t = 0<strong>and</strong> P1at t = 1),we<br />

needtocheck<strong>for</strong>coplanaritybetweenthevertex<strong>and</strong>thetriangleby<br />

findingat(t ∈ [0, 1])whentheprojecteddistancealongthenormal<br />

vectorofthetriangleisequaltozero,i.e., (Pt − at) · nt = 0.<br />

servative<strong>for</strong>primitivelevelCCDtests.Fortheexampleshownin<br />

Fig.2, BV (T)<strong>and</strong> BV (P)aretheboundingvolumesofade<strong>for</strong>mingtriangle<br />

T <strong>and</strong>ade<strong>for</strong>mingvertex P,respectively. Inorder<br />

toper<strong>for</strong>mculling, BV (T)<strong>and</strong> BV (P)mustcontaintheswept<br />

volumesofde<strong>for</strong>mingprimitives,i.e., SV (T)<strong>and</strong> SV (P),respectively(Fig.2(a-b)).<br />

TheVFpair {T, P }willbetested<strong>for</strong>exact<br />

CCDtest,sincetheirboundingvolumesoverlapduringthetime<br />

interval [0, 1](Fig.2(c)).<br />

Wemakeuseofthefollowingobservation:ifthevertex Pisalways<br />

onthesamesideofthetriangle Talongtheentire [0, 1]trajectory,<br />

thispairshouldbeclassifiedasafalsepositivesinceitcannotbe<br />

coplanar(Fig.2(d)).Basedonthisobservation,wederiveasufficientconditiontocheckwhether<br />

Ptwillalwaysbeonthesameside<br />

of Ttduringthetimeinterval [0, 1].Ifapairofprimitivessatisfies<br />

thiscondition,thenwedon’tneedtoper<strong>for</strong>mtheexacttestinterms<br />

ofsolvingacubicequation.<br />

Theideacanbesimilarlyextended<strong>for</strong>theEEtests:ifthereisno<br />

crossingbetweenthetwode<strong>for</strong>mingedgesalongthecontinuous<br />

trajectory,theycannotbecoplanarduringthetimeinterval.<br />

3.3 CoplanarityTest<br />

Inordertocheckthecoplanarityofavertex Pt<strong>and</strong>atriangle Tt,<br />

weneedtocalculatetheprojecteddistancebetweenthemalongthe<br />

directionof nt,asshowninFig.3(b).Ifthisdistancebecomeszero<br />

atanytimeinterval,thanthefourverticesofthetwoprimitivesare<br />

classifiedascoplanar.<br />

Non-coplanarTheorem<strong>for</strong>VFtests: Foratriangle Tt<strong>and</strong>a<br />

vertex Ptdefinedbythestart<strong>and</strong>endpositionsduringtheinterval<br />

[0, 1],thesepositionsarelinearlyinterpolatedintheintervalwith<br />

respecttothetimevariable, t.Ifthefollowingfourscalarvalues:<br />

A, B, 2∗C+F<br />

,<strong>and</strong> 3 2∗D+E<br />

havethesamesign, Tt<strong>and</strong> Ptwillnot<br />

3<br />

becoplanarduringtheinterval:<br />

A = (P0 − a0) · n0, B = (P1 − a1) · n1 (1)<br />

C = (P0 − a0) · ˆn, D = (P1 − a1) · ˆn (2)<br />

E = (P0 − a0) · n1, F = (P1 − a1) · n0 (3)<br />

t<br />

And:<br />

n0 = (b0 − a0) × (c0 − a0), n1 = (b1 − a1) × (c1 − a1)<br />

ˆn = (n0 + n1 − (vb − va) × (vc − va))<br />

2<br />

va = a1 − a0, vb = b1 − b0, vc = c1 − c0.<br />

Proof. Thenormalvector ntofthede<strong>for</strong>mingtriangleattime tcan<br />

berepresentedasfollowing:<br />

nt = n0 ∗ B 2 0(t) + ˆn ∗ B 2 1(t) + n1 ∗ B 2 2(t) (4)<br />

where B 2 i (t)isthe i th basisfunctionoftheBernsteinpolynomials<br />

ofdegree 2.<br />

Wedefine: α = B 2 0(t) = (1 − t) 2 , β = B 2 1(t) = 2 ∗ t ∗ (1 − t),<br />

<strong>and</strong> γ = B 2 1(t) = t 2 .ThenEquation(4)becomes:<br />

nt = n0 ∗ α + ˆn ∗ β + n1 ∗ γ<br />

Forthemovingvertex Pt = P0 ∗ (1 − t) + P1 ∗ t<strong>and</strong>avertexof<br />

thede<strong>for</strong>mingtriangle at = a0 ∗ (1 − t) + a1 ∗ t,theirprojected<br />

distantalong ntis:<br />

(Pt − at) · nt = ((P0 − a0) ∗ (1 − t) + (P1 − a1) ∗ t) · nt<br />

= ((P0 − a0) ∗ (1 − t) + (P1 − a1) ∗ t)<br />

·(n0 ∗ α + ˆn ∗ β + n1 ∗ γ)<br />

= (P0 − a0) · n0 ∗ (1 − t) ∗ α<br />

+ (P0 − a0) · ˆn ∗ (1 − t) ∗ β<br />

+ (P0 − a0) · n1 ∗ (1 − t) ∗ γ<br />

+ (P1 − a1) · n1 ∗ t ∗ γ<br />

+ (P1 − a1) · ˆn ∗ t ∗ β<br />

+ (P1 − a1) · n0 ∗ t ∗ α<br />

Substitute α, β,<strong>and</strong> γ,wehave:<br />

(Pt − at) · nt = (P0 − a0) · n0 ∗ (1 − t) 3<br />

+ (P0 − a0) · ˆn ∗ 2 ∗ (1 − t) 2 ∗ t<br />

+ (P0 − a0) · n1 ∗ (1 − t) ∗ t 2<br />

+ (P1 − a1) · n1 ∗ t 3<br />

+ (P1 − a1) · ˆn ∗ 2 ∗ t 2 ∗ (1 − t)<br />

+ (P1 − a1) · n0 ∗ t ∗ (1 − t) 2<br />

UsingthesymbolsdefinedbyEquations(1)-(3),Equation(5)becomes:<br />

(Pt − at) · nt = A ∗ (1 − t) 3 + C ∗ 2 ∗ (1 − t) 2 ∗ t<br />

+ E ∗ (1 − t) ∗ t 2 + B ∗ t 3<br />

+ D ∗ 2 ∗ t 2 ∗ (1 − t) + F ∗ t ∗ (1 − t) 2<br />

= A ∗ B 3 0(t) +<br />

+ 2 ∗ D + E<br />

3<br />

2 ∗ C + F<br />

3<br />

∗ B 3 1(t)<br />

(5)<br />

∗ B 3 2(t) + B ∗ B 3 3(t) (6)<br />

where B 3 i (t)isthe i th basisfunctionoftheBernsteinpolynomials<br />

ofdegree 3.<br />

Byusingtheconvexhullpropertyassociatedwithcontrolpointsof<br />

theBernsteinbasis,therangeoftheprojecteddistancebetween Pt<br />

<strong>and</strong> Ttisboundedbythecontrolvertices.Inourcase,thesecontrol<br />

verticesarethefourscalarvalues: A, B, 2∗C+F<br />

3 ,<strong>and</strong> 2∗D+E<br />

3 .

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!