Railway model generation method and device, computer equipment and storage medium

By automatically identifying and displaying corner connecting arcs and railway elements during the railway model generation process, the problem of low efficiency in traditional scene model generation is solved, and efficient automatic generation of railway models is achieved.

CN117011450BActive Publication Date: 2026-05-19SHENZHEN WANGYU COMPUTER NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN WANGYU COMPUTER NETWORK CO LTD
Filing Date
2022-08-11
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Traditional scene model generation is inefficient, requires a lot of repetitive manual operations, and is difficult to iterate quickly.

Method used

By responding to the main railway route drawing operation, the main route is displayed, and the corner connecting arcs at intersecting sections are automatically identified and displayed. Combined with the railway element configuration operation, a railway model is automatically formed.

Benefits of technology

It improves the efficiency of railway model generation, simplifies the operation process, reduces the need for detailed drawing, and realizes the automatic generation of railway models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011450B_ABST
    Figure CN117011450B_ABST
Patent Text Reader

Abstract

The application relates to a railway model generation method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in response to a railway main route drawing operation, displaying at least one drawn main route; in the case that there is an intersection section in the at least one main route, in response to the end of the main route drawing, corresponding to a target angle that meets an angle screening condition in a plurality of main route angles formed by the intersection section at an intersection point, displaying a corner connecting arc line connecting the intersection section in an angle region where the target angle is located; in response to a railway element configuration operation, displaying at least one type of railway element distributed along the at least one main route and the corner connecting arc line to form a railway model containing the at least one type of railway element. The above method can significantly improve the generation efficiency of the railway model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for generating railway models. Background Technology

[0002] With the development of computer technology, the application of creating scene models in virtual environments is becoming more and more widespread, such as game scene models and simulated scene models based on real-world scenes.

[0003] However, traditional scene models are generally created entirely manually. Using traditional modeling methods, various scene elements required in the scene are manually created one by one according to the scene's layout requirements. This process involves a lot of repetitive work, making it difficult to iterate quickly and resulting in low model generation efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for generating railway models that can improve model generation efficiency, in order to address the aforementioned technical problems.

[0005] Firstly, this application provides a method for generating a railway model. The method includes:

[0006] In response to the main railway route drawing operation, display at least one main route that has been drawn;

[0007] If there are intersecting road segments in the at least one main route, in response to the end of the main route drawing, a target angle that meets the angle filtering condition among the multiple main route angles formed by the intersecting road segments at the intersection point is displayed in the angle area where the target angle is located;

[0008] In response to a railway element configuration operation, at least one type of railway element distributed along the at least one main route and the corner connecting arc is displayed to form a railway model containing the at least one type of railway element.

[0009] Secondly, this application also provides an apparatus for generating railway models. The apparatus includes:

[0010] The main route drawing module is used to respond to the railway main route drawing operation and display at least one drawn main route;

[0011] The corner connection arc generation module is used to, in the case that there are intersecting road segments in the at least one main route, in response to the end of the main route drawing, display the corner connection arc connecting the intersecting road segments in the area of ​​the angle where the target angle meets the angle filtering condition among the multiple angles of the main routes formed by the intersecting road segments at the intersection point.

[0012] A railway element adding module is used to display at least one type of railway element distributed along the at least one main route and the corner connecting arc in response to a railway element configuration operation, so as to form a railway model containing the at least one type of railway element.

[0013] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0014] In response to the main railway route drawing operation, display at least one main route that has been drawn;

[0015] If there are intersecting road segments in the at least one main route, in response to the end of the main route drawing, a target angle that meets the angle filtering condition among the multiple main route angles formed by the intersecting road segments at the intersection point is displayed in the angle area where the target angle is located;

[0016] In response to a railway element configuration operation, at least one type of railway element distributed along the at least one main route and the corner connecting arc is displayed to form a railway model containing the at least one type of railway element.

[0017] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0018] In response to the main railway route drawing operation, display at least one main route that has been drawn;

[0019] If there are intersecting road segments in the at least one main route, in response to the end of the main route drawing, a target angle that meets the angle filtering condition among the multiple main route angles formed by the intersecting road segments at the intersection point is displayed in the angle area where the target angle is located;

[0020] In response to a railway element configuration operation, at least one type of railway element distributed along the at least one main route and the corner connecting arc is displayed to form a railway model containing the at least one type of railway element.

[0021] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0022] In response to the main railway route drawing operation, display at least one main route that has been drawn;

[0023] If there are intersecting road segments in the at least one main route, in response to the end of the main route drawing, a target angle that meets the angle filtering condition among the multiple main route angles formed by the intersecting road segments at the intersection point is displayed in the angle area where the target angle is located;

[0024] In response to a railway element configuration operation, at least one type of railway element distributed along the at least one main route and the corner connecting arc is displayed to form a railway model containing the at least one type of railway element.

[0025] The aforementioned railway model generation method, apparatus, computer equipment, storage medium, and computer program product, in response to the main railway route drawing operation, display at least one drawn main route. If intersecting sections exist within the at least one main route, in response to the end of the main route drawing, a target angle that meets the angle selection criteria is displayed among multiple angles formed by the intersecting sections at their intersection points. Within the angle region where the target angle is located, a corner connecting arc connecting the intersecting sections is displayed. This allows for automatic identification of angle regions requiring corner connecting arcs based on the drawn main route, achieving corner connections between intersecting sections. This effectively reduces the need for detailed drawing by the operator, improving route drawing efficiency. Furthermore, in response to railway element configuration operations, at least one type of railway element distributed along at least one main route and the corner connecting arc is displayed, automatically forming a railway model containing at least one type of railway element. Throughout the process, only simple drawing and configuration operations by the operator are required to achieve automatic generation of the railway model, effectively simplifying the operator's processing and improving the generation efficiency of the railway model. Attached Figure Description

[0026] Figure 1 This is a diagram illustrating the application environment of a railway model generation method in one embodiment.

[0027] Figure 2 This is a flowchart illustrating a method for generating a railway model in one embodiment;

[0028] Figure 3 This is a schematic diagram illustrating the section that cannot be drawn when drawing the main route in one embodiment;

[0029] Figure 4 This is a schematic diagram illustrating the correction of the drawn main route in one embodiment;

[0030] Figure 5 This is a schematic diagram showing the main route drawn in one embodiment;

[0031] Figure 6 This is a schematic diagram illustrating the process of generating a corner connection arc in one embodiment;

[0032] Figure 7 This is a schematic diagram of a page showing the corner connection arc in one embodiment;

[0033] Figure 8 This is a global schematic diagram showing a railway model containing at least one railway element in one embodiment;

[0034] Figure 9 This is a partial schematic diagram of a railway model containing at least one railway element, as shown in one embodiment.

[0035] Figure 10 This is a schematic diagram illustrating the actual height difference between target locations in intersecting road segments in one embodiment;

[0036] Figure 11 This is a schematic diagram illustrating how a road segment changes with the height of a target point in one embodiment;

[0037] Figure 12 This is a schematic diagram of the main route displayed in different styles based on its height relative to the ground in one embodiment;

[0038] Figure 13 This is a schematic diagram of a page showing a bridge spanning rugged terrain in one embodiment;

[0039] Figure 14 This is a schematic diagram of a page showing an overpass crossing the main road in one embodiment;

[0040] Figure 15 This is a schematic diagram illustrating the process of generating a bridge in one embodiment.

[0041] Figure 16 This is a schematic diagram of a page showing a turnout rail in one embodiment;

[0042] Figure 17 This is a schematic diagram illustrating the process of determining the turnout track in one embodiment.

[0043] Figure 18 This is a schematic diagram of the process of integrating sleepers in one embodiment;

[0044] Figure 19 This is a schematic diagram of the process of integrating the track bed in one embodiment;

[0045] Figure 20 This is a schematic diagram illustrating the process of generating wires and utility poles in one embodiment;

[0046] Figure 21 This is a schematic diagram illustrating the process of extracting the impact of terrain and environment in one embodiment;

[0047] Figure 22 This is a schematic diagram illustrating the page changes when environmental elements are removed from the railway model display area in one embodiment.

[0048] Figure 23 This is a flowchart illustrating a method for generating a railway model in one embodiment;

[0049] Figure 24 This is a structural block diagram of a railway model generation device in one embodiment;

[0050] Figure 25 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] The railway model generation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other servers. In response to a user-triggered railway main route drawing operation, terminal 102 displays at least one drawn main route. If there are intersecting sections in the at least one main route, terminal 102, in response to the end of the main route drawing, displays a target angle among the multiple angles formed by the intersecting sections at their intersection points that meet the angle selection criteria. Within the angle area where the target angle is located, a corner connecting arc connecting the intersecting sections is displayed. In response to a railway element configuration operation, terminal 102 displays at least one type of railway element distributed along at least one main route and the corner connecting arc, forming a railway model containing at least one type of railway element. The railway elements can be pre-configured and stored in the memory of terminal 102 or server 104. The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc., equipped with displays. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc., equipped with displays. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0053] In a specific scenario, railway models can be applied to game scenes. The generation process of railway models can be implemented in a game engine (such as Unreal Engine, or UE) using Procedural Content Generation (PCG) technology. Specifically, the operator draws the main railway route, configures railway elements, and then generates the railway model in real time or offline according to defined rules and algorithms. The railway model can be generated in a single game scene or in batches across multiple game scenes. The smallest recurring unit in the railway model is the railway element, which can be drawn using 3D computer graphics software such as Houdini. The HDA (Houdini Digital Asset) service can package railway elements drawn in Houdini into reusable digital assets. The Houdini Engine plugin in the UE engine can then import these packaged digital assets into the UE game engine for use.

