1. Introduction
Two geometric figures can be said to be similar if one of the geometric figures can be obtained by either squeezing or enlarging the other. This implies that the considered geometric figures need to have equal number of vertices and edges, matching corresponding angles, and a fixed proportionality between the corresponding edges. This concept of similarity can be used for partial matching of different geometric figures.
It is well known that geometric shapes and structures are important in determining the behavior of chemical compounds. This is true of smaller molecules [14] as well as larger macromolecules such as DNA and RNA that are studied in bioinformatics [2]. Molecular geometry [4] is thus an important aspect of physical and structural chemistry. However, while it is also known that similarity in structures often implies similar observed chemical properties, there is yet no well defined mathematical approach for comparing geometric shapes, and comparisons are made on an ad hoc basis [12, 13]. Such an approach as proposed here would thus allow for a rigorous evaluation of such properties based on the similarity of shapes with molecules with known properties. Similarity in general has wideranging applications in many domains [21].
Image similarity and comparisons also play an important role in other domains, such as in models of visual perception and object recognition in humans as well as animals [16, 1], finance and economics [18]
[15], and video analyses [20]. In such contexts also there is much scope for application of this work.Existing theory in this matter is far from complete. There are heuristic approaches to morphological similarity
[7, 8], but no sound mathematical basis for the detection of geometric similarity. Geometric similarity is particularly important in engineering, in comparing a model and its prototype [6, 10], but there however does not seem to be a proper universal measure of geometric similarity. The measure in common use in engineering is merely scalefree identity, that all corresponding lengths should be in the same ratio—there is thus no way to properly measure inexact similarity, or to quantitatively state that a figure is more similar to a reference figure, than is some other figure.Using subgraph isomorphism, alike constituent geometric figures of the original geometric figures can be found and checked for similarity. A simple similarity function can return a boolean value of 1 for similar geometric figures and 0 otherwise. However, such a function would have limited applications. In this paper, we define instead a distance function that returns a value between 0 (inclusive) and 1. The returned value reflects the dissimilarity between alike planar geometric figures connected with straight lines.
Therefore, the distance function is defined only when the graphs representing the given geometric figures are isomorphic [17]. The crux of the function is in the measurement of deviations from angular similarity and edge length proportionality.
The function is the convex sum of functions and :

The function , which we may call angular dissimilarity, measures the deviation from the angular identity between two geometric figures. In order to compute this, angles are projected on a cartesian plane, where the angles of the first geometric figure makes up one axis and the angles of the second geometric figure makes up the other axis. Therefore, a cluster of points in this plane represents corresponding angles of the given geometric figures. If the figures are similar (identical up to scale), the angular similarity property may be said to be satisfied, and the corresponding angle points lie on the line, and the value returned by is zero. If not, then the deviation from the property is now computed as the distance from the original point to the corresponding point on the line.

The function , which we may call edgelength disproportionality, measures the deviation from edgelength proportionality between geometric figures. In order to compute this, the edge lengths are similarly projected to a cartesian plane, where the edge lengths of the first geometric figure makes up one axis and the edge lengths of the second geometric figure makes up the other axis. The corresponding edge lengths of the given geometric figures are represented as points in this plane. If two figures are proportional (identical up to scale), all corresponding edgelengths are in a fixed proportion , all points pass through a line , and the value returned by is zero. In case the edgelengths are not perfectly proportional, the calculation of comes to finding the bestfit line passing through the origin, and measuring the deviation from that line.
The choice of method to find the best fit line needs to consider the fact that the line should pass through the origin. Using the leastsquares method of fitting [5] by adding as one of the corresponding edgelength pairs does not give a proper line passing through the origin. This is the reason that the Iterative Proportional Fitting Procedure (IPFP) [19] is used instead. IPFP tries to find a fixed proportion among a set of pairs, thereby giving points on the line passing through origin.
There are many IPFP [9], of which the one used in this paper is the classical IPFP [3], owing to its simplicity. On obtaining the required points from IPFP, the ratio between any two points gives the values of , as IPFP creates a fixed proportionality among a set of edgelength pairs. D explains stepbystep the IPFP technique used in this paper. Further, to compute the deviation from the edgelength proportionality, we calculate the Euclidean distance between the original point and the corresponding point on the line . Sum up the Euclidean distances of all edgelength pairs. is computed using this sum and a scaling factor. As the considered geometric figures are alike, the scaling factor is the number of edges in any one of these geometric figures. The need for this scaling factor arises to account for the fact that in a large figure, with a large number of edges, a minor change is less significant in determining overall dissimilarity, than a corresponding change in a smaller figure.
The function is shown to be a distance function as it satisfies the three properties [11] required: satisfies the commutativity (Theorem 3.7) and triangular inequality properties (Theorem 3.8) defined over single geometric figures. However, the coincidence axiom is defined over equivalence classes of geometric figures (figures that are alike up to scale). The proofs for these properties are given later in this paper.
2. The Distance Function
The distance function, represented by , reflects the degree of dissimilarity between figures.
Let, be the set of straight edge figures for which the distance function is defined then
where denotes the set of vertices, is the set of edges, represents the set of corresponding edge lengths and denotes the set of angles that are defined between adjacent edges in terms of radian.
Further, if and are said to be “similar”, then and satisfy the below conditions:

