<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Modelling of Flexible Elements</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>E.V. Afonina</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>M.N. Levaya</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>I.S. Levy</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>cvetelena@rambler.ru</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>mlevaya@mail.ru</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>i-levyy@mail.ru</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Bryansk State Technical University</institution>
          ,
          <addr-line>Bryansk</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Flexible elements are used for modeling of various hawsers, chains, ropes, tail-ropes and other elements in the programmes of simulation. Depending on a current task a set of requirements necessary for a flexible element modeling is formulated. The article presents two methods of rope, wire, cable designing in computer games programming environment Unity3D based on the use of primitive objects. The standard design method grounded in hinge joints employment is considered. The disadvantages of a standard method are noted and two new methods of modeling are offered. The developed methods consider the requirements necessary for the solution of the task at hand, they include the reality of a scene, the interaction with surrounding objects, the possibility to specify the function of a natural sag. Two methods of modeling are compared taking into account the implementation area of programs, the reflection of physical and geometrical properties of modelled entity and the reality of a scene. Both methods meet specified requirements, however it is expedient to use one of the methods for mobile scenes, such as games, exercise machines, simulators of processes, while the other fits better for static programmes.</p>
      </abstract>
      <kwd-group>
        <kwd>3D modeling</kwd>
        <kwd>computer graphics</kwd>
        <kwd>flexible elements</kwd>
        <kwd>ropes</kwd>
        <kwd>cables</kwd>
        <kwd>wires</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>One of the tasks of rope, chain, hook, knot and other flexible
elements modelling is their use in the development of 3D-games,
trainer simulators and simulators, testing and training
programmes, commercials and other animation projects.</p>
      <p>Flexible elements such as ropes and tail-ropes give
interesting and fun dynamics to game scenes. They can be used
for moving through levels, battles taking place in arenas and also
for retrieving items. In various specified 3D simulators flexible
elements can be employed to simulate wires and cables of
overhead power lines or various devices for both carrying out
rescue operations and, for example, lifting cargos. In one form or
another, flexible elements are used practically in all 3D scenes.</p>
      <p>
        In the study of the mechanical properties of wires, ropes,
