Abstract

Curves are the building blocks of shapes and designs in computer aided geometric design (CAGD). It is important to ensure these curves are both visually and geometrically aesthetic to meet the high aesthetic need for successful product marketing. Recently, magnetic curves that have been proposed for computer graphics purposes are a particle tracing technique that generates a wide variety of curves and spirals under the influence of a magnetic field. The contributions of this paper are threefold, where the first part reformulates magnetic curves in the form of log-aesthetic curve (LAC) denoting it as log-aesthetic magnetic curves (LMC) and log-aesthetic magnetic space curves (LMSC), the second part elucidates vital properties of LMCs, and the final part proposes G2 LMC design for CAD applications. The final section shows two examples of LMC surface generation along with its zebra maps. LMC holds great potential in overcoming the weaknesses found in current interactive LAC mechanism where matching a single segment with G2 Hermite data is still a cumbersome task.

1. Introduction

Curves are widely used in various fields, most commonly in art and designs. The fairness of a curve dictates the product’s quality and, in turn, its sales. The definition of a beautiful curve in the eye of an artist is a curve which exhibits constant variation of curvature monotonically and no part of the curve is a circular arc, as expressed by Ruskin [1]. It is the same for aesthetic designs in CAGD. However, lines and circles are considered fair or beautiful because of their simplicity [2]. The definition of a fair curve still remains subjective and unclear, which makes the condition required for ending a fairing process seems rather ambiguous. Conventional curves such as NURBS and Bezier have obvious oscillation in their curvature profile making it less visually pleasing. They also have more complex curvature formulas compared to those of natural spirals.

Harada et al. [3] noted that fair curves observed in nature have linear logarithmic curvature histograms (LCHs). It was later that curves which satisfy the stated condition are categorized as log-aesthetic curve (LAC) [4, 5] which comprises a huge family of fair curves, including logarithmic spiral, circle involute, and clothoid. LAC is derived from logarithmic curvature graph (LCG) which is the analytic form of logarithmic distribution diagram of curvature (LDDC). Yoshida and Saito [5] also proposed an algorithm for interactive generation of LAC. These curves satisfy G1 Hermite data. However, due to the scaling of the curve at the end of the algorithm, it is difficult to match G2 Hermite data with one LAC segment alone, albeit it can be solved by joining two LACs with G1-continuity, then scaling one of the triangles such that the joint is G2-continuous.

Gobithaasan and Miura [6] proposed the general form of the LAC’s formula known as the generalized LAC (GLAC). It has an extra degree of freedom compared to LAC which results in increased flexibility [7]. Furthermore, GLAC extends the family of LAC to include generalized cornu spiral [8]. Both curves mentioned have great potential for CAGD purposes but are highly compute intensive and time consuming. Recent progresses in this subject matter include the development of log-aesthetic spline and its application in automobile design (see Figure 1). Recently, Gobithaasan et al. [9] proposed Runge Kutta methods to compute LAC/GLAC, proven to achieve tremendous speedup.

There are also curves whose LCGs are approximately linear. These curves are known as quasi-aesthetic curves, coined by Yoshida and Saito [11]. They proposed quasi-aesthetic curve segments in the form of rational cubic Bézier. The resulting curve has monotone curvatures and has a higher aesthetic value compared to the usual rational Bezier splines. Class A Bézier [12] is another curve with monotonic curvature known to have approximately linear LCG and can be extended to space curves. However, its shape is limited to that of a logarithmic spiral as the degree of the polynomial increases. Furthermore, it is currently difficult to employ Class A Bézier space curve for surface design. Recent study by Nabiyev and Ziatdinov [13] shows that Bézier curves with monotonic curvatures are not always aesthetic in terms of the law of technical aesthetics. A study by Levien and Séquin [14] suggested that LAC is the most promising family of fair curves. Readers are referred to Miura and Gobithaasan [15] for a comprehensive review on aesthetic curves for various design feats.

In 2009, Xu and Mould proposed a particle tracing method to produce magnetic curve which is categorized as fair curve due to the monotonicity of its curvature function. It was inspired by artistic motives and they further showed its practicalities in computer graphics by rendering trees, hairs, water, and fire. Magnetic curves are defined as a particle tracing method that creates curves with constantly varying curvature by utilizing the effect of a magnetic field. This paper aims to reformulate magnetic curves for CAD practicalities and further reformulates to construct splines which satisfy G2 Hermite data.

