Route drawing method and apparatus

By selecting visible points on the screen and determining rendering control parameters in a 3D visualization system, rendering is performed only on the visible parts, solving the problems of high memory consumption and insufficient rendering performance in existing technologies, and achieving efficient path rendering effects.

CN122391537APending Publication Date: 2026-07-14REALSEE (BEIJING) TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
REALSEE (BEIJING) TECHNOLOGY CO LTD
Filing Date
2026-04-16
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In existing 3D visualization systems, the rendering method for dynamic path lines requires the pre-generation of a large amount of geometric data, resulting in high memory consumption and long loading time. In particular, it cannot guarantee smooth real-time rendering on mobile devices or low-end hardware, and the invisible path parts still consume GPU resources.

Method used

By projecting 3D path acquisition points onto screen space, screen path points are determined and expanded into path description points. Visible screen points are then filtered out, and rendering control parameters are determined based on these visible points. Only the visible parts are rendered, reducing the amount of processing required for invisible paths.

Benefits of technology

It improves the display of path details, reduces the amount of processing for invisible paths, and enhances rendering performance, especially when only a small part of the path is visible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391537A_ABST
    Figure CN122391537A_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses a path drawing method and device, wherein the method comprises: projecting a first number of three-dimensional path collection points to a screen space to obtain a first number of screen path points; determining a second number of path description points based on the first number of screen path points; the second number is greater than the first number; determining at least one screen visible point from the path description points based on the normalized device coordinates of the path description points in the screen space; the screen visible point is a path description point visible in a screen viewport of the screen space; determining a rendering control parameter based on the at least one screen visible point; rendering a target path in the screen viewport based on the rendering control parameter and attribute information of the path description points; the embodiment of the present disclosure greatly reduces the processing amount of invisible path description points, and the performance improvement is extremely obvious when only a small part of the path is visible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of 3D visualization technology, and in particular to a path drawing method and apparatus. Background Technology

[0002] In 3D visualization systems, dynamic path lines are a core visualization element, widely used in fields such as Geographic Information Systems (GIS), digital twins, traffic control, data visualization, and game engines. They are mainly used to intuitively present information such as motion trajectories (e.g., vehicle and aircraft trajectories), traffic flow lines (e.g., road network traffic flow), and equipment movement paths. Their rendering effects and performance directly determine the interactive experience and data expression accuracy of 3D scenes.

[0003] To achieve the visualization of dynamic path lines, existing technologies typically employ a combination of geometric data pre-generation and GPU rendering, relying on key technologies such as path geometry modeling, real-time rendering pipelines, and data transmission. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure is proposed. Embodiments of this disclosure provide a path drawing method and apparatus.

[0005] According to one aspect of the embodiments of this disclosure, a path drawing method is provided, including: Project the first number of 3D path acquisition points onto the screen space to obtain the first number of screen path points; Based on the first number of screen path points, a second number of path description points are determined; the second number is greater than the first number. Based on the normalized device coordinates of the path description points in the screen space, at least one screen-visible point is determined from the path description points; the screen-visible point is a path description point that is visible in the screen viewport of the screen space. Rendering control parameters are determined based on the at least one visible point on the screen; Based on the rendering control parameters and the attribute information of the path description points, the target path is rendered in the screen viewport.

[0006] Optionally, the rendering control parameters include a start offset and an end offset; Determining rendering control parameters based on the at least one visible screen point includes: Based on the path sequence corresponding to the second number of path description points, a first visible point and a second visible point are determined; the first visible point is the screen visible point that is first in the path sequence of the at least one screen visible point, and the second visible point is the screen visible point that is last in the path sequence of the at least one screen visible point; Based on the first visible point and the second visible point, the starting point offset and the ending point offset are determined.

[0007] Optionally, determining the start point offset and the end point offset based on the first visible point and the second visible point includes: Based on the first visible point and the path sequence, a first off-screen point adjacent to the first visible point in the path sequence is determined from off-screen points; the off-screen point is a path description point in the path sequence that does not belong to the visible point. Based on the second visible point and the path sequence, determine the second off-screen point in the path sequence that is adjacent to the second visible point; The starting point offset is determined based on the first off-screen point, and the ending point offset is determined based on the second off-screen point.

[0008] Optionally, determining the starting point offset based on the first off-screen point and determining the ending point offset based on the second off-screen point includes: The starting point offset is determined based on the distance between the first off-screen point and the first path description point in the path sequence; The endpoint offset is determined based on the distance between the second off-screen point and the last path description point in the path sequence.

[0009] Optionally, the rendering control parameters may also include the visible range length and animation progress; The step of determining rendering control parameters based on the at least one visible screen point further includes: The cumulative path distance is determined based on the second number of path description points; The length of the visible range is determined by subtracting the starting point offset and the ending point offset from the cumulative distance of the path. The display length is obtained by subtracting the endpoint offset from the cumulative path distance, and the animation progress is determined based on the proportion of the display length in the cumulative path distance.

[0010] Optionally, determining a second number of path description points based on the first number of screen path points includes: A smooth first curve is generated based on the first number of screen path points; the first curve passes through all of the screen path points. Based on the tangent of the first curve at at least one of the screen path points, determine the curvature of at least one path point; Based on the curvature of the at least one path point, a first interpolation process is performed on the first number of screen path points to obtain the second number of path description points.

[0011] Optionally, the step of performing a first interpolation process on the first number of screen path points based on the curvature of the at least one path point to obtain the second number of path description points includes: The curvature sequence is obtained by sorting the curvature of at least one path point according to its magnitude. According to the curvature sequence, at least one screen path point corresponding to the curvature of the at least one path point is subjected to a first interpolation process to obtain the second number of path description points; wherein, more path description points are inserted on both sides of the screen path point corresponding to the curvature of the larger acquisition point in the curvature sequence, and fewer path description points are inserted on both sides of the screen path point corresponding to the curvature of the smaller acquisition point in the curvature sequence.

[0012] Optionally, before determining the curvature of at least one path point based on the tangent of the first curve at at least one of the screen path points, the method further includes: A second interpolation process is performed on the first number of screen path points to obtain a third number of interpolated path points; Determining the curvature of at least one path point based on the tangent of the first curve at at least one of the screen path points includes: Based on the tangent of the first curve at at least one of the interpolation path points, determine the curvature of at least one interpolation point; The step of performing a first interpolation process on the first number of screen path points based on the curvature of the at least one path point to obtain the second number of path description points includes: Based on the curvature of the at least one interpolation point, a first interpolation process is performed on the third number of interpolation path points to obtain the second number of path description points.

[0013] Optionally, the step of performing a second interpolation process on the first number of screen path points to obtain a third number of interpolated path points includes: Determine the line segment distance between the start and end points of the first curve; The hierarchy coefficient is determined based on the proportional relationship between the line segment distance and the diagonal length of the screen viewport; Based on the hierarchical coefficient, a second interpolation process is performed on the first number of screen path points to obtain a third number of interpolated path points.

[0014] Optionally, the attribute information of the path description point includes coordinate information and distance parameters; The process of rendering the target path at the screen viewport based on the rendering control parameters and the attribute information of the path description points includes: Obtain the coordinate information of the path description point in the screen space; Determine the cumulative distance along the path from the starting point of the path for each of the second number of path description points to obtain the distance parameter. Based on the rendering control parameters, the coordinate information and distance parameters corresponding to the at least one visible point on the screen are obtained from the second number of coordinate information and distance parameters; The target path is obtained by rendering the coordinate information and distance parameters corresponding to at least one visible point on the screen.

