Some remarks:
Math.cos (and sin and tan) works with radians. So, line 25 and 26 might not do what you expect it to do.
Line 26 limits the values of r to the interval [-1, 1], and so, newX and newY are also limited to that interval. That mens that your drawings appear in the upper left corner of your panel, hardly to see.
In the code I pointed to yesterday, I did two things to get the effect: first, I set the origin of the panel to the midpoint of it, and second I draw the same ellips over and over, but between two ellipses I rotate a little.
If I do that here, and use ellipses for simplicity, then this is what I got:
and
Admitted, it looks not like a
rose, but it is a start.
Your idea is certainly interesting. Letting the angle go from 0 to PI, and setting r to say 200 * Math.sin(angle), and calculating x and y as if r and angle were polar coordinates. Such techniques give a lot of modelling possibilities. Another idea is to work with Path2D. Using Bezier curves might give nice leaves too. But to get something that looks like a rose, hmmm. Maybe the guys at DreamInCode have some ideas.