If is a graph that represents the adjacency of figure and is a graph that represents the adjacency of figure , then graphs and are isomorphic.

All the corresponding angles of and are equal, i.e.,
if represent the set of angles of and
if represent the set of corresponding angles of , then(2.1) .

All the corresponding edge lengths of and are proportional, i.e.,
if represent the set of edge lengths of and
if represent the set of corresponding edge lengths of , then(2.2) .
In view of this, the distance function tries to find the extent to which the considered figures deviate from conditions 2 and 3, provided condition 1 is satisfied.
Remark 2.1.
A few properties of the function:



, if and only if
where denotes that and belong to same equivalence class of figures,
i.e., are figures that are identical up to scale. 
satisfies the following:
(2.3)
3. Components of the Distance Function
3.1. Angular Dissimilarity
Let represent the angular dissimilarity function. Then the function is defined as:
(3.1a)  
(3.1b) 
where represents the graph isomorphism function.
with : set of all graphs.
(3.2) 
In (3.2), the symbol denotes that and satisfy all properties of graph isomorphism.
Assuming is computed as follows:
Project each corresponding pair into a cartesian plane, wherein the axis represents the set , while the axis represents the set . The function computes the deviation from (2.1). In this cartesian plane, according to (2.1), all corresponding pairs must lie on the line:
(3.3) 
For each point , calculate the Euclidean distance from its corresponding point on the line (3.3), i.e., .
(3.4) 
Therefore,
(3.5) 
Remark 3.1.
A few properties of the function:



(which can be equal to 0), where
Theorem 3.2.
Proof.
We see that the constituents of the function are commutative:
This follows that , a constant
Hence,
Theorem 3.3.
3.2. EdgeLength Disproportionality
Let represent the edgelength disproportionality function. Then the function is defined as:
(3.10a)  
(3.10b) 
Assuming is computed as follows:
Project each corresponding pair into a cartesian plane, wherein the axis represents the set , while the axis represents the set . The function computes the deviation from (2.2). Consider a part of the same equation.
(3.11) 
In the context of the plane, (3.11) gives the slope of a line that passes through .
Further extending this concept, it can be seen that in order to satisfy (2.2) all points should lie on the same line. Therefore, finding edge length proportionality now boils down to finding for the set of corresponding edgelength pairs the best fit line, which passes though origin.
Let the equation of the required line be:
(3.12) 
Using IPFP each point is transformed to , which is a point on the line 3.12.
On finding the desired line, the euclidean distance between and is computed.
(3.13) 
Therefore,
(3.14) 
Remark 3.4.
A few properties of the function:



