Code Monkey home page Code Monkey logo

genetic-fractals's Introduction

Genetic Fractals

A research tool studying the generation and evolution of aesthetically-pleasing fractals. It uses crowd-sourced testing along with observational patterns in the mathematical structure of attractor fractals to find optimal constants and equations.

This program is meant to be used in conjunction with Tyler Yates' Java Evolutionary GUI.

Genetic Fractals

Dependencies

Linux

    sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libpng-dev

OSX

    brew install freeglut3 glew libpng

You'll also need to install XQuartz if you're on a newer OSX version to pull in the X11 dependency.

Building

    run 'make' in root folder

If you have issues linking the AntTweakBar library on compilation, follow these steps:

For Linux:

    1. Manually run 'make' in libs/AntTweakBar/src/
    2. Add the libs/AntTweakBar/lib folder to your LD_LIBRARY_PATH

For OSX:

    1. Manually run `make -f Makefile.osx` in libs/AntTweakBar/src/

Usage

Rendering Mode

To open the single-fractal viewer with a randomized Clifford Attractor:

    ./aesthetics

You can also provide optional infix equation representations with vars {x,y,z}, consts {a,b,c,d}.

    ./aesthetics [ -p PRECISION POINTS] [EXPR_X EXPR_Y EXPR_Z EXPR_R EXPR_G EXPR_B]
    ./aesthetics -p 100000 "sin(-1.4 * y) + cos(-1.4 * x)" "sin(1.6 * x) + 0.7 * cos(1.6 * y)" "x" "x" "y" "z"

Controls:

  • f - Toggle Fullscreen
  • s - Save image to test.ppm

Image Save Mode

In addition to rendering mode, you can call the program to draw and save fractals offscreen with optional parameters:

    ./aesthetics -save [ -p PRECISION_POINTS ] [ -s WIDTH HEIGHT ] IMG_NAME EXPR_X EXPR_Y EXPR_Z EXPR_R EXPR_G EXPR_B

Kevin Yeh and Tyler Yates © 2013 (UT Freshman Research Initiative: Computational Intelligence)

genetic-fractals's People

Contributors

kyeah avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

genetic-fractals's Issues

Set aside an edge of the window for fractal selections

Allow users to select fractals from multiple generations and add them to a list on the side. Also keep track of selected fractals for each generation instead of globally, and keep them when producing a new generation (with history tree, create a parallel node with the same fractals but different selection booleans)

Implement Parsing of RGB Variables

Ran the program with the latest commit of C-Genetics and received the error:
Unable to parse character 'g' at position 30 in expression 'sin(1.8611627761312084/cos(x-g)_y)+0.7445142432870142_cos('1.1644862135176566*x)'

Don't hardcode constants at offset

Maybe make them the same as variables, or set them manually before calculation. This will also help in generating values only for constants that are used, and therefore printing out only constants that are used.

Persistent background

Allow persistent generator that waits for input, generates the image (calc points on new thread and add to queue for drawing), and outputs to stdout when finished.

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.