DAguirreAg/Dragon-curve-generator

Generates and draws a dragon curve depending on the folds requested

★ 1Forks 0PythonGitHub ↗Compare
dragon-curvefractalpython

README

Dragon-curve-generator

Generates and draws a dragon curve depending on the folds requested

Introduction

This repository contains a Python script to draw dragon curves. With it you can visualize how a “Dragon curve” will look after a specified amount of folds. I was inspired by the amazing video of Numberphile regarding this topic It worths having a look! For more info about the “Dragon curve” click here.

How to use

Just open the script and type the amount of folds you will like to visualize. Be aware that the amount of lines increases exponentially!! So try not to type a crazy number or it will crash your python shell.

Example

dragon curve with 3 folds dragon curve with 5 folds dragon curve with 9 folds

dragon curve with 11 folds dragon curve with 13 folds dragon curve with 16 folds

Future functionalities

In future versions I intend to add other curve plotting types as well as an animation function to see the transition from the previous fold to the next.

Requirements

You should install the following:

  • Python
  • Matplotlib
  • numpy

For Developers and coders!

I am aware that some parts could be optimized or are redundant for such small program. However I decided to make it as easy and simple as possible for anybody who is new to programming.

Contributors

DAguirreAg

Issues