Method, device, equipment and system for generating continuous linear construction on irregular spherical surface

By generating predictive step vectors and terrain adaptation detection on irregular spheres, and combining them with local surface normals for path attitude correction, the problems of clipping and suspension of linear structures on irregular spheres are solved, achieving a high degree of visual coherence and physical fit.

CN122134959APending Publication Date: 2026-06-02GUANGDONG TIANYUN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG TIANYUN TECH CO LTD
Filing Date
2026-02-27
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing linear structure generation schemes cannot effectively perceive terrain height variations on irregular spheres, causing structures to frequently penetrate the interior of mountains or become suspended above valleys, and making it difficult to achieve attitude alignment between adjacent segments, resulting in gaps or misalignments.

Method used

The predicted step vector is generated by predicting the spatial offset based on the current path orientation. The target landing coordinates are determined by combining terrain adaptation detection. The path attitude is corrected based on the local surface normal, and a corrected growth tangent adapted to the local terrain is generated.

Benefits of technology

This ensures that the structure can accurately "land" on the real surface of the irregular sphere, solving the problem of path generation deviating from the actual terrain height in traditional solutions. It achieves a high degree of fit between the structure and the terrain, eliminates misalignment and breakage between models, and ensures the overall coherence of the linear structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134959A_ABST
    Figure CN122134959A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and system for generating continuous linear structures on an irregular spherical surface. The method, in response to a path generation command, performs spatial offset prediction processing based on the current path orientation to generate a predicted step vector and a predicted growth position; based on the predicted growth position, it performs terrain adaptation detection processing to determine the target landing coordinates and local surface normal on the irregular spherical surface; based on the local surface normal, it performs path attitude correction processing on the predicted step vector to generate a corrected growth tangent adapted to the local terrain, and accordingly generates a segmented structural model placed at the target landing coordinates. This application, through a closed-loop mechanism of spatial prediction and terrain adaptive correction, effectively alleviates the problems of clipping, suspension, and connection breaks caused by linear structures on irregular spherical terrain, improving the fit and continuity of the structure with the complex surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer graphics and virtual simulation technology, and more specifically, to a method, apparatus, device, and system for generating continuous linear structures on an irregular sphere. Background Technology

[0002] In 3D digital planets or procedural generation engines, irregular spherical terrain is often driven by complex noise functions, exhibiting dramatic undulations. To construct continuous linear structures such as the Great Wall, roads, or pipelines on these undulating surfaces, a geometric generation scheme that can adapt to terrain changes is needed to ensure the physical consistency and visual coherence of the structures with the surface.

[0003] Existing linear construction generation schemes typically employ linear interpolation techniques based on preset key points. This scheme first presets a series of path control points on a sphere, then performs 3D linear interpolation between adjacent control points to determine the spatial coordinates of the midpoint of the path, and finally places standard model assets along the path direction.

[0004] However, this linear interpolation-based approach has significant technical drawbacks. Due to the high-frequency slope variations in irregular spherical terrain, simple linear interpolation cannot capture the actual height undulations of the terrain, resulting in generated structures frequently penetrating the interior of mountains or creating unreasonable suspensions above valleys. Furthermore, because the spherical normal directions differ across geographical locations, traditional model placement methods struggle to align the poses of adjacent segments, easily creating noticeable gaps or misalignments at connections, thus failing to meet the generation requirements for continuous linear structures in complex spherical environments. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a method, apparatus, device, and system for generating continuous linear structures on an irregular spherical surface, thereby at least alleviating the aforementioned technical problems.

[0006] A method for generating continuous linear structures on an irregular sphere includes: Step 1, responding to a path generation command, performing spatial offset prediction processing based on the orientation of the current path to generate a predicted step vector and the corresponding predicted growth position; Step 2, performing terrain adaptation detection processing based on the predicted growth position to determine the target landing coordinates and the corresponding local surface normal on the irregular sphere; Step 3, performing path attitude correction processing on the predicted step vector based on the local surface normal to generate a corrected growth tangent adapted to the local terrain, and thereby generating a segmented structural model placed at the target landing coordinates.

[0007] A continuous linear structure generation device on an irregular sphere includes: a path prediction module for performing spatial offset prediction processing based on the orientation of the current path to generate a predicted step vector characterizing the structure growth trend and the corresponding predicted growth position; a terrain adaptation module for performing terrain adaptation detection processing based on the predicted growth position to determine the target landing coordinates and the corresponding local surface normal of the predicted growth position on the irregular sphere; and a geometric correction generation module for performing path attitude correction processing on the predicted step vector based on the local surface normal to generate a corrected growth tangent adapted to the local terrain, and thereby generating a segmented structural model placed at the target landing coordinates.

[0008] An electronic device includes a processor and a memory; the memory stores instructions executable by the processor, which, when executed by the processor, implement the above-described method for generating continuous linear structures on an irregular sphere.

