Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djnavarro/flametree
Generative artwork that looks a bit like trees
https://github.com/djnavarro/flametree
Last synced: 2 days ago
JSON representation
Generative artwork that looks a bit like trees
- Host: GitHub
- URL: https://github.com/djnavarro/flametree
- Owner: djnavarro
- License: other
- Created: 2020-04-12T21:46:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-29T07:06:49.000Z (about 3 years ago)
- Last Synced: 2025-02-07T20:05:33.444Z (11 days ago)
- Language: R
- Homepage: http://flametree.djnavarro.net
- Size: 62.7 MB
- Stars: 164
- Watchers: 3
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
dev.args = list(bg = "#00000000"),
dpi = 300
)
```# Flametree
[](https://github.com/djnavarro/flametree/actions)
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=flametree)
[](https://app.codecov.io/gh/djnavarro/flametree)
[](https://r-pkg.org/pkg/flametree)Flametree provides a system for making generative art in R, written with two goals in mind. First, and perhaps foremost, art is inherently enjoyable and generative artists working in R need packages no less than any other R users. Second, the system is designed to be useful in the classroom: getting students to make artwork in class is an enjoyable exercise and flametree can be used as a method to introduce some key R concepts in a fun way. You can install the current version of flametree with:
``` r
install.packages("flametree")
```Alternatively you can install the development version of flametree with:
``` r
# install.packages("devtools")
devtools::install_github("djnavarro/flametree")
```Flametree is fairly flexible and produces art in several different styles. One example is shown here, other possibilities are described throughout the documentation.
```{r example, fig.width=8, fig.height=4}
library(flametree)# pick some colours
shades <- c("#1b2e3c", "#0c0c1e", "#74112f", "#f3e3e2")# data structure defining the trees
dat <- flametree_grow(time = 10, trees = 10)# draw the plot
dat %>%
flametree_plot(
background = "antiquewhite",
palette = shades,
style = "nativeflora"
)
```