Trajectory Rendering Method, Device, Storage Medium, and Electronic Device

By scaling, rotating and vibrating the basic spline trajectory, a variety and reasonable ballistic trajectory is generated, which solves the problems of high rendering complexity and single trajectory in the existing technology, and improves the gaming experience.

CN115212564BActive Publication Date: 2025-06-17NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210837644.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2025-06-17
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

When rendering ballistic trajectories, it is difficult to achieve diversity and rationality, mathematical formula calculations are difficult to visually adjust, and basic spline rendering leads to the same trajectory.

Method used

By loading the basic spline trajectory, you can obtain edit information for scaling, rotation and vibration, adjust the trajectory based on this information, generate the target trajectory and render it.

Benefits of technology

It realizes the diversification and rationality of trajectories, reduces the complexity of rendering, avoids the problem of the same trajectory, and improves the user's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115212564B_ABST
    Figure CN115212564B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer graphics, and in particular to a trajectory rendering method, a trajectory rendering device, a storage medium, and an electronic device. The trajectory rendering method includes: loading a basic spline trajectory; obtaining trajectory editing information for the basic spline trajectory; wherein the trajectory editing information includes any one or more of scaling information, rotation information, and vibration information; adjusting the basic spline trajectory according to the trajectory editing information to obtain a target trajectory, and rendering the target trajectory. The trajectory rendering method provided by the present disclosure can solve the problems of diversity and rationality in ballistic trajectory rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer graphics, and particularly to a trajectory rendering method, a trajectory rendering device, a storage medium, and an electronic device. Background Art

[0002] With the development of game projects, to implement skills with trajectories in skills, it is necessary to render and display the trajectory effects. The prior art generally uses mathematical functions to describe motion curves such as parabolas, or uses the most basic spline curves.

[0003] However, if implemented using mathematical formulas, it is impossible to effectively and visually adjust the trajectory effects, and as the complexity of the trajectory increases, the difficulty of obtaining the function describing the trajectory will also increase. Implementing with basic spline curves can solve the problems of non-visualization and difficult derivative calculation using mathematics, but there will be problems such as the bullets with the same trajectory being identical, and the effects not meeting expectations after scaling with distance.

[0004] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0005] The purpose of the present disclosure is to provide a trajectory rendering method, a trajectory rendering device, a storage medium, and an electronic device, aiming to solve the problems of diversity and rationality in trajectory rendering.

[0006] Other features and advantages of the present disclosure will become apparent through the following detailed description, or will be partially learned through the practice of the present disclosure.

[0007] According to one aspect of the embodiments of the present disclosure, a trajectory rendering method is provided, including: loading a basic spline curve trajectory; obtaining trajectory editing information for the basic spline curve trajectory; wherein the trajectory editing information includes any one or more of scaling information, rotation information, and vibration information; adjusting the basic spline curve trajectory according to the trajectory editing information to obtain a target trajectory, and rendering the target trajectory.

[0008] According to some embodiments of the present disclosure, based on the foregoing solution, when the trajectory editing information includes scaling information, the adjusting the basic spline curve trajectory according to the trajectory editing information to obtain a target trajectory includes: extracting a scaling type and a scaling ratio according to the scaling information, and determining scaling control points in the basic spline curve trajectory; wherein the scaling type includes approximate scaling or stretch scaling; calculating spline curve information after scaling adjustment based on the scaling type and the scaling ratio as the target trajectory.

[0009] According to some embodiments of the present disclosure, based on the foregoing solution, calculating the spline information after scaling adjustment as the target trajectory based on the scaling type and the scaling ratio includes: when the scaling type is approximate scaling, calculating the position information of the scaling control points on the first coordinate axis, the second coordinate axis, and the third coordinate axis and the spline trajectory based on the scaling ratio; or when the scaling type is stretch scaling, calculating the position information of the scaling control points on the first coordinate axis and the second coordinate axis and the spline trajectory based on the scaling ratio.

[0010] According to some embodiments of the present disclosure, based on the foregoing solution, when the trajectory editing information includes rotation information, adjusting the basic spline trajectory according to the trajectory editing information to obtain the target trajectory includes: extracting the rotation angle and the rotation direction according to the rotation information, and determining the rotation control points in the basic spline trajectory; calculating the spline information after rotation adjustment as the target trajectory based on the rotation angle and the rotation direction.