Section 1 elaborates in detail the physics behind magnetic curves. The contribution of this paper is threefold; the first part elucidates the connection between magnetic curves and LACs and the second part reformulates magnetic curves in the form of 2D and 3D log-aesthetic curve and denotes it as log-aesthetic magnetic curves (LMC) and log-aesthetic magnetic space curves (LMSC) for CAD applications; finally the third part proposes an algorithm for developing G2 continuous LMC.

2. Formulation of Magnetic Curves

In a uniform magnetic field, the motion of a particle of charge and mass , travelling with velocity under magnetic induction , is the result of Lorentz Force [16], which can be rewritten as where represents the cross product operation. It describes the motion of charged particles experiencing Lorentz force. For convenience, is separated into two components, with the first parallel to and the second perpendicular to . The steps on detailed derivation are omitted for brevity, albeit readers are referred to [17]. To vary the curvature of the curve, is set to be an arbitrary real function of instead of a constant, . Note that the magnitude of the magnetic field, , should not be confused with its vector and . We obtain the components of magnetic curves as follows: Note that , and is the initial time, of the trajectory. To simplify the expression, we take . By using separation of variables method, we arrive at the following equations: where and and are arbitrary constants. In order to set the point at the origin, the initial conditions are set to be and , which are the and components of . These values are then substituted to (4). These initial values dictate the direction and magnitude of the velocity vector at the origin of the Cartesian plane which can be represented as a vector of magnitude and the direction is parallel to the -axis. Thus we have Expressing and in (7) in terms of and substituting back into (4), we obtain the position of the particle on the Cartesian plane at time, , as where is the initial position of the particle. Thus, the magnetic curve is two-dimensional when and three-dimensional otherwise. Note that although in this paper the velocity vector at is set to be to fix the tangential angle to 0 at at the origin, we can alter the initial values   and   such that the tangential angle is . Figures 2 and 3 depict the concept of particle motion under the influence of a constant magnetic field.

The main idea of magnetic curve is to vary the radius of gyration constantly to obtain a curve with monotonic curvature. The radius of gyration and gyro-frequency of magnetic curves is given by the equations: Note that the radius of gyration is actually the same as the radius of curvature coined in CAGD while the gyro-frequency of the particle is the angular velocity referred to in physical theories. It can also be noted that is the tangential angle of the trajectory or curve. Thus, if is a constant, we will have as a constant resulting in a circular trajectory. By setting as a function of  , value of varies with respect to creating a spiral trajectory. The radius of torsion is governed by Magnetic curves with constant initial velocities and magnetic field have total arc lengths of A summary of the properties of magnetic curves [18] are as follows.(i)Radius of gyration decreases while curvature increases when increases.(ii)The direction of particle acceleration changes when changes sign.(iii)Arc length of magnetic curve grows in a constant rate as increases when is a constant.Xu and Mould [18] proposed to vary particle charge, , for creating various spirals: Assuming such that the curve is on the - Cartesian plane, the equation of the trajectory is A space curve is obtained by introducing as stated in (10). For planar curve, it can also be written in a complex plane as follows: whose gyro-frequency and radius of curvature are Equation (16) generates planar trajectories or curves of various shapes mainly spirals and circles. It produces straight lines when . Note that these curves are well-defined at when ; otherwise is not a real number.

The particle velocity uniformly scales the entire trajectory and its arc length whereas , the magnitude of magnetic field, uniformly scales the rate of change of curvature. The effects of scaling with on the curvature and rate of change of curvature can be seen in Figure 4. is a shape parameter which determines the overall shape of the magnetic curves and is directly related to LCG gradient; its effect on planar curves is shown in Figure 5. The shapes of magnetic curves are further discussed in the following section.

3. Magnetic Curves with Constant LCG and LTG Gradient

In this section we further investigate the fairness of magnetic curves with particle charge as a variant. Various aesthetic cases of magnetic curves will also be discussed in this section. Shape interrogation tools used in the aesthetic analysis of magnetic curve include curvature profile, logarithmic curvature graph (LCG), and logarithmic torsion graph (LTG).