[0054] For example, to generate a railway model by importing railway elements drawn using Houdini software into the game engine UE, specifically, the Houdini Engine plugin in UE can be used to call the HDA service to import the HAD-packaged railway elements into UE to build the railway model. The Houdini Engine plugin can be replaced by the PCGFlow plugin, which has a visual workflow interface. PCGFlow is a new plugin developed based on the Houdini Engine plugin. When there are many types of railway elements in the game scene, using PCGFlow to manage the HAD-packaged railway elements is more convenient than using Houdini Engine. The PCGFlow plugin can be used in conjunction with the developed PCGSpline tool. PCGSpline is used to adjust the parameters of the railway model. Specifically, PCGSpline has functions such as display width and tangent control, can work independently of the terrain system, and supports the creation of custom parameter templates. Parameters can be modified and adjusted by referencing parameter templates for the drawn route. Specifically, the drawing of the main railway route can be achieved using the PCGSpline tool, or by reusing the UE engine plugin or using tools provided by the Houdini Engine plugin. The specific drawing method can be selected according to the actual needs of the scene.

[0055] In one embodiment, such as Figure 2 As shown, a method for generating a railway model is provided. The method is illustrated using a computer device as an example. Specifically, this computer device can be... Figure 1 The method for generating the railway model in terminal 102 specifically includes the following steps:

[0056] Step 202: In response to the railway main route drawing operation, display at least one main route that has been drawn.

[0057] The railway main route drawing operation is used to draw the main route of the railway. This operation can be achieved through line drawing, where the drawn lines can be at least one of curves and straight lines, such as all straight lines, all curves, or a combination of straight lines and curves. The railway main route can be drawn using a drawing tool or by inputting multiple sets of coordinates and fitting lines to multiple points represented by those coordinates. Specifically, the processor, in response to events that allow the operator to control the movement of the drawing tool, obtains the railway main route based on the movement path of the drawing tool or the fitted path of the selected positioning points during the movement, and displays it on the display interface. The movement of the drawing tool can be achieved by controlling the movement of the input device.

[0058] Specifically, the drawing tool can be a drawing pen, and the operator can control the movement of the drawing pen to draw the main railway route. For example, the operator can control the continuous movement of input devices such as a mouse or stylus, or touch the pen on a touch screen, so that the controlled drawing pen can draw continuous lines on the drawing interface. The process of drawing the main railway route can also be achieved by controlling the drawing pen to determine designated points in sequence and connecting these points sequentially. For example, the user controls a mouse, stylus, or other input device to be in the first position, so that the drawing pen is at the first point on the drawing interface. The processor responds to the user's trigger operation on the input device, determines the first point as the starting point, and then controls the input device to move so that the drawing pen moves to the second point on the drawing interface. The processor responds to the user's trigger operation on the input device again, and displays the line connecting the first point to the second point on the drawing interface. When the user controls the input device to move so that the drawing pen moves to the third point on the drawing interface, the processor responds to the user's third trigger operation on the input device, and displays the fitted curve of the first line connecting the first point to the second point and the second line connecting the second point to the third point, so that the drawn line is displayed as a smooth line. This process continues until the main railway route is drawn.

[0059] It should be noted that in actual application scenarios, since the vehicle model running on the railway is composed of multiple carriages and the turning angle is limited, the curvature of the drawn curve can be limited by restricting the movement range of the drawing pen during the curve drawing process. This ensures that the curvature of the drawn curve at any position is greater than the preset curvature, thereby ensuring the stable operation of the vehicle on the railway.

[0060] The main railway route can be drawn in a scene with a specific environment or in a scene without a specific environment. For example, when the railway model needs to be placed in a scene with a specific environment, the main railway route can be drawn first and then the specific environment can be added, or the specific environment can be added first and then the main route can be drawn in that specific environment.

[0061] The main railway route represents the overall distribution of railways in the railway model to be generated. It is used to determine the distribution of railways and the positional relationships between routes in the model. The number of main routes can be one or more (including two). These main routes may or may not intersect. For example, when there is one main route, it can be a smooth route where all parts do not intersect, such as an "L"-shaped, "S"-shaped, "C"-shaped, "U"-shaped, or "O"-shaped route. This main route can also be a looping route with intersections. A looping route refers to a continuous route that passes through the same target point from multiple different directions, such as a figure-eight or "&"-shaped route. When there are two or more main routes, these can be multiple smooth routes where all parts do not intersect, such as multiple parallel smooth routes. These two or more main routes can also be multiple smooth routes with intersections in each part, such as "+" shaped routes, "T" shaped routes, "H" shaped routes, "field" shaped routes, etc.

[0062] Specifically, in response to the operator's actions on the main route drawing interface, the processor controls the drawing tools provided on the main route drawing interface to trigger the railway main route drawing operation. Based on the lines or key points drawn by the drawing tools, and based on the lines drawn or the lines fitted based on the drawn key points, at least one main route is displayed on the main route drawing interface. The display style of the main route can be determined based on pre-configured style parameters. The display style of the main route includes the color, width, transparency, texture, etc. of the displayed main route. The display style of color, width, transparency, texture, etc. can be selected or adjusted through style parameters.

[0063] Step 204: If there are intersecting road segments in at least one main route, in response to the end of the main route drawing, the target angle that meets the angle filtering condition among the multiple main route angles formed by the intersecting road segments at the intersection point is displayed in the angle area where the target angle is located.

[0064] Intersecting road segments include at least two intersecting road segments within at least one main route. Each road segment passes through the intersection point and includes two sub-road segments bounded by the intersection point. The distances between the two sub-road segments belonging to the same road segment can be the same or different. Specifically, an intersecting road segment can be at least two intersecting road segments within a spiral route (such as a figure-eight route, an &-shaped route, etc.) with an intersection point, or it can be at least two intersecting road segments within at least two routes with an intersection point. The number of road segments is related to the number of intersections of the at least one main route at the intersection point. When the number of intersections of the at least one main route at the intersection point is N (N is a positive integer), the intersecting road segment at that intersection point includes N+1 road segments. For example, when the number of intersections of the at least one main route at the intersection point is 1, the intersecting road segment includes 2 road segments. In practical applications, to ensure reliable operation of trains on railways and avoid excessive intersections of main routes at the same location, the number of intersections at the same point can be limited to one by restricting the drawing interval or adjusting the position during the main route drawing process. For example... Figure 3 As shown, on the drawing page, the allowed drawing area of ​​the pen can be limited to areas other than the prohibited drawing area by displaying a prohibited drawing area. The prohibited drawing area can be a circular area with the intersection point as the center and a preset distance as the radius. For example, as... Figure 4 As shown, when a point overlapping with an existing intersection is detected in the main route being drawn, the position of the main route is corrected using curve position correction logic. Both the curve position correction logic and the limitation of the drawing interval can be implemented by limiting the minimum allowable distance between intersections. In a specific application, the main route can be multiple routes, such as... Figure 5 As shown, any two main routes can intersect, but the number of intersecting road segments at the same intersection point is two.

[0065] The completion of main route drawing can be determined either by responding to an operator's end action or by monitoring the current main route drawing data and automatically triggering a completion condition when the data meets the completion criteria. For example, a "Confirm" button can be displayed on the drawing interface, and the completion of main route drawing can be determined in response to the operator's confirmation. Another example is that the completion condition can be pre-configured as drawing M (M is a positive integer) main routes; when the operator has drawn M main routes, the completion of the Mth main route is automatically determined. Yet another example is that the completion condition can be pre-configured as the total length of the drawn routes reaching S; when the total length of the main routes drawn by the operator reaches S, the completion of main route drawing is automatically determined. In specific applications, the completion condition can be set according to the actual scenario requirements and is not limited here.

[0066] The main route angle comprises multiple angles obtained by dividing the L (L is a positive integer greater than 1) intersecting road segments at point O based on the intersecting road segments. Specifically, each road segment includes two sub-segments, one endpoint of which coincides with point O, and the other endpoint of which is one of the two endpoints of the road segment. The main route angle can be the angle between two adjacent sub-segments in a clockwise or counterclockwise direction centered at point O. The number of main route angles is ≤ 2L. For example, when the main route is a "+" shaped route, there are 2 intersecting road segments at the intersection point, 4 sub-segments, and 4 main route angles, each with an angle of 90°. When the main route is a "T" shaped route, there are 2 intersecting road segments at the intersection point, 3 sub-segments, and 3 main route angles, with angles of 90°, 90°, and 180° respectively. The length of a sub-segment, i.e., the distance between the endpoints of the sub-segment that do not coincide with the intersection point and the intersection point, can be a fixed value or a value determined based on the angle of the main route. For example, the smaller the angle of the main route, the longer the lengths of the two sub-segments that constitute the angle of the main route will be, so that the corner connecting arcs in the angle region determined based on the target angle and the sub-segments have a smaller curvature.

