Giter Club home page Giter Club logo

paperdragon's Introduction

paperDragon

Dragon curve from paper folding sequence

Dragon curves, the binary paper folding sequence , actual paper folding.

Which is pretty easy to fold the wrong way.

I have made this curve using L-systems before, this time I have made it with the binary paper folding sequence. This is the 12th iteration and it is a binary number with 4095 digits.

If it is a "1" the turtle goes left, if "0" the turtle goes right.

I read Jurassic park, I didn't remember this curve was in the book. Some good Numberphile videos about it too.

I am not generating the paper folding sequence in the sketch.

I have the paper folding sequence for the 12 iteration which has 4095 binary digits.

I can get any level from one to 12 by taking (2^N)-1. The paper folding sequence for level 3 is (2^3)-1 = 7 digits long.

see it live:

https://greggelong.github.io/paperDragon

the level is mapped to the mouse X movement

nice quote about fractals from the fictional character Ian Malcom:

A day is like a whole life. You start out doing one thing, but end up doing something else, plan to run an errand, but never get there... And at the end of your life, your whole existence has that same haphazard quality, too. Your whole life has the same shape as a single day.โ€ โ€• Michael Crichton, Jurassic Park

I found these resources the most helpful: https://mathworld.wolfram.com/DragonCurve.html wolfram has a list of references, and a description of a simple method to create the paper folding sequence. https://larryriddle.agnesscott.org/ifs/heighway/heighway.htm Check out Larry Riddles page he has a really informative discussion of this and other fractals. And even more references to articles! #creativecoding #p5js #JavaScript #fractal #recursion #dragoncurve

paperdragon's People

Contributors

greggelong avatar

Watchers

James Cloos 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.