Code Monkey home page Code Monkey logo

turtle's Introduction

Turtle

A Generative Art tool in Rust!

This was inspired by Isaacg1's Programatically Generated Artwork .

Build & Run

Installation via cargo

Make sure you have Rust and Cargo installed.

Install this project on any platform using Cargo:

$ cargo install --git https://github.com/wcygan/turtle

How to run

$ turtle -s <size> -n <name> -p <pattern>

Options

The program options that can be used:

Option Usage Example
-s Number of pixels, N, to create an N x N image -s 10
-r Seed used to initialize a pseudorandom number generator -r 1234
-n Name of the output file -n foo
-p Image pattern to use -p square
-x Imaginary part of a complex number -x -0.55
-y Real part of a complex number -y 0.53
-i Number of times to executed iterated algorithms -i 105

Output Examples

Mandelbrot Set

$ turtle -n mandelbrot-fractal -p mandelbrot-fractal -s 8000 -x -0.5 -y 0.5 -i 104

Julia Set

$ turtle -n julia-fractal -p julia-fractal -s 3000 -x -0.55 -y 0.53 -i 105

Squiggly

$ turtle --pattern squiggly --name bar --size 1500

Julia Weird

$ turtle -n julia-weird -p julia-weird -s 8000 -x -0.596 -y 0.555 -i 60

Blobs

$ turtle --name blobs --pattern blobs --rng 14415323423445943 --size 3000

Airbrush

$ turtle --pattern airbrush --name airbrush --size 2000

Tree

$ turtle --size 2000 --pattern tree --rng 12 --name tree

Diamond

$ turtle --size 1000 --name diamond --pattern diamond --rng 124331

Snowflake

$ turtle --size 1000 --name snowflake --pattern snowflake --rng 12494213

Pixels

$ turtle --name pixels --size 2000 --pattern pixels

Square

$ turtle --size 350 --name square --pattern square --rng 2121

Circle

$ turtle --size 350 --name circle --pattern circle --radius 99479

Dependencies

  • clap to parse commands
  • image to create images
  • rand to generate pseudorandom numbers
  • rayon to parallelize execution
  • num-complex for complex math'

Directory Tree

$ tree
.
├── Cargo.lock
├── Cargo.toml
├── examples
│   ├── airbrush.png
│   ├── blobs.png
│   ├── circle.png
│   ├── diamond.png
│   ├── julia-fractal.png
│   ├── julia-weird.png
│   ├── mandelbrot-fractal.png
│   ├── pixels.png
│   ├── snowflake.png
│   ├── square.png
│   ├── squiggly.png
│   └── tree.png
├── readme.md
└── src
    ├── algorithms
    │   ├── airbrush.rs
    │   ├── blobs.rs
    │   ├── circle.rs
    │   ├── diamond.rs
    │   ├── julia_fractal.rs
    │   ├── mandelbrot_fractal.rs
    │   ├── mod.rs
    │   ├── pixels.rs
    │   ├── snowflake.rs
    │   ├── square.rs
    │   ├── squiggly.rs
    │   └── tree.rs
    ├── arguments.rs
    ├── dispatcher.rs
    └── main.rs

turtle's People

Contributors

wcygan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

turtle's Issues

Gradients?

Great tool, @wcygan!

Do you know how to create a gradient algo to product something like this?

image

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.