Journal of Applied Mathematics

Journal of Applied Mathematics / 2014 / Article

Research Article | Open Access

Volume 2014 |Article ID 960302 | 10 pages | https://doi.org/10.1155/2014/960302

Log-Aesthetic Curves for Shape Completion Problem

Academic Editor: Juan Manuel Peña
Received20 Apr 2014
Revised08 Jul 2014
Accepted11 Jul 2014
Published11 Aug 2014

Abstract

An object with complete boundary or silhouette is essential in various design and computer graphics feats. Due to various reasons, some parts of the object can be missing hence increasing the complexity in designing process. It is therefore important to reconstruct the missing parts of an object while retaining its aesthetic appearance. In this paper, we propose Log-Aestheic Curves (LAC) for shape completion problem. We propose an algorithm to construct LAC segment and subsequently fit into the gap of the missing parts with C-shape or S-shape. For C-shape completion, we define LAC segment by specifying two endpoints and their respective tangent directions between the gaps while, for S-shape, the user defines an inflection point in between the endpoints. The final section illustrates three examples to showcase the efficiency of the proposed algorithm. The results are further compared with Kimia’s method to prove that the algorithm produces equally good result. Additionally, the proposed algorithm provides an extra degree of freedom in which the user would be able to choose the type of spiral that they desire to solve the shape completion problem.

1. Introduction

In a design environment, there are situations in which the outlines of an object are missing or occluded. These scenarios are commonly known as shape completion, gap completion, or curve completion problem. It is important to recomplete the shape of the missing object while retaining its aesthetic appearance since a complete object can be used further for applications in modeling, mesh analysis, and computer-aided design as well as manufacturing purposes. The complete boundary or silhouette provides geometrical information of a model which is significant in engineering analysis and manufacturing process. In order to reconstruct the missing boundaries of an object, the associated curve segment must satisfy the boundary conditions so that the curve passes through the endpoints with specified tangent direction. To date, there are numbers of algorithms available for shape completion problem (see the works of [16]).

A notable work which received much attention is by Kimia et al. [3], where they proposed an algorithm which utilizes Euler spiral to solve shape completion problem. Euler spiral is also known as Cornu’s spiral or clothoid. The Euler spiral is widely applied in highway/railway or robotic trajectories design due to its linear curvature property (curvature varies linearly with respect to arc length). The algorithm proposed by Kimia et al. [3] is the implementation of Euler spiral to solve the shape completion problem. In their proposed algorithm, two endpoints (, ) and their tangential angles (, ) are the inputs. In order to construct Euler spiral for the given problem, curvature and arc length of the curve are required to be identified. Since the proposed Euler spiral algorithm is an iterative process, initial guess for these two parameters (curvature and arc length) is needed. Kimia et al. [3] recommended the use of biarc to obtain the initial curve with its corresponding curvature and arc length for the proposed algorithm. Note that the goal of their proposed algorithm is to minimalize the distance between last point and resulting curve in order for the gap to be filled using gradient descent method.

Log-Aesthetic Curves (LAC) are curves where the logarithmic curvature graph (LCG) can be represented by a straight line. The idea of LCG was formulated by Harada et al. (1999) when they attempted to classify all the curves used in automobile design. It was first known as logarithmic distribution diagram of curvature (LDDC). It is a graph to measure the relationship between curvature radius (denoted by ) and arc length of the curve segment (denoted by ). They found that all the curves employed in automobile design depict linear gradient of LDDC. Kanaya et al. [7] refined the formulation of LDDC which is now known as LCG. The horizontal axis of LCG represents and the vertical axis represents [8]. Figure 1 illustrates the two segments of Euler spiral.

In 2005, Miura et al. [9] derived a fundamental formula of LAC based on a linear representation of LCG. A year later, Yoshida and Saito [10] investigated the characteristics and overall shape of LAC. They also proposed a method to construct LAC segment interactively by specifying endpoints and their tangent vectors. In 2009, they further extended LAC into space curve and proposed a method to interactively control the curves, which is similar to quadratic Bezier curves.

