Interpolation and Extrapolation is the answer. There are many interpolation techniques to calculate the co-ordinates of points for a given shape. Some of them are Lagranges interpolation, Newtons Forward Difference Interpolation, newtons Backward Difference interpolation etc.
Use these techniques for deciding the path of your tools. You can store your programs in EPROMS/FLASH ROMS or Battery Backed Static RAMs. The lathe can be controlled using microcontroller.