HUMAN BODY MODELING TECHNOLOGIES FOR E-COMMERCE SYSTEMS

Relevance of the research work is the analysis of the main features of 3D modeling for further implementation in e-commerce. Namely, the features of creating a human body 3D model with the ability to edit personal settings of individual parts of the body, as well as a basic set of clothes to provide a more realistic representation of the model. The features of the 3D model in general were considered in this article. The mathematical analysis of the 3D graphics rendering on the 2D monitor and the possibilities of control and editing of such models have been presented. The developed software product allows the user to create an anatomical three-dimensional model of the human body and then adjust it to his needs. The user can apply on created model variety of settings, namely more than 15 different views, with a full package of changes. It is possible to change the size, color of hair, eyebrows, eyes, face, body, legs. Also, the user is able to select the levels of skeletal frame views and additionally can select different backgrounds to provide a more realistic representation of the model in space. Additional functionality was implemented for more flexible configuration of the model’s face. The user can pre-determine points to select directions or sizes of different parts of the face using settings, displayed on the mouse or touchpad control. After adjustments, the user is able to manage the clothes that he had saved in the shopping cart from the online store, from which he later proceeded to the online fitting. After the fitting the user can test the creation of animations in 360 degrees of free movement. Finally, the user can go to the store to pay for the items he left in the shopping cart. Developed software allows improving main metrics of the on-line stores, which has a positive impact on increasing the growth of earnings.

