System and method for implementing virtual chemical experiment

文档序号:1710210 发布日期:2019-12-13 浏览:27次 中文

阅读说明:本技术 虚拟化学实验的实现系统和方法 (System and method for implementing virtual chemical experiment ) 是由 张永策 李莹 于 2019-08-20 设计创作,主要内容包括:本发明公开了一种虚拟化学实验的实现系统和方法,包括:实验场景模块:用于组建目标化学实验所涉及的虚拟实验工作站、虚拟仪器、虚拟器具和虚拟化学试剂;实验流程模块:用于设置目标化学实验中虚拟仪器、虚拟器具和/或虚拟化学药品的操作顺序;交互模块:用于设置目标化学实验包含的人机交互规则。基于本发明的虚拟化学实验的实现系统和方法,可快速高效地完成虚拟实验开发、且具有良好可扩展性和可移植性等优点。(the invention discloses a system and a method for realizing a virtual chemical experiment, which comprises the following steps: an experiment scene module: the system comprises a virtual experiment workstation, a virtual instrument, a virtual appliance and a virtual chemical reagent, wherein the virtual experiment workstation, the virtual instrument, the virtual appliance and the virtual chemical reagent are used for establishing a target chemical experiment; an experiment flow module: the operation sequence is used for setting the operation sequence of virtual instruments, virtual appliances and/or virtual chemicals in the target chemical experiment; an interaction module: the method is used for setting the man-machine interaction rules contained in the target chemical experiment. The system and the method for realizing the virtual chemical experiment can quickly and efficiently complete the development of the virtual experiment and have the advantages of good expandability, transportability and the like.)

1. A system for implementing a virtual chemistry experiment, comprising:

An experiment scene module: the system comprises a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent, wherein the virtual experiment workstation, the virtual instrument, the virtual appliance and/or the virtual chemical reagent are used for establishing a target chemical experiment;

an experiment flow module: the operation sequence of the virtual instrument, the virtual appliance and the virtual chemical reagent in the target chemical experiment is set;

an interaction module: for setting the man-machine interaction rules contained in the target chemical experiment.

2. the system of claim 1, wherein when the target chemical experiment comprises at least two sub-scenarios;

The scene module is used for: for building up the virtual laboratory workstations, virtual instruments, virtual appliances and/or virtual chemical reagents involved for each sub-scenario;

The experimental flow module comprises: the execution sequence of each sub-scene and the operation sequence of the related virtual experiment workstation, virtual instrument, virtual appliance and/or virtual chemical reagent of each sub-scene are set;

The interaction module: for setting man-machine interaction rules contained in each sub-scene.

3. The system according to claim 1 or 2, wherein the interaction rules comprise: click manipulation rules, drag manipulation rules, rotate manipulation rules, shake manipulation rules, multi-point manipulation rules, and/or virtual 3D rules.

4. The system according to claim 1 or 2, characterized in that the system further comprises: a model library;

The model library comprises a plurality of virtual experiment workstations with adjustable parameters, virtual instruments, virtual appliances and/or virtual chemical reagents, and is used for being called by the scene module.

5. the system of claim 4, wherein the virtual appliance comprises an attitude control attribute for setting a target attitude of the virtual appliance to be associated with a target attitude sensor or a target attitude control device of a smart terminal.

6. The system of claim 3, wherein when the virtual appliance is a pipette, the multi-point operation rules for the pipette comprise:

Step 21: acquiring coordinates of a user touch point;

Step 22: judging whether the coordinates of the touch point are located in a first designated area, a second designated area and a third designated area, wherein the first designated area is the left side of the upper end of the pipette, the second designated area is the right side of the upper end of the pipette, the third designated area is the upper opening of the pipette, if yes, executing step 23, and if not, prompting a user to adjust the position of the touch point which is not located in the designated area, and returning to step 21;

Step 23: detecting whether the touch point of the third designated area leaves the third designated area, if so, executing step 24;

step 24: starting timing, changing the liquid level of the pipette in real time based on the timing duration, detecting whether a touch point appears in a third designated area in real time in the timing process, if so, stopping timing, and executing the step 25;

