Method and system for simulating movement of entity gyroscope

文档序号:593448 发布日期:2021-05-28 浏览:25次 中文

阅读说明:本技术 一种模拟实体陀螺移动的方法和系统 (Method and system for simulating movement of entity gyroscope ) 是由 周涛 于 2021-01-28 设计创作,主要内容包括:本申请涉及一种模拟实体陀螺移动的方法和系统,其中,该模拟实体陀螺移动的方法包括:基于资源信息渲染生成虚拟场地,获取虚拟陀螺在虚拟场地中的第一位置;根据虚拟陀螺的第一属性参数集生成切向加速度,根据虚拟陀螺的第二属性参数集生成径向加速度,根据径向加速度与切向加速度生成加速度向量,基于加速度向量确定虚拟陀螺在虚拟场地中的第二位置,控制虚拟陀螺从第一位置移动至第二位置。通过本申请,解决了相关技术中不能准确地模拟出虚拟陀螺的运动状态的问题,提升了对于虚拟陀螺的运动状态模拟的准确性。(The application relates to a method and a system for simulating the movement of a solid gyroscope, wherein the method for simulating the movement of the solid gyroscope comprises the following steps: rendering and generating a virtual field based on the resource information, and acquiring a first position of a virtual gyro in the virtual field; generating tangential acceleration according to a first attribute parameter set of the virtual gyroscope, generating radial acceleration according to a second attribute parameter set of the virtual gyroscope, generating an acceleration vector according to the radial acceleration and the tangential acceleration, determining a second position of the virtual gyroscope in the virtual field based on the acceleration vector, and controlling the virtual gyroscope to move from the first position to the second position. By the method and the device, the problem that the motion state of the virtual gyroscope cannot be accurately simulated in the related technology is solved, and the accuracy of motion state simulation of the virtual gyroscope is improved.)

1. A method of simulating movement of a physical gyroscope, the method comprising:

rendering and generating a virtual field based on resource information, and acquiring a first position of a virtual gyro in the virtual field;

generating a tangential acceleration from a first set of attribute parameters of a virtual gyroscope, wherein the first set of attribute parameters comprises: the method comprises the following steps of (1) setting a first preset parameter, a gyroscope friction force, a virtual field friction force and a virtual field inclination angle;

generating a radial acceleration according to a second set of attribute parameters of the virtual gyroscope, wherein the second set of attribute parameters includes: a second preset parameter, a tangential speed, a radius of the first position relative to the virtual field, a radial speed direction, a gyro friction force, a virtual field friction force and a virtual field inclination angle;

generating an acceleration vector according to the radial acceleration and the tangential acceleration, determining a second position of the virtual gyro in the virtual field based on the acceleration vector, and controlling the virtual gyro to move from the first position to the second position.

2. The method of claim 1, wherein generating the tangential acceleration from the first set of attribute parameters for the virtual gyroscope comprises:

acquiring the current tangential speed of the virtual gyroscope, and calculating the tangential acceleration a1 according to the following formula under the condition that the tangential speed is less than a preset tangential speed:

a1=C1×μ1×μ2×gcosθ

wherein C1 is a first preset parameter, mu 1 is the friction coefficient of a gyroscope, mu 2 is the friction coefficient of a virtual field, g is the gravity proportionality coefficient, and theta is the included angle between the virtual field and a standard horizontal plane.

3. The method of claim 2, wherein the method comprises:

and under the condition that the tangential speed is greater than the preset tangential speed, generating an updated tangential acceleration a1 according to the inverse number of the specific value of the tangential acceleration a1, and generating a tangential acceleration vector according to the updated tangential acceleration a 1.

4. Method according to claim 2 or 3, characterized in that the preset tangential velocity V1 is calculated according to the formula:

where K1 is the power parameter, ω is the speed of rotation, mobility is the power of the power, and m is the gyro mass.

