Generates sine and cosine functions from an arbitrary figure.