CN112843669A - Method and system for simulating movement of entity gyroscope - Google Patents

Method and system for simulating movement of entity gyroscope Download PDF

Info

Publication number
CN112843669A
CN112843669A CN202110121276.5A CN202110121276A CN112843669A CN 112843669 A CN112843669 A CN 112843669A CN 202110121276 A CN202110121276 A CN 202110121276A CN 112843669 A CN112843669 A CN 112843669A
Authority
CN
China
Prior art keywords
virtual
acceleration
gyroscope
tangential
radial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110121276.5A
Other languages
Chinese (zh)
Other versions
CN112843669B (en
Inventor
周涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Electronic Soul Network Technology Co Ltd
Original Assignee
Hangzhou Electronic Soul Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Electronic Soul Network Technology Co Ltd filed Critical Hangzhou Electronic Soul Network Technology Co Ltd
Priority to CN202110121276.5A priority Critical patent/CN112843669B/en
Publication of CN112843669A publication Critical patent/CN112843669A/en
Application granted granted Critical
Publication of CN112843669B publication Critical patent/CN112843669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/573Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using trajectories of game objects, e.g. of a golf ball according to the point of impact
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/003Navigation within 3D models or images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/10Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals
    • A63F2300/105Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals using inertial sensors, e.g. accelerometers, gyroscopes
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/65Methods for processing data by generating or executing the game program for computing the condition of a game character
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8082Virtual reality

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

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.

Description

Method and system for simulating movement of entity gyroscope
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:
Figure BDA0002922361650000021
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θ;
Figure BDA0002922361650000022
Figure BDA0002922361650000023
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,
Figure BDA0002922361650000024
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:
Figure BDA0002922361650000071
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
Figure BDA0002922361650000072
Figure BDA0002922361650000073
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,
Figure BDA0002922361650000074
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.

Claims (10)

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:
Figure FDA0002922361640000011
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θ;
Figure FDA0002922361640000021
Figure FDA0002922361640000022
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,
Figure FDA0002922361640000023
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.
CN202110121276.5A 2021-01-28 2021-01-28 Method and system for simulating physical gyro movement Active CN112843669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110121276.5A CN112843669B (en) 2021-01-28 2021-01-28 Method and system for simulating physical gyro movement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110121276.5A CN112843669B (en) 2021-01-28 2021-01-28 Method and system for simulating physical gyro movement

Publications (2)

Publication Number Publication Date
CN112843669A true CN112843669A (en) 2021-05-28
CN112843669B CN112843669B (en) 2024-02-06

Family

ID=75987811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110121276.5A Active CN112843669B (en) 2021-01-28 2021-01-28 Method and system for simulating physical gyro movement

Country Status (1)

Country Link
CN (1) CN112843669B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010175716A (en) * 2009-01-28 2010-08-12 Mitsubishi Heavy Ind Ltd Acceleration simulator and acceleration simulation method
CN103198233A (en) * 2013-04-25 2013-07-10 李援朝 Interactive toy spinning top simulation method and system
US20150260512A1 (en) * 2014-03-12 2015-09-17 Greiner Agencies, Inc. Baseball pitch quality determination method and apparatus
CN111318017A (en) * 2020-02-29 2020-06-23 深圳市腾讯信息技术有限公司 Virtual object control method, device, computer readable storage medium and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010175716A (en) * 2009-01-28 2010-08-12 Mitsubishi Heavy Ind Ltd Acceleration simulator and acceleration simulation method
CN103198233A (en) * 2013-04-25 2013-07-10 李援朝 Interactive toy spinning top simulation method and system
US20150260512A1 (en) * 2014-03-12 2015-09-17 Greiner Agencies, Inc. Baseball pitch quality determination method and apparatus
CN111318017A (en) * 2020-02-29 2020-06-23 深圳市腾讯信息技术有限公司 Virtual object control method, device, computer readable storage medium and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
袁立鹏;卢红影;崔淑梅;: "三维加速度模拟转台系统及控制策略研究", 机床与液压, no. 07 *

Also Published As

Publication number Publication date
CN112843669B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
US10953331B2 (en) Battlefield online game implementing augmented reality using IoT device
KR101954010B1 (en) Method and terminal for implementing virtual character turning
CN107376341B (en) Data processing method and device for gamepad and gamepad
US20150186571A1 (en) Methods and systems of providing items to customers via a network
JP2015529370A (en) Application fulfillment to device
CN115641421A (en) Motion-based navigation
US10572231B1 (en) Component grouping for application development
US9471299B1 (en) Updating code within an application
CN112843669A (en) Method and system for simulating movement of entity gyroscope
CN108769149B (en) Application partition processing method and device and computer readable storage medium
CN117830567A (en) Position updating method, device, medium and program product for virtual scene
JP2024518182A (en) Method and apparatus for displaying action effects, computer device, and computer program
CN113101653B (en) Virtual object type display method, data processing method and device
CN115671734B (en) Virtual object control method and device, electronic equipment and storage medium
CN117076143B (en) Equipment resource processing method, device, equipment and medium
US11157132B2 (en) Immersive experience password authentication in extended reality environments
CN116196622A (en) Information processing method and device in game
KR102276816B1 (en) Method and system for providing content composed of spatial unit
WO2024174586A1 (en) Element display method and apparatus, and device, medium and program product
Akhtar Revolutionary Gaming Style in Motion
CN115696424A (en) Social relationship determination method and device, computer equipment and storage medium
US20220146262A1 (en) Synchronization of a gyroscope in a virtual-reality environment
CN117753007A (en) Interactive processing method and device for virtual scene, electronic equipment and storage medium
Yun et al. Design of Shoot’em up Game Using OpenGL
CN116772787A (en) Pose deviation determining method, device, equipment, storage medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant