<!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>Reasoning about the Embedded Shape of a Qualitatively Represented Curve⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kazuko Takahashi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kwansei Gakuin University</institution>
          ,
          <addr-line>1 Gakuen Uegahara, Sanda</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <fpage>113</fpage>
      <lpage>118</lpage>
      <abstract>
        <p>This paper addresses the problem of embedding curves, represented qualitatively as sequences of primitive segments, onto a two-dimensional plane. These primitive segments are directed curved segments with intrinsic direction and convexity. We define a symbolic expression to each segment, and by connecting these segments, we can derive a symbolic expression that represents an abstract shape of a smooth continuous curve. There are an infinite number of embeddings of the derived curve on a two-dimensional plane, since precise information such as coordinates are missing. However, for some shape of curves, any embedding forms a spiral, which is undesirable when the curve represents the boundary of a natural object. We propose a method for judging whether it is possible to draw a curve not in a spiral form on a two-dimensional plane by checking the segment orientation.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;qualitative spatial reasoning</kwd>
        <kwd>curved line</kwd>
        <kwd>embedding on a plane</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Qualitative Spatial Reasoning (QSR) is a method that gives a symbolic expression to a spatial object or
the relationships between objects, focusing on a specific aspect of the spatial data, and that conducts
reasoning on this expression [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1, 2, 3</xref>
        ]. The approach requires no big data and has less computational
complexity, since it does not treat the numerical data. It also enables reasoning that suits human
recognition. The focused aspects involve relative location, direction, size, distance of objects, the shapes
of an object, and so on. Systems that combine more than one aspect are also proposed.
      </p>
      <p>
        Previously, we proposed a qualitative representation that describes the outline of a curve as a sequence
