Matlab Code for cycloid curve generation