can be equal to .
Theorem 3.5.
Proof.
The proof is similar to that of Theorem 3.2. ∎
Theorem 3.6.
Proof.
The proof is similar to that of Theorem 3.3. ∎
3.3. Deriving the Function
The function is the convex sum of and .
(3.15a)  
(3.15b) 
While computing using (3.15b) in A, B, C and D, the value of is set to , to equally weight the and functions. However, other values of can be used resulting in similar outcomes for the function.
Theorem 3.7.
Theorem 3.8.
4. Results
Using the above discussed method to compute the distance function, , this section tabulates the results for a few pairs of figures. It can be found that the values of in Table 1 are reflective of the dissimilarity of considered figures. The same can be said for and values.
References
 [1] Donald S. Blough, The perception of similarity, Avian Visual Cognition (Robert G. Cook, ed.), September 2001.
 [2] P. E. Bourne and J. Gu, Structural bioinformatics, 2 ed., Wiley, 2009.
 [3] W. Edwards Deming and Frederick F. Stephan, On a Least Squares Adjustment of a Sampled Frequency Table When the Expected Marginal Totals are Known, The Annals of Mathematical Statistics 11 (1940), no. 4, 427–444.
 [4] Ronald J. Gillespie and Edward A. Robinson, Models of molecular geometry, Chemical Society Reviews 34 (2005), 396–407.
 [5] B. S. Grewal and J. S. Grewal, Higher Engineering Mathematics, 40 ed., Khanna Publishers, New Delhi, 2007.
 [6] Valentin Heller, Scale effects in physical hydraulic engineering models, ournal of Hydraulic Research 49 (2011), no. 3, 293–306.

[7]
Maciej Komosinski, Grzegorz Koczyk, and Marek Kubiak,
On estimating similarity in artificial and real organisms
, Theory in Biosciences 120 (2001), no. 3–4, 271–286.  [8] Maciej Komosinski and Marek Kubiak, Quantitative measure of structural and geometric similarity of 3D morphologies, Complexity 16 (2011), no. 6, 40–52.
 [9] Michael Lahr and Louis de Mesnard, Biproportional Techniques in InputOutput Analysis: Table Updating and Structural Analysis, Economic Systems Research 16 (2004), no. 2, 115–134.
 [10] G. Pallett, Geometric similarity—some applications in fluid mechanics, Education + Training 3 (1961), no. 2, 36–37.
 [11] Walter Rudin, Principles of Mathematical Analysis, McGrawHill Inc., New York, 1976.
 [12] Ayusman Sen, Venkatasuryanarayana Chebolu, and Arnold L. Rheingold, First structurally characterized geometric isomers of an eightcoordinate complex. structural comparison between cis and transdiiodobis(2,5,8trioxanonane)samarium, Inorganic Chemistry 26 (1987), no. 11, 1821–1823.
 [13] A. Stashans, G. Chamba, and H. Pinto, Electronic structure, chemical bonding, and geometry of pure and Srdoped CaCO3, Journal of Computational Chemistry 29 (2008), no. 3, 343–349.
 [14] H. Stephen Stoker, General, organic, and biological chemistry, Cengage Learning, 2009.
 [15] Chris Sweeney, Laurent Kneip, Tobias Höllerer, and Matthew Turk, Computing similarity transformations from only image correspondences, The IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2015), June 2015, doi:10.1109/CVPR.2015.7298951, pp. 3305–3313.
 [16] Michael J. Tarr and Heinrich H. Bülthoff, Imagebased object recognition in man, monkey and machine, Cognition 67 (1998), no. 1–2, 1–20, doi:10.1016/S00100277(98)000262.
 [17] J. R. Ullmann, An Algorithm for Subgraph Isomorphism, Journal of the ACM 23 (1976), no. 1, 31–42.
 [18] Maximilian Vermorken, Ariane Szafarz, and Hugues Pirotte, Sector classification through nongaussian similarity, Applied Financial Economics 20 (2008), no. 11, doi:10.1080/09603101003636238.
 [19] David W. S. Wong, The Reliability of Using the Iterative Proportional Fitting Procedure∗, 1992, pp. 340–348.
 [20] ShiuhSheng Yu, JinnRong Liou, and WenChin Shen, Computational similarity based on chromatic barycenter algorithm, IEEE Transactions on Consumer Electronics 42 (1996), no. 2, 216–220.
 [21] Bilal Zaka, Theory and applications of similarity detection techniques, Ph.D. thesis, Institute for Information Systems and Computer Media (IICM), Graz University of Technology, Graz, Austria, 2 2009.
Appendix A Computing for Figures 0(a) and A

Comments
There are no comments yet.