Calling Data
t <- seq(0,2*pi, by = 0.16)
x <- 16*sin(t)^3
y <- 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t)
d <- data.frame(x = x, y = y)
Part 1
d$color.cake = sample(colorspace::rainbow_hcl(20), nrow(d), replace = TRUE)
d$color.candle = sample(rainbow(20), nrow(d), replace = TRUE)
p2 <- ggplot(d, aes(x, y)) +
geom_cake(aes(color.cake = color.cake,
color.candle = color.candle),
size = .1) + theme_void()
p2 + annotate("text", x = 0, y = 0, label = "Happy birthday \n ...your name...",
colour = "red", size = 9)

Part 2
d$color.candle = sample(rainbow(5), nrow(d), replace = TRUE)
d$size = runif(nrow(d), 0.05, 0.1)
d$angle = runif(nrow(d), -360, 360)
p3 <- ggplot(d, aes(x, y)) +
geom_cake(aes(color.cake = color.cake,
color.candle = color.candle,
color.fire = color.cake,
size = I(size),
angle = angle)) + theme_void()
p3 + annotate("text", x = 0, y = 0, label = "Whole-heartedly from \n ...your hopes...",
colour = "red", size = 10)