5. The method of claim 1, wherein generating the radial acceleration from the second set of attribute parameters for the virtual gyroscope comprises:

the acceleration a2 due to the component force of gravity in the radial direction, the acceleration a3 due to centrifugal force, and the radial acceleration a4 due to frictional force are calculated according to the following formulas:

a2=-g×sinθ;

wherein g is a gravity proportionality coefficient, theta is an included angle between a virtual ground and a standard horizontal plane, C is a second preset parameter, v is a radial velocity, R is a distance from the current position of the virtual gyroscope to the center position of the virtual ground,is the direction of the radial velocity, μ 1 and μ 2 are the friction coefficient of the gyroscope and the friction coefficient of the virtual field, respectively;

the radial acceleration is generated based on the acceleration a2 due to the component force in the radial direction, the acceleration a3 due to the centrifugal force, and the radial acceleration a4 due to the frictional force in combination.

6. The method of claim 1, wherein generating an acceleration vector from the radial acceleration and tangential acceleration comprises:

generating a radial acceleration vector by multiplying the radial acceleration by a radial unit vector, and generating a tangential acceleration vector by multiplying the tangential acceleration by a tangential unit vector;

combining the radial acceleration vector and the tangential acceleration vector to generate the acceleration vector.

7. The method of claim 1, wherein the controlling the virtual top to move from a first position to a second position based on the acceleration vector comprises:

acquiring an initial velocity vector of the virtual gyroscope at a first position, and generating a velocity vector through vector calculation based on the acceleration vector and the initial velocity vector;

and determining a second position on the first position by combining the velocity vector, and controlling the virtual gyroscope to move from the first position to the second position.

8. A system for simulating the movement of a physical gyroscope, the system comprising: the device comprises a rendering module, an acquisition module and a processing module;

the rendering module is used for rendering and generating a virtual field based on the resource information;

the obtaining module is configured to obtain a first position of a virtual gyroscope in the virtual field, a first attribute parameter set, and a second attribute parameter set, where the first attribute parameter set includes: first preset parameter, top frictional force, virtual place frictional force and virtual place inclination, second attribute parameter set includes: a second preset parameter, a tangential speed, a radius of the first position relative to the virtual field, a radial speed direction, a gyro friction force, a virtual field friction force and a virtual field inclination angle;

the processing module is used for generating tangential acceleration according to a first attribute parameter set of the virtual gyroscope; generating a radial acceleration according to a second attribute parameter set of the virtual gyroscope; generating an acceleration vector according to the radial acceleration and the tangential acceleration; and determining a second position based on the acceleration vector and controlling the virtual top to move from the first position to the second position.

9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements a method of simulating a movement of a physical gyroscope as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of simulating a movement of a physical gyroscope according to any one of claims 1 to 7.

Technical Field

The application relates to the technical field of computer software, in particular to a method and a system for simulating the movement of an entity gyroscope.

Background

With the rapid development of mobile computer technology and the improvement of living standard, games increasingly enter the lives of the masses. Due to the popularity of spinning top toys and related animation works, there is a high interest among the young population in spinning top related products, and consequently, a batch of spinning top related games have also emerged.

In the related art, the gyro rotation and movement process in the virtual scene is simulated by a simple and plain two-dimensional or three-dimensional animation, and the movement path is usually preset according to a certain strategy. However, as the requirements of users on game systems are continuously increased, the simulation effect is not real enough only by controlling the gyroscope to move according to the preset path and then by a simple method of presenting the movement state of the gyroscope through two-dimensional or three-dimensional animation, so that the movement state of the virtual gyroscope cannot be accurately simulated.

At present, no effective solution is provided for the problem that the motion state of the virtual gyroscope cannot be accurately simulated in the related technology.

Disclosure of Invention

The embodiment of the application provides a method, a device, a system, computer equipment and a computer readable storage medium for simulating the movement of a virtual gyroscope, so as to at least solve the problem that the motion state of the virtual gyroscope cannot be accurately simulated in the related art.