[0015] Optionally, determining at least one screen-visible point from the path description points based on their normalized device coordinates in the screen space includes: Based on the visible coordinate range, at least one of the path description points whose normalized device coordinates fall within the visible coordinate range is determined as the at least one visible screen point.

[0016] Optionally, it also includes: In response to reaching a preset period, the camera pose and screen viewport size corresponding to the changed screen space are monitored and acquired. Based on the camera pose, determine the updated normalized device coordinates of the path description point in the screen space; Based on the screen viewport size and the updated normalized device coordinates, at least one updated screen viewpoint is determined from the path description points; the updated screen viewpoint is a path description point visible in the screen viewport after the change in camera pose and screen viewport size. The update rendering control parameters are determined based on at least one updated screen viewpoint; Based on the updated rendering control parameters and the attribute information of the path description points, the updated path is obtained by rendering the screen viewport after the screen viewport size.

[0017] According to another aspect of the embodiments of this disclosure, a path drawing apparatus is provided, comprising: The screen projection module is used to project a first number of three-dimensional path acquisition points onto the screen space to obtain a first number of screen path points. The point expansion module is used to determine a second number of path description points based on the first number of screen path points; the second number is greater than the first number. The visible point recognition module is used to determine at least one visible point from the path description points based on the normalized device coordinates of the path description points in the screen space; the visible point is a path description point that is visible in the screen viewport of the screen space. A control parameter determination module is used to determine rendering control parameters based on the at least one visible screen point; The path rendering module is used to render the target path in the screen viewport based on the rendering control parameters and the attribute information of the path description points.

[0018] Optionally, the rendering control parameters include a start offset and an end offset; The control parameter determination module includes: The visible point determination unit is used to determine a first visible point and a second visible point based on the path sequence corresponding to the second number of path description points; the first visible point is the screen visible point that is first in the path sequence of the at least one screen visible point, and the second visible point is the screen visible point that is last in the path sequence of the at least one screen visible point; An offset determination unit is used to determine the starting point offset and the ending point offset based on the first visible point and the second visible point.

[0019] Optionally, the offset determination unit is specifically configured to: determine a first off-screen point adjacent to the first visible point in the path sequence from off-screen points based on the first visible point and the path sequence; the off-screen point is a path description point in the path sequence that does not belong to the visible point; determine a second off-screen point adjacent to the second visible point in the path sequence from off-screen points based on the second visible point and the path sequence; determine the starting point offset based on the first off-screen point; and determine the ending point offset based on the second off-screen point.

[0020] Optionally, when determining the starting point offset based on the first off-screen point and the ending point offset based on the second off-screen point, the offset determination unit is used to determine the starting point offset based on the distance between the first off-screen point and the first path description point in the path sequence; and to determine the ending point offset based on the distance between the second off-screen point and the last path description point in the path sequence.

[0021] Optionally, the rendering control parameters may also include the visible range length and animation progress; The control parameter determination module further includes: The visible range unit is used to determine the cumulative path distance based on the second number of path description points; and to determine the length of the visible range based on the cumulative path distance minus the start offset and the end offset. An animation progress unit is used to obtain the display length by subtracting the endpoint offset from the cumulative path distance, and to determine the animation progress based on the proportion of the display length in the cumulative path distance.

[0022] Optionally, the point expansion module includes: A curve generation unit is configured to generate a smooth first curve based on the first number of screen path points; the first curve passes through all the screen path points. A curvature determination unit is used to determine the curvature of at least one path point based on the tangent of the first curve at at least one of the screen path points; The first interpolation unit is used to perform a first interpolation process on the first number of screen path points based on the curvature of the at least one path point to obtain the second number of path description points.

[0023] Optionally, the curvature interpolation unit is specifically used to sort the curvature of the at least one path point according to its magnitude to obtain a curvature sequence; and to perform a first interpolation process on at least one screen path point corresponding to the curvature of the at least one path point according to the curvature sequence to obtain the second number of path description points; wherein, more path description points are inserted on both sides of the screen path point corresponding to the curvature of the larger acquisition point in the curvature sequence, and fewer path description points are inserted on both sides of the screen path point corresponding to the curvature of the smaller acquisition point in the curvature sequence.

[0024] Optionally, the point expansion module further includes: The second interpolation unit is used to perform a second interpolation process on the first number of screen path points to obtain a third number of interpolated path points. The curvature determination unit is used to determine the curvature of at least one interpolation point based on the tangent of the first curve at at least one of the interpolation path points. The first interpolation unit is used to perform a first interpolation process on the third number of interpolation path points based on the curvature of the at least one interpolation point to obtain the second number of path description points.

[0025] Optionally, the second interpolation unit is specifically used to determine the line segment distance between the start and end points of the first curve; determine the hierarchy coefficient based on the proportional relationship between the line segment distance and the diagonal length of the screen viewport; and perform a second interpolation process on the first number of screen path points based on the hierarchy coefficient to obtain a third number of interpolated path points.

[0026] Optionally, the attribute information of the path description point includes coordinate information and distance parameters; The path rendering module is specifically used to obtain the coordinate information of the path description points in the screen space; determine the cumulative distance along the path from the starting point of each of the second number of path description points to obtain the distance parameter; obtain the coordinate information and distance parameter corresponding to the at least one screen visible point from the second number of coordinate information and distance parameter based on the rendering control parameters; and render the coordinate information and distance parameter corresponding to the at least one screen visible point to obtain the target path.

[0027] Optionally, the visible point identification module is specifically used to determine, based on the visible coordinate range, at least one of the path description points whose normalized device coordinates fall within the visible coordinate range as the at least one screen visible point.

[0028] Optionally, the device further includes: The pose monitoring module is used to monitor and acquire the camera pose and screen viewport size corresponding to the changed screen space in response to reaching a preset period. The coordinate update module is used to determine the updated normalized device coordinates of the path description point in the screen space based on the camera pose. The rendering update module is configured to determine at least one updated screen visible point from the path description points based on the screen viewport size and the updated normalized device coordinates; the updated screen visible point is a path description point visible in the screen viewport after the change in camera pose and screen viewport size; determine updated rendering control parameters based on the at least one updated screen visible point; and render an updated path in the screen viewport after the change in screen viewport size based on the updated rendering control parameters and the attribute information of the path description points.

[0029] According to another aspect of the present disclosure, an electronic device is provided, comprising: Memory, used to store computer program products; A processor is configured to execute a computer program product stored in the memory, and when the computer program product is executed, to implement the path drawing method described in any of the above embodiments.

[0030] According to another aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the path drawing method described in any of the above embodiments.

[0031] According to another aspect of the present disclosure, a computer program product is provided, including computer program instructions that, when executed by a processor, implement the path drawing method described in any of the above embodiments.

