A tooth model collision detection method
Through the multi-step tooth model collision detection method, the principal component analysis method and feature vector projection are used to solve the accuracy and speed of the tooth model collision detection in full-mouth denture discharge, and efficient and accurate collision detection is achieved.
Patent Information
- Application Number
- CN202211072765.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-09-02
AI Technical Summary
During the process of full-mouth denture removal, how to quickly and accurately detect collisions between dental models to solve the problems of slow calculation speed and low accuracy in the prior art.
A multi-step tooth model collision detection method is adopted, including data preprocessing, rapid collision detection, centroid coordinate projection and precise collision detection. The vertex coordinates are processed by principal component analysis (PCA), the feature vector is selected for projection and collision judgment, and the center of mass coordinates and normal vectors of the triangle face sheet are accurately detected.
It realizes fast and accurate tooth model collision detection, improves calculation speed and accuracy, can meet real-time detection requirements, and reduces the number of triangular patches to improve efficiency.
Smart Images

Figure CN115470540B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital oral cavity, and in particular to a tooth model collision detection method. Background Art
[0002] In recent years, with the development of computer-aided design and computer graphics technology, digital complete dentures are also developing rapidly. During the tooth arrangement process, the position and angle of the tooth model will change, and collisions or gaps may occur between the tooth models, requiring collision detection between the tooth models. Summary of the invention
[0003] The technical problem to be solved by the present invention is: how to provide a tooth model collision detection method with fast calculation speed and high accuracy for the collision detection of tooth models in full denture teeth arrangement.
[0004] The technical solution adopted by the present invention is: a tooth model collision detection method, comprising the following steps:
[0005] Step 1: Data preprocessing stage, respectively read the vertex coordinate set, triangle face set and triangle face normal vector set in the three-dimensional model of adjacent tooth model A and tooth model B, and obtain each triangle face index according to the position of the triangle face in the triangle face set, and obtain the triangle face index set. The triangle face normal vector set and the triangle face index set are in a one-to-one mapping relationship with the triangle face set, and the normal vector direction in the triangle face normal vector set is toward the outside of the tooth. According to all the vertex coordinates of tooth model A and all the vertex coordinates of tooth model B, the centroid coordinates of tooth model A are obtained. A and the centroid coordinates O of tooth model B B ;
[0006] Step 2: Rapid collision detection stage, by projecting tooth model A and tooth model B onto the feature vector, if the projections of tooth model A and tooth model B on the feature vector have an intersection, then tooth model A and tooth model B are judged to have collided; if the projections of tooth model A and tooth model B on the feature vector have no intersection, then tooth model A and tooth model B are judged to have not collided;
[0007] Step 3: Calculate the centroid coordinates of each triangular facet in the triangular facet set of tooth model A and tooth model B, obtain the centroid coordinate set of the triangular facet of tooth model A and the centroid coordinate set of the triangular facet of tooth model B, and project the centroid coordinate set of the triangular facet of tooth model A and tooth model B to the centroid coordinate vector of tooth model A and tooth model B respectively. and The triangles in the triangle face set whose projection values are greater than zero are retained, and the triangles in the triangle face set whose projection values are less than zero are removed to obtain a reduced triangle face set;
[0008] Step 4: traverse the vertex coordinate set corresponding to the reduced triangular facet set of tooth model A, calculate the Euclidean distance between all vertices in the vertex coordinate set of tooth model A and all triangular facet centroid coordinates in the triangular facet centroid coordinate set of tooth model B, and pair the vertex coordinate set of tooth model A with the triangular facet centroid coordinate set of tooth model B according to the minimum Euclidean distance;
[0009] Step 5: Precise collision detection stage, the vertex coordinates in the vertex coordinate set of tooth model A are subtracted from the triangle facet centroid coordinates in the triangle facet centroid coordinate set of the paired tooth model B, and the resulting direction vector is then inner-producted with the normal vector in the triangle facet normal vector set corresponding to the triangle facet of tooth model B. If the value is negative, tooth model A collides with tooth model B. A negative value indicates that the point is in the opposite direction of the triangle facet normal vector.
[0010] In the step 1, the centroid coordinates of the tooth model A are obtained according to the coordinates of all vertices of the tooth model A and the coordinates of all vertices of the tooth model B. A and the centroid coordinates O of tooth model B B , means that the coordinates of all vertices of the tooth model A are averaged to obtain the centroid coordinates of the tooth model A. A , the coordinates of all vertices of tooth model B are calculated by averaging to obtain the centroid coordinates of tooth model B. B .
[0011] In step 2, by projecting tooth model A and tooth model B onto feature vectors, it means that the vertex coordinate sets of tooth model A and tooth model B are respectively projected onto multiple selected feature vectors. If the vertex coordinate sets of tooth model A and tooth model B have an intersection on any selected feature vector, tooth model A and tooth model B are judged to have collided.
[0012] In the step 2, when the vertex coordinate sets of tooth model A and tooth model B are respectively projected onto the selected multiple eigenvectors, principal component analysis (PCA) is used to obtain the eigenvalues and eigenvectors of the covariance matrix of the vertex coordinate set of each tooth model. The eigenvalues and eigenvectors are in a one-to-one correspondence. The eigenvalues are sorted from large to small, and the eigenvectors corresponding to the eigenvalues are also sorted from large to small according to the eigenvalues, and the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues are selected; the selected multiple eigenvectors refer to the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues of tooth model A and the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues of tooth model B. These six eigenvectors are used as the selected multiple eigenvectors.
[0013] In the step three, the centroid coordinates of each triangular facet in the triangular facet set of tooth model A and tooth model B are obtained by calculating the arithmetic mean of the three vertices of each triangular facet in the triangular facet set of each tooth model as the centroid coordinates of each triangular facet in the triangular facet set of each tooth model.
[0014] In the step 3, the centroid coordinate sets of the triangular facets of the tooth model A and the tooth model B are projected onto the centroid coordinate vectors of the tooth model A and the tooth model B, respectively. and Among them, the centroid coordinate vectors of tooth model A and tooth model B are and The center of mass coordinate O of the tooth model A A and the centroid coordinates O of tooth model B B Directly obtain; project the centroid coordinate set of the triangular facet of tooth model A to the centroid coordinate vector of tooth model A and tooth model B On the left, sort the projection points from small to large, select the triangular face index set with a projection value greater than zero, and project the triangular face centroid coordinate set of tooth model B to the centroid coordinate vector of tooth model A and tooth model B. On the top, the projection points are sorted from small to large, and a set of triangle face indexes with projection values greater than zero are selected. Since the centroid coordinate index of the tooth model triangle facets corresponds to the triangle facet index one by one, this method can retain the triangle facets of tooth model A close to tooth model B and the triangle facets of tooth model B close to tooth model A, so as to achieve the purpose of reducing the number of triangle facets.
[0015] In the step four, the vertex coordinate set of the tooth model A and the centroid coordinate set of the triangle facets of the tooth model B are paired according to the minimum Euclidean distance, wherein the vertex coordinate set of the tooth model A refers to the vertex coordinate set corresponding to the reduced triangular facet set of the tooth model A, and the centroid coordinate set of the triangle facets of the tooth model B refers to the centroid coordinate set of the triangle facets corresponding to the reduced triangular facet set of the tooth model B. The vertex coordinate set of the tooth model A is traversed to calculate the Euclidean distance of the vertex coordinate set of the tooth model A and the centroid set of the triangle facets of the tooth model B, and the minimum Euclidean distance triangle facet index set of the centroid set of the triangle facets of the tooth model B corresponding to the vertex coordinate set of the tooth model A can be obtained. Since the triangle facet index and the normal vector index are one-to-one corresponding, the shortest distance triangle facet and its normal vector of the tooth model B corresponding to each vertex in the vertex coordinate set of the tooth model A can be obtained.
[0016] In step 5, the vertex coordinates in the vertex coordinate set of tooth model A are subtracted from the triangular facet centroid coordinates in the triangular facet centroid coordinate set of the paired tooth model B, wherein the vertex coordinate set of tooth model A refers to the vertex coordinate set corresponding to the reduced triangular facet set of tooth model A. The beneficial effects of the present invention are as follows: the present invention provides a new adjacent tooth model collision detection method for the digital tooth arrangement process, which has a high accuracy rate through two-step judgment; and the number of triangular faces is screened and deleted, and the calculation speed is fast, so that real-time collision detection in the tooth arrangement process can be realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A logical schematic diagram for implementing the present invention;
[0018] Figure 2 It is a schematic diagram of the inner product of the paired point vector and the normal vector;
[0019] Figure 3 It is a schematic diagram of the vertex feature vector of the tooth model;
[0020] Figure 4 Schematic diagram to reduce triangles;
[0021] Figure 5 This is a schematic diagram of the normal vector pointing;
[0022] Figure 6 Schematic diagram of vertices and normal vectors. DETAILED DESCRIPTION
[0023] A tooth model collision detection method comprises the following steps:
[0024] Step 1: Data preprocessing stage, respectively read the vertex coordinate set, triangle face set and triangle face normal vector set in the three-dimensional model of adjacent tooth model A and tooth model B; obtain each triangle face index according to the position of the triangle face in the triangle face set, and obtain the triangle face index set. The triangle face normal vector set and the triangle face index set are in a one-to-one mapping relationship with the triangle face set, and the normal vector direction in the triangle face normal vector set is toward the outside of the tooth. According to all the vertex coordinates of tooth model A and all the vertex coordinates of tooth model B, the centroid coordinates of tooth model A are obtained. A and the centroid coordinates O of tooth model B B ; Obtain the centroid coordinates of tooth model A according to all vertex coordinates of tooth model A and all vertex coordinates of tooth model B A and the centroid coordinates O of tooth model B B , means that the coordinates of all vertices of the tooth model A are averaged to obtain the centroid coordinates of the tooth model A. A , the coordinates of all vertices of tooth model B are calculated by averaging to obtain the centroid coordinates of tooth model B. B .
[0025] The vertex coordinate set of the tooth model A in the three-dimensional model is {A 1 ,A 2 ,…,A n-1 ,A n}, where n is the number of vertex coordinates in the vertex coordinate set of tooth model A, where A 1 is the coordinate of the first vertex, A n is the coordinate of the nth vertex.
[0026] The triangular facet set of tooth model A is
[0027] {A″ 1 ,A″ 2 ,…,A″ n′-1 ,A″ n′}={{A 1 ,A 2 ,A 3},{A 4 ,A 5 ,A 6},…,{A n-2 ,A n-1 ,A n}}, where A″ 1 ={A 1 ,A 2 ,A 3},A″ 1 Represents the first triangle facet of the triangle facet set in the tooth model A, {A 1 ,A 2 ,A3} represents the structure of A″ 1 The set of three vertices of the triangular tooth model A, A″ n′ represents the n′th triangle facet of the triangle facet set in the tooth model A, {A n-2 ,A n-1 ,A n} represents the structure of A″ n′ This triangular tooth model A is a collection of three vertices.
[0028] The normal vector set of the triangular patch of tooth model A is Where n' is the number of normal vectors of the triangular patch of tooth model A, is the first normal vector in the normal vector set of the triangular patch of tooth model A. is the n′th normal vector in the normal vector set of the triangular patch of the tooth model A, where n=3n′.
[0029] The vertex coordinate set of tooth model B is {B 1 ,B 2 ,…,B m-1 ,B m}, where m is the number of vertex coordinates in the vertex coordinate set of tooth model B, where B 1 is the coordinate of the first vertex, B m is the coordinate of the mth vertex.
[0030] The normal vector set of the triangular patch of tooth model B is: Where m' is the number of normal vectors of the triangular patch of tooth model B, is the first normal vector in the normal vector set of the triangular patch of tooth model B. is the mth normal vector set of the triangular patch of tooth model B ′ normal vectors; and m=3m'.
[0031] The triangular face set of tooth model B is
[0032] {B″ 1 ,B″ 2 ,…,B″ m′-1 ,B″ m′}={{B 1 ,B 2 ,B 3},{B 4 ,B 5 ,B 6},…,{B m-2 ,B m-1 ,B m}},B″ 1 Represents the first triangle facet of the triangle facet set in the tooth model B, {B1 ,B 2 ,B 3} indicates the structure of B″ 1 The set of three vertices of the triangular tooth model B, B″ m′ represents the m′th triangle in the triangle set of the tooth model B, {B m-2 ,B m-1 ,B m} indicates the structure of B″ m′ This triangular patch is a collection of three vertices of the tooth model B.
[0033] Calculate the average value of all vertex coordinates and obtain the centroid coordinates O of tooth models A and B respectively. A , O B .
[0034] Where O(x ′ ,y ′ ,z ′ ) is the centroid coordinate set of the tooth model, N is the number of vertices of the tooth model, (x j ,y j ,z j ) are the vertex coordinates of the jth triangle.
[0035] Step 2: Rapid collision detection stage, by projecting tooth model A and tooth model B onto the feature vector, if the projections of tooth model A and tooth model B on the feature vector have an intersection, then tooth model A and tooth model B are judged to have collided, if the projections of tooth model A and tooth model B on the feature vector have no intersection, then tooth model A and tooth model B are judged to have not collided; by projecting tooth model A and tooth model B onto the feature vector, it means that the vertex coordinate sets of tooth model A and tooth model B are projected onto multiple selected feature vectors respectively, if on any selected feature vector, the projections of the vertex coordinate sets of tooth model A and tooth model B have an intersection, then tooth model A and tooth model B are judged to have collided. When the vertex coordinate sets of tooth model A and tooth model B are respectively projected onto the selected multiple eigenvectors, principal component analysis (PCA) is used to obtain the eigenvalues and eigenvectors of the covariance matrix of the vertex coordinate set of each tooth model. The eigenvalues and eigenvectors are in a one-to-one correspondence. The eigenvalues are sorted from large to small, and the eigenvectors corresponding to the eigenvalues are also sorted from large to small according to the eigenvalues, and the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues are selected; the selected multiple eigenvectors refer to the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues of tooth model A and the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues of tooth model B. These six eigenvectors are used as the selected multiple eigenvectors.
[0036] The vertex coordinate sets of tooth model A and tooth model B are projected to the six eigenvector directions, and the intersections of tooth models A and B in the six eigenvector directions are calculated. If the number of intersection points is not 0, it is determined that tooth model A and tooth model B collide, and rapid collision detection is completed.
[0037] The specific process is as follows Figure 3 As shown: First, principal component analysis (PCA) is performed on tooth models A and B. The specific description is given by taking tooth model A as an example:
[0038] For the vertex coordinate set A of tooth model A={A 1 ,A 2 ,…,A n-1 ,A n}, calculate the arithmetic mean, the formula is as follows:
[0039] Among them A k is the kth vertex coordinate in the vertex coordinate set, and 1≤k≤n.
[0040] For all vertices A in the vertex coordinate set of tooth model A k Decentralize
[0041]
[0042] Find the covariance matrix C of set A
[0043] Where C = AA T
[0044] Perform singular value decomposition on the covariance matrix C to obtain the eigenvalues and correspondences, sort the eigenvalues from large to small, and take the eigenvectors I corresponding to the first three eigenvalues A ,J A ,K A .
[0045] For the vertex coordinate set of tooth model B {B 1 ,B 2 ,…,B m-1 ,B m}Perform the same operation to obtain the corresponding three eigenvectors I B ,J B ,K B .
[0046] The vertex coordinates of tooth model A are set
[0047] A={A 1 ,A 2 ,…,A n-1 ,An} Projected to the eigenvector I A ,J A ,K A direction
[0048] The vertex coordinate set of tooth model B {B 1 ,B 2 ,…,B m-1 ,B m} Projected to the eigenvector I B ,J B ,K B Direction, calculate the intersection of the projections of tooth models A and B on the 6 eigenvectors. If the number of intersection points is all 0, it is determined that tooth model A and tooth model B do not collide, and the detection ends.
[0049] If the number of intersection points of the projections of tooth models A and B in the directions of the six eigenvectors does not satisfy the condition of being all zero, tooth models A and B may not collide.
[0050] The six feature vectors, three of which are feature vectors of tooth model A. A ,J A ,K A , the eigenvalues are obtained by performing principal component analysis (PCA) on the tooth model A, the eigenvalues are sorted from large to small, and the eigenvectors I corresponding to the first three eigenvalues are selected A ,J A ,K A As the vertex coordinate set of tooth model A 1 ,A 2 ,…,A n-1 ,A n}'s projection vector;
[0051] The six feature vectors, three of which are feature vectors of tooth model B. B ,J B ,K B , the eigenvalues are obtained by performing principal component analysis (PCA) on the tooth model B, the eigenvalues are sorted from large to small, and the eigenvectors I corresponding to the first three eigenvalues are selected B ,J B ,K B , as the vertex coordinate set of tooth model B {B 1 ,B 2 ,…,B m-1 ,B m}'s projection vector.
[0052] Step 3: Calculate the centroid coordinates of each triangular facet in the triangular facet set of tooth model A and tooth model B, obtain the centroid coordinate set of the triangular facet of tooth model A and the centroid coordinate set of the triangular facet of tooth model B, and project the centroid coordinate set of the triangular facet of tooth model A and tooth model B to the centroid coordinate vector of tooth model A and tooth model B respectively. and The triangles in the triangle face set whose projection values are greater than zero are retained, and the triangles in the triangle face set whose projection values are less than zero are removed to obtain a reduced triangle face set.
[0053] The centroid coordinates of each triangular facet in the triangular facet set of tooth model A and tooth model B are obtained by calculating the arithmetic mean of the three vertices of each triangular facet in the triangular facet set of each tooth model as the centroid coordinates of each triangular facet in the triangular facet set of each tooth model.
[0054] Project the centroid coordinate sets of the triangular facets of tooth model A and tooth model B to the centroid coordinate vectors of tooth model A and tooth model B respectively and Among them, the centroid coordinate vectors of tooth model A and tooth model B are and The center of mass coordinate O of the tooth model A A and the centroid coordinates O of tooth model B B Directly obtain; project the centroid coordinate set of the triangular facet of tooth model A to the centroid coordinate vector of tooth model A and tooth model B On the left, sort the projection points from small to large, select the triangular face index set with a projection value greater than zero, and project the triangular face centroid coordinate set of tooth model B to the centroid coordinate vector of tooth model A and tooth model B. On the top, the projection points are sorted from small to large, and a set of triangle face indexes with projection values greater than zero are selected. Since the centroid coordinate index of the tooth model triangle facets corresponds to the triangle facet index one by one, this method can retain the triangle facets of tooth model A close to tooth model B and the triangle facets of tooth model B close to tooth model A, so as to achieve the purpose of reducing the number of triangle facets.
[0055] The centroid coordinate calculation formula of each triangular facet in the tooth model A and B is:
[0056]
[0057] Where (x′ i ,y′ i ,z′ i ) is the centroid coordinate of the ith triangle patch, (x i ,y i ,zi ) is the coordinate of the vertex of the i-th triangular face. Calculate all the faces of the tooth model A to obtain the centroid coordinate set of the triangular face of the tooth model A in represents the centroid coordinates of the first triangular patch in tooth model A, where Represents the centroid coordinates of the n′th triangle patch in the tooth model A, A″ 1 Represents the first triangular patch of tooth model A, A″ n′ represents the n′th triangle in tooth model A, 1, 2, …, n′-1, n′ represents the sequence number of triangles, and the relationship between the number of triangles n′ in the triangle set of tooth model A and the number of vertex coordinates n in the vertex coordinate set of tooth model A is n=3n′; similarly, all triangles of tooth model B are calculated to obtain the centroid set of triangles of tooth model B in represents the centroid coordinates of the first triangular patch in tooth model B, where represents the centroid coordinates of the m′th triangle patch in the tooth model B, B″ 1 Indicates the first triangular patch of tooth model B, B″ m′ represents the m′th triangle in the tooth model B, 1, 2, …, m′-1, m′ represents the sequence number of the triangle in the triangle set of the tooth model B, and the relationship between the number of triangles m′ in the triangle set of the tooth model B and the number of vertex coordinates m in the vertex coordinate set of the tooth model B is m=3m′;
[0058] The triangular facets are screened to reduce the number of triangular facets. The screening process is as follows:
[0059] Connect the center of mass coordinates O of the tooth model A A and the centroid coordinates O of tooth model B B , from O A Point to O B
[0060] Get vector First, the centroid of the triangular face of the tooth model A is collected Projection to vector On the left, select K′ whose projection value is greater than 0 1 centroid coordinate index, retain K′ 1 The triangles corresponding to the index values are deleted, and the rest of the triangles are deleted.
[0061] Connect the center of mass coordinates O of tooth model B B and the centroid coordinates O of tooth model A A , from O B Point to O A Get vector First, collect the centroids of the triangular patches of tooth model B Projection to vector On the left, select K′ whose projection value is greater than 0 2 centroid coordinate index, retain K′ 2 The triangular facets corresponding to the index value are selected, and the remaining triangular facets are deleted. To improve the accuracy of collision detection, the tooth models A and B are then subjected to steps 3, 4, and 5 to achieve the second step of detection. To increase the calculation speed of the second step of collision detection and meet the needs of real-time collision detection, the triangular facets of the tooth models A and B are screened and deleted to reduce the amount of calculation.
[0062] For example, Figure 4 As shown, for tooth model A, the centroid points of all its triangular facets are calculated using the following formula:
[0063]
[0064] Where (x′ i ,y′ i ,z′ i ) is the centroid coordinate of the ith triangle patch, (x i ,y i ,z i ) are the three vertex coordinates of the i-th triangle, and the centroid set of all triangles of the tooth model A is obtained. in represents the centroid coordinates of the first triangular patch in tooth model A, where Represents the centroid coordinates of the n′th triangle patch in the tooth model A, A″ 1 Represents the first triangular patch of tooth model A, A″ n′ represents the n′th triangle in tooth model A, 1, 2, …, n′-1, n′ represents the triangle sequence number of the triangle set in tooth model A, and the relationship between the number of triangles n′ in the triangle set of tooth model A and the number of vertex coordinates n in the vertex coordinate set of tooth model A is n=3n′; perform the same operation on all triangles of tooth model B to obtain the centroid set of all triangles of tooth model B middle represents the centroid coordinates of the first triangular patch in tooth model B, where represents the centroid coordinates of the m′th triangle patch in the tooth model B, B″ 1 Indicates the first triangular patch of tooth model B, B″ m′represents the m′th triangle in the tooth model B, 1, 2, …, m′-1, m′ represents the triangle sequence number in the triangle set of the tooth model B, and the relationship between the number of triangles m′ in the triangle set of the tooth model B and the number of vertex coordinates m in the vertex coordinate set of the tooth model B is m=3m′;.
[0065] Connect the center of mass O of tooth model A A and the center of mass O of tooth model B B , get the center of mass O of the tooth model A A To the center of mass O of tooth model B B Vector Set the centroids of all triangular facets of tooth model A Project to Vector, and sort the projection points. Select the centroid index of the triangle patch that is greater than the projection point and greater than 0 (a total of K′ 1 The index of the centroid of the triangle corresponds to the index of the triangle. For the tooth model A, only K′ is retained. 1 The triangle face AA corresponding to the index is deleted, and the other triangle faces are deleted.
[0066] Figure 4 The gray part on the middle tooth model A is the retained part, and the triangular faces in the white area are deleted.
[0067] Connect the center of mass O of tooth model B B and the center of mass O of tooth model B A , get the center of mass O of the tooth model B B To the center of mass O of tooth model A A Vector Set the centroids of all triangular facets of tooth model B Projection to vector Select the centroid index of the triangle patch whose projection point is greater than 0 (a total of K′ 2 For tooth model B, only K′ is retained. 2 The triangle face BB corresponding to the index is deleted, and the other triangle faces are deleted.
[0068] Figure 4 The gray part on the middle tooth model B is the retained part, and the triangular faces in the white area are deleted.
[0069] After the triangles are deleted, AA is the K′ retained by the tooth model A. 1 The model after triangular patch, BB is the K′ retained by tooth model B 2 The model after triangulation.
[0070] Update the coordinate set of the triangle patch vertices of tooth model A to Among them, AA 1 Represents the first vertex coordinate in the vertex coordinate set of the tooth model A after filtering and deletion. Represents the Kth vertex coordinate set of the tooth model A after filtering and deletion 1 vertex coordinates, where 1, 2, …, K 1 -1,K 1 represents the vertex coordinate sequence number in the tooth model A after filtering and deletion, and the number of vertex coordinates in the vertex coordinate set of the tooth model A after filtering and deletion K 1 The number of triangular facets K of the tooth model A after filtering and deletion 1 The relationship between ′ is K 1 =3K 1 ′; Update the data of tooth model B in the same way to obtain the vertex coordinate set Triangle patch normal vector set K 2 =3K 2 '; The triangular face set is
[0071] The centroid set of the triangles is
[0072] in It represents the first triangular facet centroid coordinate in the triangular facet centroid coordinate set of the tooth model B after filtering and deletion. The Kth triangle patch centroid coordinate set of the tooth model B after filtering and deletion 2 ′ triangle patch centroid coordinates, BB″ 1 It represents the first triangle of tooth model B after filtering and deletion. Indicates the Kth tooth in the tooth model B after filtering and deletion 2 ′ triangular patches, of which 1,2,…,K 2 ′-1,K 2 ′ represents the number of triangles in the tooth model B after filtering and deletion, and the number of vertex coordinates in the vertex coordinate set of the tooth model B after filtering and deletion K 2 The number of triangular facets K of the tooth model B after filtering and deletion 2 The relationship between ′ is K 2 =3K 2 ′.
[0073] Step 4: traverse the vertex coordinate set corresponding to the reduced triangular facet set of tooth model A, calculate the Euclidean distance between all vertices in the vertex coordinate set of tooth model A and all triangular facet centroid coordinates in the triangular facet centroid coordinate set of tooth model B, and pair the vertex coordinate set of tooth model A with the triangular facet centroid coordinate set of tooth model B according to the minimum Euclidean distance; pair the vertex coordinate set of tooth model A with the triangular facet centroid coordinate set of tooth model B according to the minimum Euclidean distance, wherein the vertex coordinate set of tooth model A refers to the vertex coordinate set corresponding to the reduced triangular facet set of tooth model A. The centroid coordinate set of the triangle facets of tooth model B refers to the centroid coordinate set of the triangle facets corresponding to the reduced triangle facet set of tooth model B. The vertex coordinate set of tooth model A is traversed to calculate the Euclidean distance of the vertex coordinate set of tooth model A and the centroid set of the triangle facets of tooth model B. The minimum Euclidean distance triangle facet index set of the centroid set of the triangle facets of tooth model B corresponding to the vertex coordinate set of tooth model A can be obtained. Since the triangle facet index and the normal vector index are one-to-one corresponding, the shortest distance triangle facet and its normal vector of tooth model B corresponding to each vertex in the vertex coordinate set of tooth model A can be obtained.
[0074] After the triangles are filtered and deleted, the vertex coordinate set of tooth model A is updated to Among them, AA 1 Represents the first vertex coordinate in the vertex coordinate set of the tooth model A after filtering and deletion. Represents the Kth vertex coordinate set of the tooth model A after filtering and deletion 1 vertex coordinates, where 1, 2, …, K 1 -1,K 1 represents the vertex coordinate sequence number in the tooth model A after filtering and deletion, and the number of vertex coordinates in the vertex coordinate set of the tooth model A after filtering and deletion K 1 The number of triangular facets K of the tooth model A after filtering and deletion 1 The relationship between ′ is K 1 =3K 1 ′; The centroid set of the triangular facets of tooth model B is updated to in It represents the first triangular facet centroid coordinate in the triangular facet centroid coordinate set of the tooth model B after filtering and deletion. The Kth triangle patch centroid coordinate set of the tooth model B after filtering and deletion 2 ′ triangle patch centroid coordinates, BB″ 1 It represents the first triangle of tooth model B after filtering and deletion. Indicates the Kth tooth in the tooth model B after filtering and deletion 2′ triangular patches, of which 1,2,…,K 2 ′-1,K 2 ′ represents the number of triangles in the tooth model B after filtering and deletion, and the number of vertex coordinates in the vertex coordinate set of the tooth model B after filtering and deletion K 2 The number of triangular facets K of the tooth model B after filtering and deletion 2 The relationship between ′ is K 2 =3K 2 ′.
[0075] Traverse the vertex coordinate set of the tooth model A after filtering and deletion
[0076] Calculate the centroid set of the triangular face of each vertex to the tooth model B after filtering and deletion distance; select the triangle face index corresponding to the minimum Euclidean distance to obtain the triangle face index set after filtering and deletion Among them l 1 AA 1 To the centroid set of the triangular facets of the tooth model B after filtering and deletion The triangle patch index corresponding to the minimum Euclidean distance, for To the centroid set of the triangular facets of the tooth model B after filtering and deletion The triangle patch index corresponding to the minimum Euclidean distance.
[0077] The vertex coordinate set of the tooth model A after filtering and deletion Each vertex and triangular face index collection of the tooth model B after filtering and deletion The corresponding triangle patch centroids are paired one by one.
[0078] Calculate the coordinate set of the vertex A of the tooth model after filtering and deletion The kth vertex coordinate AA in k ,k∈{1,2,…,K 1 -1,K 1} to the centroid set of the triangular facets of the tooth model B after filtering and deletion The distance is selected, and the index l corresponding to the triangle corresponding to the minimum distance is selected, l∈{1,2,…,K 2 ′-1,K 2 ′}, vertex AA k and the centroid of the triangle patch pair.
[0079] Loop through and filter the coordinate set of the tooth model A vertices after deletion Repeat the above operation and remove the K of the tooth model A according to the minimum distance. 1The vertices are paired with the centroid points of the triangular facets of the tooth model B after filtering and deletion. The corresponding triangular facet index set is
[0080] The triangle patch index and the normal vector index correspond one to one. According to the index l, the corresponding normal vector BB′ can be obtained. l The corresponding set of normal vectors of the triangular facets of tooth model B after filtering and deletion is in The first tooth model B after the deletion is screened. 1 The indexed triangle normal vectors, The first The triangle normal vectors of the indices, and Filter the triangular face index set of the tooth model B after deletion The index in .
[0081] Step 5: Precise collision detection stage, the vertex coordinates in the vertex coordinate set of tooth model A are subtracted from the triangle facet centroid coordinates in the triangle facet centroid coordinate set of the paired tooth model B, and the resulting direction vector is then inner-producted with the normal vector in the triangle facet normal vector set corresponding to the triangle facet of tooth model B. If the value is negative, tooth model A collides with tooth model B. A negative value indicates that the point is in the opposite direction of the triangle facet normal vector.
[0082] The vertex coordinates in the vertex coordinate set of tooth model A are subtracted from the triangle facet centroid coordinates in the triangle facet centroid coordinate set of the paired tooth model B, wherein the vertex coordinate set of tooth model A refers to the vertex coordinate set corresponding to the reduced triangle facet set of tooth model A.
[0083] The triangle face index corresponds to the normal vector index one by one. The triangle face index set of the tooth model B after filtering and deleting in step 4 is Get the triangular face normal vector set of the tooth model B after filtering and deletion in The first tooth model B after the deletion is screened. 1 The indexed triangle normal vectors, The first The triangle normal vectors of the indices, and Filter the triangular face index set of the tooth model B after deletion Index in. Filter the vertex coordinate set of the tooth model A after deletion The centroid set of the triangular facets of tooth model B after deleting the paired filter
[0084] in The first vertex coordinate AA of the vertex coordinate set of the tooth model A after filtering and deletion 1 The centroid of the triangle face with the minimum Euclidean distance in the centroid coordinate set of the triangle face of the tooth model B after filtering and deletion, The Kth vertex coordinate set of the tooth model A after filtering and deletion 1 Vertex coordinates The centroid of the triangle with the minimum Euclidean distance in the centroid coordinate set of the triangle of the tooth model B after filtering and deletion, and The lth triangle face set in the tooth model B after filtering and deletion 1 triangles, and The first triangle face set in the tooth model B after filtering and deletion triangular patches, Filter the triangular face index set of the tooth model B after deletion The index in .
[0085] Get the shortest distance vector set between paired points in The first vertex coordinate AA of the vertex coordinate set of the tooth model A after filtering and deletion 1 minus The resulting vector, The first vertex coordinate AA of the vertex coordinate set of the tooth model A after filtering and deletion 1 minus The resulting vector;
[0086] Calculate the shortest distance vector set and the triangular face normal vector set of tooth model B If the inner product value is less than 0, it is determined that tooth model A and tooth model B collide.
[0087] The specific judgment process is as follows: the vertex coordinate set of the tooth model A after filtering and deletion Subtract the centroid set of paired triangles of tooth model B after filtering and deletion Get the vector set with the shortest distance between paired points in Corresponding to AA 1 The vector with the shortest distance to the centroid of the triangle patch corresponding to model B.
[0088] like Figure 6 As shown, calculate the shortest distance vector set The triangular face normal vector set of tooth model B after filtering and deletion The inner product Dot, the inner product formula is:
[0089]
[0090] in is the shortest distance vector set for If the value of Dot is negative, it means there is The direction is opposite to the normal vector of the triangle face corresponding to the shortest distance of the tooth model B after screening and deletion, that is, the vector Pointing to the inside of the tooth model, the vertex of the tooth model A after filtering and deletion is located inside the tooth model, and it can be determined that the tooth model A after filtering and deletion collides with the tooth model B after filtering and deletion, that is, the tooth model A collides with the tooth model B.
Claims
1. A tooth model collision detection method, Features The following steps are involved: Step 1: Data preprocessing stage, respectively read the vertex coordinate set, triangle face set and triangle face normal vector set in the three-dimensional model of adjacent tooth model A and tooth model B, and obtain each triangle face index according to the position of the triangle face in the triangle face set, and obtain the triangle face index set. The triangle face normal vector set and the triangle face index set are in a one-to-one mapping relationship with the triangle face set, and the normal vector direction in the triangle face normal vector set is toward the outside of the tooth. According to all the vertex coordinates of tooth model A and all the vertex coordinates of tooth model B, the centroid coordinates of tooth model A are obtained. A and the centroid coordinates O of tooth model B B ; Step 2: Rapid collision detection stage, by projecting tooth model A and tooth model B onto the feature vector, if the projections of tooth model A and tooth model B on the feature vector have an intersection, then tooth model A and tooth model B are judged to have collided; if the projections of tooth model A and tooth model B on the feature vector have no intersection, then tooth model A and tooth model B are judged to have not collided; Step 3: Calculate the centroid coordinates of each triangular facet in the triangular facet set of tooth model A and tooth model B, obtain the centroid coordinate set of the triangular facet of tooth model A and the centroid coordinate set of the triangular facet of tooth model B, and project the centroid coordinate set of the triangular facet of tooth model A and tooth model B to the centroid coordinate vector of tooth model A and tooth model B respectively. and , retain the triangles in the triangle face set whose projection values are greater than zero, remove the triangles in the triangle face set whose projection values are less than zero, and obtain the reduced triangle face set; Step 4: traverse the vertex coordinate set corresponding to the reduced triangular facet set of tooth model A, calculate the Euclidean distance between all vertices in the vertex coordinate set of tooth model A and all triangular facet centroid coordinates in the triangular facet centroid coordinate set of tooth model B, and pair the vertex coordinate set of tooth model A with the triangular facet centroid coordinate set of tooth model B according to the minimum Euclidean distance; Step 5: In the precise collision detection stage, the vertex coordinates in the vertex coordinate set of tooth model A are subtracted from the triangle face centroid coordinates in the triangle face centroid coordinate set of the paired tooth model B. The direction vector formed is then inner-producted with the normal vector in the triangle face normal vector set corresponding to the triangle face of tooth model B. If the value is negative, tooth model A and tooth model B collide. A negative value indicates that the point is in the opposite direction of the triangle face normal vector.
2. A tooth model collision detection method according to claim 1, Features: In the step 1, the centroid coordinates of the tooth model A are obtained according to the coordinates of all vertices of the tooth model A and the coordinates of all vertices of the tooth model B. A and the centroid coordinates O of tooth model B B , means that the coordinates of all vertices of the tooth model A are averaged to obtain the centroid coordinates of the tooth model A. A , the coordinates of all vertices of tooth model B are calculated by averaging to obtain the centroid coordinates of tooth model B. B .
3. A tooth model collision detection method according to claim 1, Features: In step 2, by projecting tooth model A and tooth model B onto feature vectors, it means that the vertex coordinate sets of tooth model A and tooth model B are respectively projected onto multiple selected feature vectors. If the vertex coordinate sets of tooth model A and tooth model B have an intersection on any selected feature vector, tooth model A and tooth model B are judged to have collided.
4. A tooth model collision detection method according to claim 3, Features: In the step 2, when the vertex coordinate sets of tooth model A and tooth model B are respectively projected onto the selected multiple eigenvectors, the principal component analysis method is used to obtain the eigenvalues and eigenvectors of the covariance matrix of the vertex coordinate set of each tooth model. The eigenvalues and eigenvectors are in a one-to-one correspondence. The eigenvalues are sorted from large to small, and the eigenvectors corresponding to the eigenvalues are also sorted from large to small according to the eigenvalues, and the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues are selected; the selected multiple eigenvectors refer to the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues of tooth model A and the eigenvectors corresponding to the three eigenvalues with the largest eigenvalues of tooth model B. These six eigenvectors are used as the selected multiple eigenvectors.
5. A tooth model collision detection method according to claim 1, Features: In the step three, the centroid coordinates of each triangular facet in the triangular facet set of tooth model A and tooth model B are obtained by calculating the arithmetic mean of the three vertices of each triangular facet in the triangular facet set of each tooth model as the centroid coordinates of each triangular facet in the triangular facet set of each tooth model.
6. A tooth model collision detection method according to claim 5, Features: In the step 3, the centroid coordinate sets of the triangular facets of the tooth model A and the tooth model B are projected onto the centroid coordinate vectors of the tooth model A and the tooth model B, respectively. and , where the centroid coordinate vectors of tooth model A and tooth model B are and The center of mass coordinate O of the tooth model A A and the centroid coordinates O of tooth model B B Directly obtain; project the centroid coordinate set of the triangular facet of tooth model A to the centroid coordinate vector of tooth model A and tooth model B On the left, sort the projection points from small to large, select the triangular face index set with a projection value greater than zero, and project the triangular face centroid coordinate set of tooth model B to the centroid coordinate vector of tooth model A and tooth model B. On the top, the projection points are sorted from small to large, and a set of triangle face indexes with projection values greater than zero are selected. Since the centroid coordinate index of the tooth model triangle facets corresponds to the triangle facet index one by one, this method can retain the triangle facets of tooth model A close to tooth model B and the triangle facets of tooth model B close to tooth model A, so as to achieve the purpose of reducing the number of triangle facets.
7. A tooth model collision detection method according to claim 1, Features: In the step four, the vertex coordinate set of the tooth model A and the centroid coordinate set of the triangle facets of the tooth model B are paired according to the minimum Euclidean distance, wherein the vertex coordinate set of the tooth model A refers to the vertex coordinate set corresponding to the reduced triangle facet set of the tooth model A, and the centroid coordinate set of the triangle facets of the tooth model B refers to the centroid coordinate set of the triangle facets corresponding to the reduced triangle facet set of the tooth model B. The vertex coordinate set of the tooth model A is traversed to calculate the Euclidean distance between the vertex coordinate set of the tooth model A and the centroid set of the triangle facets of the tooth model B, and the minimum Euclidean distance triangle facet index set of the centroid set of the triangle facets of the tooth model B corresponding to the vertex coordinate set of the tooth model A can be obtained. Since the triangle facet index and the normal vector index are one-to-one corresponding, the shortest distance triangle facet and its normal vector of the tooth model B corresponding to each vertex in the vertex coordinate set of the tooth model A can be obtained.
8. A tooth model collision detection method according to claim 1, Features: In step five, the vertex coordinates in the vertex coordinate set of the tooth model A are subtracted from the triangle facet centroid coordinates in the triangle facet centroid coordinate set of the paired tooth model B, wherein the vertex coordinate set of the tooth model A refers to the vertex coordinate set corresponding to the reduced triangle facet set of the tooth model A.
Citation Information
Patent Citations
Output method of two-dimensional (2D) projection of three-dimensional (3D) model based on spherical harmonic transform
CN102411794A
Collision detection algorithm used for interproximal enamel reduction calculation
CN105853008A