In a first aspect, an embodiment of the present application provides a method for simulating a movement of a physical gyroscope, where the method includes:

rendering and generating a virtual field based on resource information, and acquiring a first position of a virtual gyro in the virtual field;

generating a tangential acceleration from a first set of attribute parameters of a virtual gyroscope, wherein the first set of attribute parameters comprises: the method comprises the following steps of (1) setting a first preset parameter, a gyroscope friction force, a virtual field friction force and a virtual field inclination angle;

generating a radial acceleration according to a second set of attribute parameters of the virtual gyroscope, wherein the second set of attribute parameters includes: a second preset parameter, a tangential speed, a radius of the first position relative to the virtual field, a radial speed direction, a gyro friction force, a virtual field friction force and a virtual field inclination angle;

generating an acceleration vector according to the radial acceleration and the tangential acceleration, determining a second position of the virtual gyro in the virtual field based on the acceleration vector, and controlling the virtual gyro to move from the first position to the second position.

In some of these embodiments, said generating tangential acceleration from the first set of property parameters of the virtual gyroscope comprises:

acquiring the current tangential speed of the virtual gyroscope, and calculating the tangential acceleration a1 according to the following formula under the condition that the tangential speed is less than a preset tangential speed:

a1=C1×μ1×μ2×gcosθ

wherein C1 is a first preset parameter, mu 1 is the friction coefficient of a gyroscope, mu 2 is the friction coefficient of a virtual field, g is the gravity proportionality coefficient, and theta is the included angle between the virtual field and a standard horizontal plane.

In some of these embodiments, the method comprises:

and under the condition that the tangential speed is greater than the preset tangential speed, generating an updated tangential acceleration a1 according to the inverse number of the specific value of the tangential acceleration a1, and generating a tangential acceleration vector according to the updated tangential acceleration a 1.

In some of these embodiments, the preset tangential velocity V1 is calculated according to the following formula:

where K1 is the power parameter, ω is the speed of rotation, mobility is the power of the power, and m is the gyro mass.

In some of these embodiments, said generating radial acceleration from the second set of attribute parameters of the virtual gyroscope comprises:

the acceleration a2 due to the component force of gravity in the radial direction, the acceleration a3 due to centrifugal force, and the radial acceleration a4 due to frictional force are calculated according to the following formulas:

a2=-g×sinθ;

wherein g is a gravity proportionality coefficient, theta is an included angle between a virtual ground and a standard horizontal plane, C is a second preset parameter, v is a radial velocity, R is a distance from the current position of the virtual gyroscope to the center position of the virtual ground,is the direction of the radial velocity, μ 1 and μ 2 are the friction coefficient of the gyroscope and the friction coefficient of the virtual field, respectively;

the radial acceleration is collectively generated based on the acceleration a2 due to the component force in the radial direction, the acceleration a3 due to the centrifugal force, and the radial acceleration a4 due to the frictional force.

In some of these embodiments, generating an acceleration vector from the radial acceleration and the tangential acceleration comprises:

generating a radial acceleration vector by multiplying the radial acceleration by a radial unit vector, and generating a tangential acceleration vector by multiplying the tangential acceleration by a tangential unit vector;

combining the radial acceleration vector and the tangential acceleration vector to generate the acceleration vector.

In some of these embodiments, said controlling said virtual top to move from a first position to a second position based on said acceleration vector comprises:

acquiring an initial velocity vector of the virtual gyroscope at a first position, and generating a velocity vector through vector calculation based on the acceleration vector and the initial velocity vector;

and determining a second position on the first position by combining the velocity vector, and controlling the virtual gyroscope to move from the first position to the second position.

In a second aspect, an embodiment of the present application provides a system for simulating a movement of a physical gyroscope, where the system includes: the device comprises a rendering module, an acquisition module and a processing module;

the rendering module is used for rendering and generating a virtual field based on the resource information;