[0009] A continuous linear structure generation system on an irregular sphere includes: a path planning terminal, the aforementioned continuous linear structure generation device on an irregular sphere, and a scene building engine. The path planning terminal is used to acquire the user-input path start parameters and morphological perturbation coefficients, and generate path generation instructions accordingly, which are then sent to the continuous linear structure generation device on the irregular sphere. The continuous linear structure generation device on the irregular sphere is used to obtain a structural segment model and its corresponding target landing coordinates based on the path generation instructions through spatial prediction and terrain adaptation detection. The scene building engine is used to acquire the structural segment model output by the continuous linear structure generation device on the irregular sphere, and perform spatial alignment processing with the target landing coordinates in the virtual spherical environment to achieve real-time growth and rendering of linear structures on the irregular sphere.

[0010] This application's method for generating continuous linear structures on irregular spherical surfaces addresses the technical shortcomings of traditional key-point interpolation schemes, such as clipping, suspension, and connection breaks. It solves the problem of path generation deviating from actual terrain height in traditional schemes by performing spatial offset prediction based on the current path orientation and generating predicted growth positions, combined with terrain adaptation detection processing to determine target landing coordinates. Compared to the fixed linear paths in traditional schemes, this application ensures that each growth node of the structure accurately "lands" on the real surface of the irregular sphere through intersection detection of probe rays and terrain meshes. This allows the structure to automatically adjust its height according to terrain undulations, effectively mitigating the problem of structures encroaching on mountains or being suspended in valleys, achieving a high degree of surface fit.

[0011] This approach, which performs path attitude correction on the predicted step vector based on local surface normals and generates corrected growth tangents, solves the problem of traditional methods failing to achieve accurate connection of segmented models on a sphere with varying normals. Traditional methods neglect local slope variations, leading to gaps between model segments. This application, however, projects displacement components onto a local tangent plane defined by the local surface normals, ensuring that the corrected growth tangent always cuts into the local terrain surface. This surface normal-based reprojection correction allows each structural segment to undergo attitude fine-tuning according to local slope trends. Compared to traditional methods, this results in smoother model connections, effectively eliminating misalignment and breakage, and ensuring the overall coherence of the linear structure.

[0012] By introducing a normal perturbation component and a growth-based iterative mechanism, this application solves the problems of rigid morphology and difficulty in adapting to complex path requirements in traditional structure generation schemes. This application utilizes a periodic fluctuation function to generate an offset perpendicular to the tangent direction, endowing the path with a natural, meandering growth characteristic. Combined with attitude alignment processing using a three-dimensional rotation matrix, the generated long-distance linear structures not only macroscopically conform to the curvature of a sphere but also exhibit rich morphological variations microscopically. This closed-loop iterative logic of "prediction-adsorption-correction" enables this application to respond in real-time to high-frequency terrain changes on irregular spherical surfaces, and the generated linear structures exhibit better stability and adaptability under complex working conditions. Attached Figure Description

[0013] Figure 1 This application provides a method for generating continuous linear structures on an irregular spherical surface.

[0014] Figure 2 This application provides an embodiment of a device for generating continuous linear structures on an irregular spherical surface.

[0015] Figure 3 This is an electronic device according to an embodiment of the present application.

[0016] Figure 4 This application provides an embodiment of a continuous linear structure generation system on an irregular spherical surface. Detailed Implementation

[0017] like Figure 1The diagram illustrates a method for generating continuous linear structures on an irregular sphere according to an embodiment of this application. The method includes: Step 1: In response to a path generation command, performing spatial offset prediction processing based on the orientation of the current path to generate a predicted step vector and a corresponding predicted growth position; Step 2: Performing terrain adaptation detection processing based on the predicted growth position to determine the target landing coordinates and corresponding local surface normals corresponding to the predicted growth position on the irregular sphere; Step 3: Performing path attitude correction processing on the predicted step vector based on the local surface normals to generate a corrected growth tangent adapted to the local terrain, and thereby generating a segmented structural model placed at the target landing coordinates.

[0018] Optionally, step 1 includes: step 11, obtaining the tangent component and the preset normal perturbation component of the current path position; step 12, performing superposition operation on the tangent component and the normal perturbation component, and performing vector normalization processing to generate a predicted step vector; step 13, performing displacement update processing on the current path position based on the predicted step vector to obtain the predicted growth position.

[0019] Preferably, in the specific technical implementation of step 12, the process of performing superposition operation and vector normalization to determine the path growth trend is as follows: In the process of generating continuous linear structures such as the Great Wall or roads on an irregular sphere (e.g., a digital planet with undulating terrain features), firstly, the tangent component representing the main forward direction of the path, calculated in the previous step, is obtained, and a preset travel step lengthening coefficient (e.g., a constant set to zero three units in a virtual 3D scene) is retrieved. The tangent component and the travel step lengthening coefficient are then subjected to vector scaling to generate the tangent axis dominant component representing the growth trend of the main axis of the structure. Simultaneously, in this application, the normal perturbation component representing the lateral offset intention, calculated based on the sinusoidal wave function in the previous step, is obtained, and a preset perturbation amplitude weighting coefficient is retrieved. The normal perturbation component and the perturbation amplitude weighting coefficient are then subjected to vector scaling to generate the lateral oscillation component representing the local meandering trend.

