# Immersive Phobia Therapy through Adaptive Virtual Reality and Biofeedback
## 3 The PhoVR System
### Description of the Virtual Environments
#### 3.2.4. Virtual Environment for Fear of Public Speaking Therapy  
In the environment for glossophobia therapy, the user is placed in a virtual room and has to give a short presentation. The user or the therapist is able to configure the scene, run it, and receive in-session analysis and post-session analysis. Three room types and five presets for room crowding and audience distribution are provided. The user and the psychotherapist can visualize statistics about the performance in real time. The environment for treating fear of public speaking contains the following features:  
* A module for setting up the scene (Figure 15);
* A module for running the scene;
* Immersing the user within the previously chosen and configured scene;
* Speaking freely or presenting a topic within the VR application;
* Monitoring immersion factors;
* Real-time calculation of the degree of attention of each person in the virtual audience;
* Numerical display and color indicators of the attention degree of each person in the virtual audience;
* Animations corresponding to the calculated degree of attention. * In-session analysis;
* Post-session analysis. The scene setup allows the user/psychotherapist to select the following aspects: type of room, audience settings, distribution of the audience, and initial behavior of the audience (Figure 15). By pressing the Initial Behaviors button, the submenu for configuring the initial behavior of the audience will be opened, setting the factors and distribution type. The three personality factors are \"Interest in the topic\", \"Tiredness\", and \"Distraction\". The distribution is either uniform (with minimum and maximum parameters) or Gaussian (minimum, maximum, and sigma parameters--or distribution height). There are three types of rooms:  
* Small room (interview room)--maximum 4 seats;
* Medium-sized room (lecture hall)--maximum 27 seats;
* Large room (amphitheater)--maximum 124 seats (Figure 16). There are five predefined settings for populating the rooms. The percentages represent how many seats are occupied by the generated audience. * Empty room (0%);
* Small audience size (25%);
* Average audience size (50%);
* Large audience size (75%);
* Full room (100%). Figure 15. Module for setting up the scene. A session requires the following steps:  
* Placing the user within a chosen and previously configured scene;
* Speaking freely or presenting a topic within the VR exposure scenario (Figure 17);
* During the presentation, the system monitors the factors that contribute to the audience's interest, calculates the degree of attention (cumulative score) for each virtual person, displays this degree numerically and through color indicators, and performs animations of the virtual audience corresponding to their degree of attention. There are two types of monitoring factors. The audience factors presented previously (Interest in the topic, Tiredness, and Distraction), which can be configured initially, and user factors. The user factors, which are detailed below, directly influence audience factors. The first group of user factors comprises spatiality factors:  
* Position relative to the audience--calculated by measuring the distance between the presenter and each person in the audience;
* Hand movement--the total length of the hands' movement trajectories over a defined time interval (for example, the last 10 s);
* Gaze Direction--the direction the presenter is looking at affects the audience factors based on how far each person in the audience is from the center of the presenter's field of view. This applies only to the people in the audience who are located within the angle of attention. The angle of attention is centered in the presenter's gaze direction in the virtual environment and has a preset aperture (for example, 60 degrees). The attention factor is calculated according to the angle between the direction of the presenter's gaze and the direction of the person in the audience (the segment connecting the presenter's position to the person's position) (Figure 18). Figure 16: Amphitheater.