I've never made one, but one day........
I don't know if there is a mathematical formula for it, but I did used to use two small nails, a length of string and a pencil for marking out rough ellipses onto a piece of paper.
There must be a way of working out the distance between the pins and length of string to give you what you want exactly.
John