[0020] Preferably, after obtaining the two components mentioned above, this application drives the tangential dominant component and the lateral oscillation component to perform a vector superposition operation. By linearly accumulating the corresponding axial coordinate components of the two vectors, a preliminary predicted displacement vector characterizing the composite motion trend is obtained. The obtained preliminary predicted displacement vector integrates the forward thrust of the linear structure and the lateral deflection force driven by the sine wave. To ensure that the geometric length of each growth segment of the subsequently generated linear structure on the irregular spherical surface remains highly consistent, this application then performs vector normalization processing on the preliminary predicted displacement vector. Specifically, this application calculates the sum of squares of the preliminary predicted displacement vector and performs a square root operation to extract its magnitude value. Subsequently, each axial component of the preliminary predicted displacement vector is divided by this magnitude value, thereby constraining the magnitude of the composite vector to a constant unit length (e.g., a constant of 1), and thus generating a predicted step vector.

[0021] Preferably, the generated predicted step vector, by balancing the stability of the main-direction growth with the natural fluctuations of lateral perturbations, can effectively guide subsequent paths to perform smooth extension on irregular spheres with a low mutation rate. The obtained predicted step vector is then passed as a spatial displacement operator to the subsequent displacement update process. In this application, the predicted step vector is used to perform coordinate superposition on the current path starting position to calculate the growth coordinates for the next stage. Through this technical approach of superimposing lateral perturbations and implementing unitized constraints, the linear structure generated in this application can maintain high geometric continuity when traversing severe terrain undulations and presents a natural, meandering feel that conforms to the terrain characteristics on a macroscopic visual level, effectively solving the technical bottleneck of the rigid form of traditional path generation algorithms mentioned in the background art.

[0022] Preferably, the specific implementation process of step 13 is as follows: In this application, a predicted step vector (which is obtained by superimposing the normalized tangential travel component and the normal perturbation component) representing the next segmental growth direction of the linear construction and whose modulus is constrained to a unit length, generated by the previous step 12, is obtained. Simultaneously, the current path position, representing the three-dimensional spatial coordinates of the current growth end of the linear construction in the world coordinate system, is retrieved from the memory. In this application, the current path position and the predicted step vector are subjected to coordinate vector superposition. By performing the coordinate vector superposition operation, the current path position is mapped by displacement increment according to the spatial dimension indicated by the predicted step vector to generate a predicted growth position. The obtained predicted growth position initially defines the theoretical landing coordinates of the linear construction within the current growth step cycle in terms of geometric topology. The predicted growth location is then used as a key input object in the subsequent terrain adaptation detection process in step 2. By constructing a detection ray pointing towards the center of the sphere from this location and performing terrain mesh intersection calculation, it is ensured that the subsequently generated structural segment model can be accurately and smoothly attached to the irregular spherical terrain undulation surface. This effectively solves the technical bottleneck mentioned in the background art, where the structure is suspended or clipped due to the generation logic deviating from the real elevation undulation.

[0023] Optionally, step 11 includes: step 111, determining the tangent component of the current path position based on the path growth step size; step 112, calculating the offset increment perpendicular to the tangent component based on a periodic oscillation function, as the normal phase perturbation component. The periodic oscillation function is, for example, a sine wave function.

[0024] Preferably, the specific implementation process of step 111 is as follows: When performing programmed growth of continuous linear structures such as the Great Wall, roads, or pipelines on an irregular spherical surface (such as the surface of a planet with undulating and noisy terrain), in order to determine the basic travel trend of the structure within the current step cycle, the path pointing unit vector representing the current path growth direction is first obtained. Subsequently, in this application, a preset path growth step size parameter (e.g., a step value set to three units from zero in a virtual three-dimensional coordinate system) is retrieved, and the path pointing unit vector and the path growth step size parameter are driven to perform vector product scaling processing. By performing this vector product scaling processing, the forward direction of the path is quantized and integrated with the preset segment length to generate the tangent component of the current path position. The obtained tangent component of the current path position accurately defines the ideal displacement increment of the structure under conditions free from external interference. The generated tangent component of the current path position is then passed as the principal axis reference component to the subsequent superposition operation process, providing dynamic support for the subsequent synthesis of the final growth direction.

[0025] Preferably, in the specific technical implementation of step 112: To enable the generated linear structure to exhibit a meandering appearance consistent with natural geographical features on an irregular sphere, this application introduces a wave perturbation mechanism. First, a preset sinusoidal wave function is invoked, with the cumulative growth length or iteration step number of the current linear structure as the input variable. Periodic oscillation numerical calculations are performed through the sinusoidal wave function, generating a perturbation scalar amplitude representing the lateral deviation weight. Simultaneously, the previously calculated path-pointing unit vector is obtained, and combined with the current surface normal vector, a lateral offset reference vector is determined by performing a vector cross product operation or orthogonal basis reconstruction. This vector vector lies within the local surface tangent plane and is perpendicular to the path-pointing unit vector. Subsequently, the lateral offset reference vector and the perturbation scalar amplitude are multiplied to generate a normal phase perturbation component. The obtained normal phase perturbation component represents the lateral displacement shift of the structure driven by wave logic during its current growth stage. The generated normal phase perturbation component is then passed to the subsequent superposition operation process to perform vector summation composition with the tangent component of the current path position generated above.

