From:http://f.dataguru.cn/thread-12544-1-1.html
Thanks for@chenwan
###主函数
butterfly <- function(t, color = “red”)
{ x <- sin(t)*(exp(1)^cos(t)-2*cos(4*t)-(sin(t/12))^5)
y <- cos(t)*(exp(1)^cos(t)-2*cos(4*t)-(sin(t/12))^5)
plot(x, y, type = “l”, col = color)
}
###Step1
t = seq(-pi, pi, 0.01)
butterfly(t)

###Step2
t = seq(-100*pi, pi, 0.01)
butterfly(t,col=”col”)




虽然还可以按照本身的爱好改换差异的颜色,这里给一点tips:

详细的操纵小我私家照旧不厌其烦地发起参考辉少(谢益辉)的书!
最后献上这个,与诸君分享!
The Butterflies.rar