LAC has become a promising curve in graphic and industrial design due to its monotonic curvature property. There are two shape parameters of LAC denoted by and . The shape parameter is used to determine the type of spiral within the family of LAC, and is used to satisfy the constraint during the design process. LAC comprises Euler spiral (), Nielsen spiral (), logarithmic or equiangular spiral (), circle involute (), and others.

In 2011, Gobithaasan and Miura [11] expanded the family of LAC into Generalized Log-Aesthetic Curve (GLAC) by adding generalized Cornu spiral (GCS) to the family of LAC. This includes Euler spiral, logarithmic spiral, circle involute, Nielsen spiral, LAC, and GCS as the members of GLAC. To note, GCS is proposed by Ali et al. [12] where it becomes Euler spiral when the shape parameter of GCS is zero. GLAC has an extra shape parameter compared to LAC in which it can be used to satisfy additional constraints that occur during design process [13]. The curvature function of GLAC is also monotonic similar to LAC. In 2012, they further extended GLAC into space curve.

In 2012, Ziatdinov et al. [14] defined LAC in the form of incomplete gamma functions. They claimed that this new expression of LAC is capable of reducing the computation time up to 13 times faster. In 2013, the problem of Hermite interpolation was dealt with by Miura and Gobithaasan [15] by introducing log-aesthetic splines which consists of triple LAC segments. Readers are referred to [16] for a detailed review on aesthetic curves.

In this paper, we introduce the implementation of LAC algorithm to fit the gap in between the outlines of missing/occlusion objects. We compare the performance of this algorithm with the results obtained by Kimia et al.’s [3] method on the same examples in order to show the effectiveness of LAC to solve shape completion problem.

The rest of this paper is organized as follows. First, the formulation of LAC is reviewed followed by a detailed explanation on the LAC algorithm for solving the shape completion problem. In Section 3, we demonstrate the implementation of the proposed algorithm with various values with three examples to show the implementation of this method. The data and calculation used in the examples are also depicted in this section. The output of shape completion using Kimia’s method is also depicted for comparison purposes. We also make comparison of the results obtained using Kimia et al.’s [3] method and our algorithm. We further show some shape variations which can be obtained by using S-shape LAC in which the designer tweaks the segment in order to obtain the desired shape.

2. Log-Aesthetic Curves in Shape Completion

In this section, we show the parametric expression of LAC and the algorithm used to obtain the solution for shape completion problem with various values.

2.1. The Analytical Formulas and Parameters

There are two shape parameters used to define LAC segment: and . The shape parameter determines the type of spiral and is used to control the curve so that the constraints are satisfied. Let and represent radius of curvature and tangent angle of the curve, respectively.

Equation (1) shows the radius of curvature function in terms of its turning angle. To note, (1) is used to define the parametric expression of LAC in terms of its turning angle as shown in (2) as follows: where represents starting point and and represent the imaginary unit and exponent, respectively. LAC can also be represented in the arc length parameter, , as follows:Both (2) and (3) generate the same LAC. The curve can be drawn in complex plane by the -axis representing real numbers and the -axis representing imaginary numbers. Readers are referred to [10] for a detailed derivation of the parametric expression of LAC.

2.2. The LAC Algorithm

C-Shape. We customize the algorithm of constructing LAC segment to fill the gap by specifying two endpoints, its tangent vector, and value. The C-shape LAC curve is a direct process in which the user may interactively input the endpoints and the tangent direction of those points. We can further automate the identification of tangents at the endpoints by using three-point circular arc approximation around the endpoints as explained in Steps 1 and 2 in the algorithm below. Using these tangents, we may calculate the midpoint. These three points are then used to fit LAC segment in the gap for shape completion problem. The idea of this method is to find a LAC segment defined in a triangle composed of three control points as proposed by Yoshida and Saito [10]. Therefore, by using this method, it is only possible to generate a C-curve. Figures 2 and 3 show the configuration of the triangle formed by three control points for cases and , respectively. Step 5 in the algorithm below elaborates these configurations.

