I make a picture of rosette leaves of the Arabidopsis.
> t<-c(1:3600)
> u<-2*pi*t/3600
> x<-sin(u*9)
> y<-x*(cos(u))
> z<-x*(sin(u))
> plot(y,z,col="darkgreen")
If you change the number in the 3rd line, the leaf number will be changed.
(note; you should put the odd number, e.g. x<-sin(u*5)
# function(n){ }
Try the following script.
> leaves<-function(n){
+ t<-c(1:3600)
+ u<-2*pi*t/3600
+ x<-sin(u*n)
+ y<-x*(cos(u))
+ z<-x*(sin(u))
+ plot(y,z,col="darkgreen")
+ }
> leaves
you can see the script.
Then, type this.
> leaves(7)
Command +"N".
Type (or copy&paste) your script in the text.
Save as your favorite filename.
Next time you can open the file on R.
> source("/Users/..../..../XXX.R")
I attached an example file here, leaves.R.
leaves<-function(n){
if (n%%2 == 0) n<-n+1
t<-c(1:3600)
u<-2*pi*t/3600
x<-sin(u*n)
y<-x*(cos(u))
z<-x*(sin(u))
plot(y,z,col="darkgreen")
}