Click the green flag to play. Since Phosphorus no longer works, I guess I can't link it here... You can adjust the parameters "n" and "d" to change what's drawn on the screen. To toggle this display, press SPACE. Note if you use the slider, you need to click on the background for Scratch to register the SPACE input. As for why you'd want to use the sliders: n and d are the numerator and denominator of "k" respectively, where k is just a number. See notes for more details...
The way the project works is like this: The rose is plotted in polar co-ordinates. As you probably know, you can represent a position on the screen using an x and a y. But, did you know you can do the same using a radius and an angle? You measure the radius from the origin (0,0), and the angle anti-clockwise from the x-axis. So, (1,0) would be r=1, angle = 0. Then, (0, 1) --> r=1, angle = 90 degrees. In this project, the radius is determined using this equation: r = cos(r*angle), while the angle just goes from 0 to 360 degrees as usual to draw the entire rose. For n = d, k = 1 and you end up with a circle toward the right side of the screen. However, other values of k produce more interesting and rose-like roses, such as 2/9 (n = 2, d = 9). Finally, these can be translated into Cartesian (x-y) co-ordinates using the formulae x = r*cos(angle) and y = r*sin(angle). This yields (given that r = cos(k*angle)): x = cos(k*angle)*cos(angle); y = cos(k*angle)*sin(angle); Note that, if you're making a project like this yourself, the graph needs to be plotted from 0 to 2π*d, where d is the denominator. This confused me a lot and I struggled to implement the whole thing until I realised it had to do a full "turn" d times.