Paper— Application of Virtual Environment in the Teaching of Basketball Tactics Application of Virtual Environment in the Teaching of Basketball Tactics

— The traditional experience basketball teaching method can only master the technical essentials through repeated practice, which seriously affects the efficiency of basketball training. Based on this problem, a basketball teaching simulation system was constructed by using virtual reality technology. The system established a virtual simulation model of basketball players, which planed the track of athletes. In the meanwhile, it captured the real situation of basketball players and contrasted them with simulated trajectories, so as to help athletes do more targeted training. The results showed that basketball technology teaching model based on virtual reality could help athletes grasp the key points of motion skills as soon as possible, and greatly improve the training efficiency of basketball players.


Introduction
Virtual reality (VR) is an integrated technology that combines computer simulation technology, multimedia, human-computer interaction technology, sensor, intelligent man-machine interface, graphics, psychology, high performance computing technology, human behavior, artificial intelligence and other fields. Virtual reality can generate realistic 3D viewing and listening sensation on computers, and help people interact with the virtual environment of computers with the help of some devices. Virtual reality actually refers to the simulation of some thing or environment in the real world to the computer, and then put itself in the virtual environment with the assistance of some kind of devices. Computer generated 3D simulation environment can communicate and interact with some physical objects in simulation through some interfaces.
The core of virtual reality technology is the use of computer equipment, position tracking equipment, display, and interactive equipment and so on, so that users can get rich experience. The virtual reality technology not only covers the visual system, but also includes the auditory system and the positioning system, which constitute the virtual reality system on the basis of the function of the multi-functional system. Virtual reality technology itself has a lot of characteristics, but the most representative features include the following four points: multi perception, interaction, conceptualization and immersion.
Virtual reality technology not only has the visual perception of computer technology, but also has multi perception of sense of hearing, motion and force sense. Although the computer virtual reality technology has very powerful functionality, there are some constraint factors. Especially the limitations of electronic sensing determine that virtual reality technology in the current stage has many characteristics, such as hearing, force and motion. The immersion in virtual reality technology can also be called the field perception. The participants can be in the virtual environment as the protagonist in the real state, so that the participants can have the real feeling in the world and invest more deeply into the virtual reality world. The characteristics of interactivity change the basic mode of the user receiving information in the traditional form, and the use of interactivity can guarantee the users, by combining their own real needs, to use professional technical equipment, realize communication and exchange under the virtual environment. It can also change the things in the environment, and more reflect the reality and natural feeling of it. The concept is mainly realized on the basis of the extended function. Based on basis, the user's imagination can be developed and the cognitive range of people can be changed. It can be realized by using virtual reality technology both in life and in objective imagination, which can also stimulate the imagination of people.
Modern competitive sports are towards high, difficult, precise and fast development, which makes sports training more helped by modern technology. In order to maximize the potential of people, modern sports need science and technology to continue to intervene. This requires a comprehensive use of discipline knowledge related to sports science, and the method of system science (such as system simulation) is used to study the inherent laws of sports. The sports system simulation is an experimental technology science. It is an experimental technical science that reproduces the teaching experience of the physical education teachers, the training intention of the coaches, the organization plan of the managers and the training process of the athletes through the computer simulation technology, thus achieving the interpretation, analysis, prediction, organization and evaluation of the sports system. . In recent years, the research focuses of system simulation include object-oriented simulation method, qualitative simulation, distributed interactive simulation, visual simulation, multimedia simulation, simulation based on VR and intelligent simulation and so on. Different from the methods of object-oriented simulation, qualitative simulation, distributed interactive simulation, visual simulation and multimedia simulation, VR-based simulation emphasizes multi perception, interaction, and immersion, and many sports training requires the participation of a variety of sensations (such as visual, auditory, tactile and olfactory) of athletes. Therefore, with the further development of VR technology, the simulation based on VR will be widely applied in the field of sports.
This paper presents a Moven-based 3D simulation animation for basketball technology and the design architecture of virtual shooting system and puts into practice. Literature review VR technology has a good application prospect in sports simulation, which is determined by the characteristics of VR technology. VR technology can provide effective and new training means for sports workers and athletes, expand the application scope of system simulation, and can also promote the development of VR technology. Sports simulation based on VR is the application of VR technology to simulate the sports system. Li and others [1] pointed out that the application of virtual simulation in table tennis training could improve athletes' attention and judgment ability and improve their athletic stability. Deeb and so on [2] stated that virtual reality simulation training could also study the influence of competitive state anxiety on players. The movement skill transfer between basketball and darts needs the perception performance. Tirp et al. [3] studied the transferability of specific skills in a virtual and real learning environment -on throwing accuracy (TA) and quiet eye duration (QED). In basketball, some scholars like Chan and others [4], used virtual simulation technology to establish virtual environment according to the real size of basketball field, and studied the sprain of ankle joint in the basketball competitions. Researcher Lala [5] carried out the design of dynamic interaction interface in virtual basketball. The new techniques and new methods of basketball shooting are emerging in an endless stream. People should sum up the understanding of their methods and characteristics and the study of their mastery principles, and require people to understand the knowledge and new techniques and methods deeply, so as to keep up with the development of technology. At the same time, with the development and popularization of basketball, basketball technology also needs to be inherited and promoted, which requires a good method and means to popularize basketball technology, so that more and more people learn and master basketball skills and participate in the fun of basketball. Chen [6] stated that the motion simulation could simulate the shooting process in the virtual basketball shooting teaching system, simulate the movement of the basketball players, and provide scientific reference data for the basketball players