[0026] Preferably, in one scenario, through the coordinated operation of steps 111 and 112 above, this application obtains the tangent component and the normal perturbation component of the current path position produced above, and drives them to perform vector superposition operation. By performing this superposition operation, this application geometrically fuses the forward momentum of the path with the lateral deflection perturbation to generate a predicted growth step vector characterizing the composite growth trend. The obtained predicted growth step vector is then subjected to vector normalization processing (i.e., the unitization operation of dividing each axis component by the total vector magnitude) to generate a predicted step vector. This technical processing method, which determines the forward reference by the path growth step size and introduces vertical displacement perturbation by combining periodic fluctuation function, enables the linear structure generated by this application to adaptively produce a high degree of natural tortuosity. Compared with the traditional scheme that only relies on key point interpolation, it effectively eliminates the mechanical stiffness of the structure on complex spherical terrain and improves the visual fit between the linear structure and the irregular spherical terrain. The resulting predicted step vector then participates in the subsequent displacement update process, driving the structure to perform spatial migration towards the predicted growth location.

[0027] Optionally, step 2 includes: step 21, constructing a probe ray pointing towards the center of the sphere, starting from the predicted growth location; step 22, performing intersection detection with the probe ray and the preset terrain grid to obtain the intersection point of the probe ray and the terrain grid as the target landing coordinates, and extracting the surface normal at the intersection point as the local surface normal.

[0028] Preferably, the specific implementation process of step 21 is as follows: First, the predicted growth position generated in the preceding step one is obtained. This position represents the theoretical spatial landing point of the linear structure segment within the current growth cycle. Simultaneously, the coordinates of the center of the sphere representing the geometric core of the current virtual planet are obtained, serving as the geometric reference point for terrain repositioning and altitude detection. Subsequently, by calculating the spatial relative displacement component of the predicted growth position relative to the coordinates of the center of the sphere, a terrain detection pointing vector from the growth point to the core of the planet is determined. Finally, the predicted growth position is used as the emission source point of the ray, and ray construction processing is performed in conjunction with the terrain detection pointing vector to generate a terrain detection ray perpendicular to the Earth's center. The obtained terrain detection ray, as a high-precision surface-adaptive detection medium, provides a definite geometric path guide for subsequent identification of physical intersections on irregular terrain grids, ensuring that the generated linear structure can ultimately and accurately adhere to the real terrain undulation surface due to the guidance of this ray. This effectively solves the problem mentioned in the background art of linear structures being suspended or clipping due to their inability to perceive changes in terrain elevation.

[0029] Preferably, in the specific technical implementation of step 21, this application obtains the three-dimensional spatial coordinate data of the predicted growth location and retrieves the corresponding coordinates of the sphere's center, driving the two to perform vector subtraction to extract directional features, thereby generating a terrain detection pointing vector. After obtaining the terrain detection pointing vector, it is bound to the predicted growth location using spatial parameters to construct a terrain detection ray with starting point and directional attributes. The obtained terrain detection ray then participates in the subsequent terrain adaptation detection processing in step 22. By driving the terrain detection ray to perform intersection and collision detection with a preset terrain mesh, this application can calculate the physical contact point between the ray and the ground surface, thereby determining the actual landing position of the structure under complex slopes. This logic of radial detection from the predicted point to the sphere's center ensures that the growth of the linear structure is always under the radial constraint of the sphere, enabling the generated structure to adapt to high-frequency terrain changes on irregular spherical surfaces to a high degree.

[0030] Preferably, the specific implementation process of step 22 is as follows: In this application, the probe ray representing the vertical exploration trend constructed in the previous steps is obtained, and a pre-stored terrain mesh reflecting the distribution of planetary topographic relief is retrieved. In this application, the probe ray is driven to perform a physical intersection calculation with the set of triangular faces in the terrain mesh. By performing the physical intersection calculation, this application captures the physical collision point where the ray first touches the mesh surface in three-dimensional space, and determines the coordinates of this point as the target landing coordinates. The obtained target landing coordinates accurately calibrate the true altitude position that the linear structure segment should be on the irregular curved surface. The generated target landing coordinates are then used as the reference point for subsequent growth positioning in the subsequent path attitude correction process. By attaching the growth endpoint to the real physical surface, the geometric islands caused by the structure detaching from the terrain are eliminated.

[0031] Preferably, in the specific implementation of step 22, the surface normals at the intersection points are extracted to generate local surface normals. In this application, after determining the target landing coordinates, the geometric normal distribution characteristics of the terrain mesh near the current physical collision point are analyzed. Specifically, this application identifies the unit normal vector of the triangular facet containing the target landing coordinates and performs a normal vector parameter extraction operation to generate local surface normals. The obtained local surface normals reflect the instantaneous slope angle and curvature direction of the surface at that geographical location in real time. The generated local surface normals are then passed to the subsequent attitude correction process as the core reference vector for defining the local surface tangent plane. Through the real-time correction of the model height by the target landing coordinates and the sensitive perception of the terrain undulation direction by the local surface normals, this application can cope with various micro-terrain features with high-frequency changes on irregular spheres to a high extent, effectively avoiding the technical bottlenecks in the background technology caused by the generation logic ignoring terrain undulations, such as structures being suspended over a large area or penetrating into the interior of mountains.

