From 1bcaa626e02873f29e10e1a35c62b246b2ef557f Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Date: Tue, 27 Jul 2021 05:12:21 -0400 Subject: [PATCH] Got a basic animation working. --- .../2021-07-23-our-new-digital-home/index.Rmd | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/content/articles/2021-07-23-our-new-digital-home/index.Rmd b/content/articles/2021-07-23-our-new-digital-home/index.Rmd index 79dbb5b..c5ad082 100644 --- a/content/articles/2021-07-23-our-new-digital-home/index.Rmd +++ b/content/articles/2021-07-23-our-new-digital-home/index.Rmd @@ -127,15 +127,10 @@ plot(x, smooth_pulse(x, start = 0.2, stop = 0.3, cycle = 0.5), xlim = c(0,2), Lets make it animated too... -```{r} -library(animation) -desc = c("This is a super cool example of Gradient Descent") -saveHTML({ - f1 = function(x, y) x^2 + 3 * sin(y) - xx = grad.desc(f1, pi * c(-2, -2, 2, 2), c(-2 * pi, 2)) - - xx$persp(col = "lightblue", theta = 30, phi = 30) -},title = "Demo of Gradient Descent", description = desc, verbose = FALSE) +```{r, animation.hook="gifski"} +for (i in 1:32) { + pie(c(i %% 32, 6), col = c('red', 'yellow'), labels = NA) +} ``` ## Block quotes -- GitLab