[0032] Based on the path drawing method and apparatus provided in the above embodiments of this disclosure, a first number of three-dimensional path acquisition points are projected onto the screen space to obtain a first number of screen path points; based on the first number of screen path points, a second number of path description points are determined; the second number is greater than the first number; based on the normalized device coordinates of the path description points in the screen space, at least one screen visible point is determined from the path description points; the screen visible point is a path description point visible in the screen viewport of the screen space; rendering control parameters are determined based on the at least one screen visible point; based on the rendering control parameters and the attribute information of the path description points, a target path is rendered in the screen viewport; the embodiments of this disclosure expand the first number of screen path points to obtain a second number of path description points, increasing the number of points describing the path and improving the detail display of the path; furthermore, by determining the screen visible points visible in the screen viewport from the path description points, the visible range of the path is pre-determined, rendering control parameters are determined, and rendering is performed only for the screen visible points, achieving efficient clipping; the processing amount of invisible path description points is greatly reduced, especially when only a small part of the path is visible, the performance improvement is extremely significant.

[0033] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0034] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0035] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein: Figure 1 This is a flowchart illustrating a path drawing method provided in an exemplary embodiment of this disclosure; Figure 2 This is a flowchart illustrating the method for determining path descriptor points provided in an exemplary embodiment of this disclosure; Figure 3 This is a flowchart illustrating the process of determining rendering control parameters in an exemplary embodiment of this disclosure; Figure 4 This is a flowchart illustrating the process of determining the offset in a method provided in another exemplary embodiment of this disclosure; Figure 5 This is a schematic diagram of the path rendering process in an exemplary embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of a path drawing apparatus provided in an exemplary embodiment of the present disclosure; Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0036] Hereinafter, exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present disclosure, and not all embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described herein.

[0037] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0038] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0039] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.

[0040] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.

[0041] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship. The data referred to in this disclosure can include unstructured data such as text, images, and videos, as well as structured data.

[0042] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0043] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0044] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0045] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0046] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0047] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0048] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0049] Application Overview In developing this disclosure, the inventors discovered that traditional path rendering methods require pre-generating complete geometric data for the path, including all vertex positions, normals, texture coordinates, etc. For complex paths, the geometric data of a single path can reach hundreds of KB or even several MB. In scenes containing a large number of paths, the total data volume can reach several GB, resulting in excessive memory consumption and long loading times. Due to the massive data volume, the GPU needs to process a large number of vertices and fragments, causing a serious performance bottleneck. Especially on mobile devices or low-end hardware, smooth real-time rendering cannot be guaranteed. At the same time, a large number of invisible path parts still consume GPU resources.

[0050] Exemplary methods Figure 1 This is a flowchart illustrating a path drawing method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices, such as... Figure 1 As shown, it includes the following steps: Step 102: Project the first number of 3D path acquisition points onto the screen space to obtain the first number of screen path points.

[0051] Optionally, the 3D path acquisition points can be obtained by acquiring the location information of spatial trajectory points in a real scene (e.g., a building scene, a traffic scene, etc.) using 3D scanning equipment (e.g., laser scanner, structured light scanner, photogrammetry equipment, etc.). The spatial trajectory (e.g., a real road network, building corridor, equipment movement trajectory) is scanned from all directions. The equipment captures the 3D coordinates (X, Y, Z) of key points on the path using ranging and imaging principles. Point cloud processing software (e.g., CloudCompare, MeshLab) is used to denoise, simplify, and fit the data, generating continuous path point location data. Subsequently, algorithms can be used to supplement normal vectors (calculated based on plane fitting of adjacent points) and texture coordinates (mapped to scene textures). In this embodiment, the 3D path acquisition points can also be determined using the input 3D coordinate information.

[0052] In this embodiment, when a user views the screen space, the virtual camera's pose (position + attitude) information can be determined based on the user's operations. Optionally, attitude mapping (camera orientation adjustment): When the user rotates the view through mouse dragging, touch screen swiping, or other operations, the system resolves the operation trajectory into the camera's pitch angle (rotation around the horizontal axis) and yaw angle (rotation around the vertical axis). Some scenarios support roll angle (rotation around the line of sight axis), thereby constructing the camera's direction vector (forward, upward, and rightward) to determine the camera's viewing attitude. For example, when the user drags the mouse to the right, the corresponding camera yaw angle increases, the camera orientation moves synchronously to the right, and the path projection viewpoint adjusts accordingly. Position mapping (camera spatial movement): When the user adjusts the viewing distance and position through operations such as zooming with the scroll wheel and panning with the buttons, the system resolves the operation quantities and updates the camera's world space coordinates. When scrolling the scroll wheel forward (zooming in on the view), the camera moves along the forward vector in the path direction, shortening the viewing distance; when panning with the buttons, the camera pans along the horizontal / vertical direction, maintaining the orientation, ensuring that the path projection position adjusts synchronously with the user's viewpoint panning. Field of view parameter mapping (screen viewport adjustment): When the user adjusts the view size (zoom) or switches the viewing mode (orthographic / perspective), the camera's field of view parameters are updated synchronously—the field of view angle (FOV) is adjusted in perspective mode, and the field of view range (width and height) is adjusted in orthographic mode, providing parameter support for subsequent projection transformations and ensuring that the projection effect is consistent with the user's field of view settings.

[0053] The projection process involved in this embodiment may include: the 3D path acquisition points are initially stored in local coordinates (model space) (e.g., the path start point is the local origin), which need to be converted into scene global coordinates (in the world coordinate system) through a model matrix. The model matrix contains translation, rotation, and scaling parameters. Based on the pose information of the virtual camera, the 3D path acquisition points are transformed from the world coordinate system to the screen space (screen coordinate system).

[0054] Step 104: Based on the first number of screen path points, determine the second number of path description points.

[0055] The second quantity is greater than the first quantity.

[0056] In one embodiment, at least one path description point can be inserted between every two screen path points by interpolation to describe the spatial trajectory with more path description points. Optionally, in the screen space, a smooth curve is first generated based on a first number of screen path points, and then description points are added on the curve so that the added description points and the screen path points together constitute a second number of path description points.

[0057] Step 106: Determine at least one screen-visible point from the path description points based on the normalized device coordinates of the path description points in screen space.

[0058] Among them, the visible point on the screen is the path description point that is visible in the screen viewport in the screen space.

[0059] Normalized Device Coordinates (NDC) are standardized intermediate coordinates that connect the view space and the screen space in a 3D coordinate transformation pipeline. NDC is a device-independent standardized coordinate system with a coordinate range of [-1, 1] cube space in either a left-handed or right-handed coordinate system.

[0060] Optionally, based on the visible coordinate range, at least one path description point whose normalized device coordinates fall within the visible coordinate range is determined as at least one screen visible point.

[0061] The visible coordinate range can be preset or determined based on big data statistics.

[0062] Based on the characteristics of normalized device coordinates, this embodiment determines the path description points of normalized device coordinates within the visible coordinate range as visible points on the screen. For example, the visible coordinate range is preset to [-1, 1], and the path description points of normalized device coordinates within the range of [-1, 1] are determined as visible points on the screen.

[0063] This embodiment demonstrates visibility filtering by selecting visible points on the screen viewport, thus providing a basis for rendering only visible points on the screen in subsequent steps.

[0064] Step 108: Determine rendering control parameters based on at least one screen-visible point.