Method
Motion capture is also called action capture at home, which is defined as the process of recording biological motion by tracking some key points in the time domain, and then converting it into available mathematical expressions and synthesizing a single 3D motion. The motion capture system is mainly divided into five types: inertial dynamic capture system, optical dynamic capture system, mechanical dynamic capture system, acoustic dynamic capture system and electromagnetic dynamic capture system.
The XsensMoven portable inertial dynamic capture system is the representative of the body motion inertial measurement system, developed and published by the Xsens Technologies Company located in Enschede, Holland. It can track and collect human motion in real time, eliminating the limitations of camera-based measurement system and transmitter. The absolute advantage that is different from other capture systems is that either indoor or outdoor, with light and no light, it can be used, and the motion is more flexible, which is especially suitable for outdoor sports.
The Moven inertial motion capture system combines the advantages of micro inertial measurement sensors (accelerometers and gyroscopes) and auxiliary technology (GPS/GNSS visual magnetic field sensor). It has 16 inertial sensors, as shown in Figure 1, and 11 sensors are placed in the trunk, embedded in an action capture suit, with 1 placed on head, 2 placed in hands and 2 placed on feet.
Before collecting the motion data, we need to choose a working environment which is not disturbed by the geomagnetic field, and install and debug the computer equipment. At this time, the staffs help athletes model wear special clothing, and complete the cable connection between inertial sensors. At the same time, it is necessary to check the correct position of all inertial sensors, and to properly fix the position of the sensor and body. In addition, it is supposed to ensure that the surface of the model body and the vicinity of the site cannot be with metal objects; otherwise, the electromagnetic field will be distorted and the accuracy will be affected. Then, the performers are guided to do some routine actions, such as standing, walking, running, and jumping, and motion calibration is done before the action is captured to make the motion capture data more accurate. After the calibration is finished, the MVNstudio acquisition and analysis software is recorded by the system, and the models display various technical motions in the wireless communication range. At this time, the receiving sensor sends the received signal to the processing unit through the cable. According to these signals, the space position and direction of each sensor can be calculated, so that every joint action can be accurately captured and transmitted. The recorded motion data can be exported immediately, and its output format supported is BVH (Biovision hierarchical), FBX and C3D (three-dimensional coordinates).
Behavior data acquisition relies mainly on motion capture technology, also called the motion capture process of the human body, which uses sensors to record human action. There are three typical capture sensors for capturing head, arms, torso, and legs, such as optical, electromagnetic, and machinery. Motion capture includes data acquisition, tracking and recognition process. It encodes data and maps it to virtual characters through skeleton information transformation.
The physical model of the action mechanism of the described object can be obtained by changing the path and shape of the moving object. The literature represents the physical model of table tennis, and describes the real-time rebound speed, rebound time and rebound height in table tennis through mathematical equations. The golf sports simulation system is designed by Chamberlain and so on. Using the golf motion model, the computer can calculate the flight path and the corresponding position of the ball. In the simulation of ball games, the algorithm based on physical deformation is to simulate the deformation of the ball in the virtual environment and make it closer to the real situation. In recent years, many methods of deformation simulation are put forward, including finite element method (FEM), finite volume method (FVM), Meshless method and so on. These algorithms are more complex and unable to achieve real-time effect, so they are rarely applied in virtual reality system.

