Skip to content

gvegayon/twinkle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twinkle

Motivated by @ikashnitsky, who shared the snowflakes he made for his 3yo daughter, I created this R package that does something similar with one of Mateo's, my 2yo, favorite things, stars :).

Install

To install it you can use devtools

devtools::install_github("gvegayon/twinkle")

Example

This is a basic example which shows you how to solve a common problem: drawing a sky full of stars

library(twinkle)
set.seed(1)
twinkle()

If you don't like the tails, then set tail = 1

set.seed(1)
twinkle(tail = 1)

If You want to get more curvy tails, just change the deg_to option

set.seed(1)
twinkle(deg_to = pi, deg_from = 0)

You can also play with the colors

set.seed(1)
twinkle(
  tail = 300,
  col_decay_rate = 5,
  deg_to   = pi/2,
  deg_from = -pi,
  bg   = blues9[6],
  cols = c("lightyellow", "steelblue", "lightblue")
  )

Releases

No releases published

Packages

No packages published

Languages