Virtual reality scanning method
By constructing three-dimensional scenes and intelligent path planning, combining JavaScript framework and DecalGeometry technology, the problem of inefficient scanning and testing in complex waters is solved, and efficient and accurate underwater detection path planning is achieved.
Patent Information
- Application Number
- CN202510259069.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-07-29
AI Technical Summary
Traditional underwater detection and path planning are difficult to carry out in real time and accurately in complex waters, resulting in inefficient scanning and path deviations, and there is high blindness.
The virtual reality scanning method is adopted to construct a three-dimensional scene, combine the actual terrain and water environment, use intelligent path planning algorithm to calculate the scanning path, and monitor water flow and environmental changes in real time for dynamic adjustments. The JavaScript framework Vue.js and Three.js are used to create the water environment, and combine DecalGeometry technology to achieve path display and color change.
It realizes efficient and accurate scanning in complex waters. Users can adjust the path in real time to adapt to water flow and terrain changes, ensuring that the detection equipment completes scanning and testing efficiently according to the predetermined path.
Smart Images

Figure CN120388149A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of path planning and guidance, and relates to a virtual reality scanning method. Background Art
[0002] In complex waters (such as strong water currents, obstacles, rugged terrain, etc.), traditional underwater detection and path planning face many challenges, especially in water flow interference and unstable environments. Existing path planning tools are difficult to perform scanning operations on these complex areas in real time and accurately, resulting in low scanning efficiency, deviation of the scanning path, and high blindness in underwater operations. Summary of the Invention
[0003] To solve the above technical problems, the present invention provides a virtual reality scanning method, which can dynamically adapt to environmental factors such as water flow interference and terrain height, generate the optimal path through an intelligent path planning algorithm, and guide the detection device or diver to perform accurate scanning through a visualization tool, and restore the underwater operation scene with three-dimensional technology, so that the scanning efficiency is significantly improved and the scanning difficulty is greatly reduced.
[0004] The technical solution adopted by the present invention is as follows: A virtual reality scanning method, and its specific steps are as follows: S1. Construct a three-dimensional scene by simulating the actual terrain and water area environment; S2. Automatically calculate the scanning path according to the water flow direction, radiation angle, and safety height through an intelligent algorithm; S3. Display the planned path in the three-dimensional scene, continuously monitor the changes in water flow and environment, generate a new path according to new data, and make dynamic adjustments according to new environmental conditions.
[0005] Further, the construction of the three-dimensional scene in step S1 is to use the JavaScript framework Vue.js to construct the front-end architecture of the system, and use the JavaScript framework Three.js to create the water area environment and load the terrain model into the scene for display.
[0006] Further, the specific steps of automatically calculating the scanning path in step S2 are as follows: S21. Use the mouse to circle a rectangular area, convert the screen coordinates corresponding to the four vertices of the rectangle into Cartesian coordinates, and generate a rectangular area according to the four vertex coordinates; S22. Convert the angle to radians, use trigonometric functions to calculate the width of the radiation angle mapping area, and calculate the sine value, tangent value, and cotangent value of the water flow direction; S23. Calculate the starting and ending coordinates of the path according to the current angle and area width and draw them on the terrain.
[0007] Further, the formula for converting the angle to radians in step S22 is as follows: ang = (angle / 2) * (Math.PI / 180) where ang represents radians, angle represents the water flow direction angle or the radiation angle, and Math.PI represents the value of the pi (π).
[0008] Further, the formula for calculating the region width in step S22 is as follows: fusheWidth = height * Math.tan(age) where fusheWidth represents the radiation region width, height represents the safety height, and age represents the radiation angle.
[0009] Further, the calculation formulas for the sine value, tangent value, and cotangent value of the water flow direction in step S22 are as follows: sinValue = Math.sin(ang); tanValue = Math.tan(ang); cotValue = Math.tan(Math.PI / 2 - ang); where sinValue represents the sine value of the water flow direction, tanValue represents the tangent value of the water flow direction, and cotValue represents the cotangent value of the water flow direction.
[0010] Further, the starting point and ending point coordinates in step S23 are calculated as follows: aValue =offsetY1 - offsetX2 / tanValue; bValue = fusheWidth / sinValue; temp = aValue - i * bValue; where aValue represents the starting point, offsetY1 represents the screen coordinate Y, offsetX2 represents the screen coordinate X, bValue represents the ending point, temp represents the moving distance, and i represents the iteration number of the loop.
[0011] Further, the path display in step S3 is achieved by the DecalGeometry (decal) technology to change the color of the scanned area.
[0012] Adopting the technical solution of the present invention can obtain the following beneficial effects: By combining a three-dimensional scene with intelligent path planning, an intuitive and dynamic path planning is provided; users can make real-time path adjustments according to the water flow direction and terrain features, plan the optimal survey path suitable for complex waters, and the real-time feedback function can handle water flow changes and terrain complexity to ensure that the detection device or diver can complete efficient and accurate surveys along the predetermined path. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The following briefly describes the content expressed in each drawing of this specification and the marks in the drawings: Figure 1 It is a schematic structural diagram of the three-dimensional scene of the present invention; Figure 2 It is a schematic diagram of the automatic survey path of the present invention; Figure 3 It is a schematic diagram of the present invention showing the planned path (pink mark) in the three-dimensional scene; Figure 4 It is a schematic diagram of the present invention realizing color change of the surveyed completed area through the DecalGeometry (decal) technology in the three-dimensional scene. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0014] The following further details the specific embodiments of the present invention, such as the shapes, structures of the various components involved, the mutual positions and connection relationships between the various parts, the functions of the various parts, and the working principles, etc., by describing the embodiments with reference to the drawings.
[0015] This embodiment provides a virtual reality survey method, and its specific steps are as follows: S1. Construct a three-dimensional scene, combined with the actual terrain and water area environment simulation, as Figure 1 shown; Among them, the three-dimensional scene construction uses the JavaScript framework Vue.js to construct the front-end architecture of the system, uses the JavaScript framework Three.js to create the water area environment and loads it into the scene for display through the Three loader.
[0016] S2. Automatically calculate the survey path according to the water flow direction, radiation angle, and safety height, as Figure 2 shown; The specific steps for automatically calculating the survey path are as follows: S21. Use the mouse to circle a rectangular area, convert the screen coordinates corresponding to the four vertices of the rectangle into Cartesian coordinates, and generate a rectangular area according to the four vertex coordinates; S22. Convert the angle to radians, use trigonometric functions to calculate the width of the radiation angle mapping area, and calculate the sine value, tangent value, and cotangent value of the water flow direction; The formula for converting the angle to radians is as follows: ang = (angle / 2) * (Math.PI / 180) Where ang represents the radian, angle represents the water flow direction angle or the radiation angle, and Math.PI represents the value of pi (π).
[0017] The formula for calculating the area width is as follows: fusheWidth = height * Math.tan(age) Where fusheWidth represents the radiation area width, height represents the safety height, and age represents the radiation angle.
[0018] The formulas for calculating the sine value, tangent value, and cotangent value of the water flow direction are as follows: sinValue = Math.sin(ang); tanValue = Math.tan(ang); cotValue = Math.tan(Math.PI / 2 - ang); Where sinValue represents the sine value of the water flow direction, tanValue represents the tangent value of the water flow direction, and cotValue represents the cotangent value of the water flow direction.
[0019] S23. Calculate the starting and ending coordinates of the path based on the current angle and area width and draw them on the terrain.
[0020] The calculation of the starting and ending coordinates is as follows: aValue = offsetY1 - offsetX2 / tanValue; bValue = fusheWidth / sinValue; temp = aValue - i * bValue; Where aValue represents the starting point, offsetY1 represents the screen coordinate Y, offsetX2 represents the screen coordinate X, bValue represents the ending point, temp represents the moving distance, and i represents the iteration number of the loop.
[0021] S3. Display the planned path in the 3D scene, represented in pink, as Figure 3 shown, and continuously monitor the changes in the water flow and the environment, generate a new path based on the new data, and make dynamic adjustments according to the new environmental conditions.
[0022] The path display therein realizes the color change of the scanned area through the DecalGeometry technique, such as Figure 4 shown.
[0023] Through the combination of the three-dimensional scene and intelligent path planning, the present invention provides an intuitive and dynamic path planning; users can make real-time path adjustments according to the water flow direction and terrain features, plan the optimal scanning path suitable for complex waters, and the real-time feedback function can cope with water flow changes and terrain complexity to ensure that the detection device or diver can complete efficient and accurate scanning according to the predetermined path.
[0024] The present invention has been described exemplarily above in conjunction with the accompanying drawings. Obviously, the specific implementation of the present invention is not limited by the above methods. As long as various non-substantive improvements are made by adopting the method concept and technical solution of the present invention, or the concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.
Claims
1. A virtual reality scanning method, and the specific steps are as follows: S1. Construct a three-dimensional scene and simulate it in combination with the actual terrain and water environment; S2. Automatically calculate the scanning path according to the water flow direction, radiation angle, and safety height through an intelligent algorithm; S3. Display the planned path in the three-dimensional scene, continuously monitor the changes in the water flow and environment, generate a new path according to new data, and make dynamic adjustments according to new environmental conditions.
2. The virtual reality scanning method according to claim 1, characterized in that: The construction of the three-dimensional scene in step S1 is to use the JavaScript framework Vue.js to build the front-end architecture of the system, and use the JavaScript framework Three.js to create a water environment and load it into the scene for display.
3. The virtual reality scanning method according to claim 1, wherein: The specific steps for automatically calculating the scanning path in step S2 are as follows: S21. Use the mouse to circle a rectangular area, convert the screen coordinates corresponding to the four vertices of the rectangle into Cartesian coordinates, and generate a rectangular area according to the four vertex coordinates; S22. Convert the angle to radians, use trigonometric functions to calculate the width of the radiation angle mapping area, and calculate the sine value, tangent value, and cotangent value of the water flow direction; S23. Calculate the starting point and ending point coordinates of the path according to the current angle and area width and draw them on the terrain.
4. The virtual reality scanning method according to claim 3, characterized in that: The formula for converting the angle to radians in step S22 is as follows: ang = (angle / 2) * (Math.PI / 180) where ang represents the converted radian, angle represents the water flow direction angle or radiation angle, and Math.PI represents the value of pi π.
5. A virtual reality scanning method according to claim 4, characterized in that: The formula for calculating the area width in step S22 is as follows: fusheWidth = height * Math.tan(age) where fusheWidth represents the radiation area width, height represents the safety height, and age represents the radiation angle.
6. A virtual reality scanning method according to claim 5, characterized in that: The formulas for the sine value, tangent value, and cotangent value of the water flow direction in step S22 are as follows: sinValue = Math.sin(ang); tanValue = Math.tan(ang); cotValue = Math.tan(Math.PI / 2 - ang); where sinValue represents the sine value of the water flow direction, tanValue represents the tangent value of the water flow direction, and cotValue represents the cotangent value of the water flow direction.
7. A virtual reality scanning method according to claim 6, characterized in that: The calculation of the starting point and ending point coordinates in step S23 is as follows: aValue = offsetY1 - offsetX2 / tanValue; bValue = fusheWidth / sinValue; temp = aValue - i * bValue; where aValue represents the starting point, offsetY1 represents the screen coordinate Y, offsetX2 represents the screen coordinate X, bValue represents the ending point, temp represents the moving distance, and i represents the iteration number of the loop.
8. A virtual reality scanning method according to claim 1, characterized in that: The path display in step S3 is to realize the color change of the scanned area through the DecalGeometry technology.