[0065] Optionally, rendering control parameters are used to control which path descriptor points the shader renders. For example, rendering control parameters may include, but are not limited to, start offset and end offset. The start offset represents the cumulative path distance from the first visible point in the screen viewport to the start of all path descriptor points; the end offset represents the cumulative path distance from the last visible point in the screen viewport to the end of all path descriptor points.

[0066] Step 110: Based on the rendering control parameters and the attribute information of the path descriptor points, the target path is rendered in the screen viewport.

[0067] The attribute information of the path description points may include, but is not limited to, geometric data and distance parameters. Geometric data refers to the coordinate information corresponding to the path description point, and the distance parameter is the cumulative distance on the path from the starting point (the first path description point in the sequence of all path description points) to that path description point.

[0068] Typically, path rendering is performed on the GPU, while other steps are performed on the CPU. Therefore, in this embodiment, steps 102 to 108 can be implemented on the CPU, while the rendering of step 110 is implemented on the GPU. In order to save GPU rendering resources, this embodiment aims to render the spatial trajectory only within the visible range of the screen viewport, while omitting the rendering of the parts not visible to the screen viewport, thus saving resources.

[0069] In this embodiment, the attribute information of the second number of path description points is transmitted to the GPU during data transmission. During rendering, the visible points corresponding to the screen viewport are determined according to the rendering control parameters, and only the visible points are rendered. Based on this, when the screen viewport position changes, there is no need to re-upload the attribute information of the path description points. Rendering can be completed simply by re-acquiring the rendering control parameters, thus reducing the workload of data retransmission.

[0070] The method provided in the above embodiments of this disclosure projects a first number of three-dimensional path acquisition points onto screen space to obtain a first number of screen path points; based on the first number of screen path points, a second number of path description points are determined; the second number is greater than the first number; based on the normalized device coordinates of the path description points in the screen space, at least one screen visible point is determined from the path description points; the screen visible point is a path description point visible in the screen viewport of the screen space; rendering control parameters are determined based on the at least one screen visible point; based on the rendering control parameters and the attribute information of the path description points, a target path is rendered in the screen viewport. The embodiments of this disclosure expand the first number of screen path points to obtain a second number of path description points, increasing the number of points describing the path and improving the detail display of the path; furthermore, by determining the screen visible points visible in the screen viewport from the path description points, the visible range of the path is pre-determined, rendering control parameters are determined, and rendering is performed only on the screen visible points, achieving efficient clipping; the processing load of invisible path description points is significantly reduced, especially when only a small portion of the path is visible, resulting in a very significant performance improvement.

[0071] Figure 2 This is a flowchart illustrating the process of determining path descriptor points in an exemplary embodiment of this disclosure. Figure 2 As shown above, in the above Figure 1 Based on the illustrated embodiment, step 104 may include the following steps: Step 1041: Generate a smooth first curve based on a first number of screen path points.

[0072] The first curve passes through all screen path points.

[0073] Optionally, an interpolation algorithm can be used to generate a smooth first curve based on a first number of screen path points. The interpolation algorithm may include, but is not limited to, any one or more of the following: Catmull-Rom spline interpolation, B-spline interpolation, Bezier curve interpolation, Hermite interpolation, cubic polynomial interpolation, natural spline interpolation, etc.

[0074] Among them, Catmull-Rom spline is a parameterized cubic spline interpolation algorithm that passes through control points. Its core function is to generate a continuous, smooth curve that strictly passes through all the original points based on a set of ordered original points.

[0075] Step 1042: Determine the curvature of at least one path point based on the tangent of the first curve at at least one screen path point.

[0076] Optionally, the path point curvature corresponding to each screen path point is determined based on the tangent of the first curve at each screen path point.

[0077] Each path point curvature corresponds to a screen path point.

[0078] Curvature is a core metric in geometry used to describe the degree of bending of a geometric object (curve, surface, manifold, etc.) at a point. Intuitively, it is the degree to which a curve deviates from a straight line and a surface deviates from a plane. The greater the curvature, the more significant the bending. Geometrically, the degree of bending (curvature) of a curve is the rate of change of the tangent direction. The tangent is the basis for describing the local shape of a curve, and curvature is an indicator that further quantifies the degree of bending of a curve based on the tangent.

[0079] Curvature is a measure of the degree of curvature of a curve. Its calculation depends on the first and second derivatives of the curve. The first derivative corresponds to the slope of the tangent. Therefore, in this embodiment, the tangent of the first curve is determined first, and then the curvature is determined based on the tangent.

[0080] Step 1043: Based on the curvature of at least one path point, perform a first interpolation process on a first number of screen path points to obtain a second number of path description points.

[0081] Optionally, the first interpolation process may include, but is not limited to, any one or more of the following: Catmull-Rom spline interpolation algorithm, B-spline interpolation, Bezier curve interpolation, Hermite interpolation, cubic polynomial interpolation, natural spline interpolation, etc.

[0082] This embodiment analyzes the local curvature characteristics of the path curve formed by the input control points, dynamically determines the segment density of each segment based on the curvature magnitude, and realizes adaptive segment density control based on curvature analysis.

[0083] Optionally, step 1043 may include: sorting the curvatures according to the magnitude of the curvatures of at least one path point to obtain a curvature sequence.

[0084] Optionally, the curvature sequence can be a sequence of curvature from large to small, or the curvature sequence can be a sequence of curvature from small to large.

[0085] According to the curvature sequence, at least one screen path point corresponding to the curvature of at least one path point is subjected to a first interpolation process to obtain a second number of path description points.

[0086] In this case, more path description points are inserted on both sides of the screen path point corresponding to the curvature of the larger acquisition point in the curvature sequence, while fewer path description points are inserted on both sides of the screen path point corresponding to the curvature of the smaller acquisition point in the curvature sequence.

[0087] This embodiment, through curvature analysis, increases interpolation points (i.e., the number of segments corresponding to the first curve) in high curvature regions (sharp turns) and reduces interpolation points in low curvature regions (straight lines); this makes the distribution of geometric details match the actual geometric complexity of the first curve, avoiding wasting path description point resources on simple curve segments; while ensuring curve smoothness, it reduces the number of path description points by 30%-50% compared to the fixed segmentation strategy, reducing the path description point processing burden on the GPU.

[0088] In some optional embodiments, based on the above embodiments, before step 1042, the following may be included: A second interpolation process is performed on the first number of screen path points to obtain a third number of interpolated path points.

[0089] In this embodiment, the second interpolation process can adopt the same or different interpolation methods as the first interpolation process. By adding interpolation points to the first curve through the second interpolation process, the geometric complexity of the first curve can be described by more interpolation points. Optionally, the number of interpolation points can be determined according to the LOD (Level of Detail). Different LODs correspond to different numbers of interpolation points. For example, the higher the precision level, the more interpolation points are required.

[0090] In this embodiment, step 1042 may include: Based on the tangent of the first curve at at least one interpolation path point, determine the curvature of at least one interpolation point.

[0091] Each interpolation path point (in this embodiment, the interpolation path points include the interpolation insertion point and the original screen path point) corresponds to an interpolation point curvature.

[0092] In this embodiment, step 1043 may include: Based on the curvature of at least one interpolation point, a first interpolation process is performed on a third number of interpolation path points to obtain a second number of path description points.

[0093] In this embodiment, a point is inserted between every two interpolation path points through a first interpolation process. The path description point in this embodiment includes the inserted point and the original interpolation path point.