step 25: and (3) comparing the relative position of the current liquid level of the pipette with the target liquid level, returning to the step 23 if the current liquid level is higher than the target liquid level, completing the task if the current liquid level is within a preset range of the target liquid level, and prompting a user that liquid taking fails if the current liquid level is lower than the range of the target liquid level.

7. the system of claim 3, wherein when the virtual appliance is a separatory funnel, the liquid level update rule for the separatory funnel comprises:

step 31: establishing a local coordinate system with the bottom of the separating funnel as an original point, wherein the local coordinate system rotates and moves along with the separating funnel, and the Y direction is always the direction in which the central point of the separating funnel points to the plug;

Step 32: recording a vector of a current local coordinate zero point pointing to a maximum measurement scale mark in the Y direction as a vector V in a world coordinate system of a virtual space, and calculating an included angle A between the vector V and a plane normal vector of the world coordinate system;

Step 33: calculating h ═ V | × (a), d ═ (current liquid volume/total volume) × h;

step 34: and when the included angle A is larger than 90 degrees, updating the current liquid level height to be the sum of the world coordinate Y value of the local coordinate system origin and (h-d), and when the included angle A is smaller than 90 degrees, updating the current liquid level height to be the sum of the world coordinate Y value of the local coordinate system origin and d, and returning to the step 32.

8. The system of claim 3, wherein when the virtual appliance is an AR glove, the virtual 3D rules of the AR glove comprise:

Step 61: acquiring a current real scene image through a camera;

step 62: analyzing feature points of a hand in the current real scene image;

and step 63: importing a 3D model of the glove based on an affine transformation matrix, enabling a first preset feature point of the glove to be associated with and coincide with a second preset feature point of the hand, merging the first preset feature point with a video of a real scene, and displaying the merged feature points on AR presentation equipment or other equipment;

Step 64: and judging whether the gloves touch other objects or not, and if so, playing corresponding animation according to the collision position of the collision object.

9. The system of claim 1, further comprising:

a rendering module: for setting the color change rule involved in the target chemical experiment.

10. the system of claim 1 or 2, wherein the scene module further comprises light source attributes for setting a light source mode of the target chemical experiment, the light source mode comprising at least: directional light sources, point light sources, area light sources, spot lights.

11. a method for implementing a virtual chemistry experiment is characterized by comprising the following steps:

Building a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent related to the target chemical experiment;

And setting the operation sequence of the virtual instrument, the virtual appliance and the virtual chemical reagent in the target chemical experiment, and setting the human-computer interaction rule contained in the target chemical experiment.

Technical Field

the invention relates to the field of computers, in particular to a system and a method for realizing a virtual chemical experiment.

Background

with the rapid development of information technology and the continuous improvement of high education level of the state, the teaching contents and teaching modes of chemical experiments are changed greatly. In such a development context, traditional chemical experiments have not been able to meet the needs of college students for autonomous practical experiments. With the maturity of the virtual simulation experiment technology, people begin to recognize the application value of the virtual simulation experiment in the education field, and the virtual simulation experiment can assist scientific research work of colleges and universities and also has a plurality of advantages such as high utilization rate, easy maintenance and the like in the aspect of experiment teaching.

in recent years, many colleges and universities in China have established some virtual simulation experiments according to the requirements of own scientific research and teaching. However, due to the lack of convenient and professional development software, the virtual chemical simulation experiment has many problems in the aspects of accuracy, specialty, expandability and the like.

disclosure of Invention

In view of this, the present invention provides a system and a method for implementing a virtual chemical experiment, so as to solve the problem of development of the existing virtual chemical experiment.

the invention provides a system for realizing a virtual chemical experiment, which comprises

an experiment scene module: the system comprises a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent, wherein the virtual experiment workstation, the virtual instrument, the virtual appliance and/or the virtual chemical reagent are used for establishing a target chemical experiment;

an experiment flow module: the operation sequence of the virtual instrument, the virtual appliance and the virtual chemical reagent in the target chemical experiment is set;

an interaction module: the method is used for setting the man-machine interaction rules contained in the target chemical experiment.

