Trinity-Automata-Research / dsmodels

The dsmodels domain-specific-language for visualizing dynamical systems in R.
http://www.cs.trinity.edu/~sfogarty/dsmodels/index.html
GNU General Public License v2.0
7 stars 0 forks source link
chaos-theory discrete-mathematics domain-specific-language dynamical-systems internal-dsl r r-language r-package visualization

dsmodels

CRAN_Status_Badge Contact: cstein1@trinity.edu , sfogarty@trinity.edu

dsmodels is an expressive language for visualizing and analyzing two-dimensional dynamical systems. Scripts are built from a model encapsulating the dynamical system, to which other objects are composed. Components include: visualization of the entire range; user-defined curves and points; iterated images with color gradiants; and colored regions. The language can also approximate attractors and their basins through simulation.

library(dsmodels)
model <- dsmodel(function(x,y) {
  list( x*exp(2.6-x-6.45/(1+4.5*x)),
        y*exp(2.6-y-0.15*x-6.25/(1+4.5*y)) )
})
model + dsrange(0:3,0:3,discretize = 0.1, frame.plot = FALSE, axes = FALSE)
model + dsarrows(head.length=0.15)
model + simattractors() + simbasins(discretize = 0.01)
Visual generated by example code

Installation

To install dsmodels, simply type into your R console the following line:

 install.packages("dsmodels") 

To install the latest version (1.1) from GitHub:

  # install.packages("devtools")
  devtools::install_github("Trinity-Automata-Research/dsmodels")


Documentation for dsmodels.

Citation

Please use this Bibtex entry to cite dsmodels:

@inproceedings{steinfogarty2018dsmodels,
  title={dsmodels: A Little Language for Dynamical Systems},
  author={Stein, Charles and Fogarty, Seth},
  booktitle={Proceedings of the Real World Domain Specific Languages Workshop 2018},
  pages={3},
  year={2018},
  organization={ACM}
}