<!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>Construction of the Functional Voxel Model for a Spline Curve*</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>A.Tolok</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>N. Tolok</string-name>
          <email>nat_tolok@mail.ru</email>
          <email>tolok61@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A. Sycheva</string-name>
          <email>a.a.sycheva@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          ,
          <addr-line>Anastasiya</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>V.A. Trapeznikov Institute of Control Science of Russian Academy of Sciences</institution>
          ,
          <addr-line>65 Profsoyuznaya street, Moscow, 117997</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <fpage>0000</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>Analytical models are the most accurate method of geometric information representation. Parameterized smooth curves cannot be used in the field of analytical geometry, which explains the necessity for finding of analytical representation of such curves. The article considered the construction of a smooth curve presented in an analytical form and some approaches to finding an analytical model for a parametric Bezier curve. А presentation of a function in the form of its functional areas was chosen as prototype of the analytical model. The selected representation formed on the basis of the De Casteljau's method of constructing the Bezier curve and set-theoretic modeling. The Rvachev functions (Rfunctions) are used as the mathematical apparatus of set-theoretic operations on function areas. The functional-voxel method makes it possible to simplify the computation of R-functional procedures. An algorithm for constructing the functional area of the Bezier curve is developed on the basis of the presented combined R-voxel approach. The obtained results allow for the conclusions about the adequacy of this approach and its development protentional to construct more complicated structures.</p>
      </abstract>
      <kwd-group>
        <kwd>Bezier curve</kwd>
        <kwd>De Casteljau's algorithm</kwd>
        <kwd>R-functional modelling</kwd>
        <kwd>Functional voxel modelling</kwd>
        <kwd>R- voxel modelling</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Sycheva</title>
      <p>Computer synthesis of simple and complex geometrical objects and their
transformations is essential for the wide range of design problems. The necessity to construct
the maximally accurate computer geometrical models for the contemporary design
problems remains to be the primary.</p>
      <p>
        Nowadays the Set-theoretic operations for the analytical modelling of a space of the
complex function (Rvachev function [
        <xref ref-type="bibr" rid="ref1 ref2">1,2</xref>
        ]) are one of the most curious approaches to
constructing the analytically set objects of complex geometrical shape.
      </p>
      <p>CAD is traditionally considered to be the main application field of computer
geometry though the construction of smooth curves and surfaces in this sphere is based on
the parametrical descriptions of functions which makes impossible to apply them both
in the analytical geometry and in the R-Functional modelling.</p>
      <p>
        The Functional Voxel Method [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] allows to solve this problem by providing the
