Use ggplot2 to draw like turtle in LOGO language.
1 |
1 2 3 | library(ggturtle)
a <- turtle_init(); for (i in 1:8) { a <- a %>% go_forward(100) %>% turn_right(135) }; a %>% turtle_draw("RP 8 [ FW 100, TR 135 ]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.