[0011] According to some embodiments of the present disclosure, based on the foregoing solution, the method further includes: configuring the rotation angle, and configuring the rotation angle includes: configuring the minimum random rotation angle and the maximum random rotation angle to obtain a random rotation angle range; randomly setting based on the random rotation angle range to determine the rotation angle.

[0012] According to some embodiments of the present disclosure, based on the foregoing solution, when the trajectory editing information includes vibration information, adjusting the basic spline trajectory according to the trajectory editing information to obtain the target trajectory includes: extracting the vibration intensity and the vibration direction according to the vibration information, and determining the vibration control points in the basic spline trajectory; calculating the spline information after vibration adjustment as the target trajectory based on the vibration intensity and the vibration direction.

[0013] According to some embodiments of the present disclosure, based on the foregoing solution, calculating the spline information after vibration adjustment as the target trajectory based on the vibration intensity and the vibration direction includes: for a vibration control point, determining the minimum distance value of the vibration control point based on the first distance and the second distance between the vibration control point and the adjacent two vibration control points; calculating a vibration value according to the minimum distance value and the vibration intensity, and calculating the vibration offset of the vibration control point according to the vibration value and the vibration direction; determining the position information of the vibration control point after vibration adjustment and the spline trajectory based on the vibration offset.

[0014] According to a second aspect of the embodiments of the present disclosure, there is provided a trajectory rendering device, including: a loading module configured to load a basic spline trajectory; an obtaining module configured to obtain trajectory editing information for the basic spline trajectory; wherein the trajectory editing information includes any one or more of scaling information, rotation information, and vibration information; an adjustment module configured to adjust the basic spline trajectory according to the trajectory editing information to obtain a target trajectory, and render the target trajectory.

[0015] According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, it implements the trajectory rendering method in the above embodiments.

[0016] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, characterized in that it includes: one or more processors; a storage device configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the trajectory rendering method in the above embodiments.

[0017] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:

[0018] In the technical solutions provided by some embodiments of the present disclosure, based on the basic spline trajectory, editing of the trajectory such as scaling, rotation, and vibration is supported. On the one hand, it can solve the problems of difficulty in visualizing and differentiating when calculating the trajectory using mathematical formulas, and reduce the complexity of trajectory rendering; on the other hand, the increase in editing rules can also improve the diversity and rationality of the ballistic trajectory, avoid the uniformity of trajectories, and enhance the user's gaming experience.

[0019] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the following drawings are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:

[0021] Figure 1 Schematically shows a flowchart of a trajectory rendering method in an exemplary embodiment of the present disclosure;

[0022] Figure 2 Schematically shows a diagram of a basic spline trajectory in an exemplary embodiment of the present disclosure;

[0023] Figure 3 Schematically shows a schematic diagram of a spline before scaling in an exemplary embodiment of the present disclosure;

[0024] Figure 4 Schematically shows a schematic diagram of an approximately scaled spline in an exemplary embodiment of the present disclosure;

[0025] Figure 5 Schematically shows a schematic diagram of a stretched and scaled spline in an exemplary embodiment of the present disclosure;

[0026] Figure 6 Schematically shows a schematic diagram of a spline after vibration adjustment in an exemplary embodiment of the present disclosure;

[0027] Figure 7 Schematically shows a schematic diagram of the composition of a trajectory rendering device in an exemplary embodiment of the present disclosure;

[0028] Figure 8 Schematically shows a schematic diagram of a computer-readable storage medium in an exemplary embodiment of the present disclosure;

[0029] Figure 9 Schematically shows a schematic diagram of the structure of a computer system of an electronic device in an exemplary embodiment of the present disclosure. Detailed implementation manners

[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art.

[0031] In addition, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the present disclosure.

[0032] The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0033] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined. Therefore, the actual execution order may change according to the actual situation.

[0034] The implementation details of the technical solutions of the embodiments of the present disclosure will be elaborated in detail below.

[0035] Figure 1 Schematically shows a flowchart of a trajectory rendering method in an exemplary embodiment of the present disclosure. As Figure 1 shown, the trajectory rendering method includes steps S101 to S103:

[0036] Step S101, loading a basic spline trajectory;

[0037] Step S102, obtaining trajectory editing information for the basic spline trajectory; wherein, the trajectory editing information includes any one or more of scaling information, rotation information, and vibration information;

[0038] Step S103, adjusting the basic spline trajectory according to the trajectory editing information to obtain a target trajectory, and rendering the target trajectory.