Implementation of 3D animation for basketball technology based on Moven
This section uses the inertial capture system technology to obtain the key points of the motion of the basketball players, and then binds the key points of the trajectory to the virtual basketball figure model, and uses these key points to drive the action process of the virtual three dimensional basketball players. In this way, we can effectively record the players' limbs motion of the basketball players and omni-directional technical features. The main process of the implementation of the system is shown in Figure 1.  Based on Maya software to build virtual basketball venues, we should pay attention to reducing the proportion of the architectural design drawings. At the same time, we are supposed to reduce the number of models as much as possible, and delete the invisible surfaces of stereoscopic model. For example, the railing seat should be achieved with the perspective texture, so as to reduce the size of the file of the venue model.
In terms of the construction of the figure model of basketball players, first of all, the success or failure of the 3D simulation animation depends on the accuracy and the degree of the role model, so the modeling is the key to the animation production process. Because Maya has strong function of modeling and animation rendering, we use its software environment to create basketball player's skeleton and skin. In skeleton construction, the connection between human model and bone will be influenced by relevant skeleton and model weight, and it is directly related to the deformation effect of the model surface in the skeleton movement, and the above problems can be improved by setting the weight of the skin. At the same time, UV texture mapping, combined organization model and simplified model surface number are used to opti-mize the model, which can guarantee the effect of reducing the file size and guaranteeing the virtual interactive environment.
The motion trajectory collected by the motion capture system is the data point of the human joint. In order to make the data to drive the character model to move in accordance with the motion trajectory, the bone binding is required. When bone binding is concerned, we must pay attention to the influence of each node's weight of model joints, so as to ensure the natural coordination of model motion. The binding steps are as follows: firstly, the original data collected by the Moven motion capture system are imported into the Motionbuilder (MB), and the key frame of the animation model is set to 0, making the body shape adjusted to the initial action T-POSE (basic skeleton) posture, and using the Character node to carry out the Biped (bipedal animal) basic skeleton role orientation of the data 23 body link points. Then, at the same time, the Boneskeleton (BS) human skeleton model is imported without animation, and the original acquisition data is matched with the latter in size, proportion and angle with the moving and zooming tools to keep the same initial motion, and then the Bs body skeleton is mapped with the key node of the original data so that the Bs body skeleton model is driven by passive capture data and can be saved as *fbx file format. Finally, after completing the binding and debugging of the sports skeleton, the new figure data model created can be introduced into the Maya software, and the role control tool CharacterContorols can be used to bind the motion of the data model to the root node of the character. As a result, the role model is driven, and the motion display of three-dimensional data of the basketball players for the motion capture technique is realized.
The model of the basketball player is dressed well with the motion capture clothing. In the appropriate field, the motion technique of the basketball player is recorded by the action capture technique, and the 3D model of the motion data is mapped. In addition, the Maya software is used to carry out the characters, scene rendering and the later sound effect, so as to realize the 3D animation reproduction of the motion.  The effect of basketball player's actual shooting motion and the animation generated by the data are compared to verify whether the motion capture technique has a full and correct record of the basketball technical motion. It is found that the corresponding frame effect generated by the 3D dynamic capture data driven role model is consistent with the actual technical motion.

