Hey its me again…
I’m trying to create a rose drawing using a for loop(compulsory) AKA a polar curve but i cant point out whats wrong with my code.(this is not an assignment this is personal study)
there are many formulas on wikipedia. If you find one that is interesting copy it down. It usually has a few parameters that have to be calculated. I suggest you go on youtube > the coding train > and search for a few drawing videos (a program draws a certain shape). Once you finish watching you should have at least a rough idea of how to do it!
I suck at it but yeah. Btw what was the formula for the rose?
the formula was already given and is written in the for loop, and thank you for the suggestion I’m a big fan of the coding train but none of the videos i saw really helped They were mostly basic shapes or whole drawing using ps5.js
thank you for this solution. i’d like some clarification on some aspects if you dont mind.
for instance, can i ask what the variable “br” is and why you multiplied 4 by theta in this line?
br = base r (radius). its so the code is shorter and more dynamic. * 4 is because the pattern wants it. (*4 makes 8 paddles. * 7 makes 14, 16 makes 32 (2n)