the obtaining module is configured to obtain a first position of a virtual gyroscope in the virtual field, a first attribute parameter set, and a second attribute parameter set, where the first attribute parameter set includes: first preset parameter, top frictional force, virtual place frictional force and virtual place inclination, second attribute parameter set includes: a second preset parameter, a tangential speed, a radius of the first position relative to the virtual field, a radial speed direction, a gyro friction force, a virtual field friction force and a virtual field inclination angle;

the processing module is used for generating tangential acceleration according to a first attribute parameter set of the virtual gyroscope; generating a radial acceleration according to a second attribute parameter set of the virtual gyroscope; generating an acceleration vector according to the radial acceleration and the tangential acceleration; and determining a second position based on the acceleration vector and controlling the virtual top to move from the first position to the second position.

In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the method for simulating the movement of the physical gyroscope according to the first aspect.

In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for simulating a movement of a physical gyroscope as described in the first aspect.

Compared with the related art, according to the method for simulating the movement of the entity gyroscope, the tangential acceleration and the radial acceleration are respectively calculated according to the first attribute parameter set and the second attribute parameter set, then the tangential acceleration vector is generated according to the tangential acceleration and the tangential unit vector, the acceleration vector is generated according to the radial acceleration and the radial unit vector, the speed vector is determined through the acceleration, the speed vector is added to the first position to determine the second position, and finally the virtual gyroscope is controlled to move from the first position to the second position. The problem that the motion state of the virtual gyroscope cannot be accurately simulated in the related technology is solved, and the accuracy of the motion state simulation of the virtual gyroscope is improved.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:

fig. 1 is a schematic diagram of an application environment of a method for simulating a movement of a physical gyroscope according to an embodiment of the present application;

FIG. 2 is a flow chart of a method for simulating movement of a physical gyroscope according to an embodiment of the present application;

FIG. 3 is a schematic diagram of a virtual field simulating a method of moving a physical gyroscope according to an embodiment of the application;

FIG. 4 is a block diagram of a simulated physical gyroscope movement system according to an embodiment of the present application;

fig. 5 is an internal structural diagram of an electronic device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.

It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.

Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.

Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.

The method for simulating the movement of the entity gyroscope, which is provided by the present application, can be applied to the application environment shown in fig. 1, fig. 1 is an application environment schematic diagram of the method for simulating the movement of the entity gyroscope according to the embodiment of the present application, as shown in fig. 1, a terminal 10 communicates with a server 11 through a network, the terminal 10 uploads data generated by a game client to the server 11, and meanwhile, the server 11 obtains data from other terminals 10; the terminal 10 has installed thereon an application for running the analog physical gyro movement of the present embodiment. The user may issue some fixed operation instructions to the virtual gyroscope in the scene map through external devices such as a touch screen, physical keys, a keyboard and a mouse on the terminal 10. For the operation instruction, the terminal 10 can make corresponding information processing steps, such as calculating the acceleration of the virtual gyro, determining the position to which the virtual gyro will move based on the acceleration. Through the embodiment, the moving path of the virtual gyroscope can be simulated really. Further, the terminal 10 may be a smart phone, a tablet computer, a desktop computer, a notebook computer, and an intelligent wearable device; the server 11 may be an independent server or a server cluster composed of a plurality of servers.

The present application provides a method for simulating a movement of a solid gyroscope, and fig. 2 is a flowchart of the method for simulating a movement of a solid gyroscope according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:

step S201, generating a virtual field based on resource information rendering, and acquiring a first position of a virtual gyro in the virtual field; the resource information is information describing characteristics of a virtual field, the virtual field is a virtual environment for movement of a gyroscope, fig. 3 is a schematic diagram of the virtual field simulating a method for movement of a physical gyroscope according to an embodiment of the present application, and as shown in fig. 3, the terminal 10 controls the virtual gyroscope to move in the virtual field according to an operation instruction; wherein, the virtual field can be round, square, irregular, etc. Further, in the case that the virtual field is a circle, the position of the gyro may be represented by a combination of a radius and an angle, for example, at a certain time, the gyro stays at a first position, the first position is obtained to be a distance of 4 from the center position of the virtual field, the angle is 30 ° from the horizontal line, and the first position may be represented by (R4, θ 30 °);