Basketball motion simulation in virtual shooting system
The shooting simulation system is a part of basketball simulation system. It mainly stimulates for the motion behavior after the basketball shot, such as flight, plate, basket shooting and so on. The experimental team of NBA in the United States has proved that in the basketball competitions, the motion of the basketball player's shooting is the biggest factor in deciding whether the basketball will enter the basket. The majority of the world's top basketball players can feel whether the ball can enter the ball after the ball comes out, which is a reflection of the conditions given by their experience. In this section, a three-dimensional (3D) physical model is proposed, including the motion behavior of basketball motion model and the deformation algorithm simulation ball after the ball comes out. Through real time calculation, the motion state of each frame is rendered. By simulating the motion track in the air and the physical collision of the ball, basket and rebounds, it can be seen whether the ball enters like playing the basketball in the reality, and the data after the analysis and processing is fed back to the participants to increase the experience of the shooting and to achieve the purpose of scientific training.
The motion trajectory obtained by the basketball game model can simulate the realistic scene of the basketball flight in the virtual environment and determine whether the basketball is hit or not through the flight route. Because the kinetic energy of the ball coming out is acquired by the motion of the motion capture system collection participants and the algorithm of inertia transfer, the simulation of the whole process of basketball from the position of coming out to grounding is the real-time rendering of the computer. As a result, it is necessary to put forward some reasonable assumptions to simplify the realization of the project.
Basketball, after being pushed into the thrust of the motion, leaves the player's fingers and enters the air, and the basketball will be affected by gravity, air resistance and air buoyancy. The specific analysis is as follows: First of all, basketball matches are usually held indoors, so there is no wind or rain. The influence of gravity and air resistance on basketball is much greater than that of air buoyancy and air pressure during fast flight. Therefore, we ignore the influence factors of wind, rain, air buoyancy and air pressure.
Secondly, the motion distance after basketball is shot is far less than the radius of the earth. Therefore, we suppose that the surface of the earth is flat rather than spherical, and ignore the coriolis inertial force caused by the rotation of the earth.
Finally, it is assumed that the shape of basketball in virtual environment during flight is standard axis symmetry, and the influence of air friction force on basketball speed is ignored.
The motion model proposed in this section mainly considers the influence of gravity and air resistance on basketball. Through the force analysis of gravity and air resistance, the flight trajectory of basketball is a parabola. The parabolic trajectory and final placement of basketball depend on the initial speed of basketball when leaving the athlete's fingers.
In Figure 4, the basketball sports model uses the X'YZ coordinate system. X' axis represents the horizontal direction from the throwing point to basket, and Y axis represents the basketball height. The deviation angle between the X' axis and the actual shooting direction is !, and the coordinates of the sphere are (X', Z). We suppose that the X k axis is the projection of the X'Z of the parabolic path in the plane. Finally, X k and Y axis form a plane perpendicular to the axis to form the coordinate system X k OY, as shown in Figure 5.  Figure 5 describes the model of basketball in a plane. The X axis represents the horizontal direction of the basketball motion. F is air resistance, G represents gravity acceleration (9.8m/s 2 ), " 0 is the angle of basketball throwing, v is the velocity of basketball, and v 0 is the initial velocity. At the moment of t, the dynamic equation of basketball is described as follows: In (1), F x and F y are the projection of the air resistance exerted on the basketball in horizontal and vertical directions at the moment of t. u is the component of velocity in horizontal direction, and w is the vertical component of velocity. Generally, in the air, the air resistance is directly proportional to the square of velocity, no matter whether the object is basketball, baseball or automobile.
In (2), k is the air resistance coefficient of a basketball flight.
Assuming that a basketball is flying in the air at a certain time, " is the angle between the X axis and the velocity, as shown in Figure 5, then the components of the velocity in the horizontal and vertical directions are: The projections of air resistance in horizontal and vertical directions are: In the formula, F represents air resistance. According to (3) and (4), it can be deduced that: Thus, the equations of motion representing basketball in the air are obtained.
In (6), x and y are the horizontal and vertical positions of basketball at the moment of t. Taking basketball thrown as an example, when t=0, the initial value of equation is: In (7), v 0 and w 0 are the horizontal and vertical components of the initial velocity, respectively. The velocity and displacement of basketball in the horizontal and vertical direction at the moment of t are real-time calculated and the results are given to the virtual basketball, which can simulate the trajectory of the basketball in the air.
The position and height of the basket and rebounds in the scene are fixed, so if the basketball state at all times is known, it can be very intuitive to judge whether the ball enters or not. If basketball hits the basket or rebound, the rebound is produced and the rebound process is mainly considering the deformation of the ball and the elastic force. The counterforce can be calculated according to the velocity of hitting the basket or rebounds. But only by simulating the reaction force produced by the deformation and deformation of the ball can we make the sports simulation system more authentic and valuable. Like the motion model, the elastic deformation model of basketball is needed to be created for simulating elastic deformation. In order to take account of real-time and authenticity, shape matching algorithm is used to establish the deformation model. The standard shape matching is mainly focused on determining the correspondence between the two shapes so that a large number of resources need to be consumed to calculate the corresponding relationship. In the algorithm proposed in this paper, the correspondence between the initial shape of the object and the actual shape is known in advance. Basketball in the virtual environment is a three-dimensional model of a sphere, which consists of spherical point cloud data to form a spherical grid. If the displacement change is known, the main task is to determine the optimal rigid transformation between two point clouds. The problem can be expressed as follows: for a given two group of particles, the initial vector and actual vector are r i 0 and r c 0 , respectively. The rotation matrix R and the translation vectors r c and r c 0 are calculated, and the # r is minimized, in which m i is the weight of each point. Obviously, the optimal translation vector is the centroid of the initial shape and the actual shape, that is: This is physically feasible. The remaining task is to calculate the optimal rotation matrix R.
Define q i = r i 0 -r c 0 and p i = r i -r c as the relative distance between the points and the centroid. Meanwhile, the N problem of determining the optimal torque matrix R is transformed to determine the optimal linear transformation A. Combined with the least square method, the best transformation is obtained when the partial derivative of all coefficients of A is 0.
In (9), A qq is symmetric matrix, which only contains scaling without rotation. Therefore, the optimal rotation matrix R is the rotation part of matrix A pq . R can be obtained by extreme decomposition of A pq =RS, and the target location can be obtained by (10).
The g i mark position is introduced into integral formula: In the above formulas, !=[0, 1] is a parameter to simulate the hardness. By adjusting the ! parameter, we can simulate different objects. For example, when !=1, the velocity increases (g i (t)-r i (t))/$t item, so that the displacement increases g i (t)-r i (t). The particles will move directly to the target position and simulate rigid bodies. When ! 1, the particles move to the position of the H mark gradually, and can simulate the deformable objects.
The experimental process is to use Com3D virtual reality development engine to set up virtual indoor basketball scenes in advance, including basket, rebounds and virtual basketball, and to add basketball motion model and elastic deformation models to virtual basketball objects. The motion capture system of the front end is used to obtain the information of the kinetic energy and position of basketball in the hand. And then the data are loaded on the virtual basketball object, the real time effective data is obtained through the operation of the mathematical model, and the Cora3D engine is used to render it. Using basketball motion model, we can calculate the trajectory of basketball and render it in real time. Virtual elastic deformation is to stimulate the deformation that happens when basketball hits the backboard at different speeds. Because of the deformation of the grid, the reaction force in the process of deformation recovery is calculated, which makes the basketball rebound back into the air. The cycle calculation is carried out so that we can really simulate the effect of multiple rebound of basketball. The number of particles in Table 1 refers to the number of particles to calculate the surface deformation of basketball: no deformation means no elastic deformation algorithm and no deformation effect. It can be seen that the algorithm improves the authenticity of the virtual basketball shooting, the deformation of basketball can be simulated very vividly, and the loss of the deformation algorithm in real time is relatively small.

Conclusion
In this paper, the Moven motion capture system is used to collect the threedimensional data of the basketball sports technology. It is convenient for teachers to integrate and use the teaching resources at any time to make the animation database which meets the needs of the teaching. It can also make use of the technical motion parameters collected by the motion capture to carry out the scientific research analysis of the motion technology, so as to make statistics of the movement law, and make the teaching process more intuitionistic and intelligent. Of course, in the process of mastery and efficient utilization of data, it is bound to put forward higher requirements on the information technology literacy of physical education. teachers. This paper also proposes a design framework of virtual shooting system, which obtains the participants' behavior data by motion capture technology, and simulates the behavior of virtual characters in virtual reality scene with the real data obtained. In the course of shooting, two physical models are added to the virtual basketball game with motion and elastic deformation to simulate the whole motion process of basketball in the air and the elastic deformation of basketball and rebounds and floor collisions. The experimental results show that the basketball motion stimulated by the virtual system is more realistic and it is in line with the real-time requirement. In specific applications, the system can also improve the training efficiency of athletes.