小仙女的七夕

heart1 = function(name) {
    t = seq(0, 60, len = 100)
    plot(c(-8, 8), c(0, 20), type = "n", axes = FALSE, xlab = "", ylab = "")
    x = -0.01 * (-t^2 + 40 * t + 1200) * sin(pi * t/180)
    y = 0.01 * (-t^2 + 40 * t + 1200) * cos(pi * t/180)
    lines(x, y, lwd = 4)
    lines(-x, y, lwd = 4)
    text(0, 7, "七夕节快乐", col = "red", cex = 2.5, family = "STKaiti")
    text(0, 4, name, col = "red", cex = 2.5, family = "STKaiti")
}

heart1(name = "尚孟尧")

相关