[0039] In the technical solutions provided by some embodiments of the present disclosure, on the basis of the basic spline trajectory, it is supported to edit the trajectory by scaling, rotating, and vibrating. On the one hand, it can solve the problems of non-visualization and difficult derivative calculation when using mathematical formulas to calculate the trajectory, and reduce the complexity of trajectory rendering; on the other hand, the increase of editing rules can also improve the diversity and rationality of the ballistic trajectory, avoid the uniformity of the trajectory, and enhance the user's gaming experience.

[0040] Next, each step of the trajectory rendering method in this exemplary embodiment will be described in more detail with reference to the accompanying drawings and embodiments.

[0041] In step S101, a basic spline trajectory is loaded.

[0042] In an embodiment of the present disclosure, in the development of some game projects, skills with ballistic effects can be implemented, and it is necessary to render the ballistic trajectory in a game engine (in this disclosure, UE4, that is, Unreal Engine 4, is taken as an example for illustration) to bring a better gaming experience to users.

[0043] Figure 2 Schematically shows a diagram of a basic spline trajectory in an exemplary embodiment of the present disclosure. As Figure 2As shown, the style of the basic spline trajectory loaded in UE4 is displayed, which includes multiple control points 201-204, shown as small square blocks. Among them, the left control point 201 is the starting point of the spline, and the right control point 204 is the ending point of the spline. When finally rendering the trajectory, the style of the ballistic trajectory flows from the starting point to the ending point.

[0044] In step S102, trajectory editing information for the basic spline trajectory is obtained; wherein, the trajectory editing information includes any one or more of scaling information, rotation information, and vibration information.

[0045] In an embodiment of the present disclosure, the trajectory rendering method provided by the present disclosure supports three editing information, including scaling, rotation, and vibration.

[0046] For scaling adjustment, it mainly includes two types: Smiliar approximate scaling and Stretch stretching scaling. Among them, Smiliar approximate scaling scales the scaling control points as a whole on the x, y, and z axes in three-dimensional space, while Stretch stretching scaling keeps the distance on one axis (usually the z axis, representing height) of the scaling control points unchanged and scales on the other two axes.

[0047] When the trajectory editing information is scaling information, the user needs to configure the scaling type, scaling ratio, and scaling control points during trajectory editing. The scaling type can determine the scaling method, whether to use approximate scaling or stretching scaling; the scaling ratio is used to calculate the position information of the control points after adjustment and the spline trajectory. A positive ratio value means magnification, and a negative ratio value means reduction; the scaling control points determine the spline trajectory to be scaled. It is possible to scale only the local trajectory corresponding to a part of the control points in the spline or scale the entire spline. Usually, the scaling control points can be configured by default as all the control points on the entire spline to scale the entire spline trajectory as a whole.

[0048] For rotation adjustment, the trajectory formed by the control points to be rotated is rotated as a whole according to the rotation angle and rotation direction.

[0049] When the trajectory editing information is rotation information, the user needs to configure the rotation angle, rotation direction, and rotation control points during trajectory editing to rotate the trajectory corresponding to the rotation control points by a certain angle in accordance with the rotation direction. For the rotation control points, similar to the scaling adjustment, during the rotation adjustment, it is also possible to rotate the entire spline or a part of the spline, or the rotation control points can be default set to all the control points of the spline.

[0050] In an embodiment of the present disclosure, the method further includes: configuring the rotation angle, and the configuring the rotation angle includes: configuring a minimum random rotation angle and a maximum random rotation angle to obtain a random rotation angle range; and randomly setting based on the random rotation angle range to determine the rotation angle.

[0051] Specifically, the rotation angle can be randomly generated by the system. The user can set the Min Roll Range, that is, the minimum random rotation angle, and the Max Roll Range, that is, the maximum random rotation angle, to obtain a random rotation angle range. Then, when rotating, a rotation angle can be randomly set from the random rotation angle range to rotate the control point.

[0052] In an embodiment of the present disclosure, the user can also set an angle as the rotation angle.

[0053] It should be noted that the rotation direction can also be determined by distinguishing the rotation angle as positive or negative. For example, if the rotation angle is positive, it is clockwise rotation; if the rotation angle is negative, it is counterclockwise rotation. Of course, the rotation angle and the rotation direction can also be set separately.

[0054] For vibration adjustment, the control point to be vibrated is offset according to the vibration intensity configured by the user, the vibration direction, and the calculated offset amount.