[0067] The angle selection criteria can include that the two sub-segments forming the angle of the main route do not belong to the same road segment interval and that the angle of the main route is within the target angle range. For example, in a "T"-shaped main route containing three main route angles, the two sub-segments forming a 180° angle belong to the same road segment interval; therefore, this 180° angle does not meet the angle selection criteria. The maximum and minimum critical angles of the target angle range can be set according to the actual scenario requirements. The minimum critical angle can range from (0° to 90°), and the maximum critical angle can range from [90° to 180°]. For example, the target angle range could be (75° to 135°).

[0068] The included angle region is the area where the target included angle is one of its interior angles. Specifically, this included angle region can be the area enclosed by the two adjacent sub-road segments that form the target included angle, and the line connecting the two non-intersecting endpoints of the two adjacent sub-road segments, where the target included angle is one of the interior angles of the enclosed region. The specific shape of the included angle region can be set according to the actual scene requirements.

[0069] An angle-connecting arc is an arc that smoothly connects two sub-segments that form a target angle in an intersecting road segment. Specifically, the angle-connecting arc can be an arc with a radius greater than a preset radius. The larger the radius of the arc, the more curved the arc. By limiting the radius of the angle-connecting arc, it can be ensured that the railway model generated based on the main route and the angle-connecting arc can enable the vehicle model to run smoothly.

[0070] Furthermore, such as Figure 6 As shown, the process of generating a corner connecting arc can include: determining the intersection point and four endpoints of two intersecting road segments; reordering the endpoint numbers in a clockwise or counterclockwise direction according to the position of the intersection point, resulting in endpoint 1, endpoint 2, endpoint 3, and endpoint 4; finding the adjacent endpoints of each endpoint, for example, endpoint 1 is adjacent to endpoints 2 and 4, and endpoint 2 is adjacent to endpoints 1 and 3; then determining the angle with the two lines connecting the two adjacent endpoints to the intersection point as sides and the intersection point as the vertex; taking a point on the angle bisector of the angle at a target distance from the vertex as a center point corresponding to the two lines; connecting the center point to the adjacent endpoints to generate a polyline including the two lines; adding points at the middle position of each segment on the polyline; connecting adjacent points sequentially; and repeating the process of adding points at the middle position of each segment and connecting them sequentially until a smooth curve is obtained. This smooth curve is the obtained corner connecting arc. It should be noted that the curves generated at some intersecting road sections may be too curved, resulting in an unnatural effect for the final corner connecting arc. Corner connecting arcs with excessive curvature can be removed by comparing the angle between the intersecting road sections with a set threshold. Specifically, this can be achieved by determining two vectors based on the distances from the adjacent endpoints to the intersection point and the directions from the endpoints to the intersection point. The two vectors are then multiplied. If the multiplication result is greater than a set threshold (e.g., 0.7), the corner connecting arc between the adjacent endpoints is determined to be an excessively curved corner connecting arc.

[0071] Specifically, the processor determines whether there is an intersection point in the at least one main route drawn by the operator based on the position of each point in the at least one main route. If the main route drawing is completed and there is an intersection point in the at least one main route, the processor determines at least two interval road segments contained in the intersecting road segment that passes through the intersection point in the at least one main route. The processor identifies multiple main route angles formed by the at least two interval road segments at the intersection point, filters out the target angle that meets the angle filtering conditions from the multiple main route angles, locates the angle region where the target angle is located, and displays the corner connecting arc connecting the intersecting road segments in the angle region.

[0072] Step 206, in response to the railway element configuration operation, displays at least one type of railway element distributed along at least one main route and corner connecting arcs to form a railway model containing at least one type of railway element.

[0073] In this model, a railway element is the unit that constitutes the railway model. Specifically, a railway element can be one or a combination of two or more components, such as a ballast bed, sleeper, rail, utility pole, or power line. More specifically, a railway element can be the smallest unit of each type of component in the railway model; for example, a railway element can include a unit length of ballast bed, a single sleeper, a unit length of rail, a single utility pole, or a unit length of power line.

[0074] The railway element configuration operation involves configuring at least one type of railway element required to generate a railway model. Specifically, this operation can involve selecting a subset of railway elements and confirming their selection to display them on the railway model display page. Alternatively, it can involve selecting a subset of railway elements and confirming their display parameters to ensure they are displayed according to those parameters. The selected railway elements can belong to different components of the railway model and can be chosen from a pool of candidate railway elements. These candidate elements can be imported from the railway element drawing platform or pre-drawn using the built-in railway element drawing tools.

[0075] For railway elements belonging to the same component, there can be multiple railway elements with different display styles. Multiple railway elements with different display styles can be configured to be mutually exclusive. When selecting a railway element, if the operator selects one of the multiple railway elements with different styles belonging to the same component, the selected railway element will be updated from the selectable state to the selected state, and the other railway elements belonging to the same component will be updated from the selectable state to the unselectable state.

[0076] A railway network can be formed by combining at least one main route and corner connecting arcs. Railway elements are distributed along each path in the railway network so that vehicles can travel along any path in the railway model.

[0077] Specifically, in the railway element configuration area, selectable railway elements are displayed. In response to the operator's railway element configuration operation triggered for at least a portion of the railway elements, the processor displays a railway model containing at least one type of railway element on the railway model display page. This at least one type of railway element is distributed along each route in the network formed by at least one main route and corner connecting arcs.

[0078] In a specific application, taking the drawing of multiple main routes in a game environment as an example, there is at least one intersection point between the multiple main routes. At each intersection point, there are four angles between the main routes. Among these angles, there are angles smaller than a pre-set minimum critical angle, and there are also target angles with angles greater than the pre-set minimum critical angle but less than the pre-set maximum critical angle. The processor responds to the completion of main route drawing, such as... Figure 7 As shown, the angle greater than the minimum critical angle is the target angle. Within each target angle region, the corner connecting arcs of the sub-segments forming the target angle are displayed. The processor responds to railway element configuration operations triggered by railway elements such as track bed, sleepers, rails, utility poles, and power lines, such as... Figure 8 and Figure 9 As shown, this displays one of the railway elements, such as track bed, sleepers, rails, utility poles, and power lines, distributed along each route in a network consisting of at least one main route and corner connecting arcs, to automatically generate a railway model in the game environment.

[0079] In this embodiment, in response to the main railway route drawing operation, at least one main route is displayed. If there are intersecting sections in the at least one main route, in response to the end of the main route drawing, a target angle that meets the angle selection criteria is displayed among the multiple angles formed by the intersection points of the intersecting sections. In the angle region where the target angle is located, a corner connecting arc connecting the intersecting sections is displayed. Based on the drawn main route, the angle region where the corner connecting arc needs to be added can be automatically identified, realizing the corner connection of the intersecting sections. This can effectively reduce the operator's drawing of details and improve the route drawing efficiency. Furthermore, in response to the railway element configuration operation, at least one type of railway element distributed along at least one main route and the corner connecting arc can be displayed, which can automatically form a railway model containing at least one type of railway element. In the whole process, only simple drawing and configuration operations are required from the operator to realize the automatic generation of the railway model, which can effectively simplify the operator's operation and improve the generation efficiency of the railway model.

[0080] During the drawing of the main route, the at least one main route drawn can have different heights or the same height. For example, in a virtual environment with different ground heights, at least one main route is displayed whose height varies with the undulations of the ground height. In some embodiments, in order to facilitate unified management of the main routes, the height of each point in the at least one drawn main route from the same virtual plane can be the same, that is, all points in the at least one drawn main route are on the same plane.

[0081] Specifically, in some embodiments, taking the example that all points in at least one main route are located on the same virtual plane, the railway model generation method further includes a height adjustment process for the main route. This height adjustment process specifically includes: in response to a height adjustment operation triggered for at least a portion of the positions in the at least one main route, displaying the main route whose height relative to the virtual plane has changed for at least a portion of the positions. Further, the intersecting sections in the above embodiments include at least two interval sections in the at least one main route, whose projection lines on the virtual plane intersect, and the actual height difference at the projection intersection point is less than a target difference.

[0082] In this embodiment, at least one main route is drawn on the same target plane, which is parallel to the virtual plane. The height difference between the target plane and the virtual plane can be arbitrary. For example, when the height difference between the target plane and the virtual plane where the at least one main route is drawn is 0, the virtual plane is the target plane where the at least one main route is drawn. When the height difference between the target plane and the virtual plane where the at least one main route is drawn is positive, the virtual plane is below the target plane where the at least one main route is drawn. When the height difference between the target plane and the virtual plane where the at least one main route is drawn is negative, the virtual plane is above the target plane where the at least one main route is drawn. For ease of explanation, the following embodiments use the virtual plane as the target plane where the at least one main route is drawn as an example.