[0032] Optionally, step 3 includes: step 31, calculating the displacement component from the current path position to the target landing coordinates; step 32, projecting the displacement component onto a local tangent plane defined by the local surface normal, and performing normalization processing to generate a corrected growth tangent that closely follows the direction of surface undulation; step 33, constructing a three-dimensional rotation matrix using the corrected growth tangent and the local surface normal, performing attitude alignment processing on the preset structure resource based on the three-dimensional rotation matrix, and placing it at the target landing coordinates to form a segmented structural model.

[0033] Preferably, in the specific technical implementation of step 31, the current path position coordinate data representing the end of the previous segment growth of the linear structure is first obtained, and the target landing coordinates calculated on the irregular terrain grid by the previous terrain adaptation detection processing are retrieved simultaneously. The obtained target landing coordinates represent the actual physical landing point of the linear structure on the irregular sphere within the current growth cycle. Subsequently, the target landing coordinates and the current path position are subjected to coordinate vector subtraction composite processing. By performing the coordinate vector subtraction composite processing, the original spatial displacement vector representing the spatial displacement characteristics is calculated in this application. The obtained original spatial displacement vector quantifies the spatial displacement span required for the linear structure to migrate from the previous node to the current real terrain surface, providing basic displacement data support for subsequent elimination of path attitude deviations caused by terrain undulations.

[0034] Preferably, in one scenario, step 31 is implemented as follows: In this application, the original spatial displacement vector generated by the preceding steps is obtained and used as the core input operator of the attitude correction process. Since the original spatial displacement vector directly connects the geometric endpoints of two adjacent structural segments, its spatial orientation includes displacement trend characteristics influenced by the curvature and elevation changes of the planet's surface. The generated original spatial displacement vector is then passed to the subsequent projection processing flow to perform orthogonal projection with the local surface normal extracted from the local terrain features. By calculating the mapping component of the original spatial displacement vector on the local tangent plane defined by the local surface normal, this application can filter out the interference components perpendicular to the surface from the original spatial displacement vector, thereby producing a corrected growth tangent line that closely follows the surface orientation. This technical approach, which uses the reverse calculation of spatial displacement based on the landing point of the real terrain, ensures that each segment of the generated structural model can adaptively follow the slope undulation of the irregular sphere to perform pose correction. This effectively solves the bottlenecks mentioned in the background technology, such as model connection breaks or visual suspension that are prone to occur in linear structures in mountainous or steep canyon areas.

[0035] Preferably, the specific implementation process of step 32 is as follows: In application scenarios involving continuous linear structure generation for irregular spherical surfaces (such as planetary surfaces driven by noise functions and exhibiting severe undulations), to ensure the logical continuity of terrain when the structure crosses mountains or canyons, the original spatial displacement component representing the direction from the previous growth point to the current growth point, calculated by the preceding steps, is first obtained, and the surface normal at the current location, extracted from the collision points of the terrain mesh by the preceding terrain exploration process, is simultaneously retrieved. Subsequently, in this application, the original spatial displacement component and the surface normal at the current location are subjected to vector dot product processing to calculate the projected scalar length of the displacement component along the normal axis. Next, in this application, the projected scalar length and the surface normal at the current location are subjected to vector scaling product processing to generate a feature vector representing the height deviation perpendicular to the local surface undulations. Based on this, this application uses the original spatial displacement component minus the height deviation feature vector to perform vector projection elimination processing, thereby geometrically mapping the original displacement trend completely to the local tangent plane defined by the surface normal at the current location. Through this vector projection elimination processing, this application generates a preliminary tangent component characterizing the local tangential trend, which effectively eliminates interference from components perpendicular to the slope. Subsequently, this application performs normalization operator processing on the preliminary tangent component (i.e., dividing each axial component by the total modulus value of the preliminary tangent component), thereby generating a corrected growth tangent closely following the direction of surface undulation.

[0036] Preferably, in the specific technical implementation of step 32 above, by reprojecting the original spatial displacement components onto the local tangent plane, the generated corrected growth tangent not only retains the original trajectory of the structure but also, in essence, achieves precise capture of the instantaneous terrain slope direction. The result of this processing, the corrected growth tangent, eliminates the tangential deviation caused by the elevation difference between the target landing point and the previous path position. The generated corrected growth tangent is then passed as a key spatial orientation reference to the subsequent three-dimensional rotation matrix construction process. Through the vector cross product and alignment operation of the corrected growth tangent and the aforementioned surface normal at the current position, this application can calculate the coordinate system rotation parameters adapted to the local terrain height, thereby generating a seamlessly connected structural segment model. This mechanism, which reconstructs the traveling tangent in real time based on local terrain normals, ensures that the generated linear structures can always present a high degree of visual smoothness and physical fit when crossing high-frequency changing terrain areas. It effectively solves the bottlenecks in the background technology, such as model connection breaks, misalignments, and visual clipping or suspension caused by the inability of traditional linear interpolation to adapt to slope changes.

[0037] Optionally, step 33 includes: step 331, determining the local coordinate system of the structural segment model through matrix calculation based on the target landing coordinates, the corrected growth tangent, and the local surface normal; step 332, performing spatial rotation and positioning on the structural segment model according to the local coordinate system.