[0094] In this embodiment, the second interpolation process is used to reflect more curvature changes in the first curve through interpolation path points. The first interpolation process is then performed on the interpolation path points after the second interpolation process. Compared with directly performing the first interpolation process on the screen path points, this embodiment refines the curvature in the first curve through the second interpolation process, realizing a more detailed path description.

[0095] Optionally, performing a second interpolation on the first number of screen path points to obtain a third number of interpolated path points may include: Determine the distance between the starting and ending points of the first curve.

[0096] In this embodiment, the line segment distance can be the length of the line segment connecting the start and end points of the first curve. This line segment distance reflects the proportion of the spatial trajectory point on the screen.

[0097] The hierarchy coefficient is determined based on the proportional relationship between the line segment distance and the diagonal length of the screen viewport.

[0098] Optionally, the proportional relationship indicates that the larger the ratio between the line segment distance and the diagonal length of the screen viewport, the larger the corresponding hierarchy coefficient. This proportional relationship reflects the viewing distance of the screen viewport to the spatial trajectory; the closer the distance, the more details can be observed. Therefore, different proportional relationships correspond to different numbers of interpolation points. In this embodiment, the number of interpolation path points is controlled by the hierarchy coefficient. For example, the larger the hierarchy coefficient, the more interpolation path points there are.

[0099] Based on the hierarchy coefficient, a second interpolation process is performed on the first number of screen path points to obtain a third number of interpolated path points.

[0100] Optionally, the third quantity = number of screen path points * hierarchy coefficient, that is, the larger the hierarchy coefficient, the larger the third quantity. For example, interpolated path points of the hierarchy coefficient are inserted between every two screen path points.

[0101] In this embodiment, the observation distance of the first curve to the spatial trajectory is determined by the proportion of the line segment distance corresponding to the first curve on the screen. Different observation distances correspond to different levels of detail, and each level of detail corresponds to a level coefficient. Optionally, in some optional embodiments, the level of detail (LOD) can include three levels: high precision layer (LOD0): used for close-range observation, with the highest segment density (the most insertion points), and further densified in high curvature areas. This high precision layer can correspond to the proportion of the line segment distance to the diagonal length of the screen viewport being greater than or equal to 2 / 3; medium precision layer (LOD1-2): used for medium distances, with a moderate reduction in segment density (moderate number of insertion points). This medium precision layer can correspond to the proportion of the line segment distance to the diagonal length of the screen viewport being greater than or equal to 1 / 3 and less than 2 / 3; low precision layer (LOD3-4): used for long-range observation, with greatly simplified geometry (fewer insertion points), retaining only the basic shape of the path. This low precision layer can correspond to the proportion of the line segment distance to the diagonal length of the screen viewport being less than 1 / 3. Optionally, the higher the level of detail, the larger the level coefficient. For example, a high-precision layer corresponds to a level coefficient of 50, a medium-precision layer corresponds to a level coefficient of 30, and a low-precision layer corresponds to a level coefficient of 15, etc. This embodiment dynamically selects an appropriate LOD level for rendering based on the screen projection size, providing suitable visual precision for the first curve.

[0102] Figure 3 This is a schematic flowchart illustrating the process of determining rendering control parameters in an exemplary embodiment of this disclosure. Figure 3 As shown above, in the above Figure 1 Based on the illustrated embodiment, the rendering control parameters may include, but are not limited to: start offset and end offset; step 108 may include the following steps: Step 1081: Based on the path sequence corresponding to the second number of path description points, determine the first visible point and the second visible point.

[0103] The first visible point is the screen visible point that appears first in the path sequence, and the second visible point is the screen visible point that appears last in the path sequence.

[0104] The path is essentially a directed continuous trajectory. In this embodiment, the spatial trajectory points collected extend in an orderly manner over time and have a sequential order. In this embodiment, the path description points have a path sequence according to the initial order corresponding to the original three-dimensional path collection points. The first visible point on the screen in the path sequence is found as the first visible point, and the last visible point in the path sequence is taken as the second visible point.

[0105] Step 1082: Determine the starting point offset and the ending point offset based on the first visible point and the second visible point.

[0106] In this embodiment, backtracking is performed on the path sequence based on the first visible point to find the nearest path descriptor point (the path descriptor point ranked before the first visible point in the path sequence, which is not visible in the screen viewport). The starting point offset is determined by the cumulative distance between this path descriptor point and the starting point in the path sequence. The search continues on the path sequence based on the second visible point to find the nearest path descriptor point (the path descriptor point ranked after the second visible point in the path sequence, which is not visible in the screen viewport). The ending point offset is determined by the cumulative distance between this path descriptor point and the ending point in the path sequence. This embodiment achieves screen space projection analysis and visibility clipping through the starting and ending point offsets. Based on the starting and ending point offsets, the visible range of the path is pre-determined on the CPU side, and the distance offset of the invisible part is passed to the shader for efficient clipping on the GPU side. This significantly reduces the processing load of invisible path descriptor points, especially when only a small portion of the path is visible, resulting in a significant performance improvement.

[0107] Figure 4 This is a flowchart illustrating the process of determining an offset in a method provided by another exemplary embodiment of this disclosure. Figure 4 As shown above, in the above Figure 3 Based on the illustrated embodiment, step 1082 may include: Step 401: Based on the first visible point and the path sequence, determine the first off-screen point in the path sequence that is adjacent to the first visible point.

[0108] Off-screen points are path description points in the path sequence that are not visible on the screen, i.e., path description points that are not visible in the screen viewport.

[0109] In this embodiment, while determining visible points from the path description points, other path description points can be determined as off-screen points.

[0110] Step 402: Based on the second visible point and the path sequence, determine the second off-screen point in the path sequence that is adjacent to the second visible point.

[0111] In this embodiment, steps 401 and 402 do not have an execution order. Step 401 can be executed first, followed by step 402; or step 402 can be executed first, followed by step 401; or steps 401 and 402 can be executed simultaneously.

[0112] Step 403: Determine the starting point offset based on the first screen outside point, and determine the ending point offset based on the second screen outside point.

[0113] In this embodiment, the off-screen point adjacent to the first visible point is determined as the first off-screen point, and the off-screen point adjacent to the second visible point is determined as the second off-screen point. Then, the start offset and end offset are determined. In order to reduce the amount of rendering data processing in this embodiment, only the path description points (all visible points in the screen viewport) between the first visible point and the second visible point are rendered. Therefore, by determining the start offset and end offset, the path description points that need to be truncated and not rendered are determined. This embodiment improves the recognition efficiency and reduces the amount of data transmitted by determining the path description points that do not need to be rendered by using the start offset and end offset.

[0114] Optionally, step 403 may include: The starting offset is determined based on the distance between the first off-screen point and the first path description point in the path sequence; the ending offset is determined based on the distance between the second off-screen point and the last path description point in the path sequence.