the invention also provides a method for realizing the virtual chemical experiment, which comprises the following steps:

Building a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent related to the target chemical experiment;

and setting the operation sequence of the virtual instrument, the virtual appliance and the virtual chemical reagent in the target chemical experiment, and setting the human-computer interaction rule contained in the target chemical experiment.

The system and the method for realizing the virtual chemical experiment can quickly and efficiently complete the development of the virtual experiment and have the advantages of good expandability, transportability and the like.

drawings

FIG. 1 is a first block diagram of a system for implementing a virtual chemistry experiment according to the present invention;

FIG. 2 is a second block diagram of a system for implementing a virtual chemistry experiment in accordance with the present invention;

FIG. 3 is a schematic flow chart of a method for implementing a virtual chemistry experiment according to the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.

As shown in fig. 1, the system for implementing a virtual chemistry experiment of the present invention includes:

an experiment scene module: the system comprises a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent, wherein the virtual experiment workstation, the virtual instrument, the virtual appliance and/or the virtual chemical reagent are used for establishing a target chemical experiment;

An experiment flow module: the operation sequence of the virtual instrument, the virtual appliance and/or the virtual chemical reagent in the target chemical experiment is set;

An interaction module: the method is used for setting the man-machine interaction rules contained in the target chemical experiment.

Further, in order to facilitate the development of the experimental scenario module, as shown in fig. 2, the system further includes: a model library;

The model library comprises a plurality of virtual experiment workstations with adjustable parameters, virtual instruments, virtual appliances and/or virtual chemical reagents, and is used for being called by the scene module.

For example, 3DMAX can be used to model a variety of virtual chemistry experiments, including: analytical balance, erlenmeyer flask, beaker, desiccator, weighing bottle, dropper bottle, burette, indicator bottle, dropper flask, ear-washing bulb, pipette, etc.

Modeling of a 250mL erlenmeyer flask is used as an example. The 3DMAX software is first opened and a new file named with the instrument name is created. A cylindrical shape was created in the file following the actual size of a 250mL erlenmeyer flask. And changing the node number of the cylinder in the editor, selecting the upper surface of the cylinder, deleting the upper surface, then selecting a command of adding a shell in the editor, and manually adjusting the thickness of the cylinder to ensure that the conical flask has a certain thickness. The glass material is edited in a material editor, and the edited glass material is given to the conical flask. Add a face according to the radian of erlenmeyer flask on the bottle of erlenmeyer flask, simultaneously, newly build the material of a erlenmeyer flask volume sign, select the 250mL scale picture of doing, perfect the material of volume sign, give the face on the erlenmeyer flask with this material. The combination function is used to combine the face and the erlenmeyer flask into one object. According to the shape of the conical flask, a conical flask is copied and named as liquid again, the mouth of the conical flask of the liquid is deleted, the upper edge of the liquid is selected, and the upper part of the model of the liquid is sealed by using a shell command. Newly building a liquid material, and endowing the liquid material to the liquid model. The liquid model and the erlenmeyer flask model were merged together with a merge command.

an experiment scene module: and integrally dragging the model (including the virtual experiment workstation, the virtual instrument, the virtual appliance and/or the virtual chemical reagent) involved in the target chemical experiment into a scene frame in an editing interface, and putting the model according to the operation rule.

An experiment flow module: a stepcontrol script of a target chemical experiment is constructed to define an operation (or disassembly) sequence of a control model (a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent involved in the target chemical experiment).

An interaction module: setting human-computer interaction rules for the target chemical experimental instrument and writing scripts. The man-machine interaction rule corresponds to the interaction action in a one-to-one mode. The interactive actions include clicking (Click), dragging (Drag), rotating (Rotate), sliding (ScreenDrag), and long pressing (LongPress), multi-point manipulation, virtual 3D, and the like. Each action comprises a trigger object, a triggered object, trigger operation time, a distance between the camera and the trigger object, operation content prompt, camera position information, camera rotation angle and the like.

As shown in fig. 2, the human-computer interaction rule includes: click operation rules, drag operation rules, rotate operation rules, multi-point operation rules, virtual 3D rules, and the like.

