Research Article

The Approximation of Generalized Log-Aesthetic Curves with Cubic Trigonometric Bézier Function

Algorithm 1

cubic T-Bézier approximation of generalized log-aesthetic curves.
INPUT: GLAC Shape parameters ; by default tol is set as: ; the maximum number of iterations n.
OUTPUT: cubic T-Bézier curve approximating the predetermined GLAC with curvature error .
Begin
Step 1 Set ;
Step 2 Compute the solution region as stated in equation (31)
 Set the initial values as whenever , otherwise set any random values satisfy close to .
 While do step 3–7
Step 3 Compute the control points as stated in equation (22)
Step 4 Compute as stated in (19);
as stated in (20)
Step 5 Use equation (21) to compute the cubic trigonometric Bézier curve basis functions using the values of the shape parameters and gained in step 4.
Step 6 Calculate the curvature error measure as stated in equation (29)
Step 7 If then
 output ; (Procedure completed successfully.)
  stop.
 else
  Select random initial values for and satisfy the solution region and set them as new initial values in step 2, where we   highly recommended choosing values close to initial value, 1.
  Return to step 3 and search using the Interior Point method for values to and which minimize around the maximum error point in the previous iteration.
Step 8 Output (“Method failed after iterations split the GLAC or increase the tolerance 0.05,  = ”, ).
 Stop.