[0055] When the trajectory editing information is vibration information, the user needs to configure the vibration intensity, the vibration direction, and the vibration control points during trajectory editing. The greater the vibration intensity value, the greater the displacement offset of the control point; the vibration direction affects the offset direction of the control point; for the vibration control points, during vibration adjustment, it can be a single control point adjustment, or it can be a vibration adjustment for a partial spline line or the entire spline line composed of multiple control points. Additionally, the vibration control points can also be default set to all the control points of the spline line.

[0056] In an embodiment of the present disclosure, the vibration direction can be randomly set using a random vibration direction function. Specifically, for example, in the UE4 Unreal Engine for game development, the vibration direction is obtained in the way of FRotator(FMath::RandRange(-180,180),FMath::RandRange(-180,180),0).Vector(). Of course, the user can also configure a direction value as the vibration direction for vibration adjustment.

[0057] In the actual spline line editing process, these three editing methods can be flexibly applied and combined. For example, only rotation adjustment can be performed, or the three methods can be mixed and superimposed.

[0058] In step S103, the target trajectory is obtained by adjusting the basic spline trajectory according to the trajectory editing information, and the target trajectory is rendered.

[0059] In an embodiment of the present disclosure, the process of the scaling adjustment method is as follows: the scaling type and the scaling ratio are extracted according to the scaling information, and the scaling control points in the basic spline trajectory are determined; wherein, the scaling type includes approximate scaling or stretch scaling; based on the scaling type and the scaling ratio, the spline information after scaling adjustment is calculated as the target trajectory.

[0060] Specifically, when the scaling type is approximate scaling, the position information of the scaling control points on the first coordinate axis, the second coordinate axis, and the third coordinate axis and the spline trajectory are calculated based on the scaling ratio; or when the scaling type is stretch scaling, the position information of the scaling control points on the first coordinate axis and the second coordinate axis and the spline trajectory are calculated based on the scaling ratio.

[0061] Figure 3 Schematically shows a schematic diagram of a spline before scaling in an exemplary embodiment of the present disclosure. Refer to Figure 3 As shown, there are two control points 301 and 302 to be scaled, and the spline corresponding to the control points. Next, Smiliar approximate scaling and Stretch stretch scaling are respectively used to perform scaling adjustment on it.

[0062] Figure 4 Schematically shows a schematic diagram of a spline after approximate scaling in an exemplary embodiment of the present disclosure, that is, the control points will be scaled as a whole on the x, y, and z axes in the three-dimensional space to obtain 401 and 402, and the spline as a whole has changes.

[0063] Figure 5 Schematically shows a schematic diagram of a spline after stretch scaling in an exemplary embodiment of the present disclosure. Stretch stretch scaling can keep the distance between the control points unchanged in height, and finally obtain the control points 501 and 502, and the spline trajectory.

[0064] In an embodiment of the present disclosure, the process of the rotation adjustment method is as follows: the rotation angle and the rotation direction are extracted according to the rotation information, and the rotation control points in the basic spline trajectory are determined; based on the rotation angle and the rotation direction, the spline information after rotation adjustment is calculated as the target trajectory.

[0065] Specifically, the spline corresponding to the rotation control point is rotated by a certain angle according to the rotation direction to obtain the position information of the control point.

[0066] In an embodiment of the present disclosure, the process of the vibration adjustment method is as follows: extracting the vibration intensity and vibration direction according to the vibration information, and determining the vibration control points in the basic spline trajectory; calculating the spline information after vibration adjustment based on the vibration intensity and the vibration direction as the target trajectory.

[0067] Specifically, first, it is necessary to determine the vibration intensity Distrotion and the vibration direction VDir according to the vibration information. Then, based on the vibration intensity and the vibration direction, calculate the position information of the vibration control points after vibration adjustment, which specifically includes the following steps: for a vibration control point, determine the minimum distance value of the vibration control point based on the first distance and the second distance between the vibration control point and the adjacent two vibration control points; calculate the vibration value according to the minimum distance value and the vibration intensity, and calculate the vibration offset of the vibration control point according to the vibration value and the vibration direction; determine the position information of the vibration control point after vibration adjustment based on the vibration offset.

[0068] During vibration adjustment, vibration adjustment can be performed only on one vibration control point, or on multiple vibration control points in the spline. Only when adjusting multiple vibration control points, it is also necessary to traverse each single vibration control point one by one to determine the final trajectory style.

