Giter Site home page Giter Site logo

maciejstanek / collatz Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.82 MB

Generate images based on Collatz conjecture trees

Home Page: https://www.youtube.com/watch?v=LqKpkdRRLZw

License: Do What The F*ck You Want To Public License

Makefile 0.90% C++ 91.03% Shell 8.08%
numberphile collatz visualization

collatz's Introduction

Collatz conjecture visualization

This project is all about reproducing somthing similar to the visualization of the Collatz conjecture presented at Numberphile YouTube channel.

Alt

Usage

make
./collatz 8000 0.85 -0.35 5 30 16 20
eog out.png

collatz's People

Contributors

maciejstanek avatar

Watchers

 avatar  avatar

collatz's Issues

Reduce unnecessary calculations for overlapping branches

Reduce unnecessary calculations for overlapping branches. This might be done by finding common prefixes of the generated sequences.

Issues to resolve before:

  • Bezier curves are probably not the best idea;
  • I would have to probably figure out where this shortened branch should be attached. Maybe I will save at each segment its position and then I will run a DFS on it.

Unwanted size limit

The method of generating images via a shell script comes with some unwanted consequences - there is a limit of the command length in bash. As a result, a script generating a tree of 9000 branches cannot be rendered.

Solution: split generation process into steps of approximately 1000 commands and use intermediate image files. This could allow for even adding some kind of progress bar.

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.