S-Shape. Basically, a S-shape LAC segment consists of two C-shape curves joined with continuity. In order to construct the S-curve for a given gap, the inflection point is essential. A simple approach used is that users are given the freedom to define the inflection point so that the algorithm is carried out twice consisting of two C-shape segments of LAC. Thus, this approach needs two endpoints, its tangent vectors, value, and an inflection point.

The process involves breaking the S-curve into two C-curves so the first piece of curve is constructed between starting point (black) and inflection point (gray), while the second piece is between inflection point (gray) and endpoint (black). Figure 4 illustrates the inflection point that we define for one of the numerical examples in this paper.

Algorithm 1 demonstrates the LAC algorithm.

REMARK: Endpoints , inflection point and are user defined. The tangent angle at both endpoints can be
obtained either from three point circular arc approximation around the endpoints or the user defines it. Let represent the
coordinate of a point.
INPUT: , , , .
OUTPUT: , , , LAC segment.
Begin
Step  1. Set , where is the center of circle, is radius and represents angle.
Step  2. Identify unit tangent vector, and set .
Step  3. Calculate directional angle, .
Step  4. Solve simultaneous equations , where to get position of second control point .
Step  5. If , then ,
            else ; .
            If , then ; ,
             else ; .
Step  6. Translate , rotate triangle such that for ; for .
   If or , then reflect the triangle through -axis.
Step  7. Compute .
Step  8. If , then ,
          else .
Step  9. Identify bound of . If , then ; ,
               else if , then ; ,
                  else ; .
Step  10. Set tolerance ;
      iteration number .
Step  11. Calculate using Bisection method.
Step  12. Determine scaling factor, .
Step  13. Scale to the curve and transform inversely the triangle to its original position.
Step  14. Construct LAC segment using (2).
Step  15. OUTPUT (, , , LAC segment).
End

2.2.1. Computation of Tangent Angles (Step 1–Step 3)

To automate the process of defining the tangents at the endpoints, we may use circular arc approximation (osculating circle) that best fits the endpoints and points surrounding them in order to determine the tangent angle at both endpoints. Since it is an osculating circle, we substitute the points into the equation of circle. Then, we identify the center (), radius , and turning angle of circle from three points which include the endpoint. Next, we determine the unit tangent vector at the endpoints and subsequently calculate the corresponding tangent angle by using specified formula as indicated in the algorithm. Alternately, we may also allow the user to directly define tangent vectors at those points.

2.2.2. Identification of Second Control Point (Step 4)

Once the unit tangent vector at endpoints is identified, we determine the coordinate of the second control point which is the intersection point of the tangential line at both endpoints by solving the equations simultaneously.

2.2.3. Affirmation of Initial and Last Point Position (Step 5)

We assume the distance between and is less than and as proposed by Yoshida and Saito [10]. The position of and is switched if the criterion is not satisfied. Otherwise, the position remains unchanged. Note that there are two cases of constructing LAC segment based on the value as illustrated in Figures 2 and 3. For case , the initial endpoint is the starting point during the curve construction process . On the other hand, starting point of curve construction process for case is the last endpoint .

2.2.4. Transformation Process (Step 6)

The transformation process includes translation, rotation, and reflection of the original triangle that consist of , , . Initially, the original triangle is translated to the origin so that the starting point is located at the origin. Next, we rotate the triangle so that the second control point is placed on the -axis. Finally, we ensure the last point of the curve construction process is located at the positive -axis region. If not, the reflection process is needed to reflect the last point with negative -coordinate through the -axis. The configuration after transformation is illustrated in Figures 2 and 3.

2.2.5. Computation of Tangent and Turning Angle (Step 7 and Step 8)

We apply the law of cosine of a triangle to calculate corresponding angles as shown in Figures 2 and 3. The tangent angle and turning angle for case or for case will be used in the subsequent step for calculating shape parameter .

