An experiment in R to create pins in movement
An R experiment to create animated patterns made by pins in movement.
An example:
You will need to install the following packages (if you don’t have them already):
install.packages("tidyverse")
install.packages("data.table")
install.packages("gganimate")
Animations depend on three main parameters:
n_points
: Dimension of the grid (n_points
x n_points
)closeness
: Separation of consecutive pins between columns (in radians).speed
: Incremental angle to add in each frame to all pinsv_angles
: Initial arrange of pinsA complete explanation of the experiment can be found at fronkonstin
Animation is obtained thanks to gganimate
package, by Thomas Lin Pedersen,available here.
Antonio Sánchez Chinchón: