Virtual ancient building group scene fluctuation maintaining method based on collision box mechanism
By accurately constructing collision boxes and performing real-time collision detection and fluctuation analysis, the physical properties of the virtual ancient building complex are dynamically adjusted, which solves the problem of inaccurate fluctuations in the virtual ancient building complex scene and achieves a more natural interaction and a stable virtual environment.
Patent Information
- Application Number
- CN202510785568.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-23
AI Technical Summary
When constructing virtual ancient building complexes, existing technologies often use simple geometric shapes to approximate complex architectural elements in the construction of collision boxes, resulting in inaccurate fluctuation adjustments after collisions, affecting the fluctuation maintenance effect, causing unnatural user interactions or collision detection misjudgments.
By accurately constructing collision boxes, setting physical properties, detecting collisions in real time, collecting collision information, performing fluctuation analysis and dynamic adjustment, early warning functions, establishing a collision database, and optimizing collision handling strategies.
It improves the stability and user experience of the virtual ancient building complex scene, enhances the naturalness and realism of the interaction, and protects the cultural value of the ancient buildings.
Smart Images

Figure CN120689559A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of virtual reality technology, and in particular to a method for maintaining fluctuations in a virtual ancient building complex scene based on a collision box mechanism. Background Art
[0002] In game development, the collision box mechanism is primarily used to detect contact between two or more objects. This is achieved by defining collision zones between objects. In virtual reality (VR) and augmented reality (AR) technologies, the collision box mechanism is a key application area for the construction and interaction of ancient architectural complexes.
[0003] Due to the user's interactive behavior in the virtual scene (such as walking, touching, etc.) and the influence of dynamic elements in the scene (such as water flow, wind, etc.), the scene may fluctuate, resulting in poor visual effects.
[0004] Regarding this research, application document CN202410605319.0 provides a virtual reality flow scene simulation method based on a cross-spatiotemporal graph convolution operator. This technical solution involves using an operator splitting method to sequentially split the general flow physics described by the Navier-Stokes equations into four interpretable flow sub-processes, thereby establishing a virtual reality complex flow simulation neural network architecture with strong physical interpretability; further, hard constraints such as initial and boundary conditions of the flow field are strictly imposed based on the discrete nodes of the graph network. Through the aforementioned virtual reality flow scene simulation method based on a cross-spatiotemporal graph convolution operator, this technical solution can effectively overcome the problems of low computational efficiency and low automation of traditional CFD methods, achieving high-fidelity mirroring and low-latency visualization of complex virtual reality flow scenes.
[0005] Another application, filed with application number CN202311851826.4, provides a method and related equipment for rapidly constructing virtual building interior scenes. This technical solution involves acquiring a real-world indoor image; obtaining a pre-built three-dimensional indoor virtual space; and matching the real-world indoor image to the three-dimensional indoor virtual space. This method for rapidly constructing virtual building interior scenes effectively improves virtual scene construction efficiency, thereby shortening the virtual scene construction cycle.
[0006] In addition, the application document with application number CN202011602097.5 provides a real-time updating method for the virtual reality scene of a construction project. This technical solution is based on the correspondence between the position coordinates of the mobile object to be monitored and the spatial coordinates of the building's virtual reality scene, so that the three-dimensional model of the mobile object adapts to the building's virtual reality scene. The VR device receives the position information of the mobile object to be monitored collected in real time by the UWB positioning system, and updates the position information of the three-dimensional model of the mobile object in the building's virtual reality scene in real time.
[0007] However, existing collision box construction often uses simple geometric shapes to approximate complex architectural elements. This approximation method can lead to inaccurate fluctuation adjustments after collisions with irregularly shaped historical architectural elements, thus affecting the effectiveness of fluctuation maintenance. For example, in a virtual scene, users may experience an unnatural interaction with architectural elements, or in some cases, collision detection may lead to misjudgment, resulting in abnormal scene fluctuations. Summary of the Invention
[0008] In view of the above problems existing in the existing field of virtual reality technology, the present invention is proposed.
[0009] Therefore, one of the purposes of the present invention is to provide a method for maintaining fluctuations in a virtual ancient building complex scene based on a collision box mechanism. Through precise collision box construction, real-time collision detection, fluctuation analysis, dynamic adjustment and early warning functions, it effectively improves the stability and user experience of the virtual ancient building complex scene, while protecting the cultural value of the ancient buildings. It has high application value and application prospects.
[0010] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0011] The present invention provides a method for maintaining fluctuations in a virtual ancient building complex scene based on a collision box mechanism, comprising the following steps:
[0012] Step S10: constructing a collision box for each building element in the virtual ancient building complex, wherein the collision box is one or more geometric shapes and is used to approximately represent the physical boundary of the element;
[0013] Step S20: setting the size and position of the collision box according to the shape, size and position of the building element;
[0014] Step S30: obtaining a total length corresponding to the size set for the collision box of the building element based on the size, and dividing the total length into 5 to 8 length segments equally;
[0015] Step S40: setting physical properties for the collision box constructed according to the building elements, wherein the physical properties include mass parameters, elastic coefficients, and friction coefficients;
[0016] Step S50: detecting collisions between building elements during the operation of the virtual scene; and collecting physical properties when the collisions occur based on the collisions between the building elements;
[0017] Step S60: If a collision is detected between building elements, relevant information about the collision is recorded, including the length of the collision, as well as the relative speed, relative direction, and relative angle of the two colliding parties. A collision database is generated, and the size and position of the collision box are adjusted based on the relevant information.
[0018] As a preferred embodiment of the present invention, in step S50, if a mutual collision is detected between building elements, the actively colliding building element and the passively colliding building element in the mutual collision are obtained, and based on the relative speed, relative direction, and relative angle of the actively colliding building element, a correlation rule with the collided length segment of the passively colliding building element is calculated, and the result is calculated according to the following formula:
[0019]
[0020] Where, represents the velocity vector of the actively colliding building element relative to the passively colliding building element, represents the velocity vector of the actively colliding building element before the collision, Represents the velocity vector of the passively collided building element before the collision;
[0021]
[0022] Where, The direction vector of the active collision building element relative to the passive collision building element, The center point position vector of the building element that actively collides, The center point position vector of the building element representing the passive collision;
[0023]
[0024] Where θ represents the relative angle of the active collision building element to the passive collision building element, represents the normal vector of the building element of the passive collision, arccos represents the arccosine value;
[0025]
[0026] Where Δt represents the duration of the mutual collision, and L represents the length of the collided building element in the passive collision.
[0027] As a preferred embodiment of the present invention, a fluctuation analysis is performed on the passively collided building element based on the calculated association rule. The fluctuation analysis includes calculating the displacement change of the passively collided building element after the collision, obtaining the intensity and range of the fluctuation of the passively collided building element based on the displacement change, constructing a fluctuation propagation model based on the displacement change, simulating the propagation process of the fluctuation in the fluctuation propagation model, and predicting the association impact on the surrounding building elements of the passively collided building element based on the propagation process. The surrounding building elements include building elements connected to the passively collided building element.
[0028] As a preferred solution of the present invention, the displacement change of the passive collision building element after the collision is calculated according to the following formula:
[0029]
[0030] Where m e and m c are the mass parameters of active collision building elements and passive collision building elements, respectively. represents the velocity vector of the actively colliding building element before the collision, Represents the velocity vector of the passively collided building element before the collision; and Represent the velocity vectors of the active and passive colliding building elements after the collision, respectively.
[0031] As a preferred solution of the present invention, the calculation of the displacement change of the passive collision building element after the collision also includes calculating according to the following formula:
[0032]
[0033] As a preferred solution of the present invention, the mass parameters of the collision box of the passive collision building element are reset according to the calculated displacement change, the reset mass parameters are marked as reference parameters, and the parameter difference between the reference parameters and the mass parameters before reset is calculated. The correlation effect of the mass parameters and velocity vector analysis on the parameter difference of the active collision building element is analyzed by linear regression analysis, as shown below:
[0034]
[0035] Wherein, Δm represents the parameter difference, m e mass parameters representing collision-active building elements, represents the velocity vector of the actively colliding building element before the collision, α, β, and γ are regression coefficients obtained by fitting data, wherein the data are the mass parameters of the actively colliding building element and the velocity vector before the collision;
[0036] According to the above formula, the correlation analysis of the mass parameters and velocity vectors of the building elements based on active collision and the associated influence on the parameter difference is performed as follows:
[0037]
[0038] Where, Correlation coefficient between mass parameter and parameter difference of building elements representing active collision, represents the correlation coefficient between the velocity vector of the actively colliding building element and the parameter difference, Cov represents the covariance, and σ represents the standard deviation.
[0039] As a preferred embodiment of the present invention, the displacement changes of the building elements surrounding the passively colliding building element are obtained based on the analyzed associated influences; if the surrounding building elements undergo displacement changes, the movement parameters of the surrounding building elements are obtained based on the displacement changes; and when the mass parameters of the collision box of the passively colliding building element are reset, the reset mass parameters include the sum of the movement parameters and the parameter difference; otherwise, they are not included.
[0040] As a preferred embodiment of the present invention, the relative speed, relative direction, and relative angle corresponding to the displacement change of the building element causing the passive collision are obtained based on the fluctuation analysis. In a future time period, if any two building elements with the same angle as the relative angle move toward the other building element at the same speed and direction as the relative speed and direction, a collision warning is issued; otherwise, no warning is issued.
[0041] A terminal includes a processor, an input interface, an output interface and a memory, wherein the processor, input interface, output interface and memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described above.
[0042] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method described above.
[0043] Beneficial effects:
[0044] 1. Through precise collision detection and fluctuation analysis, the present invention can more realistically simulate the physical interactions between architectural elements, making the user's interactive experience in the virtual scene more natural and smooth. Whether it is a simple single building or a complex building complex, the present invention can achieve effective fluctuation maintenance by adjusting the settings and physical properties of the collision box, and has strong adaptability.
[0045] 2. By collecting physical properties at the time of collision and performing fluctuation analysis, physical properties such as mass parameters of building elements can be dynamically adjusted based on actual conditions. This dynamic adjustment strategy can better adapt to different collision scenarios and user behaviors, improving the fluctuation maintenance effect. For example, when a high collision frequency is detected in a certain area, the physical properties of that area can be automatically adjusted to reduce fluctuations.
[0046] 3. The present invention can predict possible future collision events based on the results of fluctuation analysis and issue early warnings. For example, if a building element is detected moving toward another building element at a specific speed and direction, and if the two elements are likely to collide at some point in the future, the system can issue an early warning to alert the user or automatically adjust the position of the elements to avoid a collision, thereby further improving the safety and stability of the scene.
[0047] 4. By establishing a collision database and recording collision-related information, historical data can be used for analysis and optimization. Specifically, by analyzing data from a large number of collision events, common collision patterns and problems can be discovered, and then collision handling strategies and adjustment parameters can be optimized to make the scene more stable and efficient in the long run. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them:
[0049] Figure 1 Schematic diagram of a method flow in an embodiment of the present invention;
[0050] Figure 2 Schematic diagram of the process structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present invention.
[0052] Because the existing technology may cause the fluctuation adjustment after the collision to be not accurate enough when dealing with irregularly shaped ancient architectural elements, thus affecting the effect of fluctuation maintenance.
[0053] Based on this, the present invention proposes a method for maintaining fluctuations in a virtual ancient building complex scene based on a collision box mechanism. Through precise collision box construction, real-time collision detection, fluctuation analysis, dynamic adjustment and early warning functions, it effectively improves the stability and user experience of the virtual ancient building complex scene, while protecting the cultural value of the ancient buildings. It has high application value and application prospects.
[0054] The present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.
[0055] Reference Figures 1 to 2 , is an embodiment of the present invention, which provides a method for maintaining fluctuations in a virtual ancient building complex scene based on a collision box mechanism, comprising the following steps:
[0056] Step S10: constructing a collision box for each building element in the virtual ancient building complex. The collision box is one or more geometric shapes and is used to approximately represent the physical boundary of the element.
[0057] In this embodiment, architectural elements such as walls, columns, and roofs;
[0058] The collision box is one or more geometric shapes, such as cube, cuboid, sphere, etc.
[0059] Step S20: setting the size and position of the collision box according to the shape, size and position of the building element;
[0060] In this embodiment, it is ensured that the collision boxes can accurately cover the corresponding elements while minimizing overlaps and gaps between collision boxes;
[0061] Step S30: based on the size set for the collision box of the building element, obtaining the total length corresponding to the size, and dividing the total length into 5 to 8 length segments equally;
[0062] In this embodiment, these attributes are set according to the physical characteristics and design requirements of the building elements to simulate physical interaction behaviors in the real world;
[0063] Dividing the collision box into multiple length segments can better adapt to building elements of different shapes and sizes and improve adaptability;
[0064] Step S40: setting physical properties for the collision box constructed according to the building elements, the physical properties including mass parameter, elastic coefficient and friction coefficient;
[0065] In this embodiment, physical properties such as mass parameters, elastic coefficients, and friction coefficients are set so that the collision box can simulate physical interactions more realistically and enhance the realism of the virtual scene;
[0066] And the mass parameters are set according to the actual mass of the building element or a preset value;
[0067] elastic modulus, set according to the material properties of the building element;
[0068] the coefficient of friction, which is set according to the surface characteristics of the building element;
[0069] Step S50: detecting collisions between building elements during the operation of the virtual scene; and collecting physical properties when the collisions occur based on the collisions between the building elements;
[0070] In this embodiment, the detection of collisions between building elements is performed by combining a space partitioning algorithm (such as an octree, a quadtree, etc.) with the Separating Axis Theorem (SAT) to improve detection efficiency and accuracy.
[0071] Step S60: If a collision is detected between building elements, relevant information about the collision is recorded, including the length of the collision, as well as the relative speed, direction, and angle of the two colliding elements. A collision database is generated, and the size and position of the collision box are adjusted based on the relevant information.
[0072] In this embodiment, relevant information of the collision is recorded and a collision database is generated to provide detailed data support for subsequent fluctuation analysis and adjustment;
[0073] By collecting the physical properties of the collision, we can analyze the impact of the collision more comprehensively and provide a basis for optimizing the collision handling strategy.
[0074] In step S50, if a collision is detected between building elements, the actively colliding building elements and the passively colliding building elements in the collision are obtained, and the correlation law of the length of the collision with the passively colliding building elements is calculated based on the relative speed, relative direction, and relative angle of the actively colliding building elements, and is calculated according to the following formula:
[0075]
[0076] Where, represents the velocity vector of the actively colliding building element relative to the passively colliding building element, represents the velocity vector of the actively colliding building element before the collision, Represents the velocity vector of the passively collided building element before the collision;
[0077]
[0078] Where, The direction vector of the active collision building element relative to the passive collision building element, The center point position vector of the building element that actively collides, The center point position vector of the building element representing the passive collision;
[0079]
[0080] Where θ represents the relative angle of the active collision building element to the passive collision building element, represents the normal vector of the building element of passive collision, arccos represents the inverse cosine value;
[0081]
[0082] Where Δt represents the duration of the mutual collision, and L represents the length of the collided building element in the passive collision;
[0083] In this embodiment, through these calculations, we can better understand the nature and impact of the collision, and thus adopt appropriate adjustment strategies to maintain the stability of the virtual scene;
[0084] Performing a fluctuation analysis on the passively colliding building elements based on the calculated association rules. The fluctuation analysis includes calculating the displacement change of the passively colliding building elements after the collision, obtaining the intensity and range of the fluctuation of the passively colliding building elements based on the displacement change, constructing a fluctuation propagation model based on the displacement change, simulating the wave propagation process in the wave propagation model, and predicting the association impact on the surrounding building elements of the passively colliding building elements based on the propagation process. The surrounding building elements include building elements connected to the passively colliding building elements.
[0085] In this embodiment, by calculating the displacement changes of passive collision building elements, it helps to maintain the stability of the virtual scene and reduce the scene fluctuations caused by collisions;
[0086] On the other hand, by simulating the propagation process of waves, the realism of the virtual scene can be enhanced, allowing users to experience more realistic physical interactions;
[0087] The displacement change of the passive collision building element after the collision is calculated according to the following formula:
[0088]
[0089] Where m e and m c are the mass parameters of active collision building elements and passive collision building elements, respectively. represents the velocity vector of the actively colliding building element before the collision, Represents the velocity vector of the passively collided building element before the collision; and Represent the velocity vectors of the active and passive collision building elements after the collision,
[0090] Calculation of displacement changes of passive collision building elements after collision also includes calculation based on the following formula:
[0091]
[0092] Improve the accuracy of wave analysis by calculating the displacement changes of passive collision building elements through formulas;
[0093] The mass parameters of the collision box of the passive collision building element are reset according to the calculated displacement change. The reset mass parameters are marked as reference parameters, and the parameter difference between the reference parameters and the mass parameters before reset is calculated. The correlation effect of the mass parameters and velocity vector of the active collision building element on the parameter difference is analyzed by linear regression analysis, as shown below:
[0094]
[0095] Where Δm represents the parameter difference, m e mass parameters representing collision-active building elements, represents the velocity vector of the active colliding building element before the collision. α, β, and γ are regression coefficients obtained by fitting the data. The data are the mass parameters of the active colliding building element and the velocity vector before the collision.
[0096] By resetting the quality parameters and calculating the parameter difference, the collision handling strategy can be dynamically optimized to improve the adaptability of the system;
[0097] By using linear regression analysis, we can gain a deeper understanding of the impact of the mass and speed of active collision elements on passive collision elements, providing data support for optimization and adjustment;
[0098] According to the above formula, the correlation analysis of the mass parameters and velocity vectors of building elements based on active collisions and the associated influence on parameter differences is performed as follows:
[0099]
[0100] Where, Correlation coefficient between mass parameter and parameter difference of building elements representing active collision, represents the correlation coefficient between the velocity vector of the building element that actively collides and the parameter difference, Cov represents the covariance, σ represents the standard deviation,
[0101] Obtaining displacement changes of building elements surrounding the passively colliding building element based on the analyzed correlation impact; if the surrounding building elements undergo displacement changes, obtaining movement parameters of the surrounding building elements based on the displacement changes; and when resetting mass parameters of the collision box of the passively colliding building element, the reset mass parameters include the sum of the movement parameters and the parameter difference; otherwise, they do not include the movement parameters;
[0102] In this embodiment, by analyzing the impact of passive collision building elements on surrounding building elements, it is possible to handle chain reactions and reduce wave propagation;
[0103] At the same time, when resetting quality parameters, the moving parameters and parameter differences are taken into account to ensure the comprehensiveness and effectiveness of the adjustment;
[0104] The relative speed, direction, and angle corresponding to the displacement change of the building element causing the passive collision are obtained based on fluctuation analysis. In the future, if any two building elements with the same angle and relative angle move toward each other at the same speed and direction as the relative speed and direction, a collision warning is issued; otherwise, no warning is issued.
[0105] In this embodiment, when a building element is detected moving toward another building element at a specific speed and direction, if the two elements are likely to collide at some point in the future, the system can issue an early warning to alert the user or automatically adjust the position of the elements to avoid a collision, thereby further improving the safety and stability of the scene.
[0106] A terminal includes a processor, an input interface, an output interface and a memory, wherein the processor, input interface, output interface and memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described above.
[0107] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method described above.
[0108] In summary, the present invention effectively improves the stability and user experience of the virtual ancient building complex scene through precise collision box construction, real-time collision detection, fluctuation analysis, dynamic adjustment and early warning functions, while protecting the cultural value of ancient buildings. It has high application value and application prospects.
[0109] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for maintaining fluctuations in a virtual ancient building complex scene based on a collision box mechanism, characterized in that: The following steps are involved: step S10: constructing a collision box for each building element in the virtual ancient building complex, wherein the collision box is one or more geometric shapes and is used to approximately represent the physical boundary of the element; Step S20: setting the size and position of the collision box according to the shape, size and position of the building element; Step S30: obtaining a total length corresponding to the size set for the collision box of the building element based on the size, and dividing the total length into 5 to 8 length segments equally; Step S40: setting physical properties for the collision box constructed according to the building elements, wherein the physical properties include mass parameters, elastic coefficients, and friction coefficients; Step S50: detecting collisions between building elements during the operation of the virtual scene; and collecting physical properties when the collisions occur based on the collisions between the building elements; Step S60: If a collision is detected between building elements, relevant information about the collision is recorded, including the length of the collision, as well as the relative speed, relative direction, and relative angle of the two colliding parties. A collision database is generated, and the size and position of the collision box are adjusted based on the relevant information.
2. The method for maintaining the fluctuation of a virtual ancient building complex scene based on a collision box mechanism according to claim 1, characterized in that: In step S50, if a collision is detected between building elements, the actively colliding building element and the passively colliding building element are obtained, and a correlation rule between the length segment of the collision with the passively colliding building element is calculated based on the relative speed, relative direction, and relative angle of the actively colliding building element, and is calculated according to the following formula: Where, represents the velocity vector of the actively colliding building element relative to the passively colliding building element, represents the velocity vector of the actively colliding building element before the collision, The velocity vector of the passively collided building element before the collision; Where, The direction vector of the active collision building element relative to the passive collision building element, The center point position vector of the building element that actively collides, The center point position vector of the building element representing the passive collision; Where θ represents the relative angle of the active collision building element to the passive collision building element, represents the normal vector of the building element of the passive collision, arccos represents the arccosine value; Where Δt represents the duration of the mutual collision, and L represents the length of the collided building element in the passive collision.
3. The method for maintaining the fluctuation of a virtual ancient building complex scene based on a collision box mechanism according to claim 2, characterized in that: A fluctuation analysis is performed on the passively collided building element based on the calculated association rule. The fluctuation analysis includes calculating a displacement change of the passively collided building element after the collision, obtaining the intensity and range of the fluctuation of the passively collided building element based on the displacement change, constructing a fluctuation propagation model based on the displacement change, simulating the propagation process of the fluctuation in the fluctuation propagation model, and predicting the association impact on building elements surrounding the passively collided building element based on the propagation process. The surrounding building elements include building elements connected to the passively collided building element.
4. The method for maintaining the fluctuation of a virtual ancient building complex scene based on a collision box mechanism according to claim 3, characterized in that: The displacement change of the passive collision building element after the collision is calculated according to the following formula: Where m e and m c are the mass parameters of active collision building elements and passive collision building elements, respectively. represents the velocity vector of the actively colliding building element before the collision, The velocity vector of the passively collided building element before the collision; and Represent the velocity vectors of the active and passive colliding building elements after the collision, respectively.
5. The method for maintaining the fluctuation of a virtual ancient building complex scene based on a collision box mechanism according to claim 4, characterized in that: Calculating the displacement change of the passive collision building element after the collision also includes calculating according to the following formula:
6. A method for maintaining fluctuations in a virtual ancient building complex scene based on a collision box mechanism according to any one of claims 4 to 5, characterized in that: The mass parameters of the collision box of the passive collision building element are reset according to the calculated displacement change, and the reset mass parameters are marked as reference parameters. The parameter difference between the reference parameters and the mass parameters before the reset is calculated. The correlation effect of the mass parameters and velocity vector of the active collision building element on the parameter difference is analyzed using linear regression analysis, as shown below: Wherein, Δm represents the parameter difference, m e mass parameters representing collision-active building elements, represents the velocity vector of the actively colliding building element before the collision, α, β, and γ are regression coefficients obtained by fitting data, wherein the data are the mass parameters of the actively colliding building element and the velocity vector before the collision; According to the above formula, the correlation analysis of the mass parameters and velocity vectors of the building elements based on active collision and the associated influence on the parameter difference is performed as follows: Where, Correlation coefficient between mass parameter and parameter difference of building elements representing active collision, represents the correlation coefficient between the velocity vector of the actively colliding building element and the parameter difference, Cov represents the covariance, and σ represents the standard deviation.
7. The method for maintaining the fluctuation of a virtual ancient building complex scene based on a collision box mechanism according to claim 6, characterized in that: Based on the analyzed associated impact, displacement changes of building elements surrounding the passively colliding building element are obtained. If displacement changes occur in the surrounding building elements, movement parameters of the surrounding building elements are obtained based on the displacement changes. When mass parameters of the collision box of the passively colliding building element are reset, the reset mass parameters include the sum of the movement parameters and the parameter difference; otherwise, they are not included.
8. The method for maintaining fluctuation of a virtual ancient building complex scene based on a collision box mechanism as claimed in claim 3, characterized in that: Obtaining, based on the fluctuation analysis, a relative speed, relative direction, and relative angle corresponding to a displacement change of the building element causing the passive collision, and issuing a collision warning if, in a future time period, one of any two building elements with the same angle as the relative angle moves toward the other at a speed and direction identical to the relative speed and direction; Otherwise, no warning will be issued.
9. A terminal, characterized in that: The method comprises a processor, an input interface, an output interface and a memory, wherein the processor, the input interface, the output interface and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Virtual reality scene real-time updating method for constructional engineering
CN112650395A
Method for quickly building indoor scene of virtual building and related equipment
CN117934707A
Virtual reality flow scene simulation method based on cross-spatio-temporal scale graph convolution operator
CN118364752A