mechanism for replacing the space of the analytical function  =  (  with the space
of the local functions  1 1 + ⋯ +     =   +1.
2
      </p>
      <sec id="sec-1-1">
        <title>Previous Work</title>
        <p>
          Smooth curves are one of the basic design tools applied in contemporary CAD. For
example, the reference [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] describes the application of Spline Approximation in the
CAD Systems for the Linear Constructions.
        </p>
        <p>
          The Bezier curves represent the classic type of smooth curves are of the greatest
interest in this current research. The Bezier curves’ segmentation is described in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <p>
          However, we shouldn’t overlook the application of other types of curves in solving
various design problems. In [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] and [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] the application of parametrically described
Bspline in the CAD parametrical geometry optimization problems and pavement
modelling is considered. T-splines being the generalization of B-splines are becoming more
widespread. The authors of [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] represented their own isogeometric approach to shape
optimization on the basis of this type of splines.
3
3.1
        </p>
        <p>Analytical representation of smooth curve</p>
        <p>Smoothing cubic spline
One of the simplest analytical approaches to a smooth curve representation is to define
it in the polynomial form. Having the purpose to obtain smoother shape and more
flexible design, let’s consider cubic polynomial:
 = 3+ 2+ +
(1)
The cubic spline construction is specified by four points P0(x0, y0), P1(x1, y1), P2(x2, y2),
P3(x3, y3). At the same time, points P0 and P3 are situated on the segment borders and
points P1 and P2 allow to define the position of a tangent to a curve in the boundary
points.</p>
        <p>Smoothing cubic spline construction demands implementation of several conditions:
1. The curve passes through the boundary points of the segment
2. First derivatives of the neighbor segments of the spline should be equal in the
boundary points
These conditions can be described by the system of four equations (2).</p>
        <p>The results of visualizing the cubic polynomial which coefficients are determined
by represented system of equations are illustrated in Fig.1. The construction of smooth
curve can be achieved when the conditions (2) are met.</p>
        <p>
          However, constructing the closed contours is hindered – the curve is buckling on a
tangent in reverse preventing self-intersections.
where ( ) – the amount of combinations of n choose i, n – exponent of the
polynomials, i - consecutive number of the anchor vertex. At the same time, abscissa and ordinate
are described parametrically by the system of equations (4).
Bezier spline is the classical type of smooth curves represented parametrically. The
construction of Bezier curve is carried out by means of Bernstein polynomials [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]:
        </p>
        <p>Construction of Functional Voxel Model for a Spline Curve 3
 0 =   03 +   02 +   0 + 
 3 =   33 +   32 +   3 + 
 1− 0
 1− 0 = 3  02 +   0 + 
{  2− 3
 2− 3 = 3  32 +   3 + 
(2)
(3)
(4)
the problem of constructing the complex closed structures.x
  , ( ) = (  )  (1 −  ) − ,</p>
        <p>!
( ) =  !( − )! ,</p>
        <p>( ) = ∑ =0     , ( ), 0 ≤  ≤ 1
{ ( ) = ∑ =0     , ( ), 0 ≤  ≤ 1
where xi and yi - coordinates of anchor vertex i.</p>
        <p>However, the application of this type of curves in the analytical calculations of the
R-functional modelling demands its representation in the form ω =  (x, y).</p>
        <p>The most evident approach to solving this problem is to express parameter t in terms
of one of the coordinates. To simplify evaluations let’s consider the expression of
tparameter in terms of x-coordinate in case of Bezier curve of degree 2 with anchor
vertices P0(x0, y0), P1(x1, y1), P2(x2, y2).</p>
        <p>The parameter t in the current point A will be expressed as:
1| = −Δ   + Δ   + (  (  + Δ  ) −   (
 + Δ  ))
(7)
 0− 1±√( 0−2 1+ 2) + 12− 0 2</p>
        <p>,  0 − 2 1 +  2 ≠ 0
 =</p>
        <p>− 0
2( 1− 0) ,  0 − 2 1 +  2 = 0 и  1 ≠  0</p>
        <p>− 0
√
{  2− 1</p>
        <p>,  0 =  1 ≠  3
served.
point A(tA, XA):
Even in case of Quadratic Bezier Curve the complexity of parameter expression is
ob</p>
        <p>The parameter t can also be expressed by means of local computer geometry as
t=f(x). For this purpose, it’s possible to use the equation of a tangent to the curve in the

+</p>
        <p>+  = 0
The coefficients of the equation will be defined via inclination angles n1, n2, n3 between
the normal to the tangent at the point of a curve and the coordinate axes OX, OY, OZ.</p>
        <p>Considering that the tangent line passes through some point B(tA+ΔtA, XA+ΔXA) in
the neighborhood of the point A, let’s write the determinant:


| 
  + Δ 

 
  + Δ 
1
1</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Thus, the coefficients of the equation are:</title>
      <p>= −Δ 
 = Δ 
 =   (  + Δ  ) −   (
 + Δ  )
We determine the inclination angles n1, n2, n3 by normalizing the coefficients:
 = √ 2 +  2 +  2,  1 =

 ,  2 =

 ,  3 =


On this basis we can obtain the expression t=f(x):
 1 +  2 +  3 = 0
 = − 2 + 3
− 1
(5)
(6)
(8)
(9)
(10)</p>
      <p>
        Construction of Functional Voxel Model for a Spline Curve 5
The local geometrical characteristics are calculated and kept over the entire interval
from 0 till 1 of the t-parameter. Using the given value of the x coordinate and the
corresponding inclination angles n1, n2, n3, we determine the value of the y coordinate:
 ( ) = (1 − − −2 +1 3)2  0 + (2 − − −2 +1 3)   1 + (− −2 +1 3)2  2
The result of such algorithm implementation is represented in Fig. 3:
(11)
Bezier curve can be successfully visualized in case of sequent location of anchor points
along the axis x. Otherwise, the construction of the curve disrupts because of its’
curvature which is peculiar to the parametrical nature. In this case, it’s possible to apply
the rotation of the coordinate system so that the second anchor point will always lie
between the first and the last one [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. But with an increase of the amount of anchor
points the complexity of multiple coordinate system rotations together with their
correspondence will arise.
      </p>
      <p>Let’s consider another approach to the analytical representation of the Bezier curve.
Parameters tx and ty separately determine the values of coordinates X and Y
correspondingly to the parametrical expression of the Bezier curve. The points where
parameters tx and ty are matching, form the Bezier curve. The sign of the Difference of
parameters tx and ty will determine the external and internal fields of the surface z = ty
– tx of the Bezier curve.</p>
      <p>Fig.4 illustrates the implementation of such an approach:</p>
      <p>It’s possible to draw a conclusion that the application of this algorithm also doesn’t
allow to obtain an appropriate image of the Bezier curve in consequence of the
curvature peculiar to it.</p>
      <p>
        Speaking about the Bezier curve, we cannot help but mention the De Casteljau's
algorithm (Fig.5) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. On the basis of this algorithm lies the finding the Bezier curve
tangents at each value of t-parameter. In case of the quadratic Bezier curve, t-parameter
defines the location of the tangent segment Q0Q1, which ends are situated on the
segments P0P1, P1P2 of anchor polygon. The point of tangency R in the segment Q0Q1
can also be determined by the t-parameter.
      </p>
      <p>This algorithm is not only easy to implement but also convenient to apply in case of
Bezier curve of higher degrees. To construct the cubic Bezier curve (Fig.5) the
t-parameter determines location of the tangent point A on the segment R0R1, location of the
endpoints R0 and R1 on the segments Q0Q1 and Q1Q2 and location of the endpoints Q0,
Q1, Q2 on the segments P0P1, P1P2, P2P3.</p>
      <p>De Casteljau's algorithm does not define the analytical representation of the Bezier
curve, but can well be applied for this purpose. As an analytical representation of a
function, we can use ranges of a function. Each tangent to a Bezier curve determines
two half-planes with positive and negative value of the function space and the zero
value on the boundary. Intersection of areas of two tangent lines will give its’ aggregate
positive area. The sequential intersection of the areas of the tangent functions form the
different-sign space of the curve function. Internal area of the curve will be defined by
the positive sign of the area, external – by the negative sign. Zero boundary will
describe the curve.</p>
      <p>The Fig.6 illustrates the intersection of areas of tangent functions obtained when t=t1
и t=t2. Hatched areas visualize the positive areas of functions for each tangent. The
cross-hatched area is the result of their intersection, so it is the aggregate positive area
of the functions.
Application of the R-functional calculations in pure form is a complex computational
procedure. At the same time, the computational complexity of the resulting expression
directly depends on the complexity of the original functions. Application of the
functional voxel method (FVM) to the calculation of R-functional expressions significantly
simplifies computing of the resulting function. These two approaches can be united by
one general condition – preserving positive value in the internal area of a function, the
negative value – in the external area and zero value on the boundaries. Moreover, this
condition is met at any value of the parameter α of complete system of R-functions that
allow to simplify calculations assuming α=1.</p>
      <p>Intersection operation for areas of two functions with the accepted simplification is
described by the expression:
 ∧1  = 0.5( +  − √ 2 +  2 − 2
) =
0.5( +  − √( −  )2) = 0.5( +  − | −  |)</p>
      <p>Within solving problem it is possible to ignore the multiplication of the resulting
expression on the positive number because it doesn’t affect the sign of expression:</p>
      <p>X ∧1  =  +  − | −  |
As it seen from the expression, intersection operation for areas of two functions
constitutes the sequential realization of four operations:
1. Union of areas of original functions;
2. Complement of areas of original functions;
3. Absolute value of the complement of areas of original functions;
(12)
(13)
(14)
4. Complement of areas obtained at the stages 1 and 3.</p>
      <p>Let us consider the simple example of an implementation of such algorithm.</p>
      <p>We carry out the intersection of areas for functions X and Y for horizontal and
vertical lines. The first function is described by four images  1,   2,   3,   4, the second –
similarly by images  1,  2,  3,  4. The fig. 7 illustrates M-images of the functions X
and Y as well as visualization of space of their functional areas   ,   . The first three
images for each line describe the components of a normal n1, n2, n3 at each point of
space, while fourth images are mapping the component n4, which provide a
characteristic of binding of tangent location to the corresponding point of the space.</p>
      <p>Let n1X, nX, n3X, n4X denote the components of a normal of the first straight line, and n1Y,
n2Y, n3Y, n4Y2 - the components of a normal of the second straight line.</p>
      <p>
        For each operation of the introduced algorithm, we calculate the values of n1, n2, n3,
n4, relatively to the colour intensity palette   ( = 1… 4) for the application in further
calculations. Then, the first step of the algorithm (union) will be implemented by the
following expressions [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]:
In turn, the Complement will be almost similarly implemented by changing the sign to
minus:
Computing the Absolute value of the complement of original expressions is carried out
in dependence if the sign of the local function:
 + −| − |, as well as the visualization of the
Four M-images with calculated values n1,2,3,4
obtained functional area are represented in the Fig.8.
      </p>
      <p>Thus, we can observe R-voxel implementation for Intersection operation for areas of
two functions.
The construction of the Bezier curve by an approach proposed in paragraph 3.2 is
implemented by means of the algorithm represented in paragraph 4.1. Thus, the algorithm
of creating functional-voxel representation of the Bezier curve has the following order:
1. Constructing the initial functional-voxel model of the first tangent line (t=0) by
means of a set of M-images of the function X (  1,   2,   3,   4).
2. Increase the value of the t-parameter by the value of chosen step.
3. Do while t&lt;1 :
a. Construct the functional voxel model of the tangent at the current value of t as
Mimages of the function Y (  1,   2,   3,   4).</p>
      <p>b. Carry out the intersection of the areas of functions X and Y.
c. Keep the result of intersection as M-images of the function X (  1,   2,   3,   4).
d. Increase the value of t-parameter by the value of chosen step.
4. Visualize the functional area of the resulting function X.</p>
      <p>Thus, the construction of the smooth curve can be successfully realized. Due to the De
Casteljau's method lying in the base it is possible to similarly construct the curves by
more points. The figure 10 represents the set of different curves constructed by 4 anchor
points.</p>
      <p>As it seen from the represented images, it is also possible to construct closed contours
applying this method. Further, via intersection of the areas of the few Bezier curves
with each other or with the areas of other functions, it will be possible to construct more
complicated structures.
5</p>
      <sec id="sec-2-1">
        <title>Conclusion</title>
        <p>The represented approach provides the great opportunities of complete application of
parametrically defined Bezier curve for the analytical modelling in the R-functional
modelling procedures, which broadens the set of complicated curvilinear contours
applied for the construction in CAD models.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Rvachev</surname>
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Theory of R-functions and Some Applications</article-title>
          . Naukova Dumka, Kiev (
          <year>1982</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Sheiko</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maksimenko-Sheiko</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Litvinova</surname>
            <given-names>Yu.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lisin</surname>
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>R-functions and chevron surfaces in machine building</article-title>
          .
          <source>Problemy mashinostroeniya 20(2)</source>
          ,
          <fpage>54</fpage>
          -
          <lpage>60</lpage>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Tolok</surname>
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Functional Voxel Method in Computer Modeling</article-title>
          . Fizmatlit, Moscow (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Karpov</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Struchenkov</surname>
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Dynamic Programming as a Method of Spline Approximation in the CAD Systems of Linear Constructions</article-title>
          .
          <source>Russian Technological Journal</source>
          <volume>7</volume>
          (
          <issue>3</issue>
          ),
          <fpage>77</fpage>
          -
          <lpage>88</lpage>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Guo</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            <given-names>G.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Du</surname>
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>Bézier Segmentation of T-spline Solids in Parametric Domain</article-title>
          .
          <source>Computer-Aided Design &amp; Applications</source>
          <volume>17</volume>
          (
          <issue>3</issue>
          ),
          <fpage>502</fpage>
          -
          <lpage>512</lpage>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Zhang</surname>
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>CAD-based geometry parametrisation for shape optimisation using Non-uniform Rational B-splines</article-title>
          .
          <source>Doctoral dissertation</source>
          , Queen Mary University of London (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Wedel</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Franke</surname>
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Badino</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cremers</surname>
            <given-names>D.:</given-names>
          </string-name>
          <article-title>B-spline modeling of road surfaces for freespace estimation</article-title>
          .
          <source>2008 IEEE Intelligent Vehicles Symposium</source>
          ,
          <fpage>828</fpage>
          -
          <lpage>833</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Lian</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kerfriden</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bordas</surname>
            <given-names>S.:</given-names>
          </string-name>
          <article-title>Shape optimization directly from CAD: An isogeometric boundary element approach using T-splines</article-title>
          .
          <source>Computer Methods in Applied Mechanics and Engineering</source>
          <volume>317</volume>
          ,
          <fpage>1</fpage>
          -
          <lpage>41</lpage>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Tolok</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tolok</surname>
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Loktev</surname>
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Modeling Function Domain for Curves Constructed Based on a Linear Combination of Basis Bernstein Polynomials</article-title>
          .
          <source>Programming and Computer Software</source>
          <volume>44</volume>
          (
          <issue>6</issue>
          ),
          <fpage>526</fpage>
          -
          <lpage>532</lpage>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>