[0115] In this embodiment, by finding the nearest off-screen point (first off-screen point) and the farthest off-screen point (second off-screen point), the distance offsets (startOffset and endOffset) of the visible start point and end point in the path description points are calculated. Here, the distance in this embodiment refers to the cumulative distance (by gradually accumulating the line segment distance between every two path description points to determine the distance from the first path description point in the path sequence to the first off-screen point; by gradually accumulating the line segment distance between every two path description points to determine the distance from the second off-screen point to the last path description point in the path sequence). In this embodiment, during rendering, only the start offset and end offset need to be transmitted to the GPU to quickly locate the start point (first visible point) and end point (second visible point) of the visible point in the path sequence, thus achieving path rendering with minimal data transmission.

[0116] In some optional embodiments, the rendering control parameters may further include the visible range length and animation progress; correspondingly, step 108 may further include: The cumulative path distance is determined based on the second number of path description points, and the visible range length is determined by subtracting the start offset and end offset from the cumulative path distance.

[0117] The display length is obtained by subtracting the endpoint offset from the cumulative path distance, and the animation progress is determined based on the proportion of the display length in the cumulative path distance.

[0118] This embodiment implements a shader-parameterized animation control mechanism through rendering control parameters. These parameters (startOffset, endOffset, visible range, etc.) are passed to the shader as uniform variables. In the path descriptor shader or fragment shader, the visibility and rendering effect of the path descriptor are determined by comparing the distance parameters of the path descriptor with these control parameters. By shifting the rendering logic from the CPU to the GPU, complex animation effects are achieved by modifying a small number of uniform parameters (4-16 bytes per frame) when changing the displayed path portion, completely avoiding the need to re-upload path descriptor data.

[0119] Figure 5 This is a schematic diagram of the path rendering process in an exemplary embodiment of this disclosure. Figure 5 As shown above, in the above Figure 1 Based on the illustrated embodiment, the attribute information of the path description point includes coordinate information and distance parameters; step 110 may include: Step 1101: Obtain the coordinate information of the path description point in screen space.

[0120] In this embodiment, the geometric information (coordinate information) of the path description points remains unchanged as long as the pose of the virtual camera remains unchanged. Therefore, when rendering different parts of the path with the same pose information, there is no need to change the coordinate information of the path description points.

[0121] Step 1102: Determine the cumulative distance along the path from the starting point of each path description point in the second number of path description points to obtain the distance parameter.

[0122] The start offset and end offset in the rendering control parameters are determined by the cumulative distance from one path description point to another path description point (e.g., the start point or the end point). Therefore, in this embodiment, the cumulative distance along the path starting from the path start point is determined for each path description point, and this distance is parameterized, so that any segment of the path can be flexibly controlled by the distance parameter without modifying the path description point data.

[0123] Step 1103: Based on the rendering control parameters, obtain the coordinate information and distance parameters corresponding to at least one screen-visible point from the second number of coordinate information and distance parameters.

[0124] This embodiment achieves visible point filtering by combining rendering control parameters with distance parameters. Since the distance parameters and coordinate information are attribute information of path description points, there is no need to calculate them again, which improves the efficiency of visible point filtering.

[0125] This embodiment implements parametric rendering control, ensuring that the path geometry data and distance parameters remain unchanged after being uploaded to the GPU. Animation effects are achieved by passing a small number of control parameters to the shader.

[0126] Step 1104: Render the coordinate information and distance parameters corresponding to at least one screen-visible point to obtain the target path.

[0127] This embodiment implements a path parameterized representation based on distance parameters. It calculates and stores the cumulative distance parameter (curve length from the starting point) along the path for each path descriptor point, passing it as a path descriptor point attribute to the shader. Simultaneously, it calculates the total path length. This achieves a parameterized representation of the path, allowing flexible control of any segment of the path via distance parameters without modifying the attribute information of the path descriptor points. This embodiment provides the foundation for subsequent shader parameterized control and animation implementation, enabling zero-overhead path-specific operations.

[0128] This embodiment implements shader visibility clipping. The shader determines whether each path descriptor is within the visible range based on the distance parameter and the input offset parameter (rendering control parameter). Invisible path descriptors and fragments are discarded directly and do not participate in subsequent rendering calculations.

[0129] Furthermore, to achieve better path rendering effects, zero-data-transmission animation can be implemented based on the embodiments described above. Throughout the animation, the geometric data of the path description points remains completely unchanged, and only one animation progress parameter (e.g., a 4-byte progress parameter representing the movement distance) is updated per frame. Compared to traditional methods, this disclosure transmits tens of KB of path description point data per frame, reducing the amount of data transmitted from the CPU to the GPU by more than 99.99%, completely eliminating the data transmission bottleneck.

[0130] Implementation of the flowing animation: The position of the flowing light effect on the path is controlled by dynamically updating the animation progress parameters. The shader calculates the distance between each segment and the animation progress position, and only renders segments within the specified range to form a flowing visual effect. This embodiment can also apply gradient transparency at the boundary of the visible range based on existing technology to achieve a smooth fade-in and fade-out.

[0131] In some optional embodiments, the present disclosure may further include: listening to changes in the pose of the virtual camera (corresponding to user operations), that is, listening to events of changes in position, viewpoint, and viewport size; after a change in pose, the screen viewport will inevitably change, and the corresponding visible points will also change (for example, when displacement occurs, other parts of the path will be displayed).

[0132] In response to reaching a preset period, monitor and acquire the camera pose and screen viewport size corresponding to the changed screen space; Determine the updated normalized device coordinates of the path description point in screen space based on the camera pose; Based on the screen viewport size and updated normalized device coordinates, determine at least one updated screen viewpoint from the path description points; the updated screen viewpoint is a path description point that is visible in the screen viewport after the change in camera pose and screen viewport size. The update rendering control parameters are determined based on at least one updated screen viewpoint; Based on the updated rendering control parameters and the attribute information of the path descriptor points, the updated path is obtained by rendering the screen viewport after the screen viewport size.

[0133] In the view change response mechanism provided in this embodiment, when the view (pose) changes, the screen projection analysis and capture parameter calculation are re-executed to determine and update the rendering control parameters, while the coordinate information and distance parameters corresponding to each path description point remain unchanged. Furthermore, to reduce bandwidth usage and prevent jitter, this embodiment controls the update frequency through a preset period, avoiding excessively frequent calculations that could negatively impact path rendering performance.

[0134] Optionally, the dynamic response mechanism for view changes provided in this embodiment may further include: providing an `updateScreenProjection` method (`updateScreenProjection` is typically used in graphics rendering and screen projection / projection applications; its core function is to update screen projection parameters (such as projection matrix, resolution, projection area, device adaptation information, etc.) to ensure that the projected content can correctly adapt to the target screen / device). When at least one of the camera viewpoint, camera position, and screen viewport size changes, the screen space projection analysis is re-executed, and the `startOffset` and `endOffset` are updated. This enables the rendering strategy to dynamically adjust according to view changes, always maintaining optimal visibility clipping. In interactive scenes, when the user operates the camera, the system automatically optimizes the rendering range to maintain high performance and high quality.

[0135] Any path drawing method provided in this disclosure can be executed by any suitable device with data processing capabilities, including but not limited to: terminal devices and servers. Alternatively, any path drawing method provided in this disclosure can be executed by a processor, such as by a processor executing any path drawing method mentioned in this disclosure by calling corresponding instructions stored in memory. Further details will not be elaborated below.

