**3. The virtual world made on Unity3D, blender and Vuforia**

In this section, we explain how to represent a three-dimensional function within a virtual world created with Unity3D.

The creation of the figures is carried out through two scripts working on different levels:

1.at the beginning it is important to define the resolution, that is the level of detail the figure must have. If for instance we set a resolution equal to 500, then we will have a matrix of 500x500 function values obtained varying X and Y along the grid. The implemented code produces in output the list of vertices that make up the figure.


Once the first phase has been completed, the surface lighting needs to be adjusted, to optimize the appearance of the represented shape, with respect to the user's camera position. This calculation, which seems to be complex, is carried out very quickly in Unity3D. At the end of this operation the mesh is ready to be shown on screen.