cables, geometric models do not raise a demand of reality.
Depending on the scope of application and study of the model,
modeling methods can vary significantly [
        <xref ref-type="bibr" rid="ref1 ref10 ref11 ref3 ref4 ref8">1, 3-4</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Existing</title>
      <p>elements
methods
of
modeling
flexible</p>
      <p>By “flexible element” we shall basically mean any segment,
the main characteristics of which are length, strength and
flexibility. These include hawsers, ropes, chains, wires, cables
and other elements, which can connect two or more objects. To
give realism to the scenes flexible elements should reflect
physical properties of real objects, for example, oscillation under
impulse load, natural sagging at the horizontal orientation of a
segment, etc.</p>
      <p>
        So far a certain method of creating ropes and tail-ropes in
three-dimensional modeling programmes has been developed.
Modeling of games, feature and instructional films, 3D characters
of advertising are performed in Autodesk 3ds Max, Cinema 4D,
Sculptris, Icon, Sketch Up, Sweet Home 3D, Visicon, Paint 3D,
Blender 3D and others [
        <xref ref-type="bibr" rid="ref12 ref13 ref2 ref5 ref6 ref9">2, 5, 6</xref>
        ]. But the functionality of each of
these programs is well designed to solve certain types of tasks,
and is not suitable for mmodeling of specialized scenes due to its
unability of either reflecting physical properties of such flexible
objects like wires and chains or interacting with other elements
of the scene.
      </p>
      <p>When creating production processes of training simulators
and simulators, building of ropes, tail-ropes, wires, models
should meet the following requirements:</p>
      <p>1. reflection of physical properties (elasticity, flexibility,
oscillation in motion, etc.);
2. realistic appearance of modeling object;
3. a small number of polygons,which is good for high
performance of 3D scene modeling.</p>
      <p>For clarity of the flexible element movement simulation the
cross-platform programming environment of computer games
(the so-called game engine): Unity3D was chosen. The main
advantages of Unity3D include the presence of a visual
development environment, cross-platform support and modular
system components. For nontrivial tasks, native components
written in the C# or JavaScript programming language are used.
The difficulties appearing when working with multicomponent
schemes and problems in connecting external libraries, both
leading to a sharp drop in performance, can be considered as
disadvantages.</p>
      <p>To solve this problem Unity 3D has a standard mechanism
based on the use of the component HingeJoint.</p>
      <p>HingeJoint is a component that connects two objects tipping
the scale and allows them to rotate around a specific point or axis.
When creating a flexible element, primitive objects like spheres
and capsules were used. Each sphere connects two capsules using
the HingeJoint component. At the two ends of the flexible
element there are posts with the specified IsKinematic property.
It is assumed that they will not be affected by the force of the
flexible element. These posts are also connected to the extreme
capsules by a hinge joint.</p>
      <p>As a result of modeling, we obtain a flexible element
presented in Fig. 1.</p>
      <sec id="sec-2-1">
        <title>This approach has its drawbacks:</title>
        <p>1. The employment of primitives (spheres and capsules), that
makes creating of real objects difficult.</p>
        <p>2. The uprising of gaps between primitives appearing at the
maximum amplitude of oscillation.</p>
        <p>3. The inability of element staying. Less sagging of the
element requires the change of the primitives' number, and the
display quality of the flexible element is lost.</p>
        <p>In the development of a new method of flexible elements
modeling, the set task is to avoid these disadvantages.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Methods of modeling flexible elements taking into account specified requirements</title>
      <p>The first of the possible methods of designing lies in the fact
that flexible element should be a single mesh. Mesh or baseline
grid is a term used to denote a total of top elements, edges, and
polygons that make up a single 3D object. A rope object is created
in any 3D editor using primitives, for example, cylinders. Then
tools of object deformation by means of armature (skeleton) are
employed. The more "bones" the skeleton has, the more the
simulated object will resemble the movement of a flexible
element. By using this method it is possible to get rid of the first
two disadvantages described above, but at the same time it
requires bringing in additional programmes.</p>
      <p>The second method is connected with using the standard
LineRenderer component of the Unity3d programme. This
component consists of an array of two or more points of
threedimensional space and successively draws a straight line between
each pair of points (that is, at three or more points a polyline is
obtained), therefore the created object looks seamlessly
(integrally). The use of this method makes the simulation of the
physical properties of the object possible.</p>
      <p>To implement the first method we take advantage of 3D
editor of the Blender graphics package. Blender 3D editor has
enough feature set to create 3D models, videos with complex
scenes, sculpturing and creating realistic object visualizations.</p>
      <p>To model a rope (tail-rope) a standard cylinder object should
be designed, which is then split into parts in edit mode (Fig. 2).</p>
      <p>The next step is to add a standard object “armature”
(skeleton) to the project and create a child object of CAD fittings
(“bone”) for each part of the cylinder (Fig. 3).
enter the posing mode, and set the "skeleton of bones" rotation
about different axes (Fig. 4).</p>
      <p>To simulate the motion of a flexible element the C#script
component is added to the created object. The model is then
imported into Unity3D.</p>
      <p>The following components must be specified for each part of
the flexible member:
1. Rigidbody (a solid body).</p>
      <p>With RigidBody, objects can interact with each other taking
into account physical properties by means of the programme
describing physical state, titled NVIDIA PhysX. For the body,
you can set its mass, the value of gravity, the forces acting on it,
the torque.</p>
      <p>2. SphereColider (collider). The SphereColider component
determines the shape of an object (in this case it is the shape of a
sphere),which is necessary for calculating mechanical collisions
with other objects. This component is transparent, and the
geometric shape may not match the exact shape of the object.
3. DistanceJoint3D. This designed component allows
calculating physical properties of the interaction between
objects, such as speed (velocity), distance (distance), the force
that must be given to the object to change the position (spring),
the attenuation of the object during its perturbation (damper), etc.</p>
      <p>4. The "private void AddChildren (Transform parent)"
function adds created components for each part of the flex
element. The calculation of physical properties of the
relationship between the parts of the rope is made separately in
the "void FixedUpdate" function of the "DistanceJoint3D"
component, which is called each time when the simulation scene
frame is updated.</p>
      <p>As a result, we obtain a simulation of a flexible body on the
scene shown in Fig. 5.</p>
      <p>Fig.5. Modeling of the physical properties of a flexible element.</p>
      <p>Modeling by using the second method is aided by standard
component LineRenderer (render lines) programmes Unity3d.</p>
      <p>To do this, an empty object is added to the scene and the</p>
      <p>Going forward it is imperative to bind the “bones” of the
armature to the designed object. The resulting object can freely
rotate its parts around three axes. For clarity it is necessary to</p>
      <sec id="sec-3-1">
        <title>LineRenderer component is "attached" to it. To simulate the motion of a flexible element, a C#script is added to the object. In the developed script, you can change the following properties:</title>
        <p>Fig.6. Simulation of the physical properties of a flexible
element with a sagging of 5 Unity-meters
Fig.7. Simulation of the physical properties of a flexible
element with sagging at 1 Unity-meter.</p>
        <p>
          As a result, both developed methods eliminate the
disadvantages of the standard modeling mechanism of the
flexible element and meet the necessary requirements. The
designed objects appear as a whole. There is also a range of
settings for physical properties adjusting. When specifying a
particular type of flexible element such as wire, rope, tail-rope
and other it is required a certain texturing to the model [
          <xref ref-type="bibr" rid="ref14 ref15 ref7">7, 8</xref>
          ] to
create the vividness of the scene.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>
        The developed methods meet the specified requirements,
have positive features and preferential scope of use [
        <xref ref-type="bibr" rid="ref1 ref16 ref17 ref8">1, 9, 10</xref>
        ].
      </p>
      <p>A significant advantage of the first method is the presence in
all parts of the object of the rope collider component, which
coincides with the shape of the rope. This makes the interaction
with other objects in the scene easier. The interaction is carried
out by means of add-in physical properties determinant of the
Unity 3D programme with a number of settings.</p>
      <p>This method is useful for ropes (or other flexible elements)
that often interact with other objects in the scene, such as catapult
tension harnesses (in games, simulators, process simulators, etc.).</p>
      <p>The advantage of the second method is a simpler calculation
of the rope movement, since a single object is used to form a
flexible element, which contributes to the programme efficiency.
Besides it there is no need to use additional programmes to build
the rope. This method is good in static scenes, as it is shown in
the example of high-voltage power lines.
5. References:</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Pointsinlinerenderer</surname>
          </string-name>
          <article-title>: the number of points in the LineRenderer component defines the rope (the smaller the number of points, the greater the performance of frame-by-frame rendering of the rope physics</article-title>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Sag</surname>
          </string-name>
          <article-title>Amplitude is a property that determines how much the rope will sag in the middle</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Sway</surname>
          </string-name>
          <article-title>Multiplier is a property that estimates how much the rope will deviate in different coordinates</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Sway</surname>
            <given-names>X</given-names>
          </string-name>
          <article-title>Multiplier is a deviation of the rope in the local coordinate system by the x coordinate</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Sway Y Multiplier is</surname>
          </string-name>
          <article-title>a deviation of the rope in the local coordinate system by the Y coordinate</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Sway</surname>
          </string-name>
          <article-title>Frequency is a property that determines the frequency of the rope vibrations</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>End</given-names>
            <surname>Point</surname>
          </string-name>
          <article-title>Transform is a property that determines the coordinates of the object to which the other end of the rope will be attached (it is desirable for the object being empty). The coordinates of the points of the LineRenderer component are calculated separately in the “void Animate” function, which is called each time when the simulation scene frame is updated. The calculation is made taking into account all the abovementioned properties. The result is a simulation of the physical properties of the flexible element in the scene shown in Fig. 6 with the amount of sagging of 5- Unity meters</article-title>
          and in Fig.
          <volume>7</volume>
          :
          <fpage>1Unity</fpage>
          -
          <lpage>meter</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Voloboy</surname>
            <given-names>А.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Galaktionov</surname>
            <given-names>V</given-names>
          </string-name>
          .
          <article-title>Visualisation technologies in the problems of modern industry//Scientific visualization</article-title>
          .
          <source>- 2013</source>
          .- Vol.
          <volume>5</volume>
          . № 4.-pp.
          <fpage>31</fpage>
          -
          <lpage>46</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Ermakov</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mitin</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <article-title>Solving kinematic problems of models and units of mechanisms under geometric constraints</article-title>
          [Article] // GraphiCon.- 2016
          <source>[Proc. of the international scientific conf.]: Russia</source>
          , Nizhny Novgorod, Sept.,
          <fpage>19</fpage>
          -
          <lpage>23</lpage>
          ,
          <fpage>2016</fpage>
          - pp.
          <fpage>77</fpage>
          -
          <lpage>79</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Zakharova</surname>
            <given-names>А.А.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vekhter</surname>
            <given-names>Е.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shklyar А</surname>
          </string-name>
          .V.
          <article-title>Methods for solving data mining tasks when using analytical visual models // Scientific visualization</article-title>
          .
          <source>- 2017</source>
          . - Vol.
          <volume>9</volume>
          . -
          <fpage>№</fpage>
          4. - pp.
          <fpage>78</fpage>
          -
          <lpage>88</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Bednarcyk</surname>
            <given-names>B.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stier</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simon</surname>
            <given-names>J.-W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reese</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pineda</surname>
            <given-names>E.J.</given-names>
          </string-name>
          <article-title>Meso- and micro-scale modeling of damage in plain weave composites</article-title>
          .
          <source>Composite Structures</source>
          .
          <year>2015</year>
          . Vol.
          <volume>121</volume>
          . pp.
          <fpage>258</fpage>
          −
          <lpage>270</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Behera</surname>
            <given-names>B.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dash</surname>
            <given-names>B.P.</given-names>
          </string-name>
          <article-title>Mechanical behavior of 3D woven composities</article-title>
          .
          <source>Materials &amp; Design. 2015</source>
          . Vol.
          <volume>67</volume>
          . pp.
          <fpage>261</fpage>
          −
          <lpage>271</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Brodlie</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Osorio</surname>
            ,
            <given-names>R.A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Lopes</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <article-title>A review of uncertainty in data visualization</article-title>
          .
          <source>In Expanding the Frontiers of Visual Analytics and Visualization</source>
          ; Springer: Berlin / Heidelberg, Germany,
          <year>2012</year>
          ; pp.
          <fpage>81</fpage>
          -
          <lpage>109</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Geuzaine</surname>
            <given-names>С.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Remacle J.-F. Gmsh</surname>
          </string-name>
          <article-title>: a three-dimensional finite element mesh generator with built-in pre-</article-title>
          and postprocessing facilities // International Journal for Numerical Methods in Engineering, Vol.
          <volume>79</volume>
          , i.
          <volume>11</volume>
          , pp
          <fpage>1309</fpage>
          -
          <lpage>1331</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Kirby</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
            <given-names>C.</given-names>
          </string-name>
          <article-title>The need for verifiable visualization // IEEE Computer Graphics</article-title>
          and Applications,
          <volume>28</volume>
          (
          <issue>5</issue>
          )
          <string-name>
            <surname>Sept</surname>
          </string-name>
          .
          <year>2008</year>
          . pp.
          <fpage>78</fpage>
          -
          <lpage>83</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Parsons</surname>
            <given-names>E.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>King</surname>
            <given-names>M.J.</given-names>
          </string-name>
          , Socrate S.
          <article-title>Modeling yarn slip in woven fabric at the continuum level: Simulations of ballistic impact</article-title>
          .
          <source>Journal of the Mechanics and Physics of Solid</source>
          .
          <article-title>- 2013-</article-title>
          . Vol.
          <volume>61</volume>
          .pp.
          <fpage>265</fpage>
          −
          <lpage>292</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Zakharova</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shklyar</surname>
            ,
            <given-names>A.V.</given-names>
          </string-name>
          <article-title>Visual presentation of different types of data by dynamic sign structures</article-title>
          .
          <source>Scientific</source>
          visualization Vol.
          <volume>8</volume>
          ., №
          <volume>4</volume>
          ,pp.
          <fpage>28</fpage>
          -
          <lpage>37</lpage>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>