The virtual experiment of chemistry both can satisfy the student and to the demand of manual operation, do not receive the restriction of environment and experimental condition again simultaneously, let each student can both practice by hand, clearly watch the effect of chemical experiment reaction phenomenon and condition, can furthest make the student have clear understanding to the principle and the experimental phenomenon of chemical experiment.

the realization system of the virtual chemical experiment based on the invention reduces the development difficulty, can quickly and efficiently complete the virtual experiment development, and has the advantages of good expandability, transportability and the like.

In order to facilitate development, the implementation system of the virtual chemical experiment can be implemented based on virtual simulation software unity3D, and the experiment scene module, the experiment flow module and the interaction module are implemented based on unity3D, so that a simulation experiment environment can be built more quickly and simply. Meanwhile, the unity3D can release versions to Windows, Mac, Wii, iPhone, WebGL, Windows phone and Android workstations, and the requirements of releasing versions at various terminals can be met.

human-computer interaction is the greatest advantage of virtual chemical experiments and is also the main way for exercising action operation of users, and examples of interaction rules of several typical chemical virtual instruments are given below.

(1) liquid transfer tube

the operation of using the pipette in the actual operation is as follows: holding the pipette or the appropriate position of the upper end of the pipette with the right hand, enabling the index finger to be close to the upper opening of the pipette, stretching the middle finger and the ring finger to hold the outer side of the pipette, holding the thumb at the middle position of the middle finger and the ring finger at the inner side of the pipette, and naturally relaxing the little finger; holding the ear washing ball with the left hand, holding the fist type, holding the ear suction ball in the palm with the tip facing downward, gripping the ear suction ball, exhausting air in the ball, and inserting or closely attaching the tip of the ear suction ball to the upper opening of a pipette (pipette) to prevent air leakage. Slowly releasing the fingers of the left hand, slowly sucking the washing liquid into the pipette until the part above the scale mark, removing the ear-sucking ball, and quickly plugging the upper opening of the pipette (pipette) by using the index finger of the right hand.

in order to simulate the actual operation, the invention proposes the following rules for the multipoint operation of a pipette, comprising:

step 21: acquiring coordinates of a user touch point;

Step 22: judging whether the coordinates of the touch points are located in a first designated area, a second designated area and a third designated area, wherein the first designated area is the left side of the upper end of the pipette, the second designated area is the right side of the upper end of the pipette, the third designated area is the upper opening of the pipette, if so, executing a step 23, otherwise, prompting a user to adjust the positions of the touch points which are not located in the designated areas, and returning to the step 21;

Step 23: detecting whether the touch point of the third designated area leaves the third designated area, if so, executing step 24;

step 24: starting timing, changing the liquid level of the pipette in real time based on the timing duration, detecting whether a touch point appears in a third designated area in real time in the timing process, if so, stopping timing, and executing the step 25;

Step 25: and (3) comparing the relative position of the current liquid level of the pipette with the target liquid level, returning to the step 23 if the current liquid level is higher than the target liquid level, completing the task if the current liquid level is within a preset range of the target liquid level, and prompting a user that liquid taking fails if the current liquid level is lower than the range of the target liquid level.

The multi-point operation interaction rule needs three fingers of the right hand, a thumb contact touch1, a middle finger holding tube contact touch3 and an index finger contact touch2 to control the sealing of the tube opening, and the space relative position and liquid level control of the three fingers can be simulated by multi-point touch.

The world coordinates of the pipette in the scene are calculated through matrix transformation to obtain position coordinates ScrPos in screen coordinates, and the multipoint operation interaction rule monitors screen click events and positions of contacts in each frame. When the positions of the thumb touch point 1 and the middle finger touch point 3 are respectively located on the two sides of the pipette, a preset Z-axis coordinate (distance from the camera) is added to the middle point two-dimensional coordinates of the touch1 and the touch3 coordinates, the middle point two-dimensional coordinates are converted into coordinates in a three-dimensional scene, the three-dimensional coordinates of the middle point are associated with the three-dimensional coordinates of the pipette, and the pipette can move in the scene along with the sliding of the two fingers on the screen.