Given and are the radius of curvature and arc length of a curve, the LCG is defined as a graph whose horizontal and vertical axes are the logarithm of and , respectively. A LAC is defined as a curve whose LCG is linear and its gradient function , where is a real constant. A LA space curve is defined as a curve whose LTG is linear. The LCG, LTG, and their respective gradient function [19] of a curve are given as The LCG and its gradient of (16) are The LCG and its gradient of (16) are Therefore (16) is guaranteed to be log-aesthetic curves or space curves. It is also notable that neither nor has an influence on the LCG nor LTG gradient. We are able to classify some of the well-known aesthetic curves from their LCG gradients. Xu and Mould’s magnetic spirals include clothoid curve, logarithmic spiral, and circle involute which occur when , , and . Generally, these spirals are divergent when and convergent when . The result of the shape and LCG analysis of these plane curves is depicted in Figure 6. Inflection points occur at whenever . Inflection points occur at when .

Equation (16) cannot be used to derive Nielsen’s spiral which occurs when . However, magnetic curves do comprise Nielsen’s spiral which is proven in (23)–(25).

Substituting into (8), we employ the general formula of radius of curvature to find Substituting the equations and their derivatives of (14) and (24) with respect to into (20) gives which yields the solution where , , and are arbitrary constants. Without loss of generality, we can omit as it does not change the overall shape of the curve. Note that (26) can be obtained by translating or scaling by in the following equation: We let and such that . Thus we have Definition 1 as follows. Note that (27) has a fixed LCG and LTG gradient of 0; thus this curve will always have the same basic shape despite influences of and . Figure 7 shows the parametric plots of magnetic curves with (27) and (16) when while Figure 8 shows plots of LM space curve with inputs given in Table 1.

Definition 1. The equation of log-aesthetic magnetic curves (LMC) in complex plane is where and is the initial position of the particle, and the equation of log-aesthetic magnetic curve curves (LMSC) is with

The particle charge is is the magnitude of the magnetic field, is the particle velocity, is the time when the velocity vector is , and is a parameter used for varying the gyro-frequency to produce trajectories of various shapes. These curves have a total arc length of (13). The curvature and torsion function is given by As magnetic curves share the same general form of equation and differential geometries (8)–(11), the influence of and on the curve’s curvature holds for all cases of (30) for LMC. Note that Definition 1 is the formulation of magnetic curves to represent LACs. One of the differences of LMC and LAC equation proposed in [5] is that LMC is unable to form circle with any other except for . However, this formulation allows various parameterization and equation manipulation for different application. The reparameterization of LMC is discussed in Section 5. Figure 7 illustrates two configurations of LMC representing logarithmic spiral and Nielsen’s spiral.

Since can be any arbitrary function, there are many possibilities of magnetic curves that can be generated. Another particle charge function which produces LAC is . However, it has a LCG gradient of , which means it is essentially the same as in terms of curve shapes. Note that LMC does include curves with nonlinear LCGs. An example of this case is when . Figure 8 depicts examples of LMSC with inputs as stated in Table 1.

4. Properties of Magnetic Curves

This section discusses that the properties which are roundness, monotone curvature and torsion, extensionality, and locality hold for LMC or LMSC. These properties were first introduced by Harary and Tal [20] and Levien and Séquin [14] for CAD applications. However, we need first to determine the bound for or such that the resulting curve is regular and well-behaved as shown in Table 2.

The properties of LMC or LMSC are as follows.

Proposition 2. LMC and LMSC exhibit self-affinity property.

Self-similarity is an important fractal geometry characteristic in which the geometry is invariance under uniform scaling whereas self-affinity preserves the geometry under nonuniform scaling operations.

Proof. These characteristics are inspected mathematically via omitting a front portion of the curve and scaling it by . Equation (30) now becomes Inspecting and for each case we can see that and . Thus the original shape is preserved and (30) is proven to be self-affine. Note that (30) becomes a logarithmic spiral when ; therefore it is self-similar and inline as proven by Miura [4].

Proposition 3. LMC or LMCS forms circles (roundness property).

