GithubHelp home page GithubHelp logo

fractals's Introduction

fractals

Generate fractals with Iterated Function Systems (IFS).

How to run:

Make sure to install dependencies (node-gd) first with npm install. Then, run node run.js FILE_NAME in terminal, where FILE_NAME is the name of the file containing the iterated function system.

Definition:

IFS stands for "Iterated function sequence." It is a finite set of contraction mappings.

Explanation:

A contraction mapping is a function f of metric spaces f: X -> X with the property that there is a 0 ≤ k < 1 such that d(f(x),f(y)) ≤ k*d(x,y) for all x and y in X. d refers to the distance (metric) function. The idea here is that each time f is applied to the metric space X, the image of f is "smaller" than it was previously, i.e. it has contracted.

Contraction maps are the basis for storing fractal representations. An IFS contains a finite set of contraction mapping, often represented in the form a b c d e f p where a through f are coefficients of a linear map and p is the probability that this particular map in the IFS will be applied next. If p is omitted, the distribution is assumed to be uniform.

Given a function f in our IFS, it sends a point (x,y) to the point (ax + by + e, cx + dy + f). This point is then run through the IFS again. This process is repeated a given number of times and produces a fractal.

Relevant Links:

fractals's People

Contributors

royhowie avatar

Stargazers

Thom Bakker avatar

Watchers

 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.