moved curve drawing to a function in the bexier animation class