at the same time, when the index finger releases the touch point 2 on the screen, the liquid in the pipette will decrease at a certain speed S. When the index finger is pressed again within the range of the nozzle, the liquid level stops dropping.

let the initial volume of liquid in the pipette be Vz in milliliters (ml); the liquid outflow rate is S in milliliters per second (ml/S) and the total time the index finger is released is t in seconds (S).

then, the remaining volume v ═ Vz-S × t. The residual volume v has a definite corresponding relation with the current liquid level, and the current liquid level is updated according to the residual volume v.

in addition, the curve liqLine is used for simulating the liquid level descending speed, so that the experimental effect is more real. A two-dimensional coordinate system is established with X and Y axes of 0 to 1, X being used to represent the liquid level from the lowest point to the highest point, Y being the rate of change of the liquid level, and liqLine representing this curve. Based on the curve liqLine or the function liqLine, when the X-axis coordinate is taken as a parameter to be transmitted, a numerical value corresponding to the Y axis can be obtained, and the change parameter of the Y axis is used in a formula to be multiplied by the fixed descending speed, so that the liquid level height which is closer to the reality and more real is obtained. The resulting liquid level can be adjusted to the shape of the inner wall of the pipette at varying rates.

(2) Separating funnel

The virtual appliance comprises an attitude control attribute, and the attitude control attribute is used for setting the association between the target attitude of the virtual appliance and a target attitude sensor or target attitude control equipment of the intelligent terminal.

After the association relationship is established between the virtual appliance separating funnel and the gyroscope of the intelligent terminal, the real space posture of the intelligent terminal is consistent with the virtual space posture of the separating funnel, and the rotating operation of the separating funnel can be realized by rotating the mobile phone.

Another implementation of the virtual separating funnel rotation operation is as follows: the separating funnel is set as a child object of the camera, then the camera is associated with the gyroscope sensor, the real space posture of the camera is consistent with the virtual space posture of the separating funnel, the gyroscope sensor is used for sensing the posture of the camera in the current three-dimensional space, then the posture change is mapped to the camera in the virtual scene, the separating funnel inherits the posture of the camera, and the separating funnel rotates along with the mobile phone. Because the camera has definite three-dimensional coordinates in the virtual space, the camera and the gyroscope are associated, so that the method can be more conveniently constructed: and the mapping relation between the real space attitude of the intelligent terminal and the virtual space attitude of the separating funnel.

When the separating funnel rotates, the liquid level shown by the liquid in the separating funnel can be different due to the special shape of the separating funnel, and when one side of the cock faces upwards, the liquid level can be relatively lower due to the larger volume of the lower side. When the cock is rotated to a side facing downwards, the liquid level rises relatively. Therefore, the liquid level needs to be updated at any time to keep the liquid volume constant in the rotating process.

the liquid level updating method of the separating funnel is given as follows:

Step 31: establishing a local coordinate system of the separating funnel, wherein the local coordinate system moves along with the rotation of the separating funnel, and the Y direction is always the direction in which the central point of the separating funnel points to the plug;

step 32: recording a vector of a current local coordinate zero point pointing to a maximum measurement scale mark in the Y direction as a vector V in a world coordinate system of a virtual space, and calculating an included angle A between the vector V and a plane normal vector of the world coordinate system;

step 33: calculating h ═ V | × (a), d ═ (current liquid volume/total volume) × h;

Where h is the projection of the liquid level on the Y-axis when the separatory funnel is filled with liquid, and d is the corresponding height value of the current volume of liquid.

Step 34: and when A is larger than 90 degrees, updating the sum of the world coordinate Y value with the current liquid level height as the origin of the local coordinate system and (h-d), and when A is smaller than 90 degrees, updating the sum of the world coordinate Y value with the current liquid level height as the origin of the local coordinate system and d, and returning to the step 32.

the separating funnel also relates to shaking operation, and the separating funnel is set to be associated with the accelerometer of the intelligent terminal, so that the Y-direction component of the accelerometer of the intelligent terminal is consistent with the Y-direction component of the virtual space of the separating funnel.