[0083] The height adjustment operation involves adjusting at least a portion of a position along at least one main route to change the height of that portion of the position relative to the virtual plane. Specifically, this can involve increasing or decreasing the height of that portion of the position relative to the virtual plane. The height adjustment operation can be achieved by dragging a position along the main route up or down, or by selecting a specific position along the main route, displaying its current height data, and then modifying that height value. The specific implementation method can be configured according to the actual scenario and is not limited here.

[0084] An intersecting road segment comprises at least two road sections whose projected lines intersect on the virtual plane, and whose actual height difference at the projection intersection point is less than the target height difference. Each of the at least two road sections constituting the intersecting road segment has a target location point whose projection coincides with the intersection point of the projected lines. The line connecting these target location points is perpendicular to the virtual plane, and the actual height difference between the at least two road sections at the projection intersection point is the distance between these target location points. For example... Figure 10As shown, road segment 1 and road segment 2 constitute intersecting road segments. The projection of road segment 1 onto the virtual plane is projection line 1, and the projection of road segment 2 onto the virtual plane is projection line 2. The intersection of projection line 1 and projection line 2 is the intersection of projection lines. There is a target location point 1 where the projection of road segment 1 coincides with the intersection of the projection line, and there is a target location point 2 where the projection of road segment 2 coincides with the intersection of the projection line. The distance between target location point 1 and target location point 2 is the actual height difference. The target difference is a criterion used to determine whether at least two road segments with intersecting projection lines intersect in space. In specific applications, the target difference can be set according to the actual scenario. For example, the target difference can be the height that allows vehicles to pass, such as 3 meters, 4 meters, etc. For two road segments whose projected lines intersect on a virtual plane, and where the actual height difference between the two road segments at the projection intersection point is greater than or equal to the target height difference, the road segment with the lower height is located below the road segment with the higher height, and both road segments have a height sufficient to allow vehicle passage. For example, if the road segment with the lower height can be at ground level, the road segment with the higher height can be constructed above the road segment with a bridge. Alternatively, if the road segment with the higher height can be at ground level, the road segment with the lower height can be constructed below the road segment with a tunnel.

[0085] Specifically, in response to a height adjustment operation triggered by an operator targeting at least a portion of locations within at least one main route, the processor displays the main route from which the height of at least a portion of locations relative to the virtual plane has changed. During the height adjustment operation, the operation can be performed on a single location within the main route at a time, or on a segment of the main route consisting of two locations, where the endpoints of the segment are the two locations within the main route.

[0086] Furthermore, the process of adjusting the height of at least a portion of the main route can occur before the main route is drawn, so that intersecting road segments can be determined based on the height-adjusted main route, facilitating the accurate generation of corner connection arcs and improving data processing efficiency. Alternatively, the height adjustment process can occur after the corner connection arcs are generated. If the generated corner connection arc is not the actual required corner connection line, the height can be adjusted by modifying at least one road segment corresponding to the included angle area of ​​the corner connection arc. When the height difference between the adjusted road segments is greater than or equal to the target difference, the corner connection arc is removed from display.

[0087] In this embodiment, by adjusting the height of at least a portion of a position in at least one main route, at least two road segments that originally intersected in the main route can be changed from intersecting road segments to non-intersecting road segments. By changing the height of the road segments, it is possible to control whether to generate corner connecting arcs. This allows operators to easily adjust the height of the main route and effectively achieve accurate generation of corner connecting arcs, avoiding multiple modifications and improving data processing efficiency.

[0088] In some embodiments, in response to a height adjustment operation triggered for at least a portion of locations in at least one main route, displaying the main route in which the height of at least a portion of locations changes from the virtual plane includes: in response to a height adjustment operation triggered for a target point in at least one main route, adjusting the height of the target point to the height indicated by the height adjustment operation; and subsequently adjusting the height of two interval road segments centered on the target point in the main route so that the slope of the main route after the height change is less than a preset slope value.

[0089] The target point is a point selected by the operator from multiple points that constitute the main route. The processor adjusts the height in response to the height adjustment operation of the target point. When the height adjustment operation is to drag the target point in the main route up and down in the display page of the main route, the processor determines the adjusted height of the target point according to the drag distance and direction of the drag operation and displays the target point after the height adjustment.

[0090] To ensure the main route's gradient is less than a preset value, two road segments with varying elevations are displayed to follow the target point's elevation changes. These two road segments are located on the main route centered on the target point. The lengths of these two road segments with varying elevations can be the same or different, and their lengths can be fixed or variable, changing with the target point's elevation.

[0091] Furthermore, after the elevation of the target point changes, the specific changes in road segment 1 and road segment 2 centered on the target point are as follows: Figure 11 As shown. In section 1 and section 2, the height of each point changes sequentially according to its distance from the target point. Taking the target point as a point on a horizontal section of the main route as an example, when the target point's height changes from the first height to the second height, the height of each point in the section decreases sequentially from the target point to the other end point from the second height until it decreases back to the first height. The greater the change in the target point's height, the longer the section length, in order to reduce the slope of the section and keep the maximum slope of the main route within a range less than the preset slope value. Here, slope refers to the steepness of a surface unit, specifically the ratio of the vertical height of the slope to the horizontal distance.

[0092] In this embodiment, by adjusting the height of the target point while simultaneously adjusting the height of two sections of the main route centered on the target point, the gradient of the main route after the height change is less than the preset gradient value. This ensures that the gradient of each slope in the main route is controlled within a range less than the preset gradient value, enabling the generated railway model to facilitate the smooth operation of the vehicle model and improving the usability of the railway model.

[0093] In some embodiments, the method for generating a railway model further includes: displaying a virtual environment with differences in ground elevation in response to a virtual environment configuration event; further, displaying at least one drawn main route, including: displaying at least one drawn main route in the virtual environment; having the same elevation for each section of the at least one main route; and displaying sections of the main route with elevations higher than the ground elevation of the virtual environment and sections with elevations lower than the ground elevation differently.

[0094] The virtual environment configuration event is used to configure the virtual environment in which the railway model is situated. This virtual environment contains terrain with varying elevations. Specifically, this virtual environment can be a virtual game environment with terrain with varying elevations, or a virtual simulation environment with terrain with varying elevations. Terrain with varying elevations can realistically reflect actual ground conditions, improving the realism of the scene.

[0095] Different display styles can specifically refer to differences in at least one of the following: color, transparency, texture, etc. Since at least one main route is drawn with the same height, and this height differs from the actual ground level, different display styles are used for road segments where the height is higher than the virtual environment's ground level and road segments where the height is lower than the ground level. Figure 12 As shown, road segments in the main route that are higher than the ground level of the virtual environment are displayed with a fill color, while road segments in the main route that are lower than the ground level of the virtual environment are displayed transparently.

[0096] In this embodiment, the operator can intuitively determine the specific adjustment method to improve the adaptability between the virtual environment and the railway model. For example, for a section of track with a height lower than the ground level, the processor can adjust the height of that section to bring it above the ground. If the operator is not adjusting the height of a section of track with a height lower than the ground level, and tunnel mode is not enabled, the processor can adjust the ground height parameter of that section of track in the virtual environment to bring it above the ground.

[0097] In some embodiments, the method for generating a railway model further includes a bridge generation process, which specifically includes: in a virtual environment, displaying a bridge corresponding to a section of road in at least one main route and a corner connecting arc where the height difference between the bridge and the ground in the virtual environment is greater than a target difference value, and displaying at least one type of railway element distributed along the extension direction of the bridge surface on the bridge.

[0098] Specifically, the bridge includes a bridge deck and piers. The bridge is displayed for a specific section of road, including the bridge deck and the piers connecting the bridge deck to the ground. Further, at least one type of railway element is displayed on the bridge along the extension direction of the bridge deck, including: displaying at least one type of railway element distributed along the extension direction of the bridge deck on the bridge deck.

[0099] A bridge is a structure built to cross natural or man-made obstacles. Specifically, a bridge can be a grade-separated interchange at the intersection of two or more roads, allowing for multi-directional traffic flow without interference. It can also be a connecting bridge across terrain with significant elevation changes, such as mountain streams, or areas with challenging geological conditions, such as water. A bridge can consist of a deck and piers. The deck is the surface or platform on the bridge that allows for walking or crossing, while the piers are the structures that connect the deck to the ground and support it.

[0100] The virtual environment displays ground. Due to the influence of terrain, the ground height may vary in different locations. For example, mountain streams and lakes are terrains that need to be crossed. Bridges need to be built for the railway model to cross these terrains. For railway sections that need to be crossed at intersections with separate upper and lower levels, there is a height difference between the two sections, and bridges also need to be built for the railway model.

[0101] Specifically, the processor compares the height of each position along the main route and the corner connecting arcs with the ground in the virtual environment to determine the road segments where the height difference with the ground is greater than a target difference. For these road segments, a bridge with the same height as the road segment is constructed in the virtual environment. The bridge consists of piers and a deck. The deck is a platform with the same height as the road segment, and the piers connect the deck to the ground to support it. The piers are arranged at a certain interval, which can be fixed or variable. The number of piers is determined by the length of the road segment; the longer the road segment, the more piers are needed.

