Coder Social home page Coder Social logo

frac-gen's Introduction

FracGen

Simple fractal (and more) generator.

Prerequisites

To compile FracGen you will need the following:

  • GNU make
  • Any C++ compiler supporting C++17 standard
  • libMagick++ (version 6)
  • Ruby (tested on 2.3.0)

How to run

Just clone sources to some directory and try ./frac-gen.rb. Probably you will need to change interpreter version in frac-gen.rb (first line) and compiler (CXX) in Makefile. When this is done frac-gen will generate first expression and start to build FracGen to calculate image. Then FracGen will draw image and place it in Images/{seed}_{method} subdirectory. If frac-gen succeed to generate first image then it will work for every other mode.

How to reproduce image using configuration file

To reproduce image you should get a configuration file with parameter values and expression. Once you have this file run frac-gen with following commang ./frac-gen.rb --config=<configuration file>. Also you can specify output directory. If latter is not specified frac-gen will create directory in Images named this way: <expr_num>_<method>_reproduce.

Supported options

frac-gen.rb has some options to control what method is used, how it is used and how expressions are generated. Current list of options:

  • --help -- contains the most recent version of list of options. This readme is not always updated.
  • --seed=NUM -- use specified seed for expression generation.
  • --expr=expression -- generate image for specified expression.
  • --out-dir=DIR -- put images in specified directory.
  • --method=method -- use specified method for generation. List of available methods can be seen in frac-gen.rb (starting from line 26).
  • --disable-conditionals -- generate only simple expressions without ternary operators.
  • --with-abs=NUM -- generate functions of the form |fn| = NUM.
  • --diff-exp=EXPR -- considered to be derivative of expression specified in --expr parameter.

Known issues

GCC can hang while compiling some mathematical expressions.

frac-gen's People

Contributors

illogicalmagic avatar

Stargazers

 avatar

Watchers

 avatar  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.