and (3) shaking operation rules: whether the variation of the Y-direction component of the virtual space of the separating funnel is monitored to judge whether the shaking is effective is as follows:

Step 41: acquiring a Y-direction component of the last frame of separating funnel in a virtual space, and recording the component as Y1; acquiring a Y-direction component of a current frame separating funnel in a virtual space, and recording the component as Y2;

Step 42: calculating delta Y-Y1-Y2;

step 43: and judging whether the delta y is larger than a preset value, if so, judging that the shaking operation is effective, and if not, judging that the shaking operation is ineffective.

The interval between the previous frame and the current frame can be set according to the requirement, such as 0.5 second or other values.

In addition, the number of times of satisfying effective shaking can be set, for example, 5 times of 'whether delta y is greater than a preset value' indicates that the liquid in the appliance is shaken uniformly, and the specific number of times can be set according to requirements.

before the liquid is uniformly shaken, the liquid in the appliance is layered, different layers of liquid are represented by different colors, and if the appliance contains 2 liquids A and B, the layered display method comprises the following steps:

Step 51: acquiring the y coordinates of the current liquid A and the current liquid B in a world coordinate system;

step 52: judging whether the y coordinates of A and B are both larger than the top point of the boundary (the highest point of the displayed liquid), if so, not displaying layering, and if not, executing a step 53;

Step 53: if the height of the liquid A is larger than that of the liquid B, the color of the liquid A is displayed on the part of the liquid A, which is higher than the liquid B, and the color of the liquid B is displayed on the rest part of the liquid A; if the height of the liquid A is less than that of the liquid B, the color of the liquid B is displayed on the part of the liquid B higher than the liquid A, and the color of the liquid A is displayed on the rest part of the liquid.

(3) Gloves in AR environment

The invention designs the hand recognition by AR, which can partially experience the direction and angle of the hand penetrating into the glove, increases the experience feeling, adopts ARKit open library to recognize the hand plane, can realize the recognition and superposition of AR, and the movement of the hand after recognition can control the movement of the virtual hand and the interactive animation of the glove.

Most of the existing AR algorithms cannot guarantee accuracy, and the method aims to apply a simple and convenient sensing system of an intelligent terminal to initially experience some operations and controls in an AR experiment.

the method specifically comprises the following steps:

Step 61: acquiring a current real scene image through a camera;

Step 62: analyzing feature points of a hand in the current real scene image;

and step 63: importing a 3D model of the glove based on the affine transformation matrix, enabling a first preset feature point of the glove to be associated and superposed with a second preset feature point of the hand, merging the first preset feature point and the second preset feature point with a video of a real scene, and displaying the merged feature points on AR presentation equipment or other equipment;

the method comprises the steps of analyzing a current real scene image and camera position information to obtain an affine transformation matrix of a virtual glove 3D model projected on a camera view plane.

Step 64: and judging whether the gloves touch other objects or not, and if so, playing corresponding animation according to the collision position of the collision object.

Wherein, the 'glove' is provided with a 'collision detection module' in advance, and the 'collision detection module' triggers the touch event of the 'glove'.

When the target chemical experiment comprises at least two sub-scenarios;

The scenario module may be extended to: for building virtual laboratory workstations, virtual instruments, virtual appliances and/or virtual chemical reagents involved in each sub-scenario;

the experimental flow module can be expanded into: for setting the execution sequence of the sub-scenarios and the operation sequence of the virtual laboratory workstations, virtual instruments, virtual appliances and/or virtual chemical reagents involved in each sub-scenario

The interaction module can be expanded to: for setting man-machine interaction rules contained in each sub-scene.

The invention also provides a method for implementing the virtual chemistry experiment, as shown in fig. 3, the method comprises the following steps:

s301: building a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent related to the target chemical experiment;

s302: setting the operation sequence of a virtual instrument, a virtual appliance and a virtual chemical reagent in the target chemical experiment, and setting the human-computer interaction rule contained in the target chemical experiment.

When the target chemical experiment contains at least two sub-scenarios, the method of fig. 3 may be extended to:

building virtual experiment workstations, virtual instruments, virtual appliances and/or virtual chemical reagents related to each sub-scene;

