Disclosure of Invention
In view of the foregoing, the present application has been developed to provide a method, apparatus, device, and storage medium for simulating a chain transmission to improve flexibility in simulating a chain transmission in educational software.
In order to achieve the above object, the following specific solutions are proposed:
a method of simulating a chain drive, comprising:
constructing a chain transmission model, calculating the number of split joints of a chain in the chain transmission model according to parameters of the chain transmission model, and splitting the chain into a plurality of chain sections according to the number of split joints, wherein the chain transmission model comprises the chain and two chain wheels connected to the chain, and the two chain wheels are a driving wheel and a driven wheel respectively;
determining a first tangent line and a second tangent line which are tangent to the driving wheel and the driven wheel on the chain;
determining a driving wheel index circle line on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel, and determining a driven wheel index circle line on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel;
Calculating a coordinate set of each section of chain on the chain, wherein the coordinate set of each section of chain on the chain comprises the coordinates of each section of chain on the primary wheel reference circle line, the coordinates of each section of chain on the first tangent line, the coordinates of each section of chain on the secondary wheel reference circle line and the coordinates of each section of chain on the secondary tangent line;
and determining the motion trail of all the chain sections on the chain based on the coordinate set of each chain section on the chain under the preset rotating speed of the chain wheel and the preset running frame rate, and simulating the chain transmission animation of all the chain sections on the chain based on the motion trail in real time.
Optionally, the parameters of the chain transmission model include the position of the driving wheel, the position of the driven wheel, the pitch of the chain and the number of teeth of each sprocket;
according to the parameters of the chain transmission model, calculating the number of the split joints of the chain in the chain transmission model comprises the following steps:
determining the center distance between the driving wheel and the driven wheel according to the position of the driving wheel and the position of the driven wheel;
and according to the center distance, the pitch of the chain and the tooth number of each chain wheel, calculating the number of the split sections of the chain.
Optionally, the method further comprises:
calculating the pitch circle diameter of each chain wheel according to the pitch of the chain and the tooth number of each chain wheel;
constructing the reference circle of each chain wheel according to the reference circle diameter of the chain wheel;
the determining the driving wheel index circle line on the chain according to the tangential point of the first tangent line on the driving wheel and the tangential point of the second tangent line on the driving wheel comprises the following steps:
determining a driving wheel index circle line on the chain according to the tangential points of the first tangential line on the driving wheel and the tangential points of the second tangential line on the driving wheel;
and determining a driven wheel reference circle line on the chain according to the tangential point of the first tangent line on the driven wheel and the tangential point of the second tangent line on the driven wheel, comprising:
and determining the index circle line of the driven wheel on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel.
Optionally, the method further comprises:
determining an intersection point of the first tangent line and the driving wheel as a first tangent point, wherein the first tangent point is a first end point of the first tangent line;
Determining an intersection point of the second tangent line at the intersection of the driving wheels as a second tangent point, wherein the second tangent point is a first endpoint of the second tangent line;
determining an intersection point of the first tangent line at the intersection of the driven wheel as a third tangent point, wherein the third tangent point is a second end point of the first tangent line;
and determining an intersection point of the second tangent line at the driven wheel as a fourth tangent point, wherein the fourth tangent point is a second end point of the second tangent line.
Optionally, the parameters of the chain transmission model include a pitch circle diameter of the driving wheel;
the process for calculating the coordinates of each section of chain on the indexing circle line of the driving wheel comprises the following steps:
positioning the position of a first initial section chain segment on the indexing circle line of the driving wheel at the second tangent point, and calculating a first rotation angle of the first initial section chain segment according to the coordinates of the second tangent point and the coordinates of the fourth tangent point;
calculating the coordinates of the first starting section of chain according to the first rotation angle and the reference circle diameter of the driving wheel;
and calculating the rotation angle of each section of chain section on the indexing circle line of the driving wheel according to the first rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of chain section on the indexing circle line of the driving wheel according to the rotation angle of each section of chain section on the indexing circle line of the driving wheel and the indexing circle diameter of the driving wheel.
Optionally, the parameters of the chain drive model include a pitch of the chain;
a process for calculating coordinates of each chain segment on the first tangent line, comprising:
taking the tail roller position of the tail chain section on the indexing circle line of the driving wheel as the position of the second initial chain section on the first tangential line, and calculating a second rotation angle of the second initial chain section according to the position of the second initial chain section and the coordinates of the third tangential point;
calculating coordinates of the second starting section of chain according to the second rotation angle and the pitch of the chain;
and calculating the rotation angle of each section of the chain section on the first tangent line according to the second rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of the chain section on the first tangent line according to the rotation angle of each section of the chain section and the pitch of the chain.
Optionally, the parameters of the chain drive model include a pitch of the chain;
a process for calculating coordinates of each chain segment on the driven wheel pitch circle comprising:
constructing a tangent point pitch circle by taking the tail roller position of the tail chain segment on the first tangent line as a circle center and the pitch of the chain as a radius, and determining a target intersection point of the tangent point pitch circle and the reference circle of the driven wheel;
Determining a third rotation angle of a third initial section of chain segment on the driven wheel reference circle line according to the position of the last roller of the last section of chain segment on the first tangent line and the position of the target intersection point;
calculating coordinates of the third starting section of chain according to the third rotation angle and the pitch of the chain;
and calculating the rotation angle of each section of chain section on the reference circle line of the driven wheel according to the third rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of chain section on the reference circle line of the driven wheel according to the rotation angle of each section of chain section on the reference circle line of the driven wheel and the pitch of the chain.
Optionally, the parameters of the chain drive model include a pitch of the chain;
a process for calculating coordinates of each chain segment on the second tangent line, comprising:
taking the last roller position of the last section of chain on the reference circle line of the driven wheel as the position of the fourth starting section of chain on the second tangent line, and calculating the fourth rotation angle of the fourth starting section of chain according to the position of the fourth starting section of chain and the coordinates of the second tangent point;
calculating coordinates of the fourth starting section of chain according to the fourth rotation angle and the pitch of the chain;
And calculating the rotation angle of each section of the chain on the second tangent line according to the fourth rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of the chain according to the rotation angle of each section of the chain on the second tangent line and the pitch of the chain.
Optionally, the method further comprises:
and when the number of chain sections of the chain is updated to the updated number of sections under the condition that the parameters of the chain transmission model are fixed, playing the animation of the broken chain at the intersection point of the second tangent line and the driving wheel if the updated number of sections is smaller than the preset threshold value of the number of sections of the chain transmission model.
Optionally, the method further comprises:
when the number of chain sections of the chain is updated to be updated number of sections under the condition that the parameters of the chain transmission model are fixed, if the updated number of sections is larger than a preset number of sections threshold of the chain transmission model, determining the loose edge radian of the chain according to the updated number of sections;
in the chain transmission animation, a chain part of the chain positioned below is bent to the loose edge radian of the chain.
Optionally, the method further comprises:
and playing the animation of chain de-linking when the rotation angle of any one sprocket exceeds the tooth angle of the sprocket and the pitch of the chain is different from the pitch of any one sprocket.
An apparatus for simulating a chain drive, comprising:
the chain segment calculation unit is used for constructing a chain transmission model, calculating the number of split nodes of a chain in the chain transmission model according to parameters of the chain transmission model, and splitting the chain into a plurality of chain segments according to the number of split nodes, wherein the chain transmission model comprises the chain and two chain wheels connected to the chain, and the two chain wheels are a driving wheel and a driven wheel respectively;
the tangent line determining unit is used for determining a first tangent line and a second tangent line which are tangent to the driving wheel and the driven wheel on the chain;
the indexing circle line determining unit is used for determining a driving wheel indexing circle line on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel, and determining a driven wheel indexing circle line on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel;
the coordinate calculation unit is used for calculating a coordinate set of each section of chain segment on the chain, wherein the coordinate set of each section of chain segment on the chain comprises the coordinates of each section of chain segment on the indexing circle line of the driving wheel, the coordinates of each section of chain segment on the first tangential line, the coordinates of each section of chain segment on the indexing circle line of the driven wheel and the coordinates of each section of chain segment on the second tangential line;
The simulation transmission unit is used for determining the motion trail of all the chain sections on the chain based on the coordinate set of each section of the chain on the chain under the preset rotating speed of the chain wheel and the preset running frame rate, and simulating the chain transmission animation of all the chain sections on the chain based on the motion trail in real time.
Optionally, the parameters of the chain transmission model include the position of the driving wheel, the position of the driven wheel, the pitch of the chain and the number of teeth of each sprocket;
the chain segment calculation unit includes:
the center distance determining unit is used for constructing a chain transmission model and determining the center distance between the driving wheel and the driven wheel according to the position of the driving wheel and the position of the driven wheel;
and the splitting section number calculating unit is used for calculating the splitting section number of the chain according to the center distance, the pitch of the chain and the tooth number of each chain wheel, and splitting the chain into a plurality of sections of chain sections according to the splitting section number.
Optionally, the apparatus further comprises:
a reference circle diameter calculation unit for calculating the reference circle diameter of each sprocket according to the pitch of the chain and the tooth number of each sprocket;
A reference circle construction unit for constructing the reference circle of each sprocket according to the reference circle diameter of the sprocket;
the reference circle line determination unit includes:
the driving wheel reference circle line determining unit is used for determining the driving wheel reference circle line on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel;
and the driven wheel reference circle line determining unit is used for determining the driven wheel reference circle line on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel.
Optionally, the apparatus further comprises:
the first tangent point determining unit is used for determining an intersection point of the first tangent line and the driving wheel as a first tangent point, wherein the first tangent point is a first end point of the first tangent line;
the second tangent point determining unit is used for determining that an intersection point of the second tangent line at the driving wheel is a second tangent point, and the second tangent point is a first endpoint of the second tangent line;
a third tangent point determining unit, configured to determine that an intersection point at which the first tangent line intersects at the driven wheel is a third tangent point, where the third tangent point is a second endpoint of the first tangent line;
And the fourth tangent point determining unit is used for determining that the intersection point of the second tangent line at the driven wheel is a fourth tangent point, and the fourth tangent point is a second endpoint of the second tangent line.
Optionally, the parameters of the chain transmission model include a pitch circle diameter of the driving wheel;
the coordinate calculation unit comprises a first reference circle coordinate calculation unit;
the driving wheel reference circle coordinate calculating unit comprises:
a first driving wheel reference circle coordinate calculating subunit, configured to position a position of a first start section chain segment on the driving wheel reference circle line at the second tangent point, and calculate a first rotation angle of the first start section chain segment according to the coordinates of the second tangent point and the coordinates of the fourth tangent point;
a second driving wheel reference circle coordinate calculating subunit, configured to calculate a coordinate of the first starting section chain segment according to the first rotation angle and the reference circle diameter of the driving wheel;
and the third driving wheel reference circle coordinate calculating subunit is used for calculating the rotation angle of each section of chain section on the driving wheel reference circle line according to the first rotation angle and the tooth number of the driving wheel, and calculating the coordinate of the section of chain section according to the rotation angle of each section of chain section on the driving wheel reference circle line and the reference circle diameter of the driving wheel.
Optionally, the parameters of the chain drive model include a pitch of the chain;
the coordinate calculation unit comprises a first tangential coordinate calculation unit;
the first tangential coordinate calculating unit includes:
the first rotation angle calculation unit is used for taking the tail roller position of the tail chain section on the indexing circle line of the driving wheel as the position of the second initial chain section on the first tangent line, and calculating a second rotation angle of the second initial chain section according to the position of the second initial chain section and the coordinates of the third tangent point;
a first start coordinate calculation unit for calculating coordinates of the second start section of chain according to the second rotation angle and the pitch of the chain;
and the first chain segment coordinate calculation unit is used for calculating the rotation angle of each section of chain segment on the first tangent line according to the second rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of chain segment on the first tangent line according to the rotation angle of each section of chain segment on the first tangent line and the pitch of the chain.
Optionally, the parameters of the chain drive model include a pitch of the chain;
the coordinate calculation unit comprises a driven wheel reference circle line coordinate calculation unit;
The driven wheel reference circle line coordinate calculating unit comprises:
the first driven wheel pitch circle line coordinate calculating subunit is used for constructing a tangent point pitch circle by taking the tail roller position of a tail chain segment on the first cutting line as a circle center and the pitch of the chain as a radius, and determining a target intersection point of the tangent point pitch circle and the pitch circle of the driven wheel;
the second driven wheel reference circle line coordinate calculating subunit is used for determining a third rotation angle for rotating a third initial section of chain segment on the driven wheel reference circle line according to the tail roller position of the tail section of chain segment on the first cutting line and the position of the target intersection point;
a third driven wheel reference circle line coordinate calculating subunit, configured to calculate a coordinate of the third starting section of chain segment according to the third rotation angle and the pitch of the chain;
and the fourth driven wheel reference circle line coordinate calculating subunit is used for calculating the rotation angle of each section of chain section on the driven wheel reference circle line according to the third rotation angle and the tooth number of the driving wheel, and calculating the coordinate of the section of chain section according to the rotation angle of each section of chain section on the driven wheel reference circle line and the pitch of the chain.
Optionally, the parameters of the chain drive model include a pitch of the chain;
the coordinate calculation unit comprises a second tangential coordinate calculation unit;
the second tangential coordinate calculating unit includes:
a fourth rotation angle calculating unit, configured to use a last roller position of a last chain segment on the reference circle line of the driven wheel as a position of a fourth start chain segment on the second tangent line, and calculate a fourth rotation angle of the fourth start chain segment according to the position of the fourth start chain segment and coordinates of the second tangent point;
a second start coordinate calculation unit for calculating coordinates of the fourth start section of chain according to the fourth rotation angle and the pitch of the chain;
and the second chain segment coordinate calculating unit is used for calculating the rotation angle of each section of chain segment on the second tangent line according to the fourth rotation angle and the tooth number of the driving wheel, and calculating the coordinate of each section of chain segment on the second tangent line according to the rotation angle of each section of chain segment on the second tangent line and the pitch of the chain.
Optionally, the apparatus further comprises:
and the breaking animation playing unit is used for playing the animation of breaking the chain at the intersection point of the second tangent line and the driving wheel when the number of the chain sections of the chain is updated to be the updated number of the chain sections under the condition that the parameters of the chain transmission model are fixed and if the updated number of the chain sections is smaller than the preset number of the chain transmission model threshold value.
Optionally, the apparatus further comprises:
the chain loose edge radian determining unit is used for determining the chain loose edge radian according to the updated node number when the updated node number is larger than a preset node number threshold value of the chain transmission model when the chain segment node number of the chain is updated to the updated node number under the condition that the parameters of the chain transmission model are fixed;
and the loose edge simulation unit is used for bending the chain part of the chain positioned below to the loose edge radian of the chain in the chain transmission animation.
Optionally, the apparatus further comprises:
and the chain-off animation playing unit is used for playing the chain-off animation when the rotation angle of any one sprocket exceeds the tooth angle of the sprocket and the pitch of the chain is different from the pitch of any one sprocket.
An apparatus for simulating a chain drive includes a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the method for simulating a chain transmission as described above.
A storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of a method of simulating a chain drive as described above.
By means of the technical scheme, the chain transmission model is constructed, the number of split links of the chain in the chain transmission model is calculated according to the parameters of the chain transmission model, the chain is split into a plurality of sections of chain segments according to the number of split links, the chain transmission model comprises the chain and two chain wheels connected to the chain, the two chain wheels are a driving wheel and a driven wheel respectively, a first tangent line and a second tangent line which are tangential to the driving wheel and the driven wheel are determined on the chain, the cutting points of the first tangent line on the driving wheel and the cutting points of the second tangent line on the driving wheel are determined according to the cutting points of the first tangent line on the driven wheel and the cutting points of the second tangent line on the driven wheel, the coordinate set of each chain segment on the chain is calculated, the coordinate set of each chain segment on the chain comprises the coordinate of each chain segment on the cutting circle, the coordinate of each chain segment on the chain is set on the frame of the chain is preset, the coordinate of each chain segment on the chain segment of the chain is set on the basis of the coordinate of the frame of the chain, and the motion of the real-time is determined on the basis of the coordinate of the motion of all segments on the chain segment on the chain. Therefore, the coordinates of the lower chain sections can be determined by calculating the number of the split sections of the chain, the tangent line and the reference circle line, so that the chain transmission is simulated at the initial rotating speed and the running frame rate, the parameters of the chain transmission process are not required to be set, the chain transmission simulation can be realized based on part of necessary parameters, and the flexibility of simulating the chain transmission in the education software is improved.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The scheme can be realized based on the terminal with the data processing capability, and the terminal can be a client terminal for uploading the file.
Next, as described in connection with fig. 1, the method of simulating a chain drive of the present application may include the steps of:
and S110, constructing a chain transmission model, calculating the number of split links of the chain in the chain transmission model according to parameters of the chain transmission model, and splitting the chain into a plurality of links of chain segments according to the number of split links.
The chain transmission model can comprise a chain and two chain wheels connected to the chain, wherein the two chain wheels are a driving wheel and a driven wheel respectively.
As shown in fig. 2, the sprocket on the left side of fig. 2 is a driving wheel, the sprocket on the right side of fig. 2 is a driven wheel, the driving wheel and the driven wheel are tightly connected to a chain, and when the driving wheel rotates, the chain is driven to drive and the driven wheel is driven to rotate.
In particular, the parameters of the chain drive model may include the pitch of the chain, the roller diameter, and the pitch circle diameter of each sprocket.
Further, the pitch of the chain, the diameter of the roller and the reference circle diameter of each chain wheel can be used for calculating the related parameters of each chain wheel, and the related parameters are as follows:
;
wherein,for the pitch of the chain>For the roller diameter >Is the pitch circle diameter of the chain wheel, < >>Is the root circle diameter of the chain wheel, +.>Is the diameter of the tooth top circle of the chain wheel->Is the tooth height of the chain wheel.
And step S120, determining a first tangent line and a second tangent line which are tangent to the driving wheel and the driven wheel on the chain.
As shown in fig. 2, the first tangent line Q1 is tangent to the driving wheel and the driven wheel at the same time, intersects at the point a and the point C, and the second tangent line Q2 is tangent to the driving wheel and the driven wheel at the same time, intersects at the point B and the point D.
And S130, determining a driving wheel index circle line on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel, and determining a driven wheel index circle line on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel.
Wherein, the outer part of the scale circle line of the driving wheel surrounds part of the circular arc of the driving wheel, and the outer part of the scale circle line of the driven wheel surrounds part of the circular arc of the driven wheel.
As shown in fig. 2, the tangent point of the first tangent line Q1 on the driving wheel is a, the tangent point of the second tangent line Q2 on the driving wheel is B, so that the driving wheel reference circle line on the chain can be determined to be an arc L1, the tangent point of the first tangent line Q1 on the driven wheel is C, and the tangent point of the second tangent line Q2 on the driven wheel is D, so that the driven wheel reference circle line on the chain can be determined to be an arc L2.
The coordinates of each tangent point can be calculated based on the position of the driving wheel, the reference circle diameter of the driving wheel, the position of the driven wheel and the reference circle diameter of the driven wheel.
And step 140, calculating a coordinate set of each section of the chain.
The coordinate set of each section of chain on the chain can comprise the coordinates of each section of chain on the indexing circle line of the driving wheel, the coordinates of each section of chain on the first tangent line, the coordinates of each section of chain on the indexing circle line of the driven wheel and the coordinates of each section of chain on the second tangent line.
Specifically, the position of the initial section of chain segment and the rotation angle of the next section of chain segment can be calculated from one of the tangent points on the chain as a starting point and by combining the coordinates of the tangent point, and the position of the next section of chain segment and the rotation angle of the next section of chain segment can be calculated on the basis of the position of the initial section of chain segment and the rotation angle of the next section of chain segment, so that the coordinates of all the chain segments can be determined.
And step S150, determining the motion trail of all the chain sections on the chain based on the coordinate set of each section of the chain under the preset rotating speed of the chain wheel and the preset running frame rate, and simulating the chain transmission animation of all the chain sections on the chain based on the motion trail in real time.
Specifically, a three-dimensional model can be dynamically generated according to the coordinate set of each section of chain segment on the chain, the data of all the chain segments are calculated in real time according to the preset running frame rate and the preset sprocket rotating speed, so that the motion trail of all the chain segments on the chain is determined, and after the motion trail of all the chain segments is determined, the chain transmission animation of the motion trail can be played.
The preset operation frame rate may be 30 frames to 60 frames.
According to the simulation chain transmission method, a chain transmission model is built, the number of split links of a chain in the chain transmission model is calculated according to parameters of the chain transmission model, the chain is split into a plurality of sections of chain segments according to the number of split links, the chain transmission model comprises the chain and two chain wheels connected to the chain, the two chain wheels are a driving wheel and a driven wheel respectively, a first tangent line and a second tangent line which are tangent to the driving wheel and the driven wheel are determined on the chain, a cutting point of the first tangent line on the driving wheel and a cutting point of the second tangent line on the driving wheel are determined according to the cutting point of the first tangent line on the driven wheel and the cutting point of the second tangent line on the driven wheel, a coordinate set of each chain section on the chain is calculated, the coordinate set of each chain section on the chain comprises the driving wheel and the driven wheel, the coordinate set of each chain section on the chain is set on the frame is preset, and the coordinate of each chain section on the chain is set on the frame is preset, and the coordinate of each chain on the chain is set on the frame is preset, and the real-time basis of the coordinate of the motion of all the chain is set on the frame. Therefore, the coordinates of the lower chain sections can be determined by calculating the number of the split sections of the chain, the tangent line and the reference circle line, so that the chain transmission is simulated at the initial rotating speed and the running frame rate, the parameters of the chain transmission process are not required to be set, the chain transmission simulation can be realized based on part of necessary parameters, and the flexibility of simulating the chain transmission in the education software is improved.
In some embodiments of the present application, the parameters of the chain transmission model mentioned in the foregoing embodiments are described, where the parameters of the chain transmission model may specifically include the position of the driving wheel, the position of the driven wheel, the pitch of the chain, and the number of teeth of each sprocket.
On the basis of this, a process for calculating the number of split links of the chain in the chain transmission model according to the parameters of the chain transmission model mentioned in the above embodiment will be described, and this process may include:
s1, determining the center distance between the driving wheel and the driven wheel according to the position of the driving wheel and the position of the driven wheel.
The position of the driving wheel can represent the position of the geometric center of the driving wheel, and the position of the driven wheel can represent the position of the geometric center of the driven wheel.
Specifically, the square of the difference between the abscissa of the position of the driving wheel and the abscissa of the position of the driven wheel and the square of the difference between the ordinate of the position of the driving wheel and the ordinate of the position of the driven wheel can be added to obtain a square sum, and the square sum is squared to obtain the center distance between the driving wheel and the driven wheel.
S2, calculating the number of split sections of the chain according to the center distance, the pitch of the chain and the number of teeth of each chain wheel.
Specifically, the number of split sections of the chain can be calculated using the following formula:
;
wherein,is the center distance between the driving wheel and the driven wheel, +.>For the pitch of the chain>Is the number of teeth of the driving wheel>For the number of teeth of the driven wheel>Is a coefficient of->The number of the split joints of the chain is calculated.
In some embodiments of the present application, considering that the calculation process of the pitch circle line of the driving wheel is related to the pitch circle of the driving wheel, and the calculation process of the pitch circle line of the driven wheel is related to the pitch circle of the driven wheel, the provided method for simulating chain transmission may further include:
s1, calculating the reference circle diameter of each chain wheel according to the pitch of the chain and the tooth number of each chain wheel.
Specifically, the pitch circle diameter of each sprocket can be calculated using the following formula:
;
wherein,is the pitch circle diameter of the chain wheel, < >>Is the number of teeth of the chain wheel, ">Is the pitch of the chain.
S2, constructing the reference circle of each chain wheel according to the reference circle diameter of the chain wheel.
On the basis of this, the description will be made of the process of determining the index line of the capstan on the chain according to the tangential point of the first tangent line on the capstan and the tangential point of the second tangent line on the capstan, which may include:
And determining the index circle line of the driving wheel on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel.
It will be appreciated that the pitch circle of the drive wheel may determine the curvature of the pitch circle of the drive wheel, and therefore, the pitch circle of the drive wheel on the chain needs to be determined according to the pitch circle of the drive wheel with the tangent point of the first tangent line on the drive wheel as the end point of the pitch circle of the drive wheel and the tangent point of the second tangent line on the drive wheel as the other end point of the pitch circle of the drive wheel.
On the basis of this, the description will be made of the process of determining the index circle line of the driven wheel on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel, which may include:
and determining the index circle line of the driven wheel on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel.
It will be appreciated that the pitch circle of the driven wheel may determine the curvature of the pitch circle of the driven wheel, and therefore the pitch circle of the driven wheel on the chain may need to be determined from the pitch circle of the driven wheel, with the tangent point of the first tangent line on the driven wheel being the end point of the pitch circle of the driven wheel and the tangent point of the second tangent line on the driven wheel being the other end point of the pitch circle of the driven wheel.
In some embodiments of the present application, to better calculate the coordinate position of each chain segment, the position of each tangent point may be calculated, and based on this, the provided method for simulating chain transmission may further include:
s1, determining an intersection point of the first tangent line and the driving wheel as a first tangent point.
The first tangent point is a first end point of the first tangent line.
For example, in fig. 2, the first tangent point is a, which is one end point of the first tangent line Q1.
S2, determining an intersection point of the second tangent line at the intersection of the driving wheels as a second tangent point.
The second tangent point is the first end point of the second tangent line.
For example, in fig. 2, the first tangent point is B, which is one end point of the second tangent line Q2.
And S3, determining an intersection point of the first tangent line at the intersection of the driven wheels as a third tangent point.
The third tangent point is a second end point of the first tangent line.
For example, in fig. 2, the third tangent point is C, which is one end point of the first tangent line Q1.
And S4, determining the intersection point of the second tangent line at the intersection of the driven wheels as a fourth tangent point.
The fourth tangent point is a second end point of the second tangent line.
For example, in fig. 2, the fourth tangent point is D, which is one end point of the second tangent line Q2.
In some embodiments of the present application, the calculation process of the coordinates of each chain segment on the pitch circle of the driving wheel according to the above embodiments is described, where the calculation process may include:
S1, positioning the position of a first initial section chain segment on a reference circle line of a driving wheel at a second tangent point, and calculating a first rotation angle of the first initial section chain segment according to the coordinates of the second tangent point and the coordinates of a fourth tangent point.
Specifically, a first angle of rotation at which the first starting joint strand of chain rotates may be calculated using the following equation:
;
wherein,first rotation angle for rotating the first starting section of chain, < >>Is the ordinate of the second tangent point, +.>Is the ordinate of the fourth tangent point, +.>Is the abscissa of the second tangent point, +.>Is the abscissa of the fourth tangent point,as an arctangent function.
S2, calculating the coordinates of the first starting section of chain according to the first rotation angle and the reference circle diameter of the driving wheel.
Specifically, the coordinates of the first starting joint strand of chain may be calculated using the following equation:
;
wherein the method comprises the steps of,Is the abscissa of the first starting section strand, +.>Is the ordinate of the first starting section of chain, +.>Is the pitch circle diameter of the driving wheel.
S3, calculating the rotation angle of each section of chain segment on the indexing circle line of the driving wheel according to the first rotation angle and the tooth number of the driving wheel, and calculating the coordinates of the section of chain segment according to the rotation angle of each section of chain segment on the indexing circle line of the driving wheel and the indexing circle diameter of the driving wheel.
Specifically, the rotation angle of each section of chain on the pitch circle of the drive wheel can be calculated by using the following formula:
;
wherein,for the rotation angle of the ith link segment on the indexing circle line of the driving wheel, +.>Is the number of teeth of the driving wheel,the serial number of the chain section on the indexing circle line of the driving wheel is an integer not less than 2.
Further, the coordinates of each chain segment can be calculated using the following equation:
;
wherein,representing a principalAbscissa of the ith link segment on the wheel pitch circle, < >>Representing the ordinate of the ith link segment on the driver pitch circle line.
In some embodiments of the present application, a process for calculating the coordinates of each chain segment on the first tangent line mentioned in the above embodiments is described, where the calculating process may include:
s1, taking the tail roller position of the tail section of the chain on the indexing circle line of the driving wheel as the position of the second initial section of the chain on the first tangent line, and calculating the second rotation angle of the second initial section of the chain according to the position of the second initial section of the chain and the coordinates of the third tangent point.
It will be appreciated that the last roller position of the last strand of chain on the driver pitch circle exceeds the first tangent point, and the subsequent strand of chain is the strand of the first tangent line.
Specifically, the second angle of rotation of the second starting section of chain segment may be calculated using the following equation:
;
wherein,for a second rotation angle->Is the ordinate of the position of the second starting section strand,/->For the abscissa of the position of the second starting section strand, +.>Is the ordinate of the third tangent point, +.>Is the abscissa of the third tangent point, +.>As an arctangent function.
S2, calculating the coordinates of a second initial section of chain according to the second rotation angle and the pitch of the chain.
Specifically, the coordinates of the second starting section of chain segment may be calculated using the following formula:
;
wherein,is the abscissa of the second starting section chain segment, +.>Is the ordinate of the second starting section of chain strand, +.>Is the pitch of the chain.
S3, calculating the rotation angle of each section of the chain section on the first tangent line according to the second rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of the chain section on the first tangent line according to the rotation angle of each section of the chain section and the pitch of the chain.
Specifically, the rotation angle of each chain segment can be calculated using the following formula:
;
wherein,for the rotation angle of the ith link segment on the first tangent, < >>Is the number of teeth of the driving wheel>The sequence number of the chain section on the first tangent is an integer not less than 2.
Further, the coordinates of each chain segment can be calculated using the following equation:
;
wherein,represents the abscissa of the ith link segment on the first tangent, +.>Representing the ordinate of the ith link segment on the first tangent line.
In some embodiments of the present application, the calculation process of the coordinates of each chain segment on the reference circle line of the driven wheel mentioned in the above embodiments is described, and the calculation process may include:
s1, constructing a tangent point pitch circle by taking the tail roller position of the tail chain segment on the first tangent line as a circle center and the pitch of the chain as a radius, and determining a target intersection point of the tangent point pitch circle and the reference circle of the driven wheel.
S2, determining a third rotation angle of a third initial section of chain segment on the reference circle line of the driven wheel according to the position of the tail roller of the final section of chain segment on the first tangent line and the position of the target intersection point.
Specifically, the third angle of rotation of the third starting section of chain segment may be calculated using the following equation:
;
wherein,for a third rotation angle->Is the ordinate of the position of the target intersection, +.>Is the ordinate of the last roller position of the last strand on the first tangent, +.>Is the abscissa of the position of the target intersection, +.>Is the abscissa of the last roller position of the last strand on the first tangent, +. >As an arctangent function.
And S3, calculating the coordinates of the third initial section of chain according to the third rotation angle and the pitch of the chain.
Specifically, the coordinates of the third starting section of chain segment may be calculated using the following formula:
;
wherein,is the abscissa of the third starting section chain segment, +.>Is the ordinate of the third starting section chain strand, +.>Is the pitch of the chain.
S4, calculating the rotation angle of each section of chain segment on the reference circle line of the driven wheel according to the third rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of chain segment on the reference circle line of the driven wheel according to the rotation angle of each section of chain segment on the reference circle line of the driven wheel and the pitch of the chain.
Specifically, the rotation angle of each chain segment can be calculated using the following formula:
;
wherein,for the rotation angle of the ith link segment on the driven wheel pitch circle line +.>Is the number of teeth of the driving wheel,the serial number of the chain section on the indexing circle line of the driven wheel is an integer not less than 2.
Further, the coordinates of each chain segment can be calculated using the following equation:
;
wherein,represents the abscissa of the ith link segment on the driven wheel pitch circle line, +.>Representing the ordinate of the ith link segment on the driven wheel pitch circle line.
In some embodiments of the present application, the calculation process of the coordinates of each chain segment on the second tangent line mentioned in the above embodiments is described, and the calculation process may include:
S1, taking the tail roller position of the tail section chain segment on the reference circle line of the driven wheel as the position of the fourth starting section chain segment on the second tangent line, and calculating the fourth rotation angle of the fourth starting section chain segment according to the position of the fourth starting section chain segment and the coordinates of the second tangent point.
Specifically, the fourth rotation angle of the fourth starting section chain segment may be calculated using the following formula:
;
wherein,for a fourth rotation angle->For the ordinate of the last roller position of the last strand on the driven wheel pitch circle, +.>Is the ordinate of the second tangent point, +.>For the abscissa of the last roller position of the last strand on the driven wheel pitch circle, +.>Is the abscissa of the second tangent point, +.>As an arctangent function.
S2, calculating the coordinates of a fourth starting section of the chain according to the fourth rotation angle and the pitch of the chain.
Specifically, the coordinates of the third starting section of chain segment may be calculated using the following formula:
;
wherein,for the abscissa of the fourth starting section strand, +.>For the ordinate of the fourth starting section strand, +.>Is the pitch of the chain.
And S3, calculating the rotation angle of each section of chain segment on the second tangent line according to the fourth rotation angle and the tooth number of the driving wheel, and calculating the coordinates of each section of chain segment on the second tangent line according to the rotation angle of each section of chain segment and the pitch of the chain.
Specifically, the rotation angle of each chain segment can be calculated using the following formula:
;
wherein,for the rotation angle of the i-th link segment on the second tangent, < >>Is the number of teeth of the driving wheel>The number of the chain section on the second tangent line is an integer not less than 2.
Further, the coordinates of each chain segment can be calculated using the following equation:
;
wherein,represents the abscissa of the ith link segment on the second tangent, +.>Representing the ordinate of the ith link segment on the second tangent line.
In view of modifying parameters of the chain transmission model in the educational software to improve flexibility of the educational software, the method for simulating chain transmission provided by the application may further include a process of modifying the number of chain segments of the chain, where the process may include the following two cases:
firstly, when the number of chain sections of the chain is updated to the updated number of sections under the condition that the parameters of the chain transmission model are fixed, if the updated number of sections is smaller than the preset threshold value of the number of sections of the chain transmission model, playing the animation of the broken chain at the intersection point of the second tangent line and the driving wheel.
Specifically, the preset number of knots threshold may represent the number of knots of the chain when the two sprockets and the chain are just under tension.
It will be appreciated that if the number of links of the chain is changed to a number of links less than the threshold number of preset links, the chain cannot wrap around the two sprockets, and the chain breaks due to the tightening force, so that an animation of the broken chain at the intersection of the second tangent line and the drive wheel can be played.
Secondly, when the number of chain sections of the chain is updated to the updated number of sections under the condition that the parameters of the chain transmission model are fixed, if the updated number of sections is larger than the preset threshold value of the number of sections of the chain transmission model, determining the loose edge radian of the chain according to the updated number of sections.
It will be appreciated that if the number of chain segments of the chain is changed to a number of segments not less than the preset threshold number of segments, the more the number of chain segments of the chain, the more loose the tightness of the chain drive model, and the loose edge effect of the chain drive model is shown in fig. 3. Conversely, the fewer the number of chain sections of the chain, the tighter the tightness state of the chain transmission model, when the number of chain sections of the chain is the preset number of sections of the chain transmission model, the chain transmission model is in a just-tight state, and when the number of chain sections of the chain is larger than the preset number of sections of the chain transmission model, the lower chain part of the chain is loosened due to gravity, so that an arc line is formed, and therefore, the loose edge radian of the chain can be determined according to the updated number of sections.
Further, in the chain drive animation, the chain portion of the chain located below is bent to the chain loose edge radian.
It will be appreciated that to simulate the chain condition in actual conditions, the degree of looseness of the underlying chain portion of the chain may be demonstrated in the chain drive animation to more closely conform to the actual simulated sprocket model.
Besides, the chain transmission model applied to the education software can be used for user to define and modify parameters, such as the center distance between two chain wheels, so as to realize the chain transmission effect under the tight state.
If the user causes that part of parameters in the chain transmission model are not matched in the process of self-defining and modifying the parameters, the education software does not perform rotation calculation, but performs chain falling calculation, so that the effect of chain separation is simulated.
Specifically, when the rotation angle of any one sprocket exceeds the tooth angle of the sprocket and the pitch of the chain is different from the pitch of any one sprocket, playing the animation of chain de-linking.
The device for realizing the simulated chain transmission provided by the embodiment of the application is described below, and the device for realizing the simulated chain transmission described below and the method for realizing the simulated chain transmission described above can be referred to correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a device for implementing a simulated chain transmission according to an embodiment of the present application.
As shown in fig. 4, the apparatus may include:
the chain segment calculation unit 11 is used for constructing a chain transmission model, calculating the number of split links of a chain in the chain transmission model according to parameters of the chain transmission model, and splitting the chain into a plurality of links of chain segments according to the number of split links, wherein the chain transmission model comprises the chain and two chain wheels connected to the chain, and the two chain wheels are a driving wheel and a driven wheel respectively;
A tangent line determining unit 12 for determining a first tangent line and a second tangent line tangent to both the driving pulley and the driven pulley on the chain;
a pitch circle line determining unit 13, configured to determine a pitch circle line of a driving wheel on the chain according to a tangential point of the first tangential line on the driving wheel and a tangential point of the second tangential line on the driving wheel, and determine a pitch circle line of a driven wheel on the chain according to a tangential point of the first tangential line on the driven wheel and a tangential point of the second tangential line on the driven wheel;
a coordinate calculating unit 14, configured to calculate a coordinate set of each link segment on the chain, where the coordinate set of each link segment on the chain includes a coordinate of each link segment on the driving wheel reference circle line, a coordinate of each link segment on the first tangent line, a coordinate of each link segment on the driven wheel reference circle line, and a coordinate of each link segment on the second tangent line;
the simulation transmission unit 15 is configured to determine motion trajectories of all chain segments on the chain based on a coordinate set of each chain segment on the chain at a preset sprocket rotational speed and a preset running frame rate, and simulate in real time a chain transmission animation of all chain segments on the chain based on the motion trajectories.
Optionally, the parameters of the chain transmission model include the position of the driving wheel, the position of the driven wheel, the pitch of the chain and the number of teeth of each sprocket;
the chain segment calculation unit includes:
the center distance determining unit is used for constructing a chain transmission model and determining the center distance between the driving wheel and the driven wheel according to the position of the driving wheel and the position of the driven wheel;
and the splitting section number calculating unit is used for calculating the splitting section number of the chain according to the center distance, the pitch of the chain and the tooth number of each chain wheel, and splitting the chain into a plurality of sections of chain sections according to the splitting section number.
Optionally, the apparatus further comprises:
a reference circle diameter calculation unit for calculating the reference circle diameter of each sprocket according to the pitch of the chain and the tooth number of each sprocket;
a reference circle construction unit for constructing the reference circle of each sprocket according to the reference circle diameter of the sprocket;
the reference circle line determination unit includes:
the driving wheel reference circle line determining unit is used for determining the driving wheel reference circle line on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel;
And the driven wheel reference circle line determining unit is used for determining the driven wheel reference circle line on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel.
Optionally, the steps of the implementation of each unit of the device for simulating chain transmission may be described with reference to the foregoing method for simulating chain transmission, which is not described herein again.
The device for simulating chain transmission provided by the embodiment of the application can be applied to equipment for simulating chain transmission, such as a terminal: cell phones, computers, etc. Alternatively, fig. 5 shows a block diagram of a hardware structure of an apparatus for simulating a chain transmission, and referring to fig. 5, the hardware structure of the apparatus for simulating a chain transmission may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
in the embodiment of the application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete communication with each other through the communication bus 4;
processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
The memory 3 may comprise a high-speed RAM memory, and may further comprise a non-volatile memory (non-volatile memory) or the like, such as at least one magnetic disk memory;
wherein the memory stores a program, the processor is operable to invoke the program stored in the memory, the program operable to:
constructing a chain transmission model, calculating the number of split joints of a chain in the chain transmission model according to parameters of the chain transmission model, and splitting the chain into a plurality of chain sections according to the number of split joints, wherein the chain transmission model comprises the chain and two chain wheels connected to the chain, and the two chain wheels are a driving wheel and a driven wheel respectively;
determining a first tangent line and a second tangent line which are tangent to the driving wheel and the driven wheel on the chain;
determining a driving wheel index circle line on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel, and determining a driven wheel index circle line on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel;
calculating a coordinate set of each section of chain on the chain, wherein the coordinate set of each section of chain on the chain comprises the coordinates of each section of chain on the primary wheel reference circle line, the coordinates of each section of chain on the first tangent line, the coordinates of each section of chain on the secondary wheel reference circle line and the coordinates of each section of chain on the secondary tangent line;
And determining the motion trail of all the chain sections on the chain based on the coordinate set of each chain section on the chain under the preset rotating speed of the chain wheel and the preset running frame rate, and simulating the chain transmission animation of all the chain sections on the chain based on the motion trail in real time.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
The embodiment of the application also provides a storage medium, which may store a program adapted to be executed by a processor, the program being configured to:
constructing a chain transmission model, calculating the number of split joints of a chain in the chain transmission model according to parameters of the chain transmission model, and splitting the chain into a plurality of chain sections according to the number of split joints, wherein the chain transmission model comprises the chain and two chain wheels connected to the chain, and the two chain wheels are a driving wheel and a driven wheel respectively;
determining a first tangent line and a second tangent line which are tangent to the driving wheel and the driven wheel on the chain;
determining a driving wheel index circle line on the chain according to the tangential point of the first tangential line on the driving wheel and the tangential point of the second tangential line on the driving wheel, and determining a driven wheel index circle line on the chain according to the tangential point of the first tangential line on the driven wheel and the tangential point of the second tangential line on the driven wheel;
Calculating a coordinate set of each section of chain on the chain, wherein the coordinate set of each section of chain on the chain comprises the coordinates of each section of chain on the primary wheel reference circle line, the coordinates of each section of chain on the first tangent line, the coordinates of each section of chain on the secondary wheel reference circle line and the coordinates of each section of chain on the secondary tangent line;
and determining the motion trail of all the chain sections on the chain based on the coordinate set of each chain section on the chain under the preset rotating speed of the chain wheel and the preset running frame rate, and simulating the chain transmission animation of all the chain sections on the chain based on the motion trail in real time.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.