GCode does straight lines and circles.
Having said that you can do any shape at all, what you have to do is control the axis yourself.
This can be done by a Macro. These are written in Visual Basic (there is a tutorial video) and the full syntax is available.
There would be several ways of doing it.
e.g. for x = 1 to 100 (assuming mm) then
xa = x
ya = (whatever the equation is)
CODE (g1 x) & xa &(y) & ya
The Visual Basic runs in advance of the GCode and will write 100 lines of code giving G1 X*Y* instructions for positions of x = 1 to 100
You cold write an even more complicated one using g2 or g3 commands, having worked out the diameter of the elipse at that point - thus having the elipse in a series of arcs instead on straight lines.