of segments [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. There, we defined the connection rule of curved primitive segments to obtain a smooth
continuous curve. On the other hand, there are an infinite number of embeddings of the obtained curve
on a two-dimensional plane, since precise information such as coordinates are missing. If an embedding
forms a spiral, it is not realistic as a boundary of an object in nature.
      </p>
      <p>In this paper, we discuss whether there exists a way to embed a curve so that it does not form a spiral
and show the judgment method by introducing the reduction rules on the sequence of orientations of a
curve.</p>
      <p>This paper is organized as follows. In Section 2, we describe fundamental concepts. In Section 3,
we discuss the embedding of a curve in a qualitative representation on a two-dimensional plane. In
Section 4, we propose the method of judging whether there exists an embedding that does not form a
spiral. In Section 5, we compare our work with the related works. Finally, in Section 6, we show our
concluding remarks.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Fundamental Concepts</title>
      <p>Let CURVES be a set of directed curved segments with a unique direction and curvature on a
twodimensional plane. For  ∈ CURVES , we represent the qualitative shape of  focusing on its intrinsic
direction and convexity, ignoring the precise size and the exact curvature.</p>
      <p>Let  = {, }, ℎ = {, },  = {, } and  =  ∪ ℎ. The symbols , ,  and 
indicate the north, south, east and west directions, respectively, and  and  indicate convex and
concave, respectively. The direction exactly in the middle between north and south (east and west) is
regarded as either  or  ( or , resp.). Straight lines are not considered. For  ∈ CURVES ,  =
(, , ) is said to be the qualitative representation of  where  ∈ ,  ∈ ℎ and  ∈ . , 
and  show the vertical direction, horizontal direction and the convexity of . For ,  ∈ CURVES ,
let  = (, , ) and  = ( ′, ′, ′) be qualitative representations of  and  , respectively. We
define the relation ∼ on CURVES as follows:  ∼  if  =  ′,  = ′ and  = ′. Then ∼ is an
equivalence relation on CURVES . As a result, CURVES is classified into eight equivalence classes
which are jointly exhaustive and pairwise disjoint. We denote the set of these equivalence classes as ,
that is,  = CURVES / ∼ . Then,  ∈ CURVES is mapped to  ∈ .</p>
      <p>In this paper, a smooth continuous curve without a self-intersection is called an scurve. We connect
multiple segments in  to create an scurve.</p>
      <p>For  ∈ , its initial and terminal points are indicated by () and (), respectively. For
,  ∈ , if an scurve is obtained by considering that ( ) and () are identical, then  and
 are said to be directly connectable, and the outcome of the connection is represented as  ·  . For
,  ∈ , if  =  , then they are directly connectable and the result is regarded as a single segment
without a cusp, since the precise curvatures of  and  are ignored. When  and  are directly
connectable, and  ̸=  , the connection of  and  create inflection or extremum points via direct
connections.</p>
      <p>For 1, . . . ,  ∈  ( ≥ 2), if for each  such that 1 ≤  ≤  − 1,  and +1 are directly
connectable, then we obtain an scurve by directly connecting  and +1, and the outcome of the
connections is represented as 1 · . . . · . As a result, scurve is a sequence of qualitative representations
of curved segments.</p>
      <p>For example,  = (, , ) and  = (, , ) are directly connectable (Figure 1(a)), and  =
(, , ) and  = (, , ) are directly connectable (Figure 1(b)). On the other hand,  = (, , )
and  = (, , ) are not, since a cusp is created at their connection (Figure 1(c)); but if we insert
 = (, , ) between  and  , then we get an scurve  ·  ·  (Figure 1(d)).</p>
      <p>(a)
(b)
(c)</p>
      <p>(d)</p>
    </sec>
    <sec id="sec-3">
      <title>3. Embedding on a Two-Dimensional Plane</title>
      <p>In the following, ‘embedding of ’ means an assignment of one  ∈ CURVES to  ∈ . It is defined
as follows:
1. Let  ∈ CURVES be a curved segment on a two-dimensional plane of which  ∈  is its
qualitative representation. (Note that there are infinite number of ’s.) Then  is said to be
an embedding of . () and () represent the locations of the initial point and the
terminal point of  on a two-dimensional plane, respectively.
2. Let 1 · . . . ·  be an scurve 1 · . . . · , and  (1 ≤  ≤ ) be an embedding of . For all
 such that 1 ≤  ≤  − 1, if () and (+1) are located in the same position, then
1 · . . . ·  is said to be an embedding of an scurve 1 · . . . · .</p>
      <p>For example, Figure 2 shows two kinds of embeddings of  ·  where  = (, , ) and  =
(, , ). The relative directions of the locations of ( ) regarding () are (, ) and (, )
in Figure 2(a) and Figure 2(b), respectively.</p>
      <p>If an embedding of an scurve forms a spiral, it is not desirable, when an scurve corresponds to a
boundary of an actual object. However, there exists an scurve which cannot be drawn in a non-spiral
form, no matter how it is drawn. Here, we introduce a concept of an orientation of an scurve on a
symbolic expression, and discuss the shape of its embedding by checking the orientation. We show
how to determine whether there exists an embedding that does not form a spiral on a two-dimension
plane, for a given scurve. For this purpose, we introduce a concept of open/closed embedding.</p>
      <p>For ,  ∈ , let  be an embedding of an scurve from  to  on a two-dimensional plane, where
 and  be embeddings of  and  , respectively. And ′ be an infinite-length curve that is obtained
by extending  in both directions in a manner such that the curvature of  at () and that of 
at ( ) are preserved. If ′ has a self-intersection point, then the embedding is said to be closed;
otherwise, it is open. Figure 3 shows open (a) and closed (b) embeddings of an scurve  ·  ·  where
 = (, , ),  = (, , ) and  = (, , ).</p>
      <p>(a)
(b)
(a)
(b)</p>
    </sec>
    <sec id="sec-4">
      <title>4. Admissibility</title>
      <p>4.1. Reduction
For  ∈ , its orientation is defined either as clockwise ( +) or anti-clockwise (− ). Moreover, the
orientation of an scurve is defined as a sequence of orientations of the segments that configure it.
• For  ∈ ,
() = ′ + ′ if  = (, , ), (, , ), (, , ) or (, , ); () = ′ − ′ if  =
(, , ), (, , ), (, , ) or (, , ).
• For 1, . . . ,  ∈ ,</p>
      <p>(1 · . . . · ) = (1) . . . ().</p>
      <p>We define the function  on the set {+, −} that assigns the opposite orientation: (+) = − and
(− ) = +.</p>
      <p>For an scurve , the diference of the numbers of + and − that appear in () is said to be rotation
diference of .</p>
      <p>Some specific subsequences in the orientation of an scurve do not afect the judgment of its
admissibility. We consider a shorter sequence by removing these parts. There are two reduction rules: the
subsequence + − + (or − + − ) is reduced to + (or − , resp.), and the subsequence + + −
is reduced to the empty sequence  .
[Reduction rules]</p>
      <p>Let  1 and  2 be sequences of orientations and 1, 2, 3, 4 ∈ {+, −} .
(r1) If 1 = 3 = (2), then  1123 2 is reduced to  11 2.
(or − −
++)
(r2) If 1 = 2 = (3) = (4) and (  1,  2 =  or  1,  2 ̸=  ), then  11234 2 is reduced to
 1 2.</p>
      <p>For a sequence of orientations  , a sequence of orientations obtained by applying the reduction rules
as far as possible is said to be a reduced form of  .</p>
      <p>Note that the condition on  1 and  2 in (r2) are necessary. It means that if only one of  1 and  2
is an empty sequence, then admissibility of  is not always the same with that of ′. We show two
examples that illustrate this situation.</p>
      <p>1. Assume that  = 1 · . . . · 9 where () = + + + + − − − + +. If we reduce the part
− − ++ to obtain ′ = 1 · . . . · 5, then (′) = + + + + − . In this case,  is admissible
whereas ′ is not (Figure 4(a)).
2. Assume that  = 1 · . . . · 7 where () = + + + + + − − . If we reduce the part + + −
to obtain ′ = 1 · 2 · 3, then (′) = + + +. In this case,  is not admissible whereas ′ is
(Figure 4(b)).</p>
      <p>For any sequence of orientations  and any of its reduced form, the following properties hold, which
are easily proved.</p>
      <p>Proposition 1. 1. (termination)</p>
      <p>The reduction procedure terminates.
2. (rotation diference preservation)</p>
      <p>The rotation diference is preserved in the reduction.
3. (reduced form)</p>
      <p>Let  be either + or − . A reduced form is  1 2 3 where  2 is a nonempty sequence of , and  1 and
 3 are the sequences of at most two ().</p>
      <p>Generally, a reduced form of  is not unique. For example, when  = + + + − − + − , if we apply
(r2) first, then we get the reduced form  ; whereas if we apply (r1) first, then we get the reduced form
+− . However, admissibility of these reduced forms are the same.</p>
      <p>In addition to Proposition 1, reduction has a significant property of preserving admissibility.
Theorem 2 (admissibility preservation). An scurve is admissible if and only if its reduced form is
admissible.
4.2. Judgment of Admissibility
For a given scurve , we determine its admissibility by checking its orientation.</p>
      <p>Let  = 1 · . . . ·  be a reduced form of a given scurve, and  be its rotation diference.</p>
      <p>Generally it is known that if the rotation angle of a curve is greater than or equal to 2 , then it forms
a spiral and may have a self-intersection point on a two-dimensional plane. If  ≥ 4, the rotation angle
of an scurve is greater than or equal to 2 ; in this case,  is not admissible. Therefore, it is enough to
investigate the admissibility in the cases for  ≤ 3.</p>
      <p>
        When  is more than eleven,  ≥ 4 always holds, since there exist at most two segments at each end
of a sequence that have the opposite orientation to those in the center of the sequence. It follows that
any embedding of  is closed, and thus  is not admissible. When  is less than twelve, we investigate
the admissibility of all possible orientations for scurves [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]. Due to the symmetry of the orientations
+ and − , and that of the order of the sequence, symmetric orientations need not be investigated. The
introduction of the reduction significantly decreases the number of sequences to be checked, since the
length is shortened and the reduced forms are restricted as is shown in Proposition 1. For example, we
should examine four cases when  is six, and only one case when it is eleven. And we conclude that for
any scurve, its admissibility can be determined by the sequence of its orientation, and we have gotten
the following theorem.
      </p>
      <p>Theorem 3.  is admissible if and only if  ≤ 3, where  is the rotation diference of the orientation of .</p>
    </sec>
    <sec id="sec-5">
      <title>5. Related Works</title>
      <p>Embedding of curves and their intersection are frequently handled in geometry or graph theory. In
geometry, shapes with strict curvatures are considered; and in graph theory, connectivity between
nodes is the main target to be discussed and convexity of an edge is out of focus. The QSR approach
taken in this paper treats these issues from yet another viewpoint; it is suitable for human’s recognition
of abstract shapes and reasoning on an abstract level.</p>
      <p>
        Although there have been lots of research on QSR, few of them focus on shapes, especially on curves.
Several systems in these works divide the boundary of an object into segments and represent its shape
by lining up the symbols corresponding to the segments [
        <xref ref-type="bibr" rid="ref7 ref8 ref9">7, 8, 9</xref>
        ]. Segments are usually equipped with
information of its shape related to their subsequent segments. Additional information such as relative
length and angle may be added to each segment [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ].
      </p>
      <p>
        Several QSR systems have been proposed which focus on relative directions. Moratz et al. proposed
OPRA that represents the relative direction of spatial entities as a ternary relation [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
        ]. In OPRA, a
primitive object is considered as a vector with its initial point and terminal point, which has a similar
feature with our formalization. However, the primitive object in OPRA does not have a convexity as an
attribute, which means that OPRA cannot be applied to the generation of a smooth curve by connecting
objects.
      </p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>In this paper, we have discussed the treatment of curves in a symbolic expression, focusing on the
admissibility of the curves. In conclusion, we have shown that the admissibility of a curve can be
determined by its orientation sequence: if the rotation diference is less than or equal to three, the curve
is admissible. We have introduced reduction rules that significantly decreases the number of sequences
to be checked. This framework provides a novel approach for reasoning about the shapes of curves on
a two-dimensional plane, ensuring that they do not form spirals.</p>
      <p>It is to be considered to improve the reasoning system by relaxing the conditions on the application
of the reduction rules. In addition, we are considering formalization of the obtained result as a QSR
system, and also verification using proof assistant systems to certify the proofs.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>This research is supported by JSPS Kakenhi 24K15096.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Cohn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Renz</surname>
          </string-name>
          ,
          <article-title>Qualitative spatial representation and reasoning</article-title>
          , in: Handbook of Knowledge Representation, Elsevier,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Cohn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Ouyang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <article-title>A survey of qualitative spatial representations</article-title>
          ,
          <source>The Knowledge Engineering Review</source>
          <volume>30</volume>
          (
          <year>2013</year>
          )
          <fpage>106</fpage>
          -
          <lpage>136</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M.</given-names>
            <surname>Sioutis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <article-title>Qualitative spatial and temporal reasoning: current status and future challenges</article-title>
          ,
          <source>in: Proceedings of the 30th International Joint Conference on Artificial Intelligence</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>4594</fpage>
          -
          <lpage>4601</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Taniuchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Takahashi</surname>
          </string-name>
          ,
          <article-title>Spatial representation and reasoning about fold strata: A qualitative approach</article-title>
          , in: 15th International Conference,
          <source>ICAART 2023, Revised Selected Papers</source>
          ,
          <year>2024</year>
          , pp.
          <fpage>244</fpage>
          -
          <lpage>266</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>K.</given-names>
            <surname>Takahashi</surname>
          </string-name>
          ,
          <article-title>Qualitative treatment of curves and judgment for their self-intersectionality (in japanese)</article-title>
          ,
          <source>in: IPSJ, SIG-PRO-149</source>
          ,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>K.</given-names>
            <surname>Takahashi</surname>
          </string-name>
          ,
          <article-title>Qualitative formalization of a curve on a two-dimensional plane</article-title>
          ,
          <source>in: The 16th International Conference on Spatial Information Theory (COSIT</source>
          <year>2024</year>
          ), to appear.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Leyton</surname>
          </string-name>
          ,
          <article-title>A process-grammar for shape</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>34</volume>
          (
          <year>1988</year>
          )
          <fpage>213</fpage>
          -
          <lpage>247</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M.</given-names>
            <surname>Tosue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Takahashi</surname>
          </string-name>
          ,
          <article-title>Towards a qualitative reasoning on shape change and object division</article-title>
          ,
          <source>in: 14th International Conference on Spatial Information Theory (COSIT</source>
          <year>2019</year>
          ),
          <year>2019</year>
          , pp.
          <volume>7</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>7</lpage>
          :
          <fpage>15</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Galton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Meathrel</surname>
          </string-name>
          ,
          <article-title>Qualitative outline theory</article-title>
          ,
          <source>Proceedings of the Sixteenth International Joint Conference on Artificial Intelligence</source>
          (
          <year>1999</year>
          )
          <fpage>1061</fpage>
          -
          <lpage>1066</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Cabedo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. G.</given-names>
            <surname>Abril</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. V.</given-names>
            <surname>Morente</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Falomir</surname>
          </string-name>
          ,
          <article-title>A pragmatic qualitative approach for juxtaposing shapes</article-title>
          ,
          <source>Journal of Universal Computer Science</source>
          <volume>16</volume>
          (
          <year>2010</year>
          )
          <fpage>1410</fpage>
          -
          <lpage>1424</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Falomir</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Pich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Costa</surname>
          </string-name>
          ,
          <article-title>Spatial reasoning about qualitative shape compositions</article-title>
          ,
          <source>Annals of Mathematics and Artificial Intelligence</source>
          <volume>88</volume>
          (
          <year>2020</year>
          )
          <fpage>589</fpage>
          -
          <lpage>621</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R.</given-names>
            <surname>Moratz</surname>
          </string-name>
          ,
          <article-title>Representing relative direction as a binary relation of oriented points</article-title>
          ,
          <source>in: Proceedings of the 17th Eureopean Conference on Artificial Intelligence, ECAI'</source>
          <year>2006</year>
          ,
          <year>2004</year>
          , pp.
          <fpage>407</fpage>
          -
          <lpage>411</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mossakowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Moratz</surname>
          </string-name>
          ,
          <article-title>Qualitative reasoning about relative direction of oriented points</article-title>
          ,
          <source>Artificial Intelligence 180-181</source>
          (
          <year>2012</year>
          )
          <fpage>34</fpage>
          -
          <lpage>45</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>