step S202, generating tangential acceleration according to a first attribute parameter set of the virtual gyroscope, wherein the first attribute parameter set comprises: the method comprises the following steps of (1) setting a first preset parameter, a gyroscope friction force, a virtual field friction force and a virtual field inclination angle; the tangential acceleration can be calculated by the following equation 1:

a1 ═ C1 × μ 1 × μ 2 × gcos θ; equation 1

It should be noted that the first preset parameter C1 is a parameter customized by those skilled in the art according to actual requirements, μ 1 is a friction coefficient of a gyroscope, and μ 2 is a friction parameter of a field, where, under a standard field, the friction parameter of the field is 0. In this embodiment, the virtual field may be set as a scene with an inclination angle, and accordingly, when calculating the tangential acceleration, the inclination angle of the virtual field needs to be considered, that is, the cosine value of the inclination angle θ needs to be added to the above calculation formula in the calculation process;

step S203, generating a radial acceleration according to a second attribute parameter set of the virtual gyroscope, where the second attribute parameter set includes: the method comprises the following steps that a second preset parameter, tangential speed, the radius of a first position relative to a virtual field, the radial speed direction, gyroscopic friction, virtual field friction and a virtual field inclination angle are set, further, radial acceleration can be divided into acceleration generated by component force of gravity along the radial direction, acceleration generated by centrifugal force and acceleration generated by friction, and the components of the three accelerations are respectively calculated and then combined to generate an actual value of the radial acceleration;

step S204, generating an acceleration vector according to the radial acceleration and the tangential acceleration, determining a second position of the virtual gyro in the virtual field based on the acceleration vector, and controlling the virtual gyro to move from the first position to the second position, wherein the generating of the acceleration vector according to the radial acceleration and the tangential acceleration comprises: firstly, generating a tangential acceleration vector according to the product of the acceleration and the tangential unit vector, then generating a radial acceleration vector according to the product of the radial acceleration and the radial unit vector, and finally synthesizing the tangential acceleration and the radial acceleration vector to obtain an acceleration vector. Further, adding the velocity vector to the original velocity vector to obtain an updated velocity vector; further, for the virtual site, a second position is determined at the first position in combination with the updated velocity vector.

Through the above steps S201 to S204, compared with the method of controlling the gyroscope to move according to the preset path in the related art and then presenting the gyroscope moving state through the simple two-dimensional or three-dimensional animation, in this embodiment, the speed of the virtual gyroscope is divided into the tangential speed and the radial speed, the second position to be moved is determined based on the tangential speed and the radial speed, and finally the virtual gyroscope is controlled to move from the first position to the second position. The problem that the motion state of the virtual gyroscope cannot be accurately simulated in the related technology is solved through the embodiment, and the accuracy of simulating the motion state of the virtual gyroscope and the use experience of a player are improved.

In some of these embodiments, generating the tangential acceleration from the first set of attribute parameters for the virtual gyroscope includes: acquiring the current tangential speed of the virtual gyroscope, and calculating the tangential acceleration according to the following formula 2 under the condition that the tangential speed is less than the preset tangential speed:

a1 ═ C1 × μ 1 × μ 2 × gcos θ; equation 2

Wherein C1 is a first preset parameter, mu 1 is the friction coefficient of a gyroscope, mu 2 is the friction coefficient of a virtual field, g is the gravity proportionality coefficient, and theta is the included angle between the virtual field and a standard horizontal plane. When the tangential velocity is greater than the preset tangential velocity, an updated tangential acceleration a1 is generated from the inverse of the specific value of the tangential acceleration a1, and a tangential acceleration vector is generated from the updated tangential acceleration a 1.