[0102] In this embodiment, by automatically generating bridges in sections of road where the height difference between the road and the ground in the virtual environment is greater than the target difference in at least one main route and corner connecting arc, it can adapt to virtual environments with complex terrain. It can also establish multiple railways with upper and lower layers and multiple directions that do not interfere with each other at the intersection of roads, which can effectively improve the convenience of building railway models in virtual scenes and improve the generation efficiency of railway models.

[0103] In some embodiments, the method for generating a railway model further includes: calculating the height difference between at least one main route and the corner connecting arc and the local ground, and determining the bridge section where the height difference between the at least one main route and the corner connecting arc is greater than a target difference; translating the bridge section bidirectionally along the width direction of the bridge section to obtain a bridge deck boundary line adapted to the bridge deck width; and laying the bridge deck along the bridge deck boundary line on the piers laid according to the height difference, wherein the width of the bridge deck is greater than the width of the bridge section.

[0104] Specifically, the boundary lines of the road segment are two boundary lines representing the width of the road segment. The center line of the road segment is the bisector located in the middle of the road segment along its extension direction. By translating the road segment in both directions along its width direction by the same distance in opposite directions, two bridge deck boundary lines with a distance between them equal to the width of the bridge deck are obtained. By translating the road segment in opposite directions by the same distance, the road segment can be positioned in the middle of the bridge deck, improving the compatibility between the bridge and the bridge deck.

[0105] In a specific application, the processor divides at least one main route and corner connecting arc into sections based on the terrain in the virtual environment and the height of at least one main route and corner connecting arc relative to the ground. It calculates the height difference between each section and the ground. If the height difference is greater than a set threshold, this section is extracted and used as the bridge section for generating the bridge. Figure 13 The diagram shows the processing procedure for the first type of bridge section that requires bridge generation due to terrain influences. Figure 14 The diagram illustrates the processing steps for a second type of bridge section that requires bridge generation due to the influence of other route sections. Further, the bridge generation process is as follows: Figure 15 As shown, bridge piers are laid at certain intervals along the bridge section. Based on the set bridge deck width, the center line of the bridge section is shifted to the left and right by the same distance to obtain the bridge deck boundary line. The bridge deck is then laid on the bridge piers along the bridge deck boundary line to generate the bridge.

[0106] In this embodiment, by bidirectionally translating the bridge section along its width, a bridge deck boundary line adapted to the bridge deck width is obtained. This ensures the section is within the bridge deck, improving the compatibility between the bridge and the deck. Furthermore, by laying the piers according to the height difference, the bridge deck laid on the piers maintains a height adapted to the route within the section.

[0107] In some embodiments, railway elements include rails; displaying at least one class of railway elements distributed along at least one main route and a corner connecting arc includes: displaying multiple sets of parallel rails distributed along at least one main route and a corner connecting arc; and displaying turnout rails at the intersection of two intersecting rails in two intersecting sets of parallel rails.

[0108] In the railway model, the rails are the tracks that allow vehicles to travel without turning. Parallel rails are two rails belonging to each railway track, and turnout rails are two rails belonging to different railway tracks connected at the connection point.

[0109] Specifically, the processor can determine the display positions of railway elements and turnout rails on the railway model display page by acquiring the rail positioning lines and turnout rail lines. In sections where railway tracks do not intersect, multiple sets of parallel rails are displayed, each corresponding to at least one main route and a corner connecting arc. At each intersection of two intersecting railway tracks, turnout rails are displayed.

[0110] In a specific application, such as Figure 16 As shown, the railway track includes the main route, the first turning arc connecting the arc, and the second turning arc, each of which has two parallel rails. Figure 16 From left to right, the track where the first corner connecting arc is located includes rail 1 and rail 2, the track where the main route is located includes rail 3 and rail 4, and the track where the second corner connecting arc is located includes rail 5 and rail 6. The intersection of rail 2 and rail 3, the intersection of rail 4 and rail 5, and the intersection of rail 2 and rail 5 are all intersections of two intersecting rails in two sets of parallel rails. At each intersection, a turnout rail is shown.

[0111] In this embodiment, by displaying parallel rails along at least one main route and a corner connecting arc, and displaying turnout rails at the intersection of two intersecting sets of parallel rails, vehicles can travel on parallel rails in the railway model and turn on the intersecting railways based on turnout rails, thus realizing multi-directional travel of vehicles in the railway model and improving the realism of the railway model.

[0112] In some embodiments, the method for generating a railway model further includes: obtaining multiple network lines consisting of at least one main route and corner connecting arcs; determining multiple sets of rail positioning lines that correspond one-to-one with the multiple network lines; each set of rail positioning lines includes two parallel rail positioning lines; when two sets of rail positioning lines intersect, determining the self-intersection point of the two intersecting rail positioning lines in the two sets of rail positioning lines; based on the two inner wheel trajectory lines obtained by translating the two intersecting rail positioning lines in the opposite direction, determining two intersection points between the two inner wheel trajectory lines and the two intersecting rail positioning lines; and using the two intersection points and the self-intersection point as turnout positioning points to determine the turnout rail line.

[0113] The railway network includes rail positioning lines and turnout rail lines. Each network line represents a path for a vehicle to travel on. A single network line can include multiple directly drawn main routes and new routes formed by connecting at least a portion of the main routes using corner connecting arcs. A network line can be a single line, such as the centerline of a main route or a corner connecting arc, or two parallel lines with a distance equal to the road width. For each network line, a set of rail positioning lines, including two parallel rail positioning lines, can be generated. The distance between the two parallel rail positioning lines is the required distance between two rails on the same track in the railway model. Turnout positioning points are used to determine the branching position and distance of turnouts. Based on these turnout positioning points, the turnout rail lines can be accurately obtained.

[0114] Specifically, the intersection of two sets of rail positioning lines facilitates a change of direction at the intersection, and the two ends of the corner connecting arc connect to the two intersecting sections of the track, such as... Figure 17 As shown, the processor determines the self-intersection point 1 of the intersecting rail positioning lines X and Y in the two sets of rail positioning lines at the intersection position. It then translates rail positioning line X along the first direction to obtain the inner wheel trajectory line M, and translates rail positioning line Y along the second direction to obtain the inner wheel trajectory line N. The first and second directions are opposite directions. The processor determines the intersection point 2 of the inner wheel trajectory line M and rail positioning line Y, and the intersection point 3 of the inner wheel trajectory line N and rail positioning line X. Using intersection point 2, intersection point 3, and self-intersection point 1 as turnout positioning points, the turnout rail line is determined.

[0115] In this embodiment, the processor locates the turnout by determining the self-intersection points of two intersecting rail positioning lines in two sets of rail positioning lines, as well as the two intersection points between the inner wheel trajectory line obtained by translation and the rail positioning lines. This allows for accurate determination of the turnout rail line, and further enables accurate display of railway elements and turnout rails on the railway model display page based on the rail positioning lines and the turnout rail line.

[0116] In some embodiments, determining the turnout rail line using two intersection points and a self-intersection point as turnout positioning points includes: determining two sub-segments with the intersection point as the first endpoint and the self-intersection point as the second endpoint; for each of the two sub-segments, rotating the second endpoint to the position closest to the self-intersection point with the first endpoint as the rotation center, such that the sub-segment is parallel to the other sub-segment; and using the rotated second endpoint as the extension starting point along the long sub-segment to obtain the turnout rail line.

[0117] In a specific application, such as Figure 17 As shown, the two sub-segments include sub-segment K from intersection point 2 to self-intersection point 1 and sub-segment H from intersection point 3 to self-intersection point 1. For sub-segment K, with intersection point 2 as the rotation center, rotate the other end of sub-segment K to the position closest to self-intersection point 1, making sub-segment K parallel to sub-segment H. Using the other end of the rotated sub-segment K as the extension starting point, extend sub-segment K to obtain sub-segment K1. Similarly, rotate and extend sub-segment H to obtain sub-segment H1, thus obtaining the turnout rail line including sub-segment K1 and sub-segment H1. In this embodiment, the processor, by rotating and extending the segment from the intersection point to self-intersection point in the above manner, can quickly and accurately determine the turnout rail line based on the turnout positioning point.

[0118] In some embodiments, railway elements include sleepers; displaying at least one class of railway elements distributed along at least one main route and a corner connecting arc includes: in non-intersecting sections of at least one main route and a corner connecting arc, displaying sleepers of a reference width spaced apart along at least one main route and a corner connecting arc; and in sections where at least one main route intersects with a corner connecting arc, displaying sleepers spaced apart and with a width greater than or equal to the reference width.

[0119] The sleeper is a component of the railway model. It supports the rails, maintains their position, and transfers the immense pressure from the rails to the track bed. The width of the sleeper is perpendicular to the direction of the rail's extension. The greater the distance between two rails on the same track, the wider the sleeper. Generally, the width between rails on all tracks in the same railway model is the same. The sleeper width determined based on the distance between two rails on the same track is the baseline width. Because multiple tracks intersect at intersections, the sleeper displayed at the intersection can support more than two rails simultaneously; therefore, the width of the sleeper displayed at the intersection is greater than or equal to the baseline width.