[0069] Taking the vibration adjustment of the entire spline as an example, starting from the second control point at the starting point of the spline to the penultimate control point, traverse the control points one by one; calculate the distance L1 between the control point and the previous control point and the distance L2 between the control point and the next control point respectively; obtain the minimum distance value through L1 and L2, denoted as Length; calculate the vibration value VDelta according to the minimum distance value Length × vibration intensity Distrotion; then calculate the vibration offset PosDelta through the vibration value VDelta × vibration direction VDir; finally, add the original value of the control point and the vibration offset PosDelta to obtain the position information of the control point, and at the same time, smoothly connect each control point to obtain the style after vibration adjustment.

[0070] Figure 6 Schematically shows a schematic diagram of a spline after vibration adjustment in an exemplary embodiment of the present disclosure. Refer to Figure 2 As shown, it is the spline style before adjustment. When vibrating the 201 control point, the spline style shown in Figure 6 is obtained.

[0071] In an embodiment of the present disclosure, it is also possible to perform adjustment of the Applied To Root modification point, that is, modify the control point to the target position.

[0072] Based on the above method, the ballistic trajectory can be edited using splines in a visual way; meanwhile, scaling, rotation, and vibration can be performed during runtime, thus obtaining diverse and reasonable ballistic trajectories.

[0073] Figure 7 Schematically shows a composition diagram of a trajectory rendering device in an exemplary embodiment of the present disclosure, as Figure 7 shown, the trajectory rendering device 700 may include a loading module 701, an acquisition module 702, and an adjustment module 703. Among them:

[0074] The loading module 701 is used to load the basic spline trajectory;

[0075] The acquisition module 702 is used to acquire trajectory editing information for the basic spline trajectory; wherein, the trajectory editing information includes any one or more of scaling information, rotation information, and vibration information;

[0076] The adjustment module 703 is used to adjust the basic spline trajectory according to the trajectory editing information to obtain a target trajectory, and render the target trajectory.

[0077] According to an exemplary embodiment of the present disclosure, the adjustment module 703 includes a scaling adjustment unit, which is used to extract a scaling type and a scaling ratio according to the scaling information, and determine scaling control points in the basic spline trajectory; wherein, the scaling type includes approximate scaling or stretch scaling; based on the scaling type and the scaling ratio, calculate the spline information after scaling adjustment as the target trajectory.

[0078] According to an exemplary embodiment of the present disclosure, the scaling adjustment unit is further used to, when the scaling type is approximate scaling, calculate the position information and the spline trajectory of the scaling control points on the first coordinate axis, the second coordinate axis, and the third coordinate axis based on the scaling ratio; or when the scaling type is stretch scaling, calculate the position information and the spline trajectory of the scaling control points on the first coordinate axis and the second coordinate axis based on the scaling ratio.

[0079] According to an exemplary embodiment of the present disclosure, the adjustment module 703 includes a rotation adjustment unit, which is used to extract a rotation angle and a rotation direction according to the rotation information, and determine rotation control points in the basic spline trajectory; based on the rotation angle and the rotation direction, calculate the spline information after rotation adjustment as the target trajectory.

[0080] According to an exemplary embodiment of the present disclosure, the adjustment module 703 includes a rotation configuration unit configured to configure a minimum random rotation angle and a maximum random rotation angle to obtain a random rotation angle range; and perform a random setting based on the random rotation angle range to determine the rotation angle.

[0081] According to an exemplary embodiment of the present disclosure, the adjustment module 703 includes a vibration configuration unit configured to extract a vibration intensity and a vibration direction according to the vibration information, and determine vibration control points in the basic spline trajectory; and calculate spline information after vibration adjustment based on the vibration intensity and the vibration direction as the target trajectory.

[0082] According to an exemplary embodiment of the present disclosure, the vibration configuration unit is further configured to, for one of the vibration control points, determine a minimum distance value of the vibration control point based on a first distance and a second distance between the vibration control point and two adjacent vibration control points; calculate a vibration value according to the minimum distance value and the vibration intensity, and calculate a vibration offset amount of the vibration control point according to the vibration value and the vibration direction; and determine position information of the vibration control point after vibration adjustment and the spline trajectory based on the vibration offset amount.

[0083] Specific details of each module in the above-described trajectory rendering device 700 have been described in detail in the corresponding trajectory rendering method, and thus will not be elaborated herein.