In some of these embodiments, the preset tangential velocity V1 is calculated according to equation 3 as follows:

k1 is a power parameter, omega is a rotating speed, mobility is power, m is a gyroscope mass, and optionally, the rotating speed omega and the power mobility are adjusted to adjust the speed of the gyroscope, so that the characteristics of configuring different types of gyroscopes in the game system are realized.

In some of these embodiments, generating the radial acceleration from the second set of attribute parameters for the virtual gyroscope includes: the acceleration a2 due to the component force of gravity in the radial direction, the acceleration a3 due to the centrifugal force, and the radial acceleration a4 due to the frictional force are calculated according to the following equations 4, 5, and 6, respectively:

a2 ═ g × sin θ; equation 4

Wherein g is a gravity proportionality coefficient, theta is an included angle between the virtual ground and a standard horizontal plane, C is a second preset parameter, v is a radial velocity, R is a distance from the current position of the virtual gyroscope to the center position of the virtual ground,is the direction of the radial velocity, μ 1 and μ 2 are the friction coefficient of the gyroscope and the friction coefficient of the virtual field, respectively; the radial acceleration is generated based on the acceleration a2 due to the component force in the radial direction, the acceleration a3 due to the centrifugal force, and the radial acceleration a4 due to the frictional force in combination.

In some of these embodiments, controlling the movement of the virtual top from the first position to the second position based on the acceleration vector comprises: acquiring an initial velocity vector of the virtual gyroscope at a first position, and calculating and generating a velocity vector according to the acceleration vector and the initial velocity vector; and determining a second position on the first position by combining the velocity vector, and further controlling the virtual gyroscope to move from the first position to the second position. In the embodiment, the second position to which the virtual gyroscope subsequently moves is determined through the simulated speed, and when the gyroscope continuously moves, the simulation of the real moving path of the virtual gyroscope is realized.

It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.

The present embodiment further provides a system for simulating the movement of a physical gyroscope, where the system is used to implement the foregoing embodiments and preferred embodiments, and the description of the system that has been already described is omitted. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.

Fig. 4 is a block diagram of a structure of a system for simulating a movement of a physical gyroscope according to an embodiment of the present application, as shown in fig. 4, the system includes: a rendering module 41, an acquisition module 42 and a processing module 43;

the rendering module 41 is configured to render and generate a virtual site based on the resource information;

the obtaining module 42 is configured to obtain a first position of the virtual gyroscope in the virtual field, a first attribute parameter set, and a second attribute parameter set, where the first attribute parameter set includes: first preset parameter, top frictional force, virtual place frictional force and virtual place inclination, the second attribute parameter set includes: the second preset parameter, the tangential speed, the radius of the first position relative to the virtual field, the radial speed direction, the gyroscope friction force, the virtual field friction force and the virtual field inclination angle;

the processing module 43 is configured to generate a tangential acceleration according to the first attribute parameter set of the virtual gyroscope; generating a radial acceleration according to a second attribute parameter set of the virtual gyroscope; generating an acceleration vector according to the radial acceleration and the tangential acceleration; and determining a second position based on the acceleration vector and controlling the virtual gyroscope to move from the first position to the second position.

In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of simulating movement of a physical gyroscope. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.

In one embodiment, fig. 5 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application, and as shown in fig. 5, an electronic device is provided, where the electronic device may be a server, and the internal structure diagram may be as shown in fig. 5. The electronic device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the electronic device is used for storing data. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a method of simulating movement of a physical gyroscope.

Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the electronic device to which the present application is applied, and a particular electronic device may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

It should be understood by those skilled in the art that various features of the above embodiments can be combined arbitrarily, and for the sake of brevity, all possible combinations of the features in the above embodiments are not described, but should be considered as within the scope of the present disclosure as long as there is no contradiction between the combinations of the features.

The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:智能棋牌信息提示方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类