[0038] Preferably, in the specific technical implementation of step 331, the process of determining the local coordinate system of the segmented structural model through matrix calculation is as follows: In the dynamic process of generating an irregular sphere (e.g., a digital planetary surface driven by noise and with drastic terrain undulations), the target landing coordinates calculated in the previous step are first obtained (these coordinates represent the actual physical location of the model's mesh collision on the irregular terrain), and the corrected growth tangent representing the current path growth direction trend (this tangent has undergone projection processing to fit the local terrain) and the local surface normal representing the terrain slope characteristics at the landing point are retrieved simultaneously. In this application, the corrected growth tangent and the local surface normal are driven to perform a vector cross product operation. By calculating the normal vector of the two orthogonal trend vectors, the lateral support vector representing the horizontal direction of the model's local space is obtained. The obtained lateral support vector, due to its integration of the geometric characteristics of terrain slope and growth direction, ensures that the generated coordinate system can adaptively deflect with the curvature of the sphere in the lateral direction.

[0039] Preferably, in a scenario, to ensure the visual coherence of the linear structure, this application obtains the aforementioned generated lateral support vector and drives the lateral support vector to perform a vector cross product operation with the corrected growth tangent. By performing this second cross product process, this application corrects and produces a local vertical vector that is completely perpendicular to the local surface and orthogonal to the growth direction. The obtained local vertical vector represents the local upward reference of the model segment under the current terrain. Subsequently, this application maps the lateral support vector, the local vertical vector, and the corrected growth tangent as coordinate axis components to the rotation basis vectors of the three-dimensional spatial transformation matrix (for example, assigning them to the first three column vectors of a fourth-order matrix), and combines the target landing coordinates as the translation component of the matrix, thereby generating the local coordinate system of the structural segment model.

[0040] Preferably, the local coordinate system of the structural segment model generated in step 331 technically quantifies the spatial pose of each structural segment on the irregular sphere. Because the local surface normal, which changes in real-time with terrain undulations, is introduced as an alignment reference during the construction of this coordinate system, the final generated structural segment model can closely fit the surface mesh with a high degree of accuracy. This process of reconstructing the matrix through dynamic basis vectors effectively eliminates the model interface gaps caused by inconsistent spherical normals in traditional interpolation schemes, as adjacent structural segment models share the pose characteristics of their connection points (e.g., sharing the growth endpoint of the previous segment as the starting point of this segment, and the tangent direction maintaining mathematical continuity through normal projection). The result of this process, the generated pose matrix, is then passed to the subsequent model instantiation process, driving the structural resources to perform precise pose alignment and rendering on the virtual planet.

[0041] Preferably, the specific implementation process of step 332 is as follows: In the attitude calculation process for generating continuous linear structures such as the Great Wall and roads on irregular spherical surfaces (such as the surface of a virtual planet with high-frequency terrain undulations), the local coordinate system of the structural segment model (stored in the form of a matrix or attitude operator, internally integrating rotational basis components that are fully adapted to the current terrain slope) is first obtained based on the calculation of the modified growth tangent and local surface normal in the previous step, and the prefabricated structural resources to be placed are obtained simultaneously. Subsequently, in this application, the segmented attitude rotation operator representing the three-dimensional spatial pointing characteristics is extracted from the local coordinate system of the structural segment model. Next, in this application, the segmented attitude rotation operator is driven to act on the geometric vertex data of the prefabricated structural resources, and by performing vector space transformation and attitude redirection actions, the local coordinate axes (e.g., the logical forward axis and upward axis) of the prefabricated structural resources are aligned with the modified growth tangent and the local surface normal, respectively. By performing the aforementioned attitude repositioning action, this application generates an aligned segmented model that is completely "leveled" to the local surface slope in terms of spatial orientation. The resulting aligned segmented model ensures that the structure visually conforms to the terrain, providing a deterministic attitude basis for eliminating misalignment between segments.

[0042] Preferably, after generating the aligned segmented model, this application further executes spatial positioning logic. Specifically, this application obtains the target landing coordinates, representing the current physical collision point location, produced by the preceding terrain exploration process. Subsequently, this application drives the geometric center point (or its reference bottom mounting point) of the aligned segmented model to migrate to the spatial coordinate position pointed to by the target landing coordinates, and performs world space displacement mapping processing. By performing the world space displacement mapping processing, this application accurately attaches the model instance, originally located in the abstract coordinate space, to the surface of the irregular spherical terrain grid, thereby generating a segmented construction entity with completed positioning. The resulting segmented construction entity with completed positioning simultaneously possesses rotational characteristics that change with slope and positional characteristics that undulate with altitude in terms of geometric properties, effectively solving the technical defects mentioned in the background art, such as cracks or clipping at the segment joints caused by ignoring the variability of the spherical normal in traditional generation schemes.

[0043] Specifically, this application addresses the collaborative processing of the aforementioned spatial rotation and positioning procedures. The generated, positioned segmented construction entities are output to the scene construction queue of the rendering engine to achieve real-time growth of the linear construction. Since the positioned segmented construction entities are generated based on a coordinate system corrected in real-time by local surface normals, adjacent segmented entities can achieve logically seamless splicing through shared spatial boundaries and continuous normal features. This processing results in a high degree of visual coherence and physical fit in the final linear construction presented on the irregular sphere. The end features (including position and orientation) of the generated, positioned segmented construction entities are then cached as path starting reference points in the next growth iteration, driving the construction algorithm to continuously execute on the planetary surface with low cumulative error, thus improving the engineering robustness of constructing grand linear landscapes in complex terrain environments.

[0044] Optionally, after steps 1 to 3, the method further includes: step 4, using the target landing coordinates and the corrected growth tangent of the generated structural segmentation model as the current path position and current path orientation for the next iteration cycle, and repeating steps 1 to 3. This enables the growth of a geometrically continuous linear structure on the sphere by iteratively executing steps 1 to 3 and using the output of the previous iteration cycle as the input of the next iteration cycle.

[0045] Preferably, the specific implementation process of step 4 is as follows: In the scenario of performing linear construction continuous generation for an irregular spherical surface with severe topographic undulations, in order to achieve logical consistency and physical coherence of long-distance paths, this application obtains a structural segment model that has been attitude-corrected and closely adheres to the terrain surface, generated by the calculation in the previous step 3. Subsequently, this application performs parameter extraction and continuation reset actions, that is, extracting the corresponding target landing coordinates (which represent the real physical endpoint of the current growth segment on the terrain) from the current structural segment model and determining it as the current path position for the next growth iteration cycle; simultaneously, extracting the corresponding corrected growth tangent (which represents the spatial orientation of the model at the connection point that conforms to the slope) from the model and determining it as the current path orientation for the next growth iteration cycle. By performing this parameter redefinition process, this application transforms the geometric generation result of the previous cycle into the motion initiation constraint for the next cycle. The result of this processing action is that each subsequent generated structural entity can use the physical end of the previous segment as the starting point for growth, thereby constructing a macroscopic linear trajectory with mathematical continuity on the irregular sphere by fitting discrete segments. This effectively solves the technical defects mentioned in the background technology, such as path breakage or connection misalignment that are easy to occur when crossing areas with abrupt changes in slope.

[0046] Preferably, in a scenario, when step 4 is specifically implemented, this application will simultaneously initiate termination discrimination processing after completing parameter reset. This application retrieves the preset maximum path growth length (e.g., a scalar value set to one hundred units) or preset target area coordinates, and obtains the cumulative geometric modulus of all currently generated segmented entities. This application drives the cumulative geometric modulus to perform a numerical comparison with the preset construction termination threshold. In response to the cumulative geometric modulus not reaching the construction termination threshold, this application re-injects the newly determined current path position and current path orientation into the path offset prediction link of the previous step one, triggering the calculation of the prediction step vector again. This iterative process based on recursive feedback differs from the traditional one-time keypoint fitting algorithm. Its technical essence lies in using the idea of ​​differential stepping to decompose the complex spherical curvature adaptation and microscopic terrain slope correction into each local growth cycle. The resulting parameter set, which is highly robust to iteration, enables linear structures to maintain a high degree of surface conformity when traversing areas with frequent terrain changes, such as mountains or craters, thus ensuring the geometric consistency of the final generated entity.

[0047] Preferably, the repeated execution logic described in step 4 continues until the application determines that the preset construction termination condition has been met. By feeding back the spatial state of each generated structural segment model to the initial vector of the next round of growth in real time, this application achieves a geometric growth effect similar to "adaptive crawling" on an irregular sphere. The result is that the linear structures such as the Great Wall or pipelines finally presented on the surface of the virtual planet not only perfectly follow the spherical curvature distribution on a macroscopic scale, but also present a visually smooth feel that closely follows the slope due to the continuous iterative update of the correction growth tangent on a microscopic scale. This long-distance structure generation method, achieved through dynamic parameter relay, greatly improves the automation of constructing grand landscapes in randomly generated terrain environments, and provides robust logical support for ensuring the continuity and realism of linear structures on irregular spheres.

[0048] like Figure 2 The image shows an embodiment of a continuous linear structure generation device on an irregular sphere according to this application, comprising: a path prediction module, used to perform spatial offset prediction processing based on the orientation of the current path to generate a predicted step vector characterizing the growth trend of the structure and the corresponding predicted growth position; a terrain adaptation module, used to perform terrain adaptation detection processing based on the predicted growth position to determine the target landing coordinates and the corresponding local surface normal of the predicted growth position on the irregular sphere; and a geometric correction generation module, used to perform path attitude correction processing on the predicted step vector based on the local surface normal to generate a corrected growth tangent adapted to the local terrain, and thereby generate a segmented structural model placed at the target landing coordinates.

[0049] like Figure 3 As shown, an electronic device according to an embodiment of this application includes: a processor and a memory; the memory stores instructions that can be executed by the processor, and when the instructions are executed by the processor, they implement the continuous linear construction generation method on an irregular spherical surface as described above.

[0050] like Figure 4 As shown in the figure, a continuous linear structure generation system on an irregular sphere according to an embodiment of this application includes: a path planning terminal, the aforementioned continuous linear structure generation device on an irregular sphere, and a scene building engine; the path planning terminal is used to obtain the path start parameters and morphological perturbation coefficients input by the user, and generate a path generation command accordingly, which is then sent to the continuous linear structure generation device on the irregular sphere; the continuous linear structure generation device on the irregular sphere is used to obtain the structural segment model and its corresponding target landing coordinates based on the path generation command through spatial prediction and terrain adaptation detection calculation; the scene building engine is used to obtain the structural segment model output by the continuous linear structure generation device on the irregular sphere, and perform spatial alignment processing with the target landing coordinates in the virtual spherical environment to achieve real-time growth rendering of linear structures on the irregular sphere.

[0051] The above Figures 2-4 For an exemplary explanation, please refer to the above. Figure 1 The description will not be repeated here.

[0052] The above description is merely an exemplary embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for generating continuous linear structures on an irregular sphere, characterized in that, include: Step 1: In response to the path generation command, perform spatial offset prediction processing based on the orientation of the current path to generate a prediction step vector and the corresponding prediction growth position. Step 2: Perform terrain adaptation detection processing based on the predicted growth location to determine the target landing coordinates and the corresponding local surface normal of the predicted growth location on the irregular sphere. Step 3: Based on the local surface normal, perform path attitude correction processing on the predicted step vector to generate a corrected growth tangent that adapts to the local terrain, and generate a structural segment model placed at the target landing coordinates accordingly.

2. The method for generating continuous linear structures on an irregular spherical surface according to claim 1, characterized in that, Step 1 involves performing spatial migration prediction processing, including: Obtain the tangent component and the preset normal perturbation component at the current path position; The tangent component and the normal perturbation component are superimposed, and vector normalization is performed to generate the prediction step vector. Based on the predicted step vector, a displacement update process is performed on the current path position to obtain the predicted growth position.

3. The method for generating continuous linear structures on an irregular spherical surface according to claim 2, characterized in that, The normal perturbation component is determined in the following manner: The offset increment perpendicular to the tangent component is calculated based on the periodic fluctuation function and used as the normal perturbation component, thereby giving the generated linear structure a meandering shape.

4. The method for generating continuous linear structures on an irregular spherical surface according to claim 1, characterized in that, Step 2 involves performing terrain adaptation detection processing, including: Starting from the predicted growth location, a probe ray is constructed pointing towards the center of the sphere; The detection ray is used to perform an intersection detection with a preset terrain grid to obtain the intersection point of the detection ray and the terrain grid as the target landing coordinates, and the surface normal at the intersection point is extracted as the local surface normal.

5. The method for generating continuous linear structures on an irregular spherical surface according to claim 1, characterized in that, Step 3 involves performing path attitude correction processing, including: Calculate the displacement components from the current path position to the target landing coordinates; The displacement component is projected onto a local tangent plane defined by the local surface normal, and normalization is performed to generate the corrected growth tangent that closely follows the direction of surface undulation.

6. The method for generating continuous linear structures on an irregular spherical surface according to claim 5, characterized in that, Step 3, generating the structural segmentation model, includes: A three-dimensional rotation matrix is ​​constructed using the modified growth tangent and the local surface normal; Based on the three-dimensional rotation matrix, the preset structural resources are subjected to attitude alignment processing and placed at the target landing coordinates to form the structural segment model that is seamlessly connected with the previous segment.

7. The method for generating continuous linear structures on an irregular spherical surface according to claim 1, characterized in that, Also includes: The target landing coordinates and the corrected growth tangent of the generated structural segmentation model are used as the current path position and current path orientation for the next iteration cycle, respectively. Steps 1 to 3 are repeated until the preset construction termination condition is reached.

8. A device for generating continuous linear structures on an irregular spherical surface, characterized in that, include: Path prediction module: used to perform spatial offset prediction processing based on the orientation of the current path to generate a predicted step vector and the corresponding predicted growth position that characterizes the growth trend of the structure. Terrain adaptation module: used to perform terrain adaptation detection processing based on the predicted growth location, so as to determine the target landing coordinates and the corresponding local surface normal of the predicted growth location on the irregular spherical surface; Geometric correction generation module: Based on the local surface normal, it performs path attitude correction processing on the predicted step vector to generate a corrected growth tangent that adapts to the local terrain, and generates a structural segment model placed at the target landing coordinates accordingly.

9. An electronic device, characterized in that, include: Processor and memory; The memory stores instructions that can be executed by the processor, which, when executed by the processor, implement the method for generating continuous linear structures on irregular spherical surfaces as described in any one of claims 1 to 7.

10. A continuous linear construction generation system on an irregular spherical surface, characterized in that, include: The path planning terminal, the continuous linear structure generation device on the irregular spherical surface as described in claim 8, and the scene building engine; The path planning terminal is used to obtain the path start parameters and morphological perturbation coefficients input by the user, and generate the path generation command accordingly, which is then sent to the continuous linear structure generation device on the irregular spherical surface. The continuous linear structure generation device on the irregular spherical surface is used to obtain the structural segmentation model and its corresponding target landing coordinates based on the path generation instruction through spatial prediction and terrain adaptation detection. The scene building engine is used to obtain the structural segmentation model output by the continuous linear structure generation device on the irregular sphere, and to perform spatial alignment processing with the target landing coordinates in the virtual spherical environment to achieve real-time growth rendering of linear structures on the irregular sphere.