[0136] Exemplary device Figure 6 This is a schematic diagram of the structure of a path drawing apparatus provided in an exemplary embodiment of this disclosure. For example... Figure 6 As shown, the apparatus provided in this embodiment includes: The screen projection module 61 is used to project a first number of three-dimensional path acquisition points onto the screen space to obtain a first number of screen path points.

[0137] Point extension module 62 is used to determine a second number of path description points based on a first number of screen path points.

[0138] The second quantity is greater than the first quantity.

[0139] The visible point recognition module 63 is used to determine at least one visible point on the screen from the path description points based on the normalized device coordinates of the path description points in the screen space.

[0140] Visible points on the screen are path description points that are visible in the screen viewport within the screen space.

[0141] The control parameter determination module 64 is used to determine rendering control parameters based on at least one visible point on the screen.

[0142] The path rendering module 65 is used to render the target path in the screen viewport based on the rendering control parameters and the attribute information of the path description points.

[0143] The method provided in the above embodiments of this disclosure projects a first number of three-dimensional path acquisition points onto screen space to obtain a first number of screen path points; based on the first number of screen path points, a second number of path description points are determined; the second number is greater than the first number; based on the normalized device coordinates of the path description points in the screen space, at least one screen visible point is determined from the path description points; the screen visible point is a path description point visible in the screen viewport of the screen space; rendering control parameters are determined based on the at least one screen visible point; based on the rendering control parameters and the attribute information of the path description points, a target path is rendered in the screen viewport. The embodiments of this disclosure expand the first number of screen path points to obtain a second number of path description points, increasing the number of points describing the path and improving the detail display of the path; furthermore, by determining the screen visible points visible in the screen viewport from the path description points, the visible range of the path is pre-determined, rendering control parameters are determined, and rendering is performed only on the screen visible points, achieving efficient clipping; the processing load of invisible path description points is significantly reduced, especially when only a small portion of the path is visible, resulting in a very significant performance improvement.

[0144] In some optional embodiments, the dot extension module 62 includes: A curve generation unit is used to generate a smooth first curve based on a first number of screen path points; the first curve passes through all screen path points. A curvature determination unit is used to determine the curvature of at least one path point based on the tangent of the first curve at at least one screen path point. The first interpolation unit is used to perform a first interpolation process on a first number of screen path points based on the curvature of at least one path point to obtain a second number of path description points.

[0145] Optionally, the curvature interpolation unit is specifically used to sort the curvature of at least one path point according to the magnitude of the curvature to obtain a curvature sequence; perform a first interpolation process on at least one screen path point corresponding to the curvature of at least one path point according to the curvature sequence to obtain a second number of path description points; wherein, more path description points are inserted on both sides of the screen path point corresponding to the curvature of the larger acquisition point in the curvature sequence, and fewer path description points are inserted on both sides of the screen path point corresponding to the curvature of the smaller acquisition point in the curvature sequence.

[0146] In some optional embodiments, the dot extension module 62 may further include: The second interpolation unit is used to perform a second interpolation process on the first number of screen path points to obtain a third number of interpolated path points. The curvature determination unit is used to determine the curvature of at least one interpolation point based on the tangent of the first curve at at least one interpolation path point. The first interpolation unit is used to perform a first interpolation process on a third number of interpolation path points based on the curvature of at least one interpolation point to obtain a second number of path description points.

[0147] Optionally, the second interpolation unit is specifically used to determine the line segment distance between the start and end points of the first curve; determine the hierarchy coefficient based on the proportional relationship between the line segment distance and the diagonal length of the screen viewport; and perform a second interpolation process on a first number of screen path points based on the hierarchy coefficient to obtain a third number of interpolated path points.

[0148] In some optional embodiments, the rendering control parameters include a start offset and an end offset; the control parameter determination module 64 includes: The visible point determination unit is used to determine a first visible point and a second visible point based on the path sequence corresponding to a second number of path description points; the first visible point is the screen visible point that is first in the path sequence of at least one screen visible point, and the second visible point is the screen visible point that is last in the path sequence of at least one screen visible point. The offset determination unit is used to determine the starting offset and the ending offset based on the first visible point and the second visible point.

[0149] Optionally, the offset determination unit is specifically used to determine, based on the first visible point and the path sequence, a first off-screen point adjacent to the first visible point in the path sequence; the off-screen point is a path description point in the path sequence that does not belong to the visible points; based on the second visible point and the path sequence, a second off-screen point adjacent to the second visible point in the path sequence; and to determine the starting offset based on the first off-screen point and the ending offset based on the second off-screen point.

[0150] Optionally, when determining the starting offset based on the first off-screen point and the ending offset based on the second off-screen point, the offset determination unit is used to determine the starting offset based on the distance between the first off-screen point and the first path description point in the path sequence; and to determine the ending offset based on the distance between the second off-screen point and the last path description point in the path sequence.

[0151] Optionally, rendering control parameters may also include visible range length and animation progress; The control parameter determination module 64 may further include: The visible range unit is used to determine the cumulative path distance based on a second number of path description points; and to determine the length of the visible range based on the cumulative path distance minus the start offset and the end offset. The animation progress unit is used to obtain the display length by subtracting the endpoint offset from the cumulative path distance, and to determine the animation progress based on the proportion of the display length in the cumulative path distance.

[0152] In some optional embodiments, the attribute information of the path description points includes coordinate information and distance parameters; the path rendering module 65 is specifically used to obtain the coordinate information of the path description points in screen space; determine the cumulative distance along the path from the starting point of each path description point in the second number of path description points to obtain the distance parameters; obtain the coordinate information and distance parameters corresponding to at least one screen-visible point from the second number of coordinate information and distance parameters based on rendering control parameters; and render the coordinate information and distance parameters corresponding to at least one screen-visible point to obtain the target path.

[0153] In some optional embodiments, the visible point identification module 63 is specifically used to determine at least one path description point whose normalized device coordinates are within the visible coordinate range as at least one screen visible point, based on the visible coordinate range.

[0154] In some optional embodiments, the apparatus provided in this embodiment may further include: The pose monitoring module is used to monitor and acquire the camera pose and screen viewport size corresponding to the changes in the screen space in response to the arrival of a preset period. The coordinate update module is used to determine the updated normalized device coordinates of the path description point in screen space based on the camera pose. The rendering update module is used to determine at least one updated screen visible point from the path description points based on the screen viewport size and updated normalized device coordinates; the updated screen visible point is the path description point visible in the screen viewport after the change in camera pose and screen viewport size; the module determines updated rendering control parameters based on at least one updated screen visible point; and the module renders the updated path in the screen viewport after the screen viewport size based on the updated rendering control parameters and the attribute information of the path description point.

[0155] The exemplary embodiments of the path drawing apparatus provided in this disclosure correspond to the exemplary path drawing method described above in terms of implementation. The corresponding content between the two can be referenced, combined, and cited, and will not be repeated here. The beneficial technical effects corresponding to the exemplary embodiments of the path drawing apparatus provided in this disclosure can be found in the corresponding beneficial technical effects of the exemplary path drawing method described above, and will not be repeated here.

[0156] Exemplary electronic devices Below, for reference Figure 7 This describes an electronic device according to embodiments of the present disclosure. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them.

[0157] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0158] like Figure 7 As shown, the electronic device includes one or more processors and memory.

[0159] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.