Problem review. Unlike usual two-dimensional graphics, the purpose of three-dimensional graphics is connected with the presentation of more accurate information about the producers' products. In addition, this type of graphics helps a customer to form a deeper understanding of a particular product, increases the user's confidence in the manufacturer and the chance that the customer will come back, which affects growth of sales. In modern IT industry, such an approach can be implemented on the basis of WebGL and ThreeJS technologies, which will allow the final models to integrate into web applications.
3D modeling as a direction of IT-industry is gaining momentum every year, which attracts new funding to this segment of the market. More and more companies, enterprises and businesses are beginning to implement 3D modeling as a technical tool to facilitate work and increase sales.
One such tool may be methods of computer design of clothing and textiles based on geometric models, taking into account the characteristics of the fabric [1]. It is also possible to integrate three-dimensional modeling with technologies such as Unity or other game engines based on genetic engineering ideas to create realistic models [2].
A very important place is taken by three-dimensional modeling in scientific research, one such study is the study of the cut of various fabrics, as well as studying the percentage of error between 2D and 3D methods of measuring models. Such research helps to reduce the percentage of defects in the final product and the probability of rejection by the final buyer, which brings an increase in the level of earnings for the business [3].
Three-dimensional graphics found its practical application in the study of wear and comfort of clothing in daily use, such research will help further to develop and create a new type of synthetic fabric, which will be ideally suited to man based on his physiological characteristics. This gives businesses the opportunity to enter and promote new markets that have not been exploited before [4].
A very promising bundle of technologies is Big Data and three-dimensional modeling, which allows to predict, what kind of clothes will be popular in a given time period on a base of large amount of data. This combination of technologies has great power, especially for existing businesses, where based on the data you can be the first in your industry and raise your earnings levels [5].
Thus, three-dimensional modeling can have a big impact on e-commerce, which makes relevant the developing of the algorithmic and software support for its implementation.
General theory of three-dimensional modeling. Three-dimensional modeling is the process of creating a three-dimensional model. Its main task is to show the visual volume of the created object [6]. There are several different options for creating such graphics: wireframe model, surface modeling and solid modeling. A wireframe model is a model that is fully described in terms of lines and points. The second modeling method is surface modeling, defined in terms of points, lines, and surfaces. A solid model is defined in terms of the three-dimensional volume that the body it calculates occupies.
Each of these options has its positive and negative sides, for example wireframe modeling is the easiest to perform, but has a large list of functionality limitations. In this research we use solid modeling, which is the most accurate, but difficult to perform. It gives the user wide range of possibilities for customization of his threedimensional model, provides realistic graphics in comparison with other approaches.
Algorithmic implementation of the 3D model mapping algorithm. The developed software product is based on ThreeJS technology, which in turn is based on WebGL. WebGL is a software library for JavaScript, which allows creating 3D graphics for Internet browsers. This library is based on the architecture of the OpenGL library.
There are two types of shaders (computer program originally used for shading in 3D scenes): a vertex shader is a program code, which is called for each vertex. It is used to transform the geometry from one place to another. Since the mesh consists of several triangles, and the surface of each of the triangles is called a fragment, there is a second shader. A fragment shader is a code that runs on all the pixels of each fragment. It is written to calculate and fill color of individual pixels.
A special programming language called GLSL [7] handles such shaders. Modeling graphics using Three.js is comparable to a movie set, since we have the ability to operate with concepts such as scene, light, camera, objects, and their materials.
Scene is the platform where all the objects we created are placed. Camera is the analog of the human eye pointed at the scene. The Camera captures and displays the objects in the scene. There are several types of camera in Three.js. The most common are the perspective camera and the orthographic camera. The camera perceives all objects in perspective projection [8].
Since we are wielding the concept of scene and camera in ThreeJS, we first need to break down the scene into separate fragments for displaying on the user's screen. A fragment definition function, where (a, b, c) denotes level, row and column: (1) Next, it is important to mark the centers of the cameras and calculate the position of cameras for each of the fragments [9]. The level of the required sector is calculated as the distance between the camera ℎ and the position of the center of the sector and radius To rotate model in 3D space we need to use matrices.
Rotation in 3D is specified by vector , rotation angle and rotation axis ℎ . Quaternions provide a convenient mathematical notation of orientation of space and rotation of objects in that space [10]. Compared to Euler angles, quaternions allow combining rotations more easily, and avoiding the problem of not being able to rotate on an axis, regardless of the rotation made on other axes: To get a mixture of matrix rotations, we need to get a rotation that is between quaternion and quaternion multiplied by a scalar ` through operations on them, where (x, y, z, w) are coordinate axes of rotations, and (x`, y`, z`, w`) are the rotation angles of the axes: To get a vector multiplied by a scalar G we need: Where (x , ys, zs, ws) are those rotational coordinate axes multiplied by a scalar.
Multiplication by a scalar has no effect on rotation.
The rotation of the three-dimensional quaternion vector M` is calculated as [11]: Vector is converted to a quaternion as: The quaternion back to the vector as: One of the most useful operations is similar to the multiplication of two rotation matrices [12]. The final quaternion is a combination of rotations -first the object is rotated by , and then by `. Where ` is the vector product, •` is the scalar product of vectors.
The rotation matrix is expressed in terms of quaternion components as follows: Let's substitute the sine of half of the rotation angle from the previous formulas, where = sin ( ). Thus, a three-dimensional rotation with quaternions was implemented.
Next, we need to calculate the formula that will allow to add light to our scene that can be properly diffused over the dome [13].
is the color of the surface at a point. j is the color of the light source. Now the basic mathematical software is set up to get started creating three-dimensional models.
The activity diagram of the developed software for the 3D model creation is given on the fig. 1.
Overview of system functionality. The following will demonstrate the developed software that allows the end user to create a highly detailed three-dimensional model of a person, which will be used later to try on clothes from the online store where the user uses this application. To begin, the user must select one of the two genders. After that, the main window of interaction with the model opens in front of the user.
There are two main windows in the program: the setup window on the left and the model itself on the right. In the left window, the person can customize the model by himself or create various interesting variations of digital people for fun. Many combinations for customization, the results of all selected elements and colors the user will see immediately in the right window ( fig. 2).
A wide range of customization is given to the user ( fig. 3).
It is possible to configure each of the above items using responsible buttons and windows ( fig. 4).
The user can move or rotate the 3D model using 360 degrees of free rotation around axis of coordinates. A method of zooming in and out of the camera for a better view of the model is also implemented. The user can save his model and give it a unique name. The number of the saved models in unlimited.
The software product was created as a means to increase sales and profits for the business, so it becomes necessary to evaluate the effectiveness of the web application before and after the implementation of the developed program. Statistics was measured by free analytical tool Google Analytics.    Conclusions. On the base of technology for creating and editing 3D models, it was possible to develop software that will allow its implementation in ecommerce, thereby raising the levels of business earnings. In addition, such software product will allow separating the business from competitors at the expense of the modern technologies use. Such technological symbiosis will allow the market of e-commerce, namely, online stores to attract more customers that are new. Embedding this software on their pages via an API allows the end user to try clothes before ordering, which greatly increase the sales conversion rate and online traffic to the store page.