# Personalized Visualization of the Gestures of Parkinson's Disease Patients with Virtual Reality
## 3 Materials and Methods
### The PD Data Visualization Application in Virtual Reality
#### 3.2.2 Application Analysis  
The application that was implemented was developed in Unity 3D application development software in version 2021.3.22f1 and was divided into two main parts, depending on the preference and equipment available to each user. In the first part, the application is accessible from a computer, while in the second part, the application works through virtual reality glasses. This application is not exclusively addressed to specialists in the field but also to young researchers who wish to work in the field or patients who want to see the evolution of their condition. In this context, the main menu of the application contains a learning environment where the user can be informed about both virtual reality and [PERSON]'s disease in a very realistic and immediate manner. The user has the option to read details about each topic and watch relevant videos, as shown in Figure 4.  
After the update, the user is welcomed to the application and the virtual environment and is asked to select from a set of different types of databases on the corresponding description (e.g., fist data or hand rotation data, etc.). A small sample of these different types of data is shown in Figure 5.  
After the user selects the type of data to be loaded into the system, the user is transferred to the central data simulation room. Figure 4: User information room. Figure 5: Data selection by the user. To create realistic data, a virtual 3D visualization of a hand designed for virtual reality applications was used. The goal was to have as much detail as possible for each finger. The virtual hand consists of 20 separate parts (finger joints), with at least three parts for each finger. Due to its characteristics and its compatibility with virtual reality, this hand was an ideal choice for this application. For the development of the application, 17 scripts in C# were implemented for data visualization in the virtual hand, and another 3 scripts related to the visualization rooms (see below) and the operation of the informative objects. Data visualization was performed by the following methodology:  
* Initialization of virtual hand positions;
* Transferring user data selection from the previous room;
* Data upload;
* Calculation of new positions based on data;
* Applying new positions to the virtual hand. In summary, the application integrates the data controlled by the smart glove into the virtual environment and, once categorized according to the type of sensor they come from, they are applied to the 3D virtual hand with accuracy in both position and time. The goal of the application is to reflect the movements made by the participants using the glove identically in the virtual environment. The whole methodology of the application is shown in Figure 6.  
In the first steps of the application, the possibility of adapting the data to any virtual hand was considered, this is performed by defining from the beginning the position where the virtual hand starts. At the start of the application, as described above, the user, in addition to the educational information received, is asked to select which dataset they wish to run based on the corresponding category in the simulation room. The application consists of three rooms in total: the input-update room, the simulation room, and the motion room. Through PlayerPrefs, the possibility is given to transfer the user's action to different rooms (scenes) so that the corresponding data can be loaded into the simulation codes. Utilizing the data from the.csv files and the initial hand positions, data normalization and deviation calculations are performed, resulting in the next position (newz). Then, Unity's Quaternion. Euler method is adopted to create a quaternion representing the rotation around the three basic axes (X,Y,Z) based on the Euler angles. Quaternions are mathematical structures widely used in 3D spaces to represent rotations.