[0084] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more of the above-described modules or units may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by a plurality of modules or units.

[0085] In an exemplary embodiment of the present disclosure, a storage medium capable of implementing the above method is further provided. Figure 8 A schematic diagram schematically showing a computer-readable storage medium in an exemplary embodiment of the present disclosure is shown in Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present disclosure is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.

[0086] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is further provided. Figure 9 Schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the present disclosure.

[0087] It should be noted that Figure 9 The computer system 900 of the shown electronic device is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0088] As Figure 9 shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage section 908 into the random access memory (RAM) 903. In the RAM 903, various programs and data required for system operations are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. The input / output (I / O) interface 905 is also connected to the bus 904.

[0089] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read from it can be installed into the storage section 908 as needed.

[0090] In particular, according to an embodiment of the present disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, various functions defined in the system of the present disclosure are performed.

[0091] It should be noted that the computer-readable medium shown in the embodiments of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0092] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0093] The units involved in the embodiments described in the present disclosure can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation to the unit itself in some cases.

[0094] As another aspect, the present disclosure also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiments.

[0095] It should be noted that although several modules or units of devices for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0096] Those skilled in the art can easily understand from the description of the above embodiments that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0097] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure.

[0098] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A trajectory rendering method, characterized in that, Including: Loading a basic spline trajectory; Obtaining trajectory editing information for the basic spline trajectory; wherein, the trajectory editing information includes vibration information; Extracting a vibration intensity and a vibration direction according to the vibration information, and determining vibration control points in the basic spline trajectory. For a vibration control point, determining a minimum distance value of the vibration control point based on a first distance and a second distance between the vibration control point and two adjacent vibration control points; calculating a vibration value according to the minimum distance value and the vibration intensity, and calculating a vibration offset of the vibration control point according to the vibration value and the vibration direction; determining position information of the vibration control point after vibration adjustment and the spline trajectory based on the vibration offset.

2. The trajectory rendering method according to claim 1, characterized in that, The trajectory editing information further includes scaling information, and the method further includes: Extracting a scaling type and a scaling ratio according to the scaling information, and determining scaling control points in the basic spline trajectory; wherein, the scaling type includes approximate scaling or stretch scaling; Calculating spline information after scaling adjustment as a target trajectory based on the scaling type and the scaling ratio.

3. The trajectory rendering method according to claim 2, characterized in that, The calculating spline information after scaling adjustment as a target trajectory based on the scaling type and the scaling ratio includes: When the scaling type is approximate scaling, calculating position information of the scaling control point on a first coordinate axis, a second coordinate axis, and a third coordinate axis and the spline trajectory based on the scaling ratio; or When the scaling type is stretch scaling, calculating position information of the scaling control point on a first coordinate axis and a second coordinate axis and the spline trajectory based on the scaling ratio.

4. The trajectory rendering method according to claim 1, characterized in that, The trajectory editing information further includes rotation information, and the method further includes: Extracting a rotation angle and a rotation direction according to the rotation information, and determining rotation control points in the basic spline trajectory; Calculating spline information after rotation adjustment as a target trajectory based on the rotation angle and the rotation direction.

5. The trajectory rendering method according to claim 4, characterized in that, The method further includes: configuring the rotation angle, and the configuring the rotation angle includes: Configuring a minimum random rotation angle and a maximum random rotation angle to obtain a random rotation angle range; Randomly setting based on the random rotation angle range to determine the rotation angle.

6. A trajectory rendering device, characterized in that, Including: A loading module for loading a basic spline trajectory; An obtaining module for obtaining trajectory editing information for the basic spline trajectory; wherein, the trajectory editing information includes vibration information; An adjustment module for extracting a vibration intensity and a vibration direction according to the vibration information, and determining vibration control points in the basic spline trajectory. For a vibration control point, determining a minimum distance value of the vibration control point based on a first distance and a second distance between the vibration control point and two adjacent vibration control points; calculating a vibration value according to the minimum distance value and the vibration intensity, and calculating a vibration offset of the vibration control point according to the vibration value and the vibration direction; determining position information of the vibration control point after vibration adjustment and the spline trajectory based on the vibration offset.

7. A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the trajectory rendering method according to any one of claims 1 to 5.

8. An electronic device, characterized in that, Including: One or more processors; A storage device for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the trajectory rendering method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Systems and methods for authoring cross-browser HTML 5 motion path animation

    CN110235181A