[0120] In this embodiment, by displaying sleepers of a reference width at intervals along at least one main route and corner connecting arcs in non-intersecting sections, and displaying sleepers at intervals with a width greater than or equal to the reference width in intersecting sections, the sleepers in intersecting sections can simultaneously support two or more rails, reducing the scattered distribution of sleepers and improving the stability of the supported rails.

[0121] In some embodiments, the method for generating a railway model further includes: determining a reference width of a sleeper based on the distance between parallel rails, wherein the reference width is greater than the distance between parallel rails; laying sleeper models of the reference width along at least one main route and a corner connecting arc; identifying sleeper model combinations that include multiple partially intersecting sleeper models in sections where at least one main route intersects with the corner connecting arc; performing Boolean operations on each sleeper model combination to obtain the overall sleeper model corresponding to each sleeper model combination, wherein the width of the overall sleeper model is greater than or equal to the reference width.

[0122] Boolean operations, a logical deduction method using digital symbols, include union, intersection, and subtraction. In graphics processing, Boolean operations are used to combine simple basic shapes to create new forms. In specific applications, in non-intersecting sections of at least one main route and a corner connecting arc, there are no intersecting tracks, and the sleepers are distributed at a certain spacing, without interfering with each other. However, in intersecting sections of at least one main route and a corner connecting arc, due to the presence of intersecting tracks, the distance between the tracks is smaller, such as... Figure 18 As shown, sleeper models of the reference width are laid along at least one main route and a corner connecting arc. There are some sleeper model combinations in the intersecting sections. There are intersecting parts between the sleeper models in the same sleeper model combination. Boolean operations are performed on each group of sleeper model combinations. According to the continuity of the object, each group of sleeper model combinations is combined into a whole sleeper model.

[0123] In this embodiment, by performing Boolean operations on each group of sleeper models, the sleeper models of the intersecting parts can be connected together to obtain a new overall sleeper model with increased width. This allows the sleepers in the intersecting sections to support more than two rails at the same time, which helps to improve the stability of the rails they support.

[0124] In some embodiments, railway elements include ballast; displaying at least one class of railway elements distributed along at least one main route and a corner connecting arc includes: displaying ballast laid along at least one main route and a corner connecting arc; and displaying ballast laid in the area enclosed by the corner connecting arc and intersecting sections.

[0125] The ballast bed is an important component of the railway track and forms the foundation of the track frame. It can be a layer of ballast laid on the roadbed surface beneath the sleepers. The main functions of the ballast bed are to support the sleepers, evenly transfer the pressure from above the sleepers to the roadbed surface, fix the position of the sleepers, prevent longitudinal or lateral movement, and significantly reduce the impact of roadbed deformation on the train wheels.

[0126] Specifically, such as Figure 19 As shown, the ballast distributed along at least one main route and the corner connecting arc is not laid in the area enclosed by the corner connecting arc and the intersecting section. By laying the ballast in the enclosed area of ​​the corner connecting arc and the intersecting section, the corner connecting arc and the intersecting section can be displayed as a whole, which can visually improve the overall display effect of the ballast and enhance the realism of the railway model. Furthermore, displaying the laid ballast in the enclosed area of ​​the corner connecting arc and the intersecting section includes: performing Boolean operations on the ballast distributed along at least one main route and the corner connecting arc to identify the enclosed area composed of at least three ballasts; and filling the enclosed area with ballast material to obtain the ballast covering the enclosed area.

[0127] Through Boolean operations, the processor can identify multiple track beds that are close to each other and connected along at least one main route and corner connecting arc. It can then identify an enclosed area consisting of at least three track beds. By filling the enclosed area with track bed material, the processor displays the enclosed area consisting of at least three track beds together with the original track beds as a whole, which can improve the overall display effect of the track beds and enhance the realism of the railway model.

[0128] In some embodiments, the method for generating a railway model further includes: displaying utility poles spaced at parallel offset lines along the at least one main route and the corner connecting arc; displaying a wire-carrying component on each utility pole; and displaying wires connecting the wire-carrying components on adjacent utility poles.

[0129] Utility poles are poles used to erect power lines. Since vehicles running on railway tracks require electricity, utility poles must be erected along at least one main route and a corner connecting arc. Each utility pole is equipped with a power line carrying component to support the power lines and ensure stable power transmission. The power lines are carried on the power line carrying components, and adjacent utility poles are connected based on the power lines carried on their respective power line carrying components along at least one main route and the corner connecting arc.

[0130] In a specific application, such as Figure 20As shown, a route offset is performed along at least one main route and a corner connecting arc to obtain an offset route for locating the installation range of utility poles. Based on a set interval, the installation coordinates of each utility pole are determined on the offset route, and the utility poles are then installed. After the utility poles are installed, the connected utility poles on the offset route are connected with wires to generate the utility poles and wires. In this embodiment, by displaying utility poles and wires along at least one main route and a corner connecting arc, a more complete operating environment can be added to the railway model, enhancing its realism.

[0131] In some embodiments, displaying wires between wire-carrying components connected to adjacent utility poles includes: displaying curved wires between the wire-carrying components on adjacent utility poles; wherein the curved wires are at a higher height near the utility poles than at a higher height away from the utility poles, and the degree of curvature of the wires is positively correlated with the distance between the adjacent utility poles.

[0132] Specifically, the wire-bearing components on adjacent utility poles that hold the wires are connected by wires, and the connected wires are controlled to bend and deform towards the ground. By displaying the bent wires between the wire-bearing components on adjacent utility poles, and showing the effect of the wires naturally drooping due to gravity, the processing of realistic wire display effects can be simplified, processing efficiency can be improved, and the realism of the railway model can be enhanced.

[0133] In some embodiments, the method for generating a railway model further includes: displaying a virtual environment containing a surface environment; displaying environmental elements in the surface environment; and de-displaying environmental elements in the surface environment located within the area where the railway model is located when the railway model is generated in the virtual environment.

[0134] Specifically, the surface environment refers to the ground environment that includes environmental elements existing on the earth's surface. These environmental elements can include plants, trees, buildings, etc. Since the railway model is created on the surface of a virtual environment, these surface elements will affect the movement of vehicles on the railway model. Figure 21 As shown, vegetation is displayed between the tracks of the railway model. The processor can identify the impact of the railway model on the surface environment within the virtual environment, determine the surface environment impact data, and then cancel the display of environmental elements within the surface environment impact range to obtain an updated display result. The generated railway model will affect the terrain height and the representation of surface environmental elements. In order to be compatible with manually modified data within the game engine and facilitate the iteration of the entire process, it is necessary to separate the surface environment impact data separately. The specific separation process is as follows: Figure 22As shown, further, the display environment elements in the surface environment are environment elements that can be configured by the operator according to type. The processor can respond to the operator's reconfiguration operation of the environment elements and display the environment elements outside the influence range of the surface environment in the virtual environment based on the surface environment influence data of the railway model.

[0135] In this embodiment, by canceling the display of environmental elements in the area where the railway model is located in the ground environment when a railway model is formed in the virtual environment, the impact of environmental elements on the movement of vehicles in the railway model can be reduced, and the environmental elements can be updated quickly and conveniently when they are updated.

[0136] This application also provides a game application scenario in which the above-mentioned railway model generation method is applied. Specifically, the application process of the railway model generation method in the game application scenario is as follows: Figure 23 As shown.

[0137] Taking a user (operator) who needs to build a railway model in a game scene, inputting multiple curves as the main line, the operator draws the curves using the PCGSpline tool. The processor, based on the positions of points on the multiple curves input by the operator, determines whether there are intersections among the curves. If intersections exist, the processor identifies the intersecting segments that pass through the intersection point. The processor determines the intersection point and endpoints of the intersecting segments. Based on the position of the intersection point, the endpoint numbers are reordered in a clockwise or counterclockwise direction. For each endpoint, adjacent endpoints are found, and then a center point is added between the two endpoints, and a line is drawn connecting them to generate a polyline. This polyline is then further augmented with points, and the average of the point positions is taken to obtain a smooth curve effect, resulting in a corner connecting arc. The dot product is calculated from the two ends of the intersecting segment pointing towards the center point. If the dot product exceeds a set threshold, it is determined to be a corner connecting arc with excessive curvature, and the processor removes it. Based on the drawn multiple curves and the generated corner connecting arcs, a road network containing multiple routes can be constructed.

[0138] The entire railway model generation process can be divided into four main parts: processing of railway elements, processing of bridges, processing of utility poles, and processing of the ground environment.

