GithubHelp home page GithubHelp logo

mkleo / mandalas-colored Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aschinchon/mandalas-colored

0.0 2.0 0.0 9 KB

An R experiment about Voronoi tesselation to create colored mandalas

License: MIT License

Dockerfile 14.99% R 68.43% Shell 16.58%

mandalas-colored's Introduction

Mandalas Colored

After completing this experiment you will be able to create your mandalas and use colourLovers palettes to colour them. It maybe used as workshop to teach Voronoi tesselations, recursivity as well as ggplot. This is an example of what you can do:

Getting Started

Prerequisites

You will need to install the following packages (if you don't have them already):

install.packages("ggplot2")
install.packages("dplyr")
install.packages("deldir")
install.packages("colourlovers")
install.packages("rlist")

More info

A complete explanation of the experiment can be found at fronkonstin

Docker

You can also build a Docker image with dependencies, and package with rstudio for nice interactive viewing of the plots. The image is available on Docker Hub and if you clone the repository, you can also build the image. Feel free to skip this step and move to the next section - when you run the container and it's not found locally, it will be pulled from Docker Hub!

docker build -t vanessa/mandalas .

Interactive with RStudio

To run the container interactively to use rstudio, issue this command:

docker run -p 8787:8787 vanessa/mandalas --rstudio

You can then open your browser up to http://localhost:8787 and login with username rstudio and password rstudio. Open the file "mandalas_colored.R" in the file browser and have fun! The mandalas will appear in the Plot area in the upper right.

Run headless

If you want to run the container headless and save your mandala png to file, you can bind a folder to /data in the container to do this.

mkdir -p /tmp/outy
docker run -v /tmp/outy:/data vanessa/mandalas

You also can change any of the parameters to modify your mandala!

Here are the full set of options:

  • --iter: Number of iterations (depth)
  • --radius: Number of points
  • --points: Factor of expansion/compression
  • --outfile: The output file to save in /data. You should map the directory on your host to /data in the container to retrieve it.
docker run -v /tmp/outy:/data vanessa/mandalas --outfile pancakes.png

And here is how you can make a nice loop of them :)

for i in `seq 1 10`;
   do
       docker run -v /tmp/outy:/data vanessa/mandalas --outfile mandala-${i}.png
done 

Authors

Contributors

mandalas-colored's People

Contributors

vsoch avatar aschinchon avatar

Watchers

James Cloos avatar liuzhenghui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.