Three-dimensional ray drawing method and device
By dynamically generating curve control points and performing curvature correction, combined with the Bezier curve parameter model, the problem of failure to consider the Earth's curvature in the existing technology is solved, and high-precision three-dimensional ray drawing is achieved.
Patent Information
- Application Number
- CN202510323476.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-03-19
AI Technical Summary
The existing three-dimensional ray drawing technology fails to fully consider the impact of Earth's curvature on the actual trajectory, resulting in distortion of spatial trajectory and lacks effective curvature correction mechanism and dynamic control point optimization.
By receiving multiple sets of point data, calculating the surface distance and azimuth angle, dynamically generate curve control points, and perform curvature correction based on the surface projection model, a Bezier curve parameter model is constructed to generate a smooth spatial trajectory.
Real trajectory expressions that take into account the curvature of the earth are realized, the authenticity and smoothness of spatial trajectories are improved, and accurate rendering is ensured at different scales and perspectives.
Smart Images

Figure CN119850813B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a three-dimensional ray drawing method and device. Background Art
[0002] Existing 3D ray drawing techniques usually use simple straight line connections or basic spline curves to express, which fails to fully consider the impact of the earth's curvature on the actual trajectory, resulting in distortion in the spatial trajectory. Traditional methods suffer from precision loss in coordinate system conversion and projection transformation, and lack an effective curvature correction mechanism.
[0003] At the same time, existing technologies also have limitations in control point generation and curve fitting. Most systems use a fixed spacing or proportional distribution of control point layout schemes, which fail to dynamically optimize according to the actual surface distance and azimuth, affecting the authenticity and smoothness of the trajectory. The curve parameterization modeling method is relatively simple and it is difficult to accurately reflect the actual motion characteristics in the spherical space.
[0004] In addition, the existing system needs to be improved in terms of rendering and display in three-dimensional scenes. The lack of a complete coordinate transformation compensation mechanism makes it easy to have display deviations at different scales and viewing angles. The mapping relationship between the geodetic coordinate system and the display coordinate system is not processed accurately enough, which affects the visualization effect of the spatial trajectory. Solving these problems is of great significance to improving the display accuracy of the three-dimensional geographic information system. Summary of the invention
[0005] In response to the problems in the prior art, the present application provides a three-dimensional ray drawing method and device, which can break through the limitations of traditional straight line drawing and achieve true trajectory expression taking into account the curvature of the earth.
[0006] In order to solve at least one of the above problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a three-dimensional ray drawing method, comprising:
[0008] Receive multiple groups of point data, each group of the point data includes a starting point coordinate, an end point coordinate, a starting point name and an end point name, convert the starting point coordinate and the end point coordinate from a geographic coordinate system to a projected coordinate system, calculate the surface distance and azimuth between the starting point coordinate and the end point coordinate, determine the number of control points based on the surface distance, generate multiple candidate control points on the perpendicular bisector of the line connecting the two points, calculate the offset coefficient of each candidate control point in combination with the azimuth, and use the offset candidate control point as a curve control point;
[0009] Performing curvature correction on the curve control points, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control points, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence;
[0010] The point set sequence is loaded in a three-dimensional coordinate system, coordinate transformation compensation is performed on the point set sequence, a mapping relationship between a geodetic coordinate system and a display coordinate system is established, the compensated point set sequence is projected into a spherical space, curve fitting is performed on the projected point set sequence based on preset rendering parameters, a three-dimensional space curve with curvature correction is generated, the three-dimensional space curve is combined with the start point name and the end point name to form ray display data, and the three-dimensional space curve is rendered on a three-dimensional map based on the ray display data.
[0011] Further, receiving multiple groups of point data, each group of the point data includes a starting point coordinate, an end point coordinate, a starting point name and an end point name, converting the starting point coordinate and the end point coordinate from a geographic coordinate system to a projected coordinate system, and calculating the surface distance and azimuth between the starting point coordinate and the end point coordinate, including:
[0012] Read a data stream containing point information from a data interface, parse the data stream to extract the starting point coordinates, end point coordinates, starting point name and end point name of the point data, perform validity verification on the starting point coordinates and the end point coordinates, establish an index list of point data, and organize and store the verified data in a preset format;
[0013] The starting point coordinates and the end point coordinates are converted from the WGS84 geographic coordinate system to the Mercator projection coordinate system, the spatial coordinate values of the starting point coordinates and the end point coordinates on the projection plane are calculated according to the projection transformation matrix, the surface distance between the starting point coordinates and the end point coordinates is calculated using the spherical distance formula, and the azimuth of the starting point coordinates and the end point coordinates is calculated based on the projected coordinate values.
[0014] Further, the determining the number of control points based on the surface distance, generating a plurality of candidate control points on the perpendicular bisector of the line connecting the two points, calculating the offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point, includes:
[0015] Establish a mapping relationship between the ray length and the number of control points, substitute the surface distance into the mapping relationship to calculate the number of control points, calculate the perpendicular bisector equation of the line connecting the two points according to the spatial positions of the starting point coordinates and the end point coordinates, generate multiple candidate control points on the perpendicular bisector at preset intervals, and calculate the vertical distance from each candidate control point to the line;
[0016] A control point offset model is established according to the azimuth angle, the spatial coordinates of the candidate control point are substituted into the control point offset model to calculate the benchmark offset value of each control point, the benchmark offset value is weighted based on the vertical distance to obtain an offset coefficient, and the offset coefficient is multiplied by the spatial coordinates of the candidate control point to obtain the offset control point coordinates.
[0017] Furthermore, the curvature correction is performed on the curve control points, the influence parameters of the earth curvature on the ray trajectory are calculated based on the surface projection model, the influence parameters are fused and corrected with the spatial coordinates of the curve control points, and the Bezier curve parameter model is constructed, including:
[0018] Calculate the radius of curvature according to the parameters of the earth ellipsoid, project the curve control point onto the reference ellipsoid, calculate the main curvature and geodesic curvature of the curve control point on the ellipsoid based on the geodetic model, construct an earth curvature influence factor calculation model, substitute the main curvature and geodesic curvature into the earth curvature influence factor calculation model to obtain the influence parameter;
[0019] The spatial coordinates of the curve control points are normalized, the influencing parameters and the normalized spatial coordinates are weightedly combined to obtain correction coefficients, the spatial coordinates of the curve control points are corrected according to the correction coefficients, and the corrected control point coordinates are substituted into the quadratic Bezier curve equation to construct a curve parameter model.
[0020] Further, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in spatial position order to form a point set sequence, includes:
[0021] The Bezier curve parameter model is uniformly sampled in the interval [0,1], the parameter equation value corresponding to each sampling point is calculated, the parameter equation value is substituted into the Bezier curve parameter model to obtain the spatial coordinates of the waypoint, and the spatial coordinates of the waypoint are numerically corrected to eliminate calculation errors;
[0022] The waypoint coordinates are restored from the Mercator projection coordinate system to the WGS84 geographic coordinate system, the longitude, latitude and elevation values of the waypoint coordinates are calculated, the starting point coordinates, the restored waypoint coordinates and the end point coordinates are sorted according to the spatial position relationship, and a point set sequence is constructed based on a preset data structure to store the sorting results.
[0023] Furthermore, the step of loading the point set sequence in the three-dimensional coordinate system, performing coordinate transformation compensation on the point set sequence, establishing a mapping relationship between the earth coordinate system and the display coordinate system, and projecting the compensated point set sequence into the spherical space includes:
[0024] Initialize the display parameters of the three-dimensional coordinate system, load the coordinate data of the point set sequence into the coordinate system buffer, calculate the coordinate transformation matrix according to the display viewing angle, perform geometric transformation on the point set sequence based on the coordinate transformation matrix to obtain compensated coordinate values, and normalize the compensated coordinate values;
[0025] Construct a conversion equation from the geodetic coordinate system to the display coordinate system, substitute the geodetic coordinates of the point set sequence into the conversion equation to calculate the display coordinates, establish a spherical projection relationship according to the earth ellipsoid model, and project the compensated point set sequence to the reference spherical space based on the spherical projection relationship.
[0026] Further, the curve fitting is performed on the projected point set sequence based on preset rendering parameters to generate a three-dimensional space curve with curvature correction, the three-dimensional space curve is combined with the start point name and the end point name to form ray display data, and the three-dimensional space curve is rendered on a three-dimensional map based on the ray display data, including:
[0027] Loading material parameters and lighting parameters for curve rendering, performing cubic spline interpolation on the projected point set sequence, calculating the tangent vector and curvature of the interpolation node, constructing a geometric description of the three-dimensional curve based on the tangent vector and the curvature, converting the geometric description into vertex data and index data, and performing normal vector calculation on the vertex data to obtain a three-dimensional space curve;
[0028] The geometric data of the three-dimensional space curve is combined with the starting point name and the end point name into a ray display data structure, lighting calculation and depth test are performed on the ray display data according to a preset rendering pipeline configuration, and the three-dimensional space curve is drawn to a rendering buffer of a three-dimensional map based on the rendering pipeline.
[0029] In a second aspect, the present application provides a three-dimensional ray drawing device, comprising:
[0030] A data processing module, for receiving a plurality of groups of point data, each group of the point data comprising a starting point coordinate, an end point coordinate, a starting point name and an end point name, converting the starting point coordinate and the end point coordinate from a geographic coordinate system to a projected coordinate system, calculating a surface distance and an azimuth between the starting point coordinate and the end point coordinate, determining the number of control points based on the surface distance, generating a plurality of candidate control points on a perpendicular bisector connecting two points, calculating an offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point;
[0031] A coordinate determination module, for performing curvature correction on the curve control point, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control point, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence;
[0032] A ray drawing module is used to load the point set sequence in a three-dimensional coordinate system, perform coordinate transformation compensation on the point set sequence, establish a mapping relationship between the geodetic coordinate system and the display coordinate system, project the compensated point set sequence into a spherical space, perform curve fitting on the projected point set sequence based on preset rendering parameters, generate a three-dimensional space curve with curvature correction, combine the three-dimensional space curve with the start point name and the end point name to form ray display data, and render the three-dimensional space curve on a three-dimensional map based on the ray display data.
[0033] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the three-dimensional ray drawing method when executing the program.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the three-dimensional ray drawing method when executed by a processor.
[0035] In a fifth aspect, the present application provides a computer program product, comprising a computer program / instruction, which implements the steps of the three-dimensional ray drawing method when executed by a processor.
[0036] It can be seen from the above technical solutions that the present application provides a three-dimensional ray drawing method and device, which dynamically generates curve control points by accurately converting the geographic coordinate system and the projection coordinate system, combining the azimuth and the surface distance. An innovative curvature correction mechanism based on the surface projection model is designed, which takes into account the influence of the earth's curvature on the ray trajectory, and realizes smooth spatial trajectory generation through the Bezier curve parameter model. The system uses coordinate transformation compensation and spherical projection technology to establish an accurate mapping between the geodetic coordinate system and the display coordinate system, ensuring the accurate rendering of three-dimensional space curves at different scales and viewing angles, and providing a high-precision technical solution for geographic information visualization. This method breaks through the limitations of traditional straight line drawing and realizes the true trajectory expression that takes into account the curvature of the earth. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 This is one of the flowcharts of the three-dimensional ray drawing method in the embodiment of the present application;
[0039] Figure 2 This is a second flow chart of the three-dimensional ray drawing method in the embodiment of the present application;
[0040] Figure 3 The third flowchart of the three-dimensional ray drawing method in the embodiment of the present application;
[0041] Figure 4 This is a fourth flow chart of the three-dimensional ray drawing method in an embodiment of the present application;
[0042] Figure 5 FIG5 is a fifth flow chart of the three-dimensional ray drawing method in the embodiment of the present application;
[0043] Figure 6 This is a sixth flow chart of the three-dimensional ray drawing method in the embodiment of the present application;
[0044] Figure 7 FIG7 is a flowchart of a three-dimensional ray drawing method in an embodiment of the present application;
[0045] Figure 8 is a structural diagram of a three-dimensional ray drawing device in an embodiment of the present application;
[0046] Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0047] Reference numerals:
[0048] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0051] Taking into account the problems existing in the prior art, the present application provides a three-dimensional ray drawing method and device, which dynamically generates curve control points by accurately converting the geographic coordinate system and the projection coordinate system, combining the azimuth and the surface distance. An innovative curvature correction mechanism based on the surface projection model is designed, which takes into account the influence of the earth's curvature on the ray trajectory, and realizes smooth spatial trajectory generation through the Bezier curve parameter model. The system uses coordinate transformation compensation and spherical projection technology to establish an accurate mapping between the geodetic coordinate system and the display coordinate system, ensuring the accurate rendering of three-dimensional space curves at different scales and viewing angles, and providing a high-precision technical solution for geographic information visualization. This method breaks through the limitations of traditional straight line drawing and realizes the true trajectory expression that takes into account the curvature of the earth.
[0052] In order to break through the limitations of traditional straight line drawing and realize the true trajectory expression considering the curvature of the earth, the present application provides an embodiment of a three-dimensional ray drawing method, see Figure 1 The three-dimensional ray drawing method specifically includes the following contents:
[0053] Step S101: receiving multiple groups of point data, each group of the point data includes a start point coordinate, an end point coordinate, a start point name and an end point name, converting the start point coordinate and the end point coordinate from a geographic coordinate system to a projection coordinate system, calculating a surface distance and an azimuth between the start point coordinate and the end point coordinate, determining the number of control points based on the surface distance, generating multiple candidate control points on a perpendicular bisector connecting two points, calculating an offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point;
[0054] Optionally, this embodiment adopts a multi-level data parsing mechanism in point data processing. The interface layer receives the input data stream through an asynchronous buffer queue and supports high-concurrency processing of batch data. The parser first extracts the data packet header, verifies the protocol version number and data format identifier, and then parses the point data according to a preset field mapping table. For required fields, including starting point coordinates, end point coordinates, starting point name, and end point name, strict type checking and boundary validation are adopted. For example, longitude values are limited to the range of [-180, 180], latitude values are limited to the range of [-90, 90], and coordinate accuracy is supported to six decimal places.
[0055] This embodiment implements a high-precision coordinate system conversion engine. In the conversion process from the WGS84 geographic coordinate system to the Mercator projection coordinate system, the ellipsoid parameter table is first loaded, including the major semi-axis, the minor semi-axis, the first eccentricity and the second eccentricity. The conversion calculation adopts a step-by-step strategy, first converting the geographic coordinates into Cartesian space rectangular coordinates, and then performing the projection transformation. When processing high-latitude areas, the transverse Mercator projection is used to reduce deformation. The projection parameters are dynamically optimized according to the target area to ensure that the projection deformation is within a controllable range. Double-precision floating-point operations are used in the coordinate conversion process, and the accumulated error is handled through the error compensation model.
[0056] This embodiment designs an accurate geodetic calculation module. The surface distance calculation is based on the improved Vincenty algorithm. First, the earth is approximated as a spheroid, and the geodesic length is obtained through iterative calculation. A convergence threshold is set during the iteration process to ensure the calculation accuracy. For special cases crossing the poles or the date line, singular points are avoided through segmented calculation. The azimuth calculation adopts the geodetic azimuth formula, which takes into account the influence of the earth's curvature and projection deformation. During the calculation process, the convergence and efficiency of the iteration are guaranteed by adaptive step size control.
[0057] This embodiment constructs a dynamic control point configuration system. The number of control points is determined based on a multi-factor evaluation model, taking into account ray length, curvature change, and display scale. The model uses piecewise function mapping. For short-distance rays (less than 1,000 kilometers), a control point is set at a fixed distance; for medium-distance rays, the control point spacing increases with distance; for transoceanic rays, additional control points are added at key locations to better represent the curvature of the earth. A smoothing factor is introduced in the number calculation process to avoid sudden changes in the number of control points near the critical value.
[0058] This embodiment implements an efficient perpendicular median generation algorithm. First, the direction vector of the connecting line is obtained by vector calculation, and the direction vector of the perpendicular median is obtained by applying orthogonal transformation. The candidate control point generation adopts an adaptive sampling strategy, and the sampling interval is proportional to the ray length to ensure that the control points are evenly distributed. In order to avoid numerical calculation errors, the Kramer rule is used to solve the perpendicular median equation, and the calculation stability is guaranteed by matrix condition number analysis. During the generation process, the point query is accelerated through the spatial index structure.
[0059] This embodiment constructs a complex control point offset calculation framework. The offset model divides the 360-degree azimuth space into multiple sectors based on the azimuth characteristics, and each sector uses an independent offset calculation rule. The offset coefficient is determined by a combination of a reference offset value and a weight factor. The reference offset value is related to the ray length and azimuth, and the weight factor considers the vertical distance from the control point to the connecting line. In polar regions, the offset calculation is optimized by polar coordinate transformation. The entire offset process is processed in parallel through tensor operations to improve computing efficiency.
[0060] This embodiment achieves a smooth transition of the ray trajectory through accurate calculation of the curve control points. The spatial distribution of the control points fully considers the influence of the earth's curvature, ensuring that the generated spatial curve has good geometric characteristics and visual effects. While ensuring the calculation accuracy, this solution improves the processing efficiency through a multi-level optimization strategy, providing reliable basic data for subsequent curve fitting and rendering.
[0061] Step S102: performing curvature correction on the curve control points, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control points, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence;
[0062] Optionally, this embodiment implements an accurate curvature correction mechanism in the processing of curve control points. The correction process first establishes a parameter model of the earth ellipsoid, including reference parameters such as the major semi-axis, the minor semi-axis and the flattening. For each control point, the local curvature characteristics are calculated by the Gaussian curvature formula, taking into account the geometric characteristics of the geodesic on the ellipsoid surface. The correction algorithm adopts an iterative method, and each iteration updates the control point position through a weighted combination of the normal curvature and the geodesic curvature until the curvature change is less than a preset threshold.
[0063] This embodiment constructs a complete curved surface projection model. The model is based on Riemannian geometry theory and treats the earth's surface as a two-dimensional manifold embedded in a three-dimensional Euclidean space. By establishing a local coordinate system, the first basic form and the second basic form near each control point are calculated. In the calculation process of the influencing parameters, the combined influence of Gaussian curvature and mean curvature on the ray trajectory is considered. For long-distance rays across multiple projection bands, curvature continuity is ensured through segmented processing and smooth transition.
[0064] This embodiment designs an adaptive coordinate fusion algorithm. The curvature influencing parameters are converted into a spatial transformation matrix and fused with the control point coordinates through tensor operations. The fusion process adopts a weighted average strategy, and the weight coefficient is dynamically adjusted according to the control point position and curvature size. In order to deal with numerical sensitivity, a regularization term is introduced to control the fusion strength. The corrected control point coordinates are optimized by the least squares method to ensure the uniformity and smoothness of the spatial distribution.
[0065] This embodiment implements a high-order Bezier curve parameterization method. Based on the corrected control points, an n-order Bezier curve model is constructed, where n is adaptively determined according to the number of control points. The parameterization process uses the De Castellio algorithm to improve the computational efficiency through recursive subdivision. During the curve parameter optimization process, the tension parameter is introduced to adjust the curve shape to ensure that the generated trajectory not only conforms to the earth's curvature characteristics, but also has a good visual effect.
[0066] This embodiment constructs an accurate waypoint generation mechanism. Adaptive sampling is performed within the Bezier curve parameter interval, and the sampling density is proportional to the curve curvature. For areas with drastic curvature changes, the trajectory accuracy is improved by increasing the number of sampling points. Tangent continuity constraints are applied during sampling to ensure smooth transitions between adjacent segments. The generated waypoints are optimized through cubic spline interpolation to eliminate possible jitter.
[0067] This embodiment adopts a strict numerical processing strategy in the coordinate system conversion. When restoring from the Mercator projection coordinate system to the WGS84 geographic coordinate system, the inverse projection transformation matrix is first constructed. The nonlinear characteristics of the projection deformation are considered in the transformation process, and the restoration accuracy is improved by an iterative method. For coordinate restoration in high-latitude areas, an improved polar coordinate transformation is used to avoid singular points. The restored coordinates are verified for accuracy by ellipsoid fitting.
[0068] This embodiment implements an efficient point set sequence organization mechanism. First, a spatial index structure is established to support fast location query and sorting. During the sequence organization process, the relative position of the point is determined by the azimuth and cumulative distance. For densely distributed waypoints, cluster analysis is used for screening to avoid redundancy. The final point set sequence is verified for its continuity and integrity through spatial topological relationships.
[0069] This embodiment achieves the generation of ray trajectories that conform to the curvature characteristics of the earth through complex curvature correction and parametric modeling. This solution fully considers the geometric characteristics of the earth's surface and ensures the accuracy and visual effect of the trajectory through multi-level optimization. The entire processing flow adopts a parallel computing architecture, which significantly improves processing efficiency while ensuring calculation accuracy, providing reliable technical support for large-scale ray drawing.
[0070] Step S103: Load the point set sequence in a three-dimensional coordinate system, perform coordinate transformation compensation on the point set sequence, establish a mapping relationship between the geodetic coordinate system and the display coordinate system, project the compensated point set sequence into a spherical space, perform curve fitting on the projected point set sequence based on preset rendering parameters, generate a three-dimensional space curve with curvature correction, combine the three-dimensional space curve with the starting point name and the end point name to form ray display data, and render the three-dimensional space curve on a three-dimensional map based on the ray display data.
[0071] Optionally, this embodiment adopts a hierarchical coordinate processing mechanism in the construction of three-dimensional space. First, the OpenGL rendering context is initialized, and the viewport parameters and projection matrix are configured. The point set sequence loading process uses the vertex buffer object (VBO) technology to transfer the coordinate data in batches to the graphics memory. In order to improve the rendering efficiency, a dynamic level of detail (LOD) mechanism is implemented to dynamically adjust the point set density according to the viewpoint distance.
[0072] This embodiment implements an accurate coordinate transformation compensation algorithm. The compensation process first constructs the world coordinate system transformation matrix, taking into account the combined effects of scaling, rotation, and translation transformations. For projection deformations caused by different latitudes, local compensation is performed through adaptive meshing. The compensation coefficients are optimized by the least squares method to ensure the consistency of the spatial relationship before and after the transformation. For rays that span multiple projection bands, a segmented compensation strategy is adopted to achieve a smooth transition at the boundary.
[0073] This embodiment designs a complex coordinate system mapping framework. The conversion from the geodetic coordinate system to the display coordinate system uses quaternion interpolation to avoid the gimbal lock problem. The mapping relationship is represented by an affine transformation matrix, which supports dynamic viewing angle adjustment. In order to handle special situations in polar regions, a seamless conversion from polar coordinates to Cartesian coordinates is achieved. An error compensation mechanism is introduced in the mapping process to ensure projection accuracy through feedback control.
[0074] This embodiment constructs a high-precision spherical projection engine. Based on the improved spherical Mercator projection algorithm, the compensated point set sequence is mapped to the reference ellipsoid. The projection process takes into account the influence of the earth's flattening, and the projection deformation is optimized by the ellipsoid parameters. For large-range rays, a block projection strategy is adopted, and the optimal projection parameters are used for each block. The continuity of the projection result is verified by surface fitting.
[0075] This embodiment implements an adaptive curve fitting mechanism. Based on the projected point set, an improved NURBS (non-uniform rational B-spline) algorithm is used for curve fitting. The control point weights are dynamically adjusted through curvature analysis to ensure sufficient fitting accuracy in high curvature areas. The distribution of node vectors is optimized through tangent continuity constraints to avoid sudden changes in the fitting curve. The entire fitting process is solved iteratively until the residual meets the convergence condition.
[0076] This embodiment builds a complete rendering parameter configuration system. Material parameters include diffuse color, specular reflection coefficient and transparency, and support distance-based gradient effects. The lighting model uses improved Phong shading, taking into account the combined effects of ambient light, diffuse light and specular light. The rendering pipeline is configured with multi-sampling anti-aliasing (MSAA) to improve the display quality of curved edges.
[0077] This embodiment designs an efficient ray display data organization structure. The geometric data of the three-dimensional space curve and the start and end point annotation information are encapsulated into a unified data structure. The annotation position is optimized through an avoidance algorithm to prevent text overlap. The data structure supports attribute animation to achieve dynamic rendering effects of rays. The rendering process uses instantiation technology to improve batch drawing efficiency.
[0078] This embodiment implements a professional map rendering engine. Data loading is optimized through a multi-level cache mechanism, supporting real-time rendering of large-scale rays. Depth testing ensures the correct occlusion relationship between rays and terrain, and translucent blending achieves the penetration effect of rays. The rendering engine supports multi-view switching, including orthographic projection and perspective projection, to meet different observation needs.
[0079] This embodiment achieves the real visualization of rays through precise coordinate processing and high-quality rendering technology. This solution improves the visual effect through multi-level optimization while ensuring geographic accuracy. The entire rendering process adopts modern graphics API features, supports large-scale data while maintaining a high rendering frame rate, and provides reliable technical support for 3D map applications.
[0080] From the above description, it can be seen that the three-dimensional ray drawing method provided in the embodiment of the present application can dynamically generate curve control points by accurately converting the geographic coordinate system and the projection coordinate system, combining the azimuth and the surface distance. An innovative curvature correction mechanism based on the surface projection model is designed, which takes into account the influence of the earth's curvature on the ray trajectory, and realizes smooth spatial trajectory generation through the Bezier curve parameter model. The system uses coordinate transformation compensation and spherical projection technology to establish an accurate mapping between the geodetic coordinate system and the display coordinate system, ensuring the accurate rendering of three-dimensional space curves at different scales and viewing angles, and providing a high-precision technical solution for geographic information visualization. This method breaks through the limitations of traditional straight line drawing and realizes the true trajectory expression that takes into account the curvature of the earth.
[0081] In one embodiment of the three-dimensional ray drawing method of the present application, see Figure 2 , and can also include the following:
[0082] Step S201: reading a data stream containing point information from a data interface, parsing the data stream to extract the starting point coordinates, end point coordinates, starting point name and end point name of the point data, performing validity verification on the starting point coordinates and the end point coordinates, establishing an index list of point data, and organizing and storing the verified data in a preset format;
[0083] Step S202: Convert the starting point coordinates and the end point coordinates from the WGS84 geographic coordinate system to the Mercator projection coordinate system, calculate the spatial coordinate values of the starting point coordinates and the end point coordinates on the projection plane according to the projection transformation matrix, calculate the surface distance between the starting point coordinates and the end point coordinates using the spherical distance formula, and calculate the azimuth of the starting point coordinates and the end point coordinates based on the projected coordinate values.
[0084] Optionally, this embodiment adopts a multi-threaded asynchronous reading mechanism at the data interface layer. By establishing an independent data reading thread pool, the reception and caching of high-concurrency data streams are achieved. The data stream uses a double-buffered queue structure to ensure that data loss does not occur under high load conditions. The interface supports multiple data formats, including binary streams, JSON, and XML, etc., and performs format conversion through a unified adapter interface. For large-scale data transmission, data compression and breakpoint resume transmission mechanisms are implemented.
[0085] This embodiment designs a powerful data parsing engine. The parsing process first identifies the key fields in the data stream through a lexical analyzer and extracts the basic elements of the point information. For strings in different encoding formats, automatic encoding recognition and conversion functions are implemented. Coordinate data parsing uses high-precision floating-point processing to retain sufficient significant digits after the decimal point. The name field is standardized through Unicode to ensure multi-language support.
[0086] This embodiment implements a strict data verification framework. Coordinate validity verification includes range checking and format verification. Longitude is limited to the range of [-180, 180], and latitude is limited to the range of [-90, 90]. For special points, such as coordinates near the poles and the date line, special processing rules are used. Abnormal data found during the verification process is recorded through the error log system, and detailed diagnostic information is generated.
[0087] This embodiment builds an efficient data indexing mechanism. The B+ tree structure is used to organize point data, supporting fast spatial query and range retrieval. The design of the index key takes into account the principle of spatial locality, and data in adjacent areas are stored in similar physical locations. In order to improve retrieval efficiency, a multi-level cache mechanism is implemented, and frequently accessed data is kept in memory.
[0088] This embodiment implements an accurate coordinate system conversion algorithm. In the conversion process from the WGS84 geographic coordinate system to the Mercator projection coordinate system, the standard ellipsoid parameters are first loaded. The conversion calculation adopts the Gauss-Kruger projection model, taking into account the influence of the earth's flattening. For different projection zones, the central meridian is dynamically selected to ensure the minimum projection deformation. The coordinate conversion process is processed in parallel through matrix operations to improve the calculation efficiency.
[0089] This embodiment designs a complete projection transformation framework. In the process of constructing the projection transformation matrix, the scale factor, rotation angle and translation vector are taken into account. The matrix elements are optimized by the least squares method to ensure that the projection deformation is evenly distributed. For large areas, a zone projection strategy is adopted to achieve smooth transitions at the boundaries between zones. The accuracy of the projection result is verified by the inverse transformation.
[0090] This embodiment constructs a professional distance measurement algorithm system. The spherical distance calculation adopts the improved Vincenty formula, taking into account the irregularity of the earth ellipsoid. The accuracy is improved by the iterative method during the calculation process, and the convergence condition is dynamically adjusted according to the actual application requirements. For the distance calculation across the polar regions, the segmented calculation strategy is adopted to avoid singular points.
[0091] This embodiment implements an accurate azimuth calculation method. Based on the projected coordinate values, the four-quadrant inverse tangent function is used to calculate the initial azimuth. The azimuth calculation takes into account the influence of projection deformation and is corrected by spherical trigonometry formulas. For long-distance rays, the azimuth changes of the start and end points are calculated for subsequent curve control point generation.
[0092] This embodiment provides reliable basic data for subsequent ray generation through strict data processing and accurate coordinate transformation. While ensuring data integrity and accuracy, this solution improves processing efficiency through multi-level optimization. The entire data processing flow adopts a modular design, has good scalability and maintainability, and can adapt to data processing needs of different scales and types.
[0093] In one embodiment of the three-dimensional ray drawing method of the present application, see Figure 3 , and can also include the following:
[0094] Step S301: Establish a mapping relationship between the ray length and the number of control points, substitute the surface distance into the mapping relationship to calculate the number of control points, calculate the perpendicular bisector equation of the line connecting the two points according to the spatial positions of the starting point coordinates and the end point coordinates, generate multiple candidate control points on the perpendicular bisector at preset intervals, and calculate the vertical distance from each candidate control point to the connecting line;
[0095] Step S302: Establish a control point offset model according to the azimuth angle, substitute the spatial coordinates of the candidate control point into the control point offset model to calculate the baseline offset value of each control point, adjust the weight of the baseline offset value based on the vertical distance to obtain an offset coefficient, and multiply the offset coefficient by the spatial coordinates of the candidate control point to obtain the offset control point coordinates.
[0096] Optionally, this embodiment implements an adaptive mapping mechanism in the ray control strategy. The mapping relationship is constructed through piecewise functions, and different control point densities are used for different distance ranges. For short-distance rays (less than 1000 kilometers), linear mapping is used to ensure basic curve smoothness; for medium-range rays, the number of control points grows logarithmically with the distance to balance accuracy and computational overhead; for long-range rays, additional control points are added at key locations to better express the earth's curvature effect. The mapping function achieves smooth transitions through spline interpolation to avoid mutations at critical points.
[0097] This embodiment designs an accurate perpendicular median calculation framework. First, the vertical direction vector is obtained by vector cross multiplication, and the parameterized straight line equation is constructed by combining the midpoint of the connecting line. In order to deal with the numerical accuracy problem, the Kramer rule is used to solve the linear equations, and the calculation stability is ensured by matrix condition number analysis. On the projection plane, the direction of the perpendicular median is ensured to be exactly perpendicular to the connecting line direction through affine transformation.
[0098] This embodiment implements an efficient candidate point generation algorithm. The preset interval is determined by an adaptive sampling strategy, and the sampling density is inversely proportional to the ray length to ensure that the control points are evenly distributed. The generation process uses vector operations in parallel to improve computational efficiency. For each candidate point, the precise vertical distance to the connecting line is calculated by the projection theorem as a reference parameter for subsequent offset calculations.
[0099] This embodiment constructs a complex azimuth processing model. The 360-degree azimuth space is divided into multiple sectors, and each sector uses an independent offset calculation rule. The model takes into account the influence of the earth's rotation direction and the direction of the main ocean currents, so that the generated ray trajectory is more in line with the laws of nature. The sector boundaries are smoothly transitioned through the weight function to avoid sudden changes in the trajectory caused by azimuth changes.
[0100] This embodiment implements a dynamic control point offset mechanism. The baseline offset value calculation uses nonlinear mapping, taking into account the combined effects of azimuth, geographic location and ray length. For control points in polar regions, the offset calculation is optimized through polar coordinate transformation. The offset model achieves parallel processing through tensor operations to improve computing efficiency.
[0101] This embodiment designs an accurate weight adjustment algorithm. The weight function is constructed based on the vertical distance and uses the Gaussian distribution characteristics to ensure a smooth transition. The adjustment process takes into account the relative position of the control points. The control points close to the starting and ending points have smaller weights, while the control points in the middle section have larger weights, forming a natural arc change. A regularization term is introduced in the weight calculation process to avoid trajectory distortion caused by extreme values.
[0102] This embodiment constructs a stable coordinate transformation framework. The offset calculation uses a local coordinate system and projects the control points onto the tangent plane for processing. The coordinate transformation matrix is constructed through quaternion interpolation to avoid the gimbal lock problem. The impact of projection deformation is taken into account during the transformation process, and accuracy is ensured through error compensation.
[0103] This embodiment implements an efficient parallel computing architecture. The batch operation of control point coordinates is optimized using SIMD instruction sets, which significantly improves processing efficiency. The data structure design supports vectorized operations and reduces memory access overhead. During the calculation process, load balancing is achieved through task decomposition to adapt to data processing requirements of different scales.
[0104] This embodiment achieves a natural transition of ray trajectories through precise control point generation and offset calculation. This solution improves the visual effect through multi-level optimization while ensuring geometric accuracy. The entire processing flow adopts a modular design, has good scalability and maintainability, and provides reliable control point data for subsequent curve fitting. The processing results fully consider the geographical features and natural laws, and the generated ray trajectories are both in line with the mathematical model and have good visual expression.
[0105] In one embodiment of the three-dimensional ray drawing method of the present application, see Figure 4 , and can also include the following:
[0106] Step S401: Calculate the radius of curvature according to the earth ellipsoid parameters, project the curve control points onto the reference ellipsoid surface, calculate the main curvature and geodesic curvature of the curve control points on the ellipsoid surface based on the geodetic model, construct an earth curvature influence factor calculation model, substitute the main curvature and the geodesic curvature into the earth curvature influence factor calculation model to obtain the influence parameters;
[0107] Step S402: normalize the spatial coordinates of the curve control points, perform weighted combination of the influencing parameters and the normalized spatial coordinates to obtain correction coefficients, correct the spatial coordinates of the curve control points according to the correction coefficients, and substitute the corrected control point coordinates into the quadratic Bezier curve equation to construct a curve parameter model.
[0108] Optionally, this embodiment implements accurate ellipsoid parameter calculation in curvature processing. Based on the WGS84 standard ellipsoid parameters, including the major semi-axis, the minor semi-axis and the flattening, the local curvature characteristics are calculated by Meridian curvature. For different latitudes, the radius of curvature of the meridian circle and the radius of curvature of the meridian circle are dynamically calculated to ensure the accuracy of the curvature calculation. The irregularity of the earth is taken into account in the parameter calculation process, and the accuracy is improved by an iterative method.
[0109] This embodiment designs a professional ellipsoid projection mechanism. The control point projection adopts an improved Gauss projection algorithm, and first establishes a local tangent plane coordinate system. The projection process takes into account the geometric characteristics of the ellipsoid surface, and optimizes the projection deformation through tangent point selection. For control point sequences that span multiple projection bands, seamless splicing projection conversion is achieved to ensure projection continuity.
[0110] This embodiment implements a complex geodetic calculation framework. The geodesic curvature calculation is based on Riemann geometry theory, considering the first fundamental form and the second fundamental form of the surface. The geodesic curvature is calculated by Christopher symbol, reflecting the geometric characteristics of the shortest path on the surface. The curvature calculation process uses tensor analysis method to support high-precision numerical calculation.
[0111] This embodiment constructs a complete curvature influence model. The calculation of the influence factor takes into account the combined effects of the principal curvature, geodesic curvature and local azimuth. The model uses a nonlinear mapping function to ensure that the influence parameters show a reasonable change trend with the change of curvature. For special areas, such as near the poles, the calculation accuracy is optimized by polar coordinate transformation.
[0112] This embodiment realizes efficient coordinate normalization processing. The normalization process first calculates the center of gravity and scale parameters of the control point sequence, and realizes coordinate normalization through translation and scaling transformation. The processing process takes into account numerical stability and ensures the reliability of the transformation through conditional number analysis. The normalization result is verified to be correct through inverse transformation.
[0113] This embodiment designs an accurate weighted combination algorithm. The weight coefficient is determined by an adaptive method, taking into account the spatial distribution and curvature characteristics of the control points. The combination process uses tensor operations to support parallel processing to improve efficiency. A smoothing factor is introduced in the weight adjustment process to avoid discontinuities caused by local mutations.
[0114] This embodiment builds a reliable coordinate correction mechanism. The correction coefficients are applied to the control point coordinates through matrix transformation to ensure the preservation of spatial relationships. The correction process takes into account the changes in the local coordinate system and optimizes the transformation accuracy through the Jacobian matrix. For densely distributed control points, adaptive adjustment based on curvature is achieved.
[0115] This embodiment implements high-order Bezier curve parameterization. Based on the corrected control points, a quadratic Bezier curve equation is constructed to support parametric expression and geometric operations. The parameter model is optimized by the De Castellio algorithm to ensure the smoothness and continuity of the curve. The tension parameter is taken into account during the curve generation process, and the curve shape can be adjusted to meet the needs of different scenarios.
[0116] This embodiment realizes the generation of curves that conform to the curvature characteristics of the earth through accurate curvature calculation and control point correction. While ensuring geometric accuracy, this solution improves computational efficiency through multi-level optimization. The entire processing flow adopts modern computational geometry theory, has a strict mathematical foundation and good practicality. The processing results fully consider the geometric characteristics of the earth's surface, and the generated curves not only meet geodetic standards, but also have good visual effects. This solution provides a reliable mathematical model and geometric data for subsequent three-dimensional visualization.
[0117] In one embodiment of the three-dimensional ray drawing method of the present application, see Figure 5 , and can also include the following:
[0118] Step S501: uniformly sampling the Bezier curve parameter model in the interval [0,1], calculating the parameter equation value corresponding to each sampling point, substituting the parameter equation value into the Bezier curve parameter model to obtain the spatial coordinates of the waypoint, and numerically correcting the spatial coordinates of the waypoint to eliminate calculation errors;
[0119] Step S502: Restore the waypoint coordinates from the Mercator projection coordinate system to the WGS84 geographic coordinate system, calculate the latitude, longitude and elevation values of the waypoint coordinates, sort the starting point coordinates, the restored waypoint coordinates and the end point coordinates according to the spatial position relationship, and build a point set sequence based on a preset data structure to store the sorting results.
[0120] Optionally, this embodiment implements an adaptive parameter partitioning mechanism in Bezier curve sampling. The sampling process first determines the optimal sampling interval through curve arc length analysis, and increases the sampling density for areas with drastic curvature changes. The parameter space is divided using a non-uniform distribution strategy to ensure a more accurate curve expression in key areas. The generation process of sampling points is accelerated through parallel computing to improve processing efficiency.
[0121] This embodiment designs an accurate parametric equation solving framework. The improved Newton-Raphson iteration method is used to solve the equation, and the convergence speed is improved by dynamic step size adjustment. Jacobian matrix correction is introduced in the solution process to ensure the stability of numerical calculation. For special parameter values, Taylor expansion approximate calculation is used to avoid singular point problems.
[0122] This embodiment implements a complex coordinate calculation mechanism. High-precision floating-point operations are used in the spatial coordinate calculation process to retain sufficient effective digits. The coordinate calculation results are verified by geometric constraints to ensure the continuity and smoothness of the point sequence. For the waypoints near the control points, the local accuracy is improved through interpolation optimization.
[0123] This embodiment builds a complete error correction system. The numerical correction first identifies outliers through residual analysis and uses local regression method to eliminate random errors. The correction process takes into account the correlation between coordinate components and optimizes the correction parameters through covariance analysis. For system errors, dynamic correction based on Kalman filtering is implemented.
[0124] This embodiment implements a high-precision coordinate system restoration algorithm. When restoring from the Mercator projection coordinate system to the WGS84 geographic coordinate system, an accurate inverse projection transformation matrix is first constructed. The restoration process uses an iterative method to ensure the conversion accuracy by controlling the residual. For coordinate restoration in high-latitude areas, a polar coordinate compensation mechanism is implemented.
[0125] This embodiment designs a professional latitude and longitude calculation framework. The latitude and longitude values are calculated through the ellipsoid parameter model, taking into account the influence of the earth's flattening. The calculation of the elevation value is based on the earth's ellipsoid, and the accuracy is improved through geoid correction. The accuracy of the result is verified by ellipsoid fitting during the coordinate conversion process.
[0126] This embodiment constructs an efficient spatial sorting mechanism. Based on the relative position relationship of the waypoints, an improved quick sorting algorithm is used to achieve sequence rearrangement. The sorting process takes into account the spatial continuity constraint to ensure that the generated point set sequence conforms to the actual path characteristics. For densely distributed waypoints, the spatial distribution is optimized through cluster analysis.
[0127] This embodiment implements a reliable data structure design. The point set sequence is stored in a bidirectional linked list structure, which supports efficient insertion and deletion operations. The data structure contains location information and attribute data, which is convenient for subsequent rendering and analysis. The storage process implements data compression and index optimization, reducing memory usage.
[0128] This embodiment achieves accurate sampling and restoration of Bezier curves through precise parameter calculation and coordinate conversion. While ensuring geometric accuracy, this solution improves computational efficiency through multi-level optimization. The entire processing flow adopts modern numerical calculation theory, has a strict mathematical foundation and good practicality.
[0129] This embodiment demonstrates unique technical advantages in coordinate system conversion and spatial sorting. Through precise inverse projection transformation and spatial relationship analysis, the accuracy and continuity of the point set sequence are ensured. This solution provides high-quality basic data for subsequent three-dimensional visualization and supports ray rendering and spatial analysis in complex scenes. The processing results fully consider the special needs of the geographic information system, ensuring both data accuracy and good computing performance.
[0130] In one embodiment of the three-dimensional ray drawing method of the present application, see Figure 6 , and can also include the following:
[0131] Step S601: Initializing display parameters of a three-dimensional coordinate system, loading coordinate data of the point set sequence into a coordinate system buffer, calculating a coordinate transformation matrix according to a display viewing angle, performing a geometric transformation on the point set sequence based on the coordinate transformation matrix to obtain compensated coordinate values, and normalizing the compensated coordinate values;
[0132] Step S602: construct a conversion equation from the geodetic coordinate system to the display coordinate system, substitute the geodetic coordinates of the point set sequence into the conversion equation to calculate the display coordinates, establish a spherical projection relationship according to the earth ellipsoid model, and project the compensated point set sequence to the reference spherical space based on the spherical projection relationship.
[0133] Optionally, this embodiment implements complete display parameter configuration when the 3D scene is initialized. Display parameters include key elements such as field of view, near and far clipping planes, and projection type, which are uniformly scheduled through the scene manager. The device resolution and performance characteristics are taken into account during the parameter configuration process to dynamically optimize the rendering quality. For high-resolution display devices, multi-sampling anti-aliasing is automatically enabled to improve edge display effects.
[0134] This embodiment designs an efficient coordinate data caching mechanism. The buffer adopts a multi-level structure, including vertex buffer objects and index buffer objects, to support fast access to large-scale point sets. The data loading process is optimized through asynchronous transmission to reduce main thread blocking. Buffer management implements dynamic memory allocation and adaptively adjusts according to the data scale.
[0135] This embodiment realizes accurate perspective transformation calculation. In the process of constructing the transformation matrix, the observation coordinate system is first determined by the viewpoint position and the target point. The matrix calculation takes into account the intrinsic and extrinsic parameters of the camera, and a smooth perspective transition is achieved through quaternion interpolation. For large-scale scenes, the cone clipping optimization is realized.
[0136] This embodiment builds a complex geometric transformation framework. The transformation process first performs model view transformation, and then maps the three-dimensional scene to a two-dimensional plane through projection transformation. The transformation calculation adopts matrix stack management and supports nested transformation operations. For dynamic scenes, incremental updates of the transformation matrix are implemented.
[0137] This embodiment implements professional coordinate normalization processing. The normalization process takes into account the scene scale and display range, and maps the coordinates to the standardized device coordinate system through affine transformation. During the processing, error analysis is used to ensure accuracy, and special processing strategies are used for boundary conditions.
[0138] This embodiment designs an accurate coordinate system conversion equation. The conversion equation is based on the earth reference system and takes into account the datum difference and projection deformation between different coordinate systems. The equation is solved by iteration and the conversion accuracy is ensured by residual control. For special areas, local parameter correction is implemented.
[0139] This embodiment constructs a complete spherical projection framework. The projection relationship is based on the standard ellipsoid model, and coordinate mapping is achieved through the Gaussian projection principle. The projection process takes into account the influence of the earth's curvature and reduces deformation through zonal projection. For polar projection, stereoscopic projection is used to optimize the display effect.
[0140] This embodiment realizes efficient reference spherical construction. The spherical space is discretized using triangular meshes, and the mesh density is dynamically adjusted according to display requirements. The space division adopts a quadtree structure to support multi-level detail level control. For complex terrain areas, mesh subdivision optimization is achieved.
[0141] This embodiment realizes accurate visualization of point set sequence through display parameter configuration and coordinate transformation. While ensuring the display effect, this solution improves rendering efficiency through multi-level optimization. The entire processing flow adopts modern graphics theory, has a strict mathematical foundation and good practicality.
[0142] This embodiment demonstrates unique technical advantages in coordinate system conversion and spherical projection. Through precise coordinate mapping and projection transformation, accurate expression of spatial relationships is ensured. This solution provides a reliable display foundation for the three-dimensional visualization system and supports interactive operations and spatial analysis in complex scenes. The processing results fully consider the professional needs of the geographic information system, ensuring the accuracy of spatial data while providing a smooth interactive experience.
[0143] In one embodiment of the three-dimensional ray drawing method of the present application, see Figure 7 , and can also include the following:
[0144] Step S701: loading material parameters and lighting parameters for curve rendering, performing cubic spline interpolation on the projected point set sequence, calculating the tangent vector and curvature of the interpolation node, constructing a geometric description of the three-dimensional curve based on the tangent vector and the curvature, converting the geometric description into vertex data and index data, and performing normal vector calculation on the vertex data to obtain a three-dimensional space curve;
[0145] Step S702: Combine the geometric data of the three-dimensional space curve with the starting point name and the end point name into a ray display data structure, perform lighting calculation and depth test on the ray display data according to a preset rendering pipeline configuration, and draw the three-dimensional space curve into a rendering buffer of the three-dimensional map based on the rendering pipeline.
[0146] Optionally, this embodiment implements a complex parameter configuration mechanism in the material system. Material parameters include physical properties such as diffuse reflection coefficient, specular reflection coefficient, and transparency, which are uniformly scheduled through the material manager. Lighting parameter configuration supports multiple light source models, including ambient light, parallel light, and point light sources, and realizes physically based realistic rendering. For lighting changes at different time periods, the lighting parameters are dynamically adjusted to enhance visual realism.
[0147] This embodiment designs an accurate spline interpolation algorithm. The cubic spline interpolation uses natural boundary conditions to ensure the second-order continuity of the curve at the nodes. The interpolation process is constructed by piecewise cubic polynomials, and the coefficients of each segment are obtained by solving a system of linear equations. For dense sampling points, tension parameter adjustment is implemented to control the curve shape.
[0148] This embodiment implements an efficient tangent calculation framework. The tangent vector is calculated by the first-order derivative of the spline function, and the central difference method is used to improve the accuracy. The curvature calculation is based on the rate of change of the tangent vector, and the geometric characteristics of the space curve are derived by the Fresnet formula. For high curvature areas, the sampling density is increased to optimize the display effect.
[0149] This embodiment builds a complete geometry description system. The geometry description includes attribute data such as vertex position, tangent vector, normal vector, etc., which are organized in a structured format. The data conversion process is accelerated by parallel computing to support real-time processing of large-scale curves. The geometry data organization takes into account the GPU rendering architecture and optimizes the memory access mode.
[0150] This embodiment implements a professional normal vector calculation mechanism. The normal vector calculation is based on the tangent vector and the curvature distribution, and the consistency of the vector field is ensured by Gram-Schmidt orthogonalization. The calculation process takes into account the torsion characteristics of the curve, and the local coordinate system is constructed by the Frey internal frame. For singular points, interpolation smoothing is used.
[0151] This embodiment designs an efficient data structure organization. The ray display data structure adopts a hierarchical design, including geometric data, material properties and annotation information. The data organization supports dynamic updates and realizes incremental rendering optimization. The structural design takes into account the requirements of data compression and fast access.
[0152] This embodiment builds a professional rendering pipeline framework. The rendering configuration supports advanced features such as multi-sampling anti-aliasing, depth testing, and transparency blending. The lighting calculation uses deferred rendering technology to separate the geometry processing and lighting processing stages. The depth test uses the Z-buffer algorithm to achieve the correct occlusion relationship.
[0153] This embodiment achieves efficient buffer management. The rendering buffer adopts a multi-buffer mechanism to support asynchronous rendering and vertical synchronization. Buffer allocation takes into account video memory management and achieves dynamic resource scheduling. For large-scale scenes, block rendering optimization is achieved.
[0154] This embodiment achieves realistic display of rays through material rendering and lighting calculation. While ensuring visual effects, this solution improves rendering performance through multi-level optimization. The entire processing flow adopts modern graphics rendering theory, has a strict mathematical foundation and good practicality.
[0155] This embodiment demonstrates unique technical advantages in geometry processing and rendering optimization. Through precise curve construction and efficient rendering pipeline, the smoothness and realism of ray display are ensured. This solution provides a professional rendering engine for the 3D visualization system, supporting real-time display and interactive operations in complex scenes. The processing results fully consider the professional needs of the geographic information system, ensuring the accuracy of spatial data while providing excellent visual expression. Through the optimization of depth testing and lighting calculation, the natural display effect of rays on the earth's surface is achieved, enhancing the intuitive expression of spatial relationships.
[0156] In order to break through the limitations of traditional straight line drawing and realize the true trajectory expression considering the curvature of the earth, the present application provides an embodiment of a three-dimensional ray drawing device for realizing all or part of the content of the three-dimensional ray drawing method, see Figure 8 The three-dimensional ray drawing device specifically includes the following contents:
[0157] The data processing module 10 is used to receive multiple groups of point data, each group of the point data includes a starting point coordinate, an end point coordinate, a starting point name and an end point name, convert the starting point coordinate and the end point coordinate from a geographic coordinate system to a projected coordinate system, calculate the surface distance and azimuth between the starting point coordinate and the end point coordinate, determine the number of control points based on the surface distance, generate multiple candidate control points on the perpendicular bisector of the line connecting the two points, calculate the offset coefficient of each candidate control point in combination with the azimuth, and use the offset candidate control point as a curve control point;
[0158] A coordinate determination module 20 is used to perform curvature correction on the curve control point, calculate the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fuse and correct the influence parameters with the spatial coordinates of the curve control point, construct a Bezier curve parameter model, generate multiple waypoints based on the Bezier curve parameter model, restore the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combine the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence;
[0159] The ray drawing module 30 is used to load the point set sequence in the three-dimensional coordinate system, perform coordinate transformation compensation on the point set sequence, establish a mapping relationship between the geodetic coordinate system and the display coordinate system, project the compensated point set sequence into the spherical space, perform curve fitting on the projected point set sequence based on preset rendering parameters, generate a three-dimensional space curve with curvature correction, combine the three-dimensional space curve with the starting point name and the end point name to form ray display data, and render the three-dimensional space curve on the three-dimensional map based on the ray display data.
[0160] From the above description, it can be seen that the three-dimensional ray drawing device provided in the embodiment of the present application can dynamically generate curve control points by accurately converting the geographic coordinate system and the projection coordinate system, combining the azimuth and the surface distance. An innovative curvature correction mechanism based on the surface projection model is designed, which takes into account the influence of the earth's curvature on the ray trajectory, and realizes smooth spatial trajectory generation through the Bezier curve parameter model. The system uses coordinate transformation compensation and spherical projection technology to establish an accurate mapping between the geodetic coordinate system and the display coordinate system, ensuring the accurate rendering of three-dimensional space curves at different scales and viewing angles, and providing a high-precision technical solution for geographic information visualization. This method breaks through the limitations of traditional straight line drawing and realizes the true trajectory expression that takes into account the curvature of the earth.
[0161] From the hardware level, in order to break through the limitations of traditional straight line drawing and realize the true trajectory expression considering the curvature of the earth, the present application provides an embodiment of an electronic device for realizing all or part of the contents of the three-dimensional ray drawing method, and the electronic device specifically includes the following contents:
[0162] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the three-dimensional ray drawing device and related devices such as the core business system, user terminal and related database; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the three-dimensional ray drawing method and the embodiment of the three-dimensional ray drawing device in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0163] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0164] In practical applications, part of the three-dimensional ray drawing method can be executed on the electronic device side as described above, or all operations can be completed in the client device. The selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0165] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0166] Fig. 9 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig. 9 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig. 9 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0167] In one embodiment, the 3D ray drawing method function may be integrated into the central processing unit 9100. The central processing unit 9100 may be configured to perform the following control:
[0168] Step S101: receiving multiple groups of point data, each group of the point data includes a start point coordinate, an end point coordinate, a start point name and an end point name, converting the start point coordinate and the end point coordinate from a geographic coordinate system to a projection coordinate system, calculating a surface distance and an azimuth between the start point coordinate and the end point coordinate, determining the number of control points based on the surface distance, generating multiple candidate control points on a perpendicular bisector connecting two points, calculating an offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point;
[0169] Step S102: performing curvature correction on the curve control points, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control points, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence;
[0170] Step S103: Load the point set sequence in a three-dimensional coordinate system, perform coordinate transformation compensation on the point set sequence, establish a mapping relationship between the geodetic coordinate system and the display coordinate system, project the compensated point set sequence into a spherical space, perform curve fitting on the projected point set sequence based on preset rendering parameters, generate a three-dimensional space curve with curvature correction, combine the three-dimensional space curve with the starting point name and the end point name to form ray display data, and render the three-dimensional space curve on a three-dimensional map based on the ray display data.
[0171] As can be seen from the above description, the electronic device provided in the embodiment of the present application dynamically generates curve control points by accurately converting the geographic coordinate system and the projection coordinate system, combining the azimuth and the surface distance. An innovative curvature correction mechanism based on the surface projection model is designed, taking into account the influence of the earth's curvature on the ray trajectory, and realizing smooth spatial trajectory generation through the Bezier curve parameter model. The system uses coordinate transformation compensation and spherical projection technology to establish an accurate mapping between the geodetic coordinate system and the display coordinate system, ensuring accurate rendering of three-dimensional space curves at different scales and viewing angles, and providing a high-precision technical solution for geographic information visualization. This method breaks through the limitations of traditional straight line drawing and realizes the true trajectory expression that takes into account the curvature of the earth.
[0172] In another embodiment, the 3D ray drawing device can be configured separately from the CPU 9100. For example, the 3D ray drawing device can be configured as a chip connected to the CPU 9100, and the 3D ray drawing method function is implemented under the control of the CPU.
[0173] like Fig. 9 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig. 9 In addition, the electronic device 9600 may also include Fig. 9 For components not shown, reference may be made to the prior art.
[0174] like Fig. 9 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0175] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0176] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0177] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0178] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0179] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0180] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0181] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all steps of the three-dimensional ray drawing method in the above embodiment, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all steps of the three-dimensional ray drawing method in the above embodiment, where the execution subject is a server or a client, are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0182] Step S101: receiving multiple groups of point data, each group of the point data includes a start point coordinate, an end point coordinate, a start point name and an end point name, converting the start point coordinate and the end point coordinate from a geographic coordinate system to a projection coordinate system, calculating a surface distance and an azimuth between the start point coordinate and the end point coordinate, determining the number of control points based on the surface distance, generating multiple candidate control points on a perpendicular bisector connecting two points, calculating an offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point;
[0183] Step S102: performing curvature correction on the curve control points, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control points, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence;
[0184] Step S103: Load the point set sequence in a three-dimensional coordinate system, perform coordinate transformation compensation on the point set sequence, establish a mapping relationship between the geodetic coordinate system and the display coordinate system, project the compensated point set sequence into a spherical space, perform curve fitting on the projected point set sequence based on preset rendering parameters, generate a three-dimensional space curve with curvature correction, combine the three-dimensional space curve with the starting point name and the end point name to form ray display data, and render the three-dimensional space curve on a three-dimensional map based on the ray display data.
[0185] As can be seen from the above description, the computer-readable storage medium provided in the embodiment of the present application dynamically generates curve control points by accurately converting the geographic coordinate system and the projection coordinate system, combining the azimuth and the surface distance. An innovative curvature correction mechanism based on the surface projection model is designed, taking into account the influence of the earth's curvature on the ray trajectory, and realizing smooth spatial trajectory generation through the Bezier curve parameter model. The system uses coordinate transformation compensation and spherical projection technology to establish an accurate mapping between the geodetic coordinate system and the display coordinate system, ensuring accurate rendering of three-dimensional space curves at different scales and perspectives, and providing a high-precision technical solution for geographic information visualization. This method breaks through the limitations of traditional straight line drawing and realizes the true trajectory expression taking into account the curvature of the earth.
[0186] The embodiments of the present application also provide a computer program product capable of implementing all steps of the three-dimensional ray drawing method in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the three-dimensional ray drawing method are implemented. For example, the computer program / instruction implements the following steps:
[0187] Step S101: receiving multiple groups of point data, each group of the point data includes a start point coordinate, an end point coordinate, a start point name and an end point name, converting the start point coordinate and the end point coordinate from a geographic coordinate system to a projection coordinate system, calculating a surface distance and an azimuth between the start point coordinate and the end point coordinate, determining the number of control points based on the surface distance, generating multiple candidate control points on a perpendicular bisector connecting two points, calculating an offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point;
[0188] Step S102: performing curvature correction on the curve control points, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control points, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence;
[0189] Step S103: Load the point set sequence in a three-dimensional coordinate system, perform coordinate transformation compensation on the point set sequence, establish a mapping relationship between the geodetic coordinate system and the display coordinate system, project the compensated point set sequence into a spherical space, perform curve fitting on the projected point set sequence based on preset rendering parameters, generate a three-dimensional space curve with curvature correction, combine the three-dimensional space curve with the starting point name and the end point name to form ray display data, and render the three-dimensional space curve on a three-dimensional map based on the ray display data.
[0190] As can be seen from the above description, the computer program product provided in the embodiment of the present application dynamically generates curve control points by accurately converting the geographic coordinate system and the projection coordinate system, combining the azimuth and the surface distance. An innovative curvature correction mechanism based on the surface projection model is designed, taking into account the influence of the earth's curvature on the ray trajectory, and realizing smooth spatial trajectory generation through the Bezier curve parameter model. The system uses coordinate transformation compensation and spherical projection technology to establish an accurate mapping between the geodetic coordinate system and the display coordinate system, ensuring accurate rendering of three-dimensional space curves at different scales and viewing angles, and providing a high-precision technical solution for geographic information visualization. This method breaks through the limitations of traditional straight line drawing and realizes the true trajectory expression that takes into account the curvature of the earth.
[0191] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0192] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0193] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0194] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0195] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A three-dimensional ray rendering method, characterized in that: The method comprises: Receive multiple groups of point data, each group of the point data includes a starting point coordinate, an end point coordinate, a starting point name and an end point name, convert the starting point coordinate and the end point coordinate from a geographic coordinate system to a projected coordinate system, calculate the surface distance and azimuth between the starting point coordinate and the end point coordinate, determine the number of control points based on the surface distance, generate multiple candidate control points on the perpendicular bisector of the line connecting the two points, calculate the offset coefficient of each candidate control point in combination with the azimuth, and use the offset candidate control point as a curve control point; Performing curvature correction on the curve control points, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control points, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence; The point set sequence is loaded in a three-dimensional coordinate system, coordinate transformation compensation is performed on the point set sequence, a mapping relationship between a geodetic coordinate system and a display coordinate system is established, the compensated point set sequence is projected into a spherical space, curve fitting is performed on the projected point set sequence based on preset rendering parameters, a three-dimensional space curve with curvature correction is generated, the three-dimensional space curve is combined with the start point name and the end point name to form ray display data, and the three-dimensional space curve is rendered on a three-dimensional map based on the ray display data.
2. The three-dimensional ray rendering method according to claim 1, characterized in that: The receiving of multiple sets of point data, each set of the point data including a starting point coordinate, an end point coordinate, a starting point name and an end point name, converting the starting point coordinate and the end point coordinate from a geographic coordinate system to a projection coordinate system, and calculating a surface distance and an azimuth between the starting point coordinate and the end point coordinate, comprises: Read a data stream containing point information from a data interface, parse the data stream to extract the starting point coordinates, end point coordinates, starting point name and end point name of the point data, perform validity verification on the starting point coordinates and the end point coordinates, establish an index list of point data, and organize and store the verified data in a preset format; The starting point coordinates and the end point coordinates are converted from the WGS84 geographic coordinate system to the Mercator projection coordinate system, the spatial coordinate values of the starting point coordinates and the end point coordinates on the projection plane are calculated according to the projection transformation matrix, the surface distance between the starting point coordinates and the end point coordinates is calculated using the spherical distance formula, and the azimuth of the starting point coordinates and the end point coordinates is calculated based on the projected coordinate values.
3. The three-dimensional ray rendering method according to claim 1, characterized in that: The method of determining the number of control points based on the surface distance, generating a plurality of candidate control points on the perpendicular bisector of the line connecting the two points, calculating the offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point includes: Establish a mapping relationship between the ray length and the number of control points, substitute the surface distance into the mapping relationship to calculate the number of control points, calculate the perpendicular bisector equation of the line connecting the two points according to the spatial positions of the starting point coordinates and the end point coordinates, generate multiple candidate control points on the perpendicular bisector at preset intervals, and calculate the vertical distance from each candidate control point to the line; A control point offset model is established according to the azimuth angle, the spatial coordinates of the candidate control point are substituted into the control point offset model to calculate the benchmark offset value of each control point, the benchmark offset value is weighted based on the vertical distance to obtain an offset coefficient, and the offset coefficient is multiplied by the spatial coordinates of the candidate control point to obtain the offset control point coordinates.
4. The three-dimensional ray rendering method according to claim 1, characterized in that: The curvature correction is performed on the curve control points, and the influence parameters of the earth curvature on the ray trajectory are calculated based on the surface projection model, and the influence parameters are fused and corrected with the spatial coordinates of the curve control points to construct a Bezier curve parameter model, including: Calculate the radius of curvature according to the parameters of the earth ellipsoid, project the curve control point onto the reference ellipsoid, calculate the main curvature and geodesic curvature of the curve control point on the ellipsoid based on the geodetic model, construct an earth curvature influence factor calculation model, substitute the main curvature and geodesic curvature into the earth curvature influence factor calculation model to obtain the influence parameter; The spatial coordinates of the curve control points are normalized, the influencing parameters and the normalized spatial coordinates are weightedly combined to obtain correction coefficients, the spatial coordinates of the curve control points are corrected according to the correction coefficients, and the corrected control point coordinates are substituted into the quadratic Bezier curve equation to construct a curve parameter model.
5. The three-dimensional ray rendering method according to claim 1, characterized in that: The method of generating a plurality of waypoints based on the Bezier curve parameter model, restoring the coordinates of the waypoints from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in spatial position order to form a point set sequence includes: The Bezier curve parameter model is uniformly sampled in the interval [0,1], the parameter equation value corresponding to each sampling point is calculated, the parameter equation value is substituted into the Bezier curve parameter model to obtain the spatial coordinates of the waypoint, and the spatial coordinates of the waypoint are numerically corrected to eliminate calculation errors; The waypoint coordinates are restored from the Mercator projection coordinate system to the WGS84 geographic coordinate system, the longitude, latitude and elevation values of the waypoint coordinates are calculated, the starting point coordinates, the restored waypoint coordinates and the end point coordinates are sorted according to the spatial position relationship, and a point set sequence is constructed based on a preset data structure to store the sorting results.
6. The three-dimensional ray rendering method according to claim 1, characterized in that: The step of loading the point set sequence in the three-dimensional coordinate system, performing coordinate transformation compensation on the point set sequence, establishing a mapping relationship between the earth coordinate system and the display coordinate system, and projecting the compensated point set sequence into the spherical space includes: Initialize the display parameters of the three-dimensional coordinate system, load the coordinate data of the point set sequence into the coordinate system buffer, calculate the coordinate transformation matrix according to the display viewing angle, perform geometric transformation on the point set sequence based on the coordinate transformation matrix to obtain compensated coordinate values, and normalize the compensated coordinate values; Construct a conversion equation from the geodetic coordinate system to the display coordinate system, substitute the geodetic coordinates of the point set sequence into the conversion equation to calculate the display coordinates, establish a spherical projection relationship according to the earth ellipsoid model, and project the compensated point set sequence to the reference spherical space based on the spherical projection relationship.
7. The three-dimensional ray rendering method according to claim 1, characterized in that: The method includes performing curve fitting on the projected point set sequence based on preset rendering parameters to generate a three-dimensional space curve with curvature correction, combining the three-dimensional space curve with the start point name and the end point name to form ray display data, and rendering the three-dimensional space curve on a three-dimensional map based on the ray display data, including: Loading material parameters and lighting parameters for curve rendering, performing cubic spline interpolation on the projected point set sequence, calculating the tangent vector and curvature of the interpolation node, constructing a geometric description of the three-dimensional curve based on the tangent vector and the curvature, converting the geometric description into vertex data and index data, and performing normal vector calculation on the vertex data to obtain a three-dimensional space curve; The geometric data of the three-dimensional space curve is combined with the starting point name and the end point name into a ray display data structure, lighting calculation and depth test are performed on the ray display data according to a preset rendering pipeline configuration, and the three-dimensional space curve is drawn to a rendering buffer of a three-dimensional map based on the rendering pipeline.
8. A three-dimensional ray rendering device, characterized in that: The device comprises: A data processing module, for receiving a plurality of groups of point data, each group of the point data comprising a starting point coordinate, an end point coordinate, a starting point name and an end point name, converting the starting point coordinate and the end point coordinate from a geographic coordinate system to a projected coordinate system, calculating a surface distance and an azimuth between the starting point coordinate and the end point coordinate, determining the number of control points based on the surface distance, generating a plurality of candidate control points on a perpendicular bisector connecting two points, calculating an offset coefficient of each candidate control point in combination with the azimuth, and using the offset candidate control point as a curve control point; A coordinate determination module, for performing curvature correction on the curve control point, calculating the influence parameters of the earth curvature on the ray trajectory based on the curved surface projection model, fusing and correcting the influence parameters with the spatial coordinates of the curve control point, constructing a Bezier curve parameter model, generating a plurality of waypoints based on the Bezier curve parameter model, restoring the waypoint coordinates from the projection coordinate system to the geographic coordinate system, and combining the restored waypoint coordinates with the starting point coordinates and the end point coordinates in the order of spatial positions to form a point set sequence; A ray drawing module is used to load the point set sequence in a three-dimensional coordinate system, perform coordinate transformation compensation on the point set sequence, establish a mapping relationship between the geodetic coordinate system and the display coordinate system, project the compensated point set sequence into a spherical space, perform curve fitting on the projected point set sequence based on preset rendering parameters, generate a three-dimensional space curve with curvature correction, combine the three-dimensional space curve with the start point name and the end point name to form ray display data, and render the three-dimensional space curve on a three-dimensional map based on the ray display data.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the three-dimensional ray drawing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the three-dimensional ray drawing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Shield segment attitude measurement method based on three-dimensional laser scanning technology
CN112161614A
Application for forming a sheet structure from a foldable material
US20180101982A1