Create motion curve.m