[0160] The memory can store one or more computer program products, and the memory can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products can be stored on the computer-readable storage medium, and the processor can run the computer program products to implement the path drawing methods of the various embodiments of this disclosure described above and / or other desired functions.

[0161] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0162] In addition, the input device may also include, for example, a keyboard, a mouse, etc.

[0163] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0164] Of course, for the sake of simplicity, Figure 7 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0165] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the path drawing methods according to various embodiments of this disclosure as described in the foregoing portions of this specification.

[0166] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0167] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the path drawing methods according to various embodiments of this disclosure as described in the foregoing portion of this specification.

[0168] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0169] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0170] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0171] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0172] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0173] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.

[0174] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0175] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A path drawing method, characterized in that, include: Project the first number of 3D path acquisition points onto the screen space to obtain the first number of screen path points; Based on the first number of screen path points, a second number of path description points are determined; the second number is greater than the first number. Based on the normalized device coordinates of the path description points in the screen space, at least one screen-visible point is determined from the path description points; the screen-visible point is a path description point that is visible in the screen viewport of the screen space. Rendering control parameters are determined based on the at least one visible point on the screen; Based on the rendering control parameters and the attribute information of the path description points, the target path is rendered in the screen viewport.

2. The method according to claim 1, characterized in that, The rendering control parameters include the start offset and the end offset; Determining rendering control parameters based on the at least one visible screen point includes: Based on the path sequence corresponding to the second number of path description points, a first visible point and a second visible point are determined; the first visible point is the screen visible point that is first in the path sequence of the at least one screen visible point, and the second visible point is the screen visible point that is last in the path sequence of the at least one screen visible point; Based on the first visible point and the second visible point, the starting point offset and the ending point offset are determined.

3. The method according to claim 2, characterized in that, Determining the start point offset and the end point offset based on the first visible point and the second visible point includes: Based on the first visible point and the path sequence, a first off-screen point adjacent to the first visible point in the path sequence is determined from off-screen points; the off-screen point is a path description point in the path sequence that does not belong to the visible point. Based on the second visible point and the path sequence, determine the second off-screen point in the path sequence that is adjacent to the second visible point; The starting point offset is determined based on the first off-screen point, and the ending point offset is determined based on the second off-screen point.

4. The method according to claim 3, characterized in that, The step of determining the starting point offset based on the first off-screen point and determining the ending point offset based on the second off-screen point includes: The starting point offset is determined based on the distance between the first off-screen point and the first path description point in the path sequence; The endpoint offset is determined based on the distance between the second off-screen point and the last path description point in the path sequence.

5. The method according to claim 2, characterized in that, The rendering control parameters also include the visible range length and animation progress; The step of determining rendering control parameters based on the at least one visible screen point further includes: The cumulative path distance is determined based on the second number of path description points; The length of the visible range is determined by subtracting the starting point offset and the ending point offset from the cumulative distance of the path. The display length is obtained by subtracting the endpoint offset from the cumulative path distance, and the animation progress is determined based on the proportion of the display length in the cumulative path distance.

6. The method according to any one of claims 1-5, characterized in that, Determining a second number of path description points based on the first number of screen path points includes: A smooth first curve is generated based on the first number of screen path points; the first curve passes through all of the screen path points. Based on the tangent of the first curve at at least one of the screen path points, determine the curvature of at least one path point; Based on the curvature of the at least one path point, a first interpolation process is performed on the first number of screen path points to obtain the second number of path description points.

7. The method according to claim 6, characterized in that, The step of performing a first interpolation process on the first number of screen path points based on the curvature of the at least one path point to obtain the second number of path description points includes: The curvature sequence is obtained by sorting the curvature of at least one path point according to its magnitude. According to the curvature sequence, at least one screen path point corresponding to the curvature of the at least one path point is subjected to a first interpolation process to obtain the second number of path description points; wherein, more path description points are inserted on both sides of the screen path point corresponding to the curvature of the larger acquisition point in the curvature sequence, and fewer path description points are inserted on both sides of the screen path point corresponding to the curvature of the smaller acquisition point in the curvature sequence.

8. The method according to claim 6 or 7, characterized in that, Before determining the curvature of at least one path point based on the tangent of the first curve at at least one of the screen path points, the method further includes: A second interpolation process is performed on the first number of screen path points to obtain a third number of interpolated path points; Determining the curvature of at least one path point based on the tangent of the first curve at at least one of the screen path points includes: Based on the tangent of the first curve at at least one of the interpolation path points, determine the curvature of at least one interpolation point; The step of performing a first interpolation process on the first number of screen path points based on the curvature of the at least one path point to obtain the second number of path description points includes: Based on the curvature of the at least one interpolation point, a first interpolation process is performed on the third number of interpolation path points to obtain the second number of path description points.

9. The method according to claim 8, characterized in that, The step of performing a second interpolation process on the first number of screen path points to obtain a third number of interpolated path points includes: Determine the line segment distance between the start and end points of the first curve; The hierarchy coefficient is determined based on the proportional relationship between the line segment distance and the diagonal length of the screen viewport; Based on the hierarchical coefficient, a second interpolation process is performed on the first number of screen path points to obtain a third number of interpolated path points.

10. The method according to any one of claims 1-9, characterized in that, The attribute information of the path description point includes coordinate information and distance parameters; The process of rendering the target path at the screen viewport based on the rendering control parameters and the attribute information of the path description points includes: Obtain the coordinate information of the path description point in the screen space; Determine the cumulative distance along the path from the starting point of the path for each of the second number of path description points to obtain the distance parameter. Based on the rendering control parameters, the coordinate information and distance parameters corresponding to the at least one visible point on the screen are obtained from the second number of coordinate information and distance parameters; The target path is obtained by rendering the coordinate information and distance parameters corresponding to at least one visible point on the screen.

11. The method according to any one of claims 1-10, characterized in that, Determining at least one visible point from the path description points based on the normalized device coordinates of the path description points in the screen space includes: Based on the visible coordinate range, at least one of the path description points whose normalized device coordinates fall within the visible coordinate range is determined as the at least one visible screen point.

12. The method according to any one of claims 1-11, characterized in that, Also includes: In response to reaching a preset period, the camera pose and screen viewport size corresponding to the changed screen space are monitored and acquired. Based on the camera pose, determine the updated normalized device coordinates of the path description point in the screen space; Based on the screen viewport size and the updated normalized device coordinates, at least one updated screen viewpoint is determined from the path description points; the updated screen viewpoint is a path description point visible in the screen viewport after the change in camera pose and screen viewport size. The update rendering control parameters are determined based on at least one updated screen viewpoint; Based on the updated rendering control parameters and the attribute information of the path description points, the updated path is obtained by rendering the screen viewport after the screen viewport size.

13. A path drawing device, characterized in that, include: The screen projection module is used to project a first number of three-dimensional path acquisition points onto the screen space to obtain a first number of screen path points. The point expansion module is used to determine a second number of path description points based on the first number of screen path points; the second number is greater than the first number. The visible point recognition module is used to determine at least one visible point from the path description points based on the normalized device coordinates of the path description points in the screen space; the visible point is a path description point that is visible in the screen viewport of the screen space. A control parameter determination module is used to determine rendering control parameters based on the at least one visible screen point; The path rendering module is used to render the target path in the screen viewport based on the rendering control parameters and the attribute information of the path description points.