setting the execution sequence of each sub-scene and the operation sequence of the virtual experiment workstation, the virtual instrument, the virtual appliance and/or the virtual chemical reagent related to each sub-scene, and setting the human-computer interaction rule contained in each sub-scene.

Wherein the interaction rule comprises: click manipulation rules, drag manipulation rules, rotate manipulation rules, shake manipulation rules, multi-point manipulation rules, and/or virtual 3D rules.

further: the method comprises the steps of building a sub-scene or building a virtual experiment workstation, a virtual instrument, a virtual appliance and/or a virtual chemical reagent related to a target chemical experiment by calling a model library, wherein the model library comprises a plurality of virtual experiment workstations, virtual instruments, virtual appliances and/or virtual chemical reagents with adjustable parameters.

Further, the virtual appliance includes an attitude control attribute for setting a target attitude of the virtual appliance to be associated with a target attitude sensor or a target attitude control device of the intelligent terminal.

when the virtual appliance is a pipette, the multi-point operation rules of the pipette include:

Step 21: acquiring coordinates of a user touch point;

step 22: judging whether the coordinates of the touch points are located in a first designated area, a second designated area and a third designated area, wherein the first designated area is the left side of the upper end of the pipette, the second designated area is the right side of the upper end of the pipette, the third designated area is the upper opening of the pipette, if so, executing a step 23, otherwise, prompting a user to adjust the positions of the touch points which are not located in the designated areas, and returning to the step 21;

step 23: detecting whether the touch point of the third designated area leaves the third designated area, if so, executing step 24;

step 24: starting timing, changing the liquid level of the pipette in real time based on the timing duration, detecting whether a touch point appears in a third designated area in real time in the timing process, if so, stopping timing, and executing the step 25;

Step 25: and (3) comparing the relative position of the current liquid level of the pipette with the target liquid level, returning to the step 23 if the current liquid level is higher than the target liquid level, completing the task if the current liquid level is within a preset range of the target liquid level, and prompting a user that liquid taking fails if the current liquid level is lower than the range of the target liquid level.

When the virtual appliance is a separating funnel, the liquid level updating rule of the separating funnel comprises the following steps:

Step 31: establishing a local coordinate system with the bottom of the separating funnel as an original point, wherein the local coordinate system rotates and moves along with the separating funnel, and the Y direction is always the direction in which the central point of the separating funnel points to the plug cover;

step 32: recording a vector of a current local coordinate zero point pointing to a maximum measurement scale mark in the Y direction as a vector V in a world coordinate system of a virtual space, and calculating an included angle A between the vector V and a plane normal vector of the world coordinate system;

step 33: calculating h ═ V | × (a), d ═ (current liquid volume/total volume) × h;

step 34: and when the included angle A is larger than 90 degrees, updating the sum of the world coordinate Y value with the current liquid level height as the local coordinate system origin and (h-d), when the included angle A is smaller than 90 degrees, updating the sum of the world coordinate Y value with the current liquid level height as the local coordinate system origin and d, and returning to the step 32.

When the virtual appliance is an AR glove, the virtual 3D rules of the AR glove include:

Step 61: acquiring a current real scene image through a camera;

step 62: analyzing feature points of a hand in the current real scene image;

and step 63: importing a 3D model of the glove based on the affine transformation matrix, enabling a first preset feature point of the glove to be associated and superposed with a second preset feature point of the hand, merging the first preset feature point and the second preset feature point with a video of a real scene, and displaying the merged feature points on AR presentation equipment or other equipment;

Step 64: and judging whether the gloves touch other objects or not, and if so, playing corresponding animation according to the collision position of the collision object.

Further, the method further comprises: and setting color change rules related to the target chemical experiment.

further, the method further comprises: setting a light source mode of a target chemical experiment, wherein the light source mode at least comprises the following steps: directional light sources, point light sources, area light sources, spot lights.

It should be noted that the embodiment of the method for implementing a virtual chemical experiment according to the present invention has the same principle as the embodiment of the system for implementing a virtual chemical experiment, and the relevant points can be referred to each other.

The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种冠心病教学模型

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!