• 沒有找到結果。

Over a time interval

3.4 View-based Self-Collision Detection

If a deformable object has self-collision, then there are some properties for the trian-gles at the colliding position. Let's take a look on a 2D closed curve, for example. Suppose that there is a 2D closed curve, and there is no self-intersection. In fact, the curve is called a Jordan curve, as shown in Figure 3.10. By the Jordan curve theorem, the curve divides

the 2D space into two regions, an interior region and an exterior region. For example, in Figure 3.10, the interior region is indicated by green color, and the exterior region is indicated by blue color.

Figure 3.10: A 2D closed curve with a ray shot outward.

Now, we shoot a ray from a fixed point P in the interior region to any point in the exterior region, as shown in Figure 3.10. We can observe that the ray must intersect with the curve for odd number of times. Initially, the ray lies in the interior region. After the first time the ray intersects with the curve, the ray lies in the exterior region. However, when the ray intersects with the curve again, the ray must lie in the interior region. In short, after the ray intersecting with the curve, the ray lies in the different region.

Suppose that the normal vectors of the curve point to the exterior region. And there is a ray R with direction d shot from the point P to the exterior region and intersected with the curve at P0, P1, and P2 orderly, as shown in Figure 3.10. P0 is the first intersection point. In this case, d· NP0 ≥ 0, where NP0 is the normal vector of the point P0. So, we can determine that the point P0 faces the point P . Next, P1 is the second intersection point. In this case, d· NP1 ≤ 0, where NP1 is the normal vector of the point P1. So we can determine that the point P1 is back to the point P . Finally, P2 is the third intersection point. In this case, d· NP2 ≥ 0 again, where NP2 is the normal vector of the point P2. So, we can determine that the point P2 faces the point P .

For a 2D closed curve with no self-intersection, we can now conclude that if a ray shoots from a point P inside the curve and intersects with some points on the curve. When

an intersection occurs between the ray and the curve, the regions that the ray lies and the orientation of the intersection points according to P are opposite.

Now, for a 2D closed curve with self-intersection, suppose that the colliding point is called pc. A ray is shot from the point P in the interior region to pc, as shown in Figure 3.11.

At the colliding position, the ray should intersect with the curve for greater than or equal to two times. Therefore, there are at least two points that one faces P and another is back to P at the colliding position. In addition, there is a special case. At the colliding position, the normal vectors of the points are perpendicular to the direction of the ray, i.e. d·Ni = 0, where i is the number of points at the colliding position.

Figure 3.11: 2D closed curves with self-intersection.

Theorem 5. Suppose that there is a 2D closed curve with self-intersection. A point P is put in the interior region of the curve. Then, at the colliding position, there are two points px and py that (d· Nx)· (d · Ny) < 0 or both Nxand Ny are perpendicular to d, where d is the direction of a ray shot from the point P to the exterior region of the curve, and Nx and Ny are the normal vectors of pxand py.

Proof. If we shoot a ray from the point P to the colliding position, then there are two points at least at the colliding position. By the Jordan curve theorem, the location, which the ray passes through, should be change when the ray intersects with the curve, and the orientation should be opposite for any two consecutive intersection points. Now, we have two points, suppose they are pxand py, at least at the colliding position, so, the orientation

of px and py are opposite according to P , and (d · Nx)· (d · Ny) < 0. Besides, for the special case, Both Nxand Ny can be perpendicular to d.

We can extend the results to a 2D closed curve with a line segment in the interior region. We divide the space and the curve into three regions. Originally, we create a ray shot from the point P in the interior region to the exterior region. Now, we create a ray shot from the check point on the line segment to the curve. The check point is determined by the region that the curve belongs to. We can further extend the results to 3D closed triangle meshes with a point or a line segment inside the meshes.

Corollary 3. Suppose that there is a 3D closed model with triangle meshes, and a point q lies inside the meshes. If self-collision occurs, then there are at least two triangles at the colliding position that one faces the point q, and another is back to the point q, or the normal vectors of these two triangles are both perpendicular to the vector from q to themselves.

Corollary 4. Suppose that there is a 3D closed model with triangle meshes, and a line segment q0q1lies inside the meshes. If self-collision occurs, then there are at least two tri-angles at the colliding position that one faces the line segment q0q1, and another is back to the line segment q0q1, or the normal vectors of these two triangles are both perpendicular to the vector from the check points to themselves.