2.2.6. Upper Bound of Shape Parameter (Step 9)

For the case when , there is no upper bound for shape parameter . So, the value of can be arbitrarily large. However, there are upper bounds for when and . Therefore, the value of these two cases is restricted within the range of () where and are assigned a specified value as indicated in the algorithm above.

2.2.7. Shape Parameter Calculation (Step 10 and Step 11)

We determine the value that satisfies the constraints of endpoints and angles by using bisection method. First, tolerance and bound of are used in the calculation of iteration number for bisection method. Then, the calculating process will run until the iteration number is met. Once the value of the curve is obtained, it is an interpolating curve that satisfies boundary constraints as shape parameter is used to control the curve so that the constraints are satisfied. The obtained value ensures the generated LAC segment starts at the starting point and ends at the last point while the shape of curve follows the specified tangent vectors at two endpoints.

2.2.8. Computation of Scale Factor (Step 12)

We calculate the scaling factor by using the formula as shown in the algorithm where and are endpoints of the original triangle while and are endpoints of the transformed triangle.

2.2.9. Construction of LAC Segment (Step 13–Step 15)

In order to obtain the curve which is defined in the original triangle, we inversely transform the triangle to its original position. The curve segment is constructed using (2) with the obtained value of , , .

3. Numerical Examples and Discussion

This section shows the input data and numerical and graphical results of implementing the algorithm presented in Section 2 for three examples. For comparison purpose, we present the results of Kimia’s algorithm [3] algorithm on the same examples as well.

3.1. The Graphical Results

Figure 5 shows the first example of fitting Euler spiral and LAC segment to two parts of a jug. The results of the second example (artifact) and third example (vase) are depicted in Figures 6 and 7, respectively.

3.2. The Numerical Results

The input data and the obtained parameter values to render LAC segment for C-shaped and S-shaped gaps are shown in Tables 1, 2, and 3, respectively.


FigurePart/gap shapeStarting pointInflection pointTerminating point

Figure 5Outer C(475.33, 290.67)(408, 512)
Inner C(444, 319.3)(406.7, 490.7)
S(68.67, 198)(115.139, 317.874)(132, 445.33)

Figure 6Left C(150.4, 320.8)(123.2, 589.6)
Right C(853, 307)(824, 583)

Figure 7C(504, 126)(176, 120)
Right S(576.67, 379.33)(501.722, 483.092)(445.33, 598)
Left S(215.33, 599.33)(166.565, 481.2)(94, 376)


FigurePartShape parameterAngles (radian)Scale factor
or

Figure 5(b)Outer C0.1811021.973521.09383106.443
Inner C0.1878222.503051.5361257.7559

Figure 5(c)Outer C0.2368271.973520.879684179.903
Inner C0.3071632.503050.966927144.024

Figure 6(b)Left C0.3196851.551471.00107105.562
Right C0.2048612.355621.4757989.6424

Figure 6(c)Left C0.533641.551471.0010790.2434
Right C0.6105632.355621.4757965.4159

Figure 7(c)0.1400541.16370.601359271.762

Figure 7(d)0.1690611.16370.601359270.036


FigurePartLine styleShape parameterAngles (radian)Scale factor
or

Figure 5(b)Piece 1Thick0.6467460.7396230.451367107.501
Dashed1.135870.439630.288258152.739
Piece 2Thick0.1403721.326470.68965393.5698
Dashed0.4730331.026480.6368276.6964

Figure 5(c)Piece 1Thick2.195230.439630.151372568.396
Dashed1.072160.7396230.288256293.721
Piece 2Thick0.8111231.026480.389659222.587
Dashed0.1566811.326470.63682116.479

Figure 7(c)Right SPiece 1Thick0.00004296880.5715010.285752227.044
Dashed0.6987120.8715010.58574639.271
Dotted2.457580.3715280.28574623.657
Piece 2Thick0.01187780.9084370.455056145.074
Dashed0.4035971.209050.75567365.1694
Dotted0.7009230.7077040.45338100.657