[0139] The processing of railway elements includes three parts: rails, sleepers, and ballast. Rails, sleepers, and ballast can be processed separately depending on whether their distribution location is an intersection (i.e., an intersecting section). For sections without intersections, they can be directly distributed according to the railway network. For intersection sections, the displayed rails include turnout rails. Turnout rails can be located by determining the turnout rail lines. The turnout rail lines can be two parallel lines obtained by translating the railway network lines, and the distance between these parallel lines is the rail distance. The processor identifies the self-intersection point 1 of the intersecting rail positioning lines X and Y at the intersection of the two sets of rail positioning lines. It then translates rail positioning line X along a first direction to obtain the inner wheel trajectory line M, and translates rail positioning line Y along a second direction to obtain the inner wheel trajectory line N. The first and second directions are opposite. The processor then identifies the intersection point 2 between the inner wheel trajectory line M and rail positioning line Y, and the intersection point 3 between the inner wheel trajectory line N and rail positioning line X. Finally, it determines the distance from intersection point 2 to self-intersection point 1. For sub-segment K and sub-segment H from intersection point 3 to self-intersection point 1, with intersection point 2 as the rotation center, rotate the other end of sub-segment K to the position closest to self-intersection point 1, making sub-segment K parallel to sub-segment H. Using the other end of the rotated sub-segment K as the extension starting point, extend along the longer sub-segment K to obtain sub-segment K1. Similarly, rotate and extend sub-segment H to obtain sub-segment H1, thus obtaining the turnout rail line including sub-segment K1 and sub-segment H1, and further determining the turnout rail. For sleepers, the width of the sleeper can be used to place facets representing sleepers along the curve, and then the facets of the intersecting parts are connected together as a whole using Boolean operations. Based on the continuity of the object, the model of the intersecting part is replaced with a new sleeper. For the ballast, it can be modeled by lofting along the curve, and multiple ballasts constituting the enclosed area can be merged into a whole using Boolean operations, and then sealed off.

[0140] The bridge processing involves two parts: piers and bridge deck. Specifically, the processor extracts the bridge curve, segments the curve based on the input terrain, calculates the height between each curve segment and the terrain, and if it exceeds a set threshold, extracts that segment as the bridge curve for generating the bridge. Pier models are then placed along the extracted bridge curve. Based on the set bridge deck width, the bridge curve is shifted to the left and right sides respectively, and bridge deck models are placed along the curve, resulting in a bridge including piers and a bridge deck.

[0141] The processing of utility poles includes two parts: the poles themselves and the wires. For the poles, the processor offsets curves in the road network and places the poles along these offset curves. For the wires, the processor connects the points on each pole where the wires will be placed, controlling the resulting wire segments to bend downwards, creating a naturally drooping wire effect.

[0142] For processing the surface environment, the processor identifies the impact of the railway model on the surface environment, determines the surface environment impact data, and then cancels the display of environmental elements within the surface environment's impact range, obtaining an updated display result. Furthermore, the generated railway model affects the terrain's height and the representation of surface environmental elements. The surface environment impact data can also be separated out. The display environmental elements within the surface environment are configurable by type by the operator. The processor can respond to the operator's reconfiguration of environmental elements and, based on the railway model's surface environment impact data, display environmental elements outside the surface environment's impact range in the virtual environment.

[0143] By using the above-mentioned railway model generation method, a railway system can be created quickly. By adjusting the parameter settings on the curve, various types of railway tracks can be realized. By configuring the input of different prefabricated railway elements, different railway model components can be generated. The operator only needs to provide the correct input according to their needs, and the tool can quickly generate the desired result after calculation. The whole process is not only highly controllable, but also greatly improves the production efficiency of game assets.

[0144] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0145] Based on the same inventive concept, this application also provides a railway model generation apparatus for implementing the railway model generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations of one or more railway model generation apparatus embodiments provided below can be found in the limitations of the railway model generation method described above, and will not be repeated here.

[0146] In one embodiment, such as Figure 24 As shown, a railway model generation device is provided, including: a main route drawing module 2402, a corner connecting arc generation module 2404, and a railway element adding module 2406, wherein:

[0147] The main route drawing module 2402 is used to display at least one main route drawn in response to the railway main route drawing operation.

[0148] The corner connection arc generation module 2404 is used to, in response to the end of the main route drawing, display the corner connection arc connecting the intersecting road segments in the area of ​​the angle where the target angle meets the angle filtering condition among the multiple angles of the main routes formed by the intersection points of the intersecting road segments when there are intersecting road segments in the at least one main route.

[0149] The railway element adding module 2406 is used to display at least one type of railway element distributed along the at least one main route and the corner connecting arc in response to the railway element configuration operation, so as to form a railway model containing the at least one type of railway element.

[0150] In one embodiment, all points in the at least one main route are located on the same virtual plane; the railway model generation device further includes a height adjustment module for displaying the main route whose height from the virtual plane changes in response to a height adjustment operation triggered for at least a portion of the positions in the at least one main route; the intersecting segments include at least two section segments in the at least one main route, the projection lines of the at least two section segments intersect on the virtual plane, and the actual height difference at the projection intersection point is less than a target difference.

[0151] In one embodiment, the height adjustment module is further configured to, in response to a height adjustment operation triggered for a target point in at least one of the main routes, adjust the height of the target point to the height indicated by the height adjustment operation; and subsequently adjust the height of two road segments centered on the target point in the main route so that the slope of the main route after the height change is less than a preset slope value.

[0152] In one embodiment, the railway model generation apparatus further includes a virtual environment configuration module for displaying a virtual environment with differences in ground elevation in response to a virtual environment configuration event;

[0153] The main route drawing module is also used to display at least one drawn main route in the virtual environment; each segment of the at least one main route has the same height; and the display styles of the segments of the main route whose height is higher than the ground height of the virtual environment are different from those of the segments whose height is lower than the ground height.

[0154] In one embodiment, the railway model generation apparatus further includes a bridge processing module, used to display a bridge deck and bridge piers connecting the bridge deck and the ground in the virtual environment, corresponding to the section of the at least one main route and the corner connecting arc where the height difference with the ground in the virtual environment is greater than a target difference; and to display at least one type of railway elements distributed along the extension direction of the bridge deck on the bridge deck.

[0155] In one embodiment, the bridge processing module is further configured to calculate the height difference between the at least one main route and the corner connecting arc and the ground, determine the bridge section with a height difference greater than a target difference among the at least one main route and the corner connecting arc; translate the bridge section bidirectionally along the width direction of the bridge section to obtain a bridge deck boundary line adapted to the bridge deck width; the bridge deck width is greater than the width of the bridge section; and lay the bridge deck along the bridge deck boundary line on the piers laid according to the height difference.

[0156] In one embodiment, the railway element includes rails; the railway model generation device further includes a rail adding module for displaying multiple sets of parallel rails distributed along the at least one main route and the corner connecting arc; and displaying turnout rails at the intersection of two intersecting sets of parallel rails.

[0157] In one embodiment, the rail adding module is further configured to acquire multiple road network lines formed by the at least one main route and the corner connecting arc; determine multiple sets of rail positioning lines corresponding one-to-one with the multiple road network lines; each set of rail positioning lines includes two parallel rail positioning lines; the rail positioning lines are used to determine the display position of the rails; when two sets of rail positioning lines intersect, determine the self-intersection point of the two intersecting rail positioning lines in the two sets of rail positioning lines; based on the two inner wheel trajectory lines obtained by translating the two intersecting rail positioning lines in the opposite direction, determine the two intersection points of the two inner wheel trajectory lines and the two intersecting rail positioning lines; use the two intersection points and the self-intersection point as turnout positioning points to determine the turnout rail line, the turnout rail line being used to determine the display position of the turnout rail.

[0158] In one embodiment, the rail adding module is further configured to determine two sub-segments with the intersection point as the first endpoint and the self-intersection point as the second endpoint; for each of the two sub-segments, with the first endpoint as the rotation center, the second endpoint is rotated to the position closest to the self-intersection point and such that the sub-segment is parallel to the other sub-segment; and the second endpoint after rotation is used as the extension starting point to extend the sub-segment to obtain the turnout rail line.

[0159] In one embodiment, the railway element includes sleepers; the railway model generation device further includes a sleeper adding module for displaying sleepers of a reference width spaced apart along the at least one main route and the corner connecting arc in the non-intersecting sections of the at least one main route and the corner connecting arc; and for displaying sleepers spaced apart and with a width greater than or equal to the reference width in the sections where the at least one main route intersects the corner connecting arc.

[0160] In one embodiment, the sleeper adding module is further configured to determine a reference width of the sleeper based on the distance between parallel rails, the reference width being greater than the distance between the parallel rails; lay sleeper models of the reference width along the at least one main route and the corner connecting arc; identify sleeper model combinations including multiple partially intersecting sleeper models in the section where the at least one main route intersects the corner connecting arc; perform Boolean operations on each group of sleeper model combinations to obtain the overall sleeper model corresponding to each group of sleeper model combinations, the width of the overall sleeper model being greater than or equal to the reference width.

[0161] In one embodiment, the railway element includes a ballast bed; the railway model generation device further includes a ballast bed adding module for displaying the laid ballast bed along the at least one main route and the corner connecting arc, and in the area enclosed by the corner connecting arc and the intersecting section.

[0162] In one embodiment, the track bed adding module is further configured to perform Boolean operations on the track beds distributed along the at least one main route and the corner connecting arc to identify an enclosed area consisting of at least three track beds; and to fill the enclosed area with track bed material to obtain a track bed covering the enclosed area.

[0163] In one embodiment, the railway model generation apparatus further includes a pole and wire adding module for displaying poles spaced at parallel offset lines along the at least one main route and the corner connecting arc; displaying wire carrying components on each of the poles; and displaying wires connecting the wire carrying components on adjacent poles.

