$ python3.10 dragon.py 10
┌─┐ ┌─┐ ┌─┐ ┌─┐
┌─┼─┼─┼─┘ ┌─┼─┼─┼─┘
└─┘ └─┼─┐ ┌─┐ └─┘ └─┼─┐ ┌─┐
┌─┼─┼─┼─┘ ┌─┼─┼─┼─┘
┌─┐ ┌─┐ ┌─┼─┼─┼─┼─┐ ┌─┐ ┌─┼─┼─┼─┘
┌─┼─┼─┼─┼─┘ └─┼─┼─┘ └─┼─┼─┼─┼─┼─┘
└─┘ └─┼─┼─┐ └─┼─┐ └─┼─┼─┼─┼─┐ ┌─┐
┌─┘ └─┘ └─┘ ┌─┼─┼─┼─┼─┼─┼─┘
┌─┼─┐ └─┼─┼─┼─┼─┼─┘ ┌─┐ ┌─┐
┌─┼─┼─┘ ┌─┼─┘ └─┼─┘ ┌─┼─┼─┼─┘
└─┘ └─┐ ╶─┐ └─┼─┐ └─┐ ┌─┐ └─┘ └─┼─┐ ┌─┐
┌─┼─┐ ┌─┘ └─┘ ┌─┼─┼─┘ ┌─┼─┼─┼─┘
└─┘ └─┘ └─┼─┼─┐ ┌─┐ ┌─┼─┼─┼─┘
┌─┐ ┌─┼─┼─┼─┼─┼─┼─┼─┼─┘
└─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┐ ┌─┐
┌─┐ ┌─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘
└─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘ └─┘ └─┘
┌─┼─┘ └─┼─┼─┼─┼─┼─┘
└─┼─┐ └─┼─┼─┼─┼─┐ ┌─┐
└─┘ ┌─┼─┼─┼─┼─┼─┼─┘
└─┼─┘ └─┘ └─┘
┌─┐ ┌─┐ ┌─┐ ┌─┘
└─┼─┐ └─┼─┐ └─┼─┼─┐ ┌─┐
┌─┐ ┌─┼─┼─┐ ┌─┼─┼─┐ ┌─┼─┼─┼─┼─┘
└─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘ ┌─┐ ┌─┐
┌─┼─┘ └─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘ ┌─┼─┼─┼─┘
└─┼─┐ └─┼─┼─┼─┼─┼─┼─┼─┼─┐ ┌─┐ └─┘ └─┼─┐ ┌─┐
└─┘ ┌─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘ ┌─┼─┼─┼─┘
└─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┐ ┌─┐ ┌─┼─┼─┼─┘
┌─┐ ┌─┐ ┌─┐ ┌─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘
└─┼─┐ └─┼─┐ └─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┐ ┌─┐
┌─┐ ┌─┼─┼─┐ ┌─┼─┼─┐ ┌─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘
└─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘ └─┘ └─┼─┼─┼─┼─┘ └─┘ └─┼─┼─┼─┼─┘ └─┘ └─┘
┌─┼─┘ └─┼─┼─┼─┼─┼─┘ ┌─┼─┼─┼─┘ ┌─┼─┼─┼─┘
└─┼─┐ └─┼─┼─┼─┼─┐ ┌─┐ └─┘ └─┼─┐ ┌─┐ └─┘ └─┼─┐ ┌─┐
└─┘ ┌─┼─┼─┼─┼─┼─┼─┘ ┌─┼─┼─┼─┘ ┌─┼─┼─┼─┘
└─┼─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘
┌─┐ ┌─┘
└─┼─┼─┐ ┌─┐
┌─┐ ┌─┼─┼─┼─┼─┘
└─┼─┼─┼─┼─┼─┘
┌─┼─┘ └─┼─┘ ┌─┐
└─┼─┐ └─┐ ┌─┐ ╵ └─┐
└─┘ ┌─┼─┼─┘ ┌─┘
└─┼─┼─┐ ┌─┐ ┌─┼─┐
┌─┼─┘ └─┼─┼─┘ └─┘
└─┼─┐ └─┼─┐
└─┘ └─┘
$ python3.10 dragon.py --help
usage: dragon.py [-h] [--turns-only] [--x-step X_STEP]
[--y-step Y_STEP] [--initial-direction {R,D,L,U}]
DEPTH
Draw a dragon curve.
positional arguments:
DEPTH Depth of the dragon curve to generate
options:
-h, --help show this help message and exit
--turns-only Instead of drawing the curve, output the turns
necessary for cli-draw to draw the curve
(default: False)
--x-step X_STEP, -x X_STEP
The number of columns a single x-axis step
takes. (default: 2)
--y-step Y_STEP, -y Y_STEP
The number of lines a single y-axis step
takes. (default: 1)
--initial-direction {R,D,L,U}, -d {R,D,L,U}
The starting direction of travel. (default: R)
-
Notifications
You must be signed in to change notification settings - Fork 0
Dragon Curve generator
License
angus-lherrou/dragon
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Dragon Curve generator
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published