Project development of the virtual laboratory work with 3D visualization of gyroscope motion

In accordance with the concept of project-based learning, the project activities of computer modeling and simulation are organized in the physics course for the students of Novosibirsk State Technical University NETI. The students’ teams develop interactive virtual labs with 3D dynamic visualization of physical systems and processes. The program developing of the interactive virtual lab work “Precession and nutation of a gyroscope” is demonstrated. A feature of the program development is the use of concepts of the object-oriented approach when creating the software product. The program’s interactive abilities allow doing a large number of virtual experiments to study gyroscope behavior. You can observe and investigate various gyroscope motions as unidirectional precession, looping precession and cuspidal motion. Dynamic visualization of the gyroscope motion, supplemented by graphs, allows you to analyze the processes in detail. The students’ software developments find their applications in the physical laboratory practicum and in the lecture course of the university physics as additional didactic tools.


Introduction
In recent years, project-based learning (PBL) has attracted increasing attention of educational organizationsschools, lyceums and universities. PBL is an active student-centered form of instruction which is characterized by students' autonomy, constructive investigations, goal-setting, collaboration, communication and reflection within real-world practices [1]. It is considered to be a particular type of inquiry-based learning where the context of learning is provided through authentic questions and problems within real-world practices that lead to meaningful learning experiences [1]. Technical universities are particularly interested in this learning practice [2,3].
PBL is actively used in the organization of educational processes at the faculties and departments of the Novosibirsk State Technical University NETI (NSTU NETI). At the Department of General Physics, PBL is organized with the students' project activities of computer modeling and simulation of physical systems and processes. In our PBL practice, we support the idea of Marc Prensky that students can become developers of educational software products [4]. When choosing the direction of PBL we also relied on the concept of the importance of virtual interactive laboratories in tra ining of physics [5]. Therefore, our students' teams develop interactive virtual laboratories with 3D dynamic visualization of physical systems and processes [6,7]. The example of developing the interactive virtual lab work "Precession and nutation of a gyroscope" is demonstrated. A distinctive feature of the student's program development is the use of concepts of the object-oriented approach when creating the software product.

Students' project activity of computer modeling and simulation
Project activity of computer modeling and simulation is organized on a voluntary basis. All teams are formed from second-year students (3-4 people). Each student team implements every project independently. The teacher only plays the role of organizer, consultant, assistant and referee.
In advance, the uniform requirements are formulated and put up on the NSTU NETI website for the program projects and the presentation form of finished developments. One of the basic requirements is the availability of an interactive, friendly graphical user interface (GUI) that enables users to adapt quickly to it and provides a means of interactive interaction. Most preferred is the execution of the interface in the style of well-known and familiar Windows interfaces.
In the process of working on the projects, the students' teams have the opportunity to exchange information about the progress of work, useful links to information sources, programming techniques and design findings. The exchange of information occurs both at regular consultations of the teacher, and in groups on social networks.
The main stages of the organized project activity and the tasks solved by the developers [6]: 1. Familiarity with information about simulated systems and processes. 2. Formation of the conceptual physical and mathematical models of the analyzed systems and processes. 3. Definition of methods for solving equations of mathematical models. 4. Formation of the concept of the algorithm for software implementation. 5. Definition of graphic and functional formats of the program interface. 6. Creating the virtual 3D model using a graphical editor. 6. Software product development. 7. Testing the finished software product -performing virtual computer experiments. 8. Preparation of the report and presentation.
For the software implementation of projects, our students use: high-level languages C++ or C#, Visual Studio, Qt Creator or NET Framework, the OpenGL open graphics library, and the Blender graphics editor.

Mathematical model of gyroscope motion
According to Merriam-Webster dictionary [8], gyroscope is a wheel or disks mounted to spin rapidly about an axis and also free to rotate about one or both of two axes perpendicular to each other and to the axis of spin. So a rotation of one of the two mutually perpendicular axes results from application of torque to the other when the wheel is spinning and so that the entire apparatus offers considerable opposition depending on the angular momentum to any torque that would change the direction of the axis of spin [8].
If the axis of a spinning gyroscope is inclined to the vertical, its axis generates in space a circular cone, so that the angle between the axis and the vertical remains constant during rotation. This kind of motion of a gyroscope that is subjected to an external torque is called forced or torque-induced precession. In the general case, i.e., for arbitrary initial conditions, the motion of a gyroscope is a superposition of forced regular precession and nutation. Nutation of a fast-spinning gyroscope reveals itself as (small) vibration and shivering of the precessing axis [9]. Figure 1 schematically shows a gyroscope, the mechanical motion of which is associated with rotation around its own axis, precession and nutation. The Euler angles , and are used to describe the gyroscope motion. The angle describes the gyroscope rotation around its own axis, the angle describes the gyroscope precession, and the angle describes the gyroscope nutation.
The Lagrange method was used to construct a mathematical model of gyroscope motion. The method allows obtaining differential equations of motion for the Euler angles. We used the approximation of the weightless axis and the absence of friction. The Lagrange function is the difference between the kinetic and potential energies of the gyroscope [10]: where: 0the moment of inertia of the gyroscope about the 1 -and 1 -axes, perpendicular to the 1 -axis, the moment of inertia about the 1 -axis, the disk mass, the distance from the origin of coordinates to the disk. The moment vector of the force is directed perpendicular to the directions of gravity and the axes and 1 . Hence [11]: where: is the angular momentum of the disk along the 1 -axis, is the angular momentum along the -axis. From equations (2) and (3) we obtain: Equations (4) -(6) are differential equations of the gyroscope motion in the Euler angles representation. In our program, the obtained differential equations are integrated using the wellknown numerical Runge-Kutta 4 th order method. This method is stable and gives small errors [12]. The results of numerical solutions are used for dynamic step-by-step visualization of a 3D model of the gyroscope.

Software product implementation
We chose an object-oriented approach for program implementation. That allows us to map abstract objects described by classes to real physical objects [13]. The basis for this was the C++ language with the Qt framework [14]. Figure 2 shows the class diagram of our program implementation. The gyroscope of 3B Scientific Company was chosen as a real prototype for a 3D computer simulation object. The virtual 3D model of the prototype gyroscope was created in the Blender3D editor [15], and it was exported as files with the obj extension and files with textures. Figure 3 shows the GUI of the virtual lab "Precession and nutation of a gyroscope". The GUI contains two areas: the main graphic window and the control panel. The menu item «File» contains a button to exit the program. The menu item «Graphs» includes graphs of the angle as a function of and as a function of time, as well as graphs of the kinetic, potential, and total energies of the gyroscope as functions of time.

GUI and capabilities
The menu item «About» contains the user manual, theoretical information and information about the authors of the software product.
The control panel is responsible for interacting with the 3D model and allows changing the characteristics of the gyroscope. Under the «Start», «Pause» and «Reset» buttons there are six sliders: • The first slider is responsible for changing the distance from the vertical axis to the disk. The interval of change is from 0.15 to 0.2 m. The step of change is 0.01 m. • The second slider is responsible for changing the mass of the disk. The interval of change is from 0.1 to 2 kg. The step of change is 0.1 kg. • The third slider is responsible for changing the radius of the disk. The interval of change is from 0.05 to 0.08 m. The step of change is 0.01 m.