GPU Optimization and Performance Analysis of a 3D Curve-Skeleton Generation Algorithm