[0164] In one embodiment, the utility pole and wire adding module is further configured to display a curved wire between wire-bearing components on adjacent utility poles; wherein the curved wire is higher near the utility pole than far from the utility pole, and the degree of curvature of the wire is positively correlated with the distance between the adjacent utility poles.

[0165] In one embodiment, the railway model generation apparatus further includes an environment element processing module for displaying a virtual environment containing a surface environment; displaying environmental elements in the surface environment; and de-displaying environmental elements in the surface environment located within the area of ​​the railway model when a railway model is formed in the virtual environment.

[0166] The aforementioned railway model generation device, in response to the main railway route drawing operation, displays at least one drawn main route. If intersecting sections exist within this main route, upon completion of the main route drawing, it identifies a target angle among multiple angles formed by the intersecting sections at their intersection points that meet the angle selection criteria. Within the angle region of the target angle, it displays a corner connecting arc connecting the intersecting sections. This device can automatically identify angle regions requiring corner connecting arcs based on the drawn main routes, achieving corner connections between intersecting sections. This effectively reduces the need for detailed drawing by the operator, improving route drawing efficiency. Furthermore, in response to railway element configuration operations, it displays at least one type of railway element distributed along the at least one main route and the corner connecting arc, automatically forming a railway model containing at least one type of railway element. Throughout the process, only simple drawing and configuration operations by the operator are required to automatically generate the railway model, effectively simplifying the operator's processing and improving the efficiency of railway model generation.

[0167] The modules in the aforementioned railway model generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0168] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 25As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for generating a railway model. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0169] Those skilled in the art will understand that Figure 25 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0170] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0171] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0172] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0174] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0175] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0176] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for generating a railway model, characterized in that, The method includes: In response to the main railway route drawing operation, display at least one main route that has been drawn; If there are intersecting road segments in the at least one main route, in response to the end of the main route drawing, a target angle that meets the angle filtering condition among the multiple main route angles formed by the intersecting road segments at the intersection point is displayed in the angle area where the target angle is located; In response to a railway element configuration operation, at least one type of railway element distributed along the at least one main route and the corner connecting arc is displayed to form a railway model containing the at least one type of railway element.

2. The method according to claim 1, characterized in that, All points in the at least one main route drawn are located on the same virtual plane; the method further includes: In response to a height adjustment operation triggered for at least a portion of the locations in at least one of the main routes, the main routes in which the height of the at least a portion of the locations relative to the virtual plane changes are displayed; The intersecting road segments include at least two section segments in the at least one main route, wherein the projection lines of the at least two section segments intersect on the virtual plane, and the actual height difference at the projection intersection point is less than the target difference.

3. The method according to claim 2, characterized in that, The main routes that respond to height adjustment operations triggered for at least a portion of locations in at least one of the main routes, and display changes in the height of the at least a portion of locations relative to the virtual plane, include: In response to a height adjustment operation triggered for a target point in at least one of the main routes, the height of the target point is adjusted to the height indicated by the height adjustment operation; The height of the two road segments centered on the target point in the main route is adjusted accordingly, so that the slope of the main route after the height change is less than the preset slope value.

4. The method according to claim 1, characterized in that, The method further includes: In response to virtual environment configuration events, display virtual environments where ground heights differ; The display drawing of at least one main route includes: In the virtual environment, at least one main route is displayed; all road segments in the at least one main route have the same height; the road segments in the main route whose height is higher than the ground level of the virtual environment are displayed differently from the road segments whose height is lower than the ground level.

5. The method according to claim 4, characterized in that, The method further includes: In the virtual environment, for the section of road where the height difference between the at least one main route and the corner connecting arc is greater than the target difference with the ground in the virtual environment, the bridge deck and the bridge piers connecting the bridge deck and the ground are displayed; On the bridge deck, at least one type of railway element is shown distributed along the extension direction of the bridge deck.

6. The method according to claim 5, characterized in that, The method further includes: Calculate the height difference between the at least one main route and the corner connecting arc and the ground, and determine the bridge section of the at least one main route and the corner connecting arc whose height difference is greater than the target difference; The bridge section is translated bidirectionally along its width to obtain a bridge deck boundary line that matches the bridge deck width; the bridge deck width is greater than the width of the bridge section. The bridge deck is laid along the boundary line of the bridge deck on the piers laid according to the height difference.

7. The method according to claim 1, characterized in that, The railway element includes railway tracks; The display shows at least one type of railway elements distributed along the at least one main route and the corner connecting arc, including: Displays multiple sets of parallel rails distributed along the at least one main route and the corner connecting arc; At the intersection of two intersecting sets of parallel rails, the turnout rail is shown.

8. The method according to claim 7, characterized in that, The method further includes: Obtain the network of lines formed by the at least one main route and the corner connecting arc; Multiple sets of rail positioning lines are identified, each corresponding one-to-one with the multiple road network lines; each set of rail positioning lines includes two parallel rail positioning lines; the rail positioning lines are used to determine the display position of the rails. When two sets of the rail positioning lines intersect, determine the self-intersection point of the two intersecting rail positioning lines in the two sets of intersecting rail positioning lines; The two intersecting rail positioning lines are translated in the opposite direction to obtain two inner wheel trajectory lines, and the two intersection points of the two inner wheel trajectory lines and the two intersecting rail positioning lines are determined. Using the two intersection points and the self-intersection point as turnout positioning points, the turnout rail line is determined, and the turnout rail line is used to determine the display position of the turnout rail.

9. The method according to claim 8, characterized in that, The method of determining the turnout track line by using the two intersection points and the self-intersection point as turnout positioning points includes: Determine two sub-line segments with each of the aforementioned intersection points as the first endpoint and the aforementioned self-intersection points as the second endpoint; For each of the two sub-segments, with the first endpoint as the rotation center, rotate the second endpoint to the position closest to the self-intersection point, such that the sub-segment is parallel to the other sub-segment; Using the rotated second endpoint as the starting point for extension, the sub-segment is extended to obtain the turnout rail line.

10. The method according to claim 1, characterized in that, The railway element includes sleepers; The display shows at least one type of railway elements distributed along the at least one main route and the corner connecting arc, including: In the non-intersecting sections of the at least one main route and the corner connecting arc, sleepers of a reference width are displayed at intervals along the at least one main route and the corner connecting arc; In the section where at least one main route intersects with the corner connecting arc, sleepers are displayed at intervals and with a width greater than or equal to the reference width.

11. The method according to claim 10, characterized in that, The method further includes: The reference width of the sleeper is determined based on the distance between the parallel rails, and the reference width is greater than the distance between the parallel rails; A sleeper model of reference width is laid along the at least one main route and the corner connecting arc. In the section where the at least one main route intersects with the corner connecting arc, a sleeper model combination including multiple sleeper models that partially intersect is identified. Boolean operations are performed on each group of sleeper model combinations to obtain the overall sleeper model corresponding to each group of sleeper model combinations. The width of the overall sleeper model is greater than or equal to the reference width.

12. The method according to claim 1, characterized in that, The railway elements include the track bed; The display shows at least one type of railway elements distributed along the at least one main route and the corner connecting arc, including: The paved roadbed is shown along the at least one main route and the corner connecting arc, as well as in the area enclosed by the corner connecting arc and the intersecting road section.

13. The method according to claim 12, characterized in that, The paved roadbed is shown in the area enclosed by the corner connecting arc and the intersecting road segment, including: Boolean operation is performed on the track beds distributed along the at least one main route and the corner connecting arc to identify the enclosed area consisting of at least three track beds; The enclosed area is filled with track bed material to obtain a track bed covering the enclosed area.

14. The method according to claim 1, characterized in that, The method further includes: Display utility poles spaced at parallel offset lines along the at least one main route and the corner connecting arc; The wire-carrying component is shown on each of the aforementioned utility poles; This shows the wires connecting the wire-bearing components on the adjacent utility poles.

15. The method according to claim 14, characterized in that, The display shows the wires connected between wire-bearing components on adjacent utility poles, including: A bent wire is shown between the wire-bearing components on the adjacent utility poles; The curved wire is higher near the utility pole than far from it, and the degree of curvature of the wire is positively correlated with the distance between adjacent utility poles at the location.

16. The method according to any one of claims 1 to 15, characterized in that, The method further includes: Display a virtual environment that includes the surface environment, and display environmental elements within that surface environment; When a railway model is created in the virtual environment, environmental elements within the area where the railway model is located in the surface environment are de-displayed.

17. A railway model generating device, characterized in that, The device includes: The main route drawing module is used to respond to the railway main route drawing operation and display at least one drawn main route; The corner connection arc generation module is used to, in the case that there are intersecting road segments in the at least one main route, in response to the end of the main route drawing, display the corner connection arc connecting the intersecting road segments in the area of ​​the angle where the target angle meets the angle filtering condition among the multiple angles of the main routes formed by the intersecting road segments at the intersection point. A railway element adding module is used to display at least one type of railway element distributed along the at least one main route and the corner connecting arc in response to a railway element configuration operation, so as to form a railway model containing the at least one type of railway element.

18. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 16.

19. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 16.

20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 16.