If an interpolation problem involves interpolating a circle, a desirable interpolation spline should form an exact circle. Thus, given any two tangent points on a circle, LMC will be able to form a circular arc and fit into these tangent points.

Proof. LMC readily forms a circular trajectory when .

Proposition 4. LMC or LMSC has monotonically increasing or decreasing curvature and torsion (note: set to restrict the curve to - plane to obtain LMC).

The monotonicity of curvature is the most basic criteria for a fair curve as suggested by many researchers and designers. Since human eyes are very sensitive towards curvature extrema; the extrema should not appear on any point of the curve segment except for its end points [14].

Proof. The rate of change of curvature of (30) is given by The values of and for all or are as given in Table 3 by inspecting (33) and (34). As the shapes of the curve on the interval are either nonexisting or mirror images of those on except for , , thus we consider only the interval where . Since and are always negative or positive in the interval , the proposition above holds. Note that the sign of and   may change if the sign of is inverted.

Proposition 5. LMCs have inflection points.

Inflection points are important in achieving G2-continuous S-shaped splines and connecting a curve to a straight line or vice versa in CAD applications.

Proof. From the inspecting the curvature function, the inflection is most obvious for ,  , as these curves’ inflection points occur when and elsewhere (see (32) and (35)). Note that the circle () does not have any inflection points. For the rest of cases of LMC, the inflection points may occur at . See Table 2 for more detail.

Proposition 6. Increasing the scaling factor of any magnetic curves (including LMC) by will scale the original curvature by a factor of .

Proof. Assume a magnetic curve is originally scaled to a factor of . We have . Increasing the scaling factor () of magnetic curves by , the new curvature at is Rearranging both and such that it forms a relationship, we obtain This relationship aids the process of designing G2-continuous aesthetic splines as we may anticipate how scaling affects the curvatures at the end points of the splines.

Proposition 7. LMC is extensible.

When additional data point is placed on a LMC, the shape of the curve does not change if it satisfies the extensionality property.

Proof. Given LMC interpolating points and with tangents and , for any data point and respective tangent taken from the curve segment, the LMC interpolating the point-tangent pairs (,) and (,) or (,) and (,) coincides with original LMC which interpolates () and (,), provided that the shape parameter of the smaller segment is the same as the original segment.

Proposition 8. LMC has global characteristics.
Good locality is a property where a small local change in the position of one data point will affect only the curve shape near the local change position.

Proof. Similar to log-aesthetic curve, LMC is determined by three control points, with two being the start and end points and the other being the intersection point of the tangents at start and end points. Local changes at any one of the control point change almost the entire curve shape.

5. Reparameterization of LMC

In this section, the reparameterization of LMC for various design application in two-dimensional spaces is discussed. These parameterizations are tangential angles and end curvature parameterization.

The LMC in the form of tangential angles is parameterized as follows: where is a user defined time parameter which satisfies the range of presented in Table 4 which is the same as stated in the first section of this paper. Fixing to a real value, the equation can be used to solve G1 Hermite interpolation problem using Yoshida and Saito’s [5] curve generation algorithm. For simplicity, we set . Instead of searching for the shape parameter in original LAC equation, in (39) is searched. The boundaries for are given in Table 4. Note that ’s sign is changed to negative in (39) so that the curve is on quadrants I and II of the x-y plane.

In order to achieve G2-continuity, it is required to manipulate the end curvature of a curve. LMC is parameterized to directly manipulate both end curvatures while satisfying the user defined tangential angles of the curve. The equation of the end curvature parameterized curve is The following equations can be incorporated into (40) to fix the end tangents so that the angle is stated by the user: where , , and are the user defined start curvature, end curvature, and end tangential angles. Note that the tangential angle at the origin (starting point of the curve) is always 0 as discussed in Section 1. Figure 9 shows LMC curves plotted with (40) and (41). However, will not affect the curve shape when (41) is substituted in (40). This is because the terms in (41) will cancel out in (40) when (40) is substituted with (41) and the only parameters left in the resulting equation are , and .

We solve G2 Hermite interpolation for C-shaped curves with the method shown in Algorithm 1.

Three control points start and end curvatures, and user tolerance are given. Using Principal Axis
minimization method, shape parameter is searched. Using the new parameter, a new curve
is transformed back into the original orientation and position, and be plotted.
Input:
Output:
Begin
Step  0. set and
Step  1. if
    ;
  else
    ;
Step  2. Translate to ()
Step  3. if
    Reflect triangle over -axis;
Step  4. Rotate triangle such that tangent vector at () coincides with -axis;
Step  5. ;
Step  6. if
    Set ; ; ;
    if
     
   else
    if
     ; go to Step  8
    else if
     ; go to Step  8
    else
     if
       ;
       ;
     else
       ;
       ;
     Find from such that
    end if
Step  7. if
    Output: “Solution does not exist or method failed to converge”;
   else
    Transform LMC back to
    Plot LMC
End

Note is when . is when . is when .Consider = and are substituted and used in the equations in the entire algorithm.

The following section presents implementation examples.

6. Numerical Examples

In this section, three examples of G2 Hermite interpolation problem are presented. G2-continuous LMCs are also shown to indicate the possibilities of joining segments with different matching end curvatures to produce S-shaped curves. At the end of this section, LM surfaces are presented and discussed.

Using the method proposed in the previous section, two examples of implementation are provided in Figure 10. The inputs for these figures are provided in Table 5.

We used Mathematica built-in minimization function (Find Minimum) which employs principal axis method [21] for the optimization process as it does not require the computation of derivatives. The two initial search points are set as and for and and for . These initial search points do not determine the boundary of the search area. There are cases where the solution does not exist due to the number of constraints imposed on the curve. For example, it is notable that even though Figure 10(a) seems to coincide with the given end points, in fact, it has approximately error (distance between the given end point and the end point of the curve), which if we set the user tolerance to be below , this curve is not acceptable leading to a conclusion that a solution does not exist. Another obvious example is when the given inputs are , , , and , the solution is with as shown in Figure 11.

LMC can be modified to control both start and end curvatures and tangent angle directly using Algorithm 1. The proposed method is to solve G2 Hermite data with only a single segment of LAC which has not been achieved before. It also preserves curvature monotonicity as only one segment is used.

Figure 12 is a G2-continuous LM spline joined together by matching the data points at the joints without using any interpolation methods. It is to show the possibility of creating a G2-continuous spline with different values. It also shows the possibility of creating G2-continuous C-shaped and S-shaped LM spline with different values.

Algorithm 1 solves G2 Hermite data with only a single segment of LAC which has not been achieved before for LA curve design. The feature of controlling end curvatures opens up to new possibilities in creating more variation of G2 splines, such as forming S-shaped G2 spline with two C-shaped LACs.

Figure 13 shows the two-dimensional LMC profile and reference curve and Figure 14 shows a surface generated using Frenet sweeping method with the curves in Figure 13. The LM surface is generated by sweeping a C-shaped LM profile curve along S-shaped reference curve. This is achieved by translating the profile curve along the reference curve while rotating the profile curve to match the reference curve’s Frenet frame. The inputs of the profile and reference LMC are given in Table 6. Another example where two symmetrical surfaces generated using the same method are joined together with G2-continuity in designing a car hood is provided. The reference and profile curves are shown in Figure 15 while the inputs are shown in Table 7. The surface plot is provided in Figure 16.

7. Conclusion and Future Work

This paper reformulates log-aesthetic curves under the influence of a magnetic field and denotes it as log-aesthetic magnetic curves. The physical analysis provides an insight into various parameters previously regarded as shape parameters. We derived an end curvature controllable LAC with the formulation of LMC. We have also presented the possibility of interpolating given G2 Hermite data with a single segment of LMC. The characteristics LMC indicate high potential for CAD applications. Two examples of surface generation using LMC segments illustrated in the final section along with its zebra maps are indicating LMC surfaces are of high quality.

Future work includes in-depth analysis of the drawable region of G2 LMC and the study of the generalization of magnetics curves with various possibilities of representations.

Conflict of Interests

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

Acknowledgments

The authors acknowledge Ministry of Education Malaysia for providing financial aid (FRGS: 59265) to carry out this research. Special thanks are due to to anonymous reviewers for providing constructive comments which helped to improve the presentation of this paper.