Figure 7(d)Right SPiece 1Thick2.531470.8715010.58574641.1231
Dashed0.00004295920.5715010.285752227.044
Dotted10.77790.3715280.28574625.7032
Piece 2Thick1.26061.209050.75567347.4646
Dashed0.01200780.9084370.455056145.071
Dotted2.487850.7077040.4533867.3212

Figure 7(c)Left SPiece 1Thick0.1884120.9811570.509674121.657
Dashed0.6037190.7811420.471473103.99
Dotted0.3614021.381140.90966652.4523
Piece 2Thick0.00004625140.5946720.297337218.104
Dashed0.8845320.3946710.29733535.514
Dotted0.5641670.9946660.69733127.5123

Figure 7(d)Left SPiece 1Thick1.617810.7811420.47147383.3887
Dashed0.2344120.9811570.509674120.616
Dotted1.428161.381140.90966631.5215
Piece 2Thick 9.266460.3946710.29733531.4849
Dashed0.00004624230.5946720.297337218.104
Dotted2.667520.9946660.69733126.6104

3.3. Discussion

We implemented LAC algorithm with various values for each example. In Figures 5, 6, and 7, we showed a subfigure of LAC with in between the gaps for the missing part of the objects. These examples are indeed Euler spiral similar to the work of Kimia et al. [3]. Users are indeed fitting a circle involute when as shown in each figure; Nielsen spiral is fitted when and logarithmic spiral when . The shape parameter definitely dictates the type of spiral the user desires to fit into the gap.

Based on the comparison of graphical results in Figures 5, 6 and 7 we found that Kimia’s algorithm [3] and the LAC algorithm behave similarly. However, the proposed LAC algorithm gives more flexibility to designers as they can manipulate the shape parameter and the tangent direction at the inflection point in order to get various S-shaped LAC segments.

4. Conclusion

A LAC segment can be constructed by specifying the endpoints and their tangent directions. LAC is a family of aesthetic curves where their curvature changes monotonically. It comprises Euler spiral, logarithmic spiral, Nielsen spiral, and circle involute with different values. The algorithm for constructing LAC segment to solve shape completion problem is defined in Section 2. The results of implementing both Kimia et al.’s [3] algorithm and the proposed LAC algorithm on the same images are depicted in Section 3. LAC has an upper hand due to its flexibility although both algorithms are capable of solving shape completion problems. Since LAC represents a bigger family rather than Euler spiral alone, it is clear that more shapes are available to fill the missing gap. Moreover, the resulting LAC segments are satisfying continuity where the curve segments interpolate both endpoints in the specified tangent directions. In case the user wants a LAC solution, one may plug in the technique proposed by Miura et al. [15] or employ GLAC [17] in which we may use shape parameter in GLAC to satisfy the desired curvatures.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

The authors acknowledge Universiti Malaysia Terengganu (GGP grant) and Ministry of Higher Education Malaysia (FRGS: 59265) for providing financial aid to carry out this research. They further acknowledge anonymous referees for their constructive comments which improved the readability of this paper.

References

  1. M. Kolomenkin, I. Shimshoni, and A. Tal, “Demarcating curves for shape illustration,” ACM Transactions on Graphics, vol. 27, no. 5, article 157, 2008. View at: Publisher Site | Google Scholar
  2. D. Decarlo, A. Finkelstein, S. Rusinkiewicz, and A. Santella, “Suggestive contours for conveying shape,” ACM Transactions on Graphics, vol. 22, no. 3, pp. 848–855, 2003. View at: Google Scholar
  3. B. B. Kimia, I. Frankel, and A. Popescu, “Euler spiral for shape completion,” International Journal of Computer Vision, vol. 54, no. 1–3, pp. 159–182, 2003. View at: Google Scholar
  4. T. Judd, F. Durand, and E. Adelson, “Apparent ridges for line drawing,” ACM Transactions on Graphics, vol. 26, no. 3, article 19, 7 pages, 2007. View at: Google Scholar
  5. S. Yoshizawa, A. Belyaev, and H. P. Seidel, “Fast and robust detection of crest lines on meshes,” in Proceedings of the ACM Symposium on Solid and Physical Modeling (SPM '05), pp. 227–232, June 2005. View at: Publisher Site | Google Scholar
  6. G. Harary and A. Tal, “3D Euler spirals for 3D curve completion,” Computational Geometry: Theory and Applications, vol. 45, no. 3, pp. 115–126, 2012. View at: Publisher Site | Google Scholar | Zentralblatt MATH
  7. I. Kanaya, Y. Nakano, and K. Sato, “Simulated designer’s eyes—classification of aesthetic surfaces,” in Proceedings of the International Conference on Virtual Systems and Multimedia, pp. 289–296, 2003. View at: Google Scholar
  8. R. U. Gobithaasan and K. T. Miura, “Logarithmic curvature graph as a shape interrogation tool,” Applied Mathematical Sciences, vol. 8, no. 16, pp. 755–765, 2014. View at: Google Scholar
  9. K. T. Miura, J. Sone, A. Yamashita, and T. Kaneko, “Derivation of a general formula of aesthetic curves,” in Proceedings of 8th International Conference on Humans and Computers, pp. 166–171, Tokyo, Japan, 2005. View at: Google Scholar
  10. N. Yoshida and T. Saito, “Interactive aesthetic curve segments,” The Visual Computer, vol. 22, no. 9-11, pp. 896–905, 2006. View at: Publisher Site | Google Scholar
  11. R. U. Gobithaasan and K. T. Miura, “Aesthetic spiral for design,” Sains Malaysiana, vol. 40, no. 11, pp. 1301–1305, 2011. View at: Google Scholar
  12. J. M. Ali, R. M. Tookey, J. V. Ball, and A. A. Ball, “The generalised Cornu spiral and its application to span generation,” Journal of Computational and Applied Mathematics, vol. 102, no. 1, pp. 37–47, 1999. View at: Publisher Site | Google Scholar | Zentralblatt MATH
  13. R. U. Gobithaasan, R. Karpagavalli, and K. T. Miura, “Shape analysis of generalized log-aesthetic curves,” International Journal of Mathematical Analysis, vol. 7, no. 33, pp. 1751–1759, 2013. View at: Publisher Site | Google Scholar
  14. R. Ziatdinov, N. Yoshida, and T. Kim, “Analytic parametric equations of log-aesthetic curves in terms of incomplete gamma functions,” Computer Aided Geometric Design, vol. 29, no. 2, pp. 129–140, 2012. View at: Publisher Site | Google Scholar | Zentralblatt MATH
  15. K. T. Miura, D. Shibuya, R. U. Gobithaasan, and S. Usuki, “Designing log-aesthetic splines with G2 continuity,” Computer-Aided Design and Applications, vol. 10, no. 6, pp. 1021–1032, 2013. View at: Publisher Site | Google Scholar
  16. K. T. Miura and R. U. Gobithaasan, “Aesthetic curves and surfaces in computer aided geometric design,” International Journal of Automation Technology, vol. 8, no. 3, pp. 304–316, 2014. View at: Google Scholar
  17. R. U. Gobithaasan, R. Karpagavalli, and K. T. Miura, “G2 continuous generalized log aesthetic curves,” Computer Aided Design & Application, Accepted for publication. View at: Google Scholar

Copyright © 2014 R. U. Gobithaasan et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

819 Views | 473 Downloads | 1 Citation
 PDF  Download Citation  Citation
 Download other formatsMore
 Order printed copiesOrder

We are committed to sharing findings related to COVID-19 as quickly and safely as possible. Any author submitting a COVID-19 paper should notify us at help@hindawi.com to ensure their research is fast-tracked and made available on a preprint server as soon as possible. We will be providing unlimited waivers of publication charges for accepted articles related to COVID-19.