I think that there also is an issue with the trace of the polar function. It should trace the line in the (x pos, y pos) quadrant, then (xpos,yneg), to (xneg, yneg) and finally the (xneg, ypos) quadrant.
That is the concept behind these plots which led to understanding the travel of bodies in space. IF you fiddle the function to be r = sin(4*theta), you get the plot like the Wolfram plot.
Conceptually, there seems to be an issue plotting polar plots, even on a polar figure, and ending with cartesian co-ordinates. I suspect that the abs call on f sorts the problem but obscures that you are plotting the reversed r value, making this a discontinuous function, which it is not.
In terms of the movement of bodies relationship, it seems would be analogous to reversing gravity!!