The analysis of length and energy of log-aesthetic curves and its application in shape completion and path smoothing problems