-
1Step 1
Open the python script in the text editor of your choice.
-
2Step 2
You will find many variables at the start of the script you can change:
Rules:
rules['X'] = 'X+YF+' # Dragon curve
rules['Y'] = '-FX-Y'
axiom = 'FX'
angle = 90
Looking like these, you can write your own or uncomment the ones already there.
iterations = 13 # number of iterations
step = 9 # step size / line length
Here you can set the number of iterations and the length of one step. Don't go too low on the step-size and too high on the iterations.
color1 = (105, 46, 26) # brown 1
color2 = (201, 146, 127) # brown 2
color3 = (101, 250, 52) # green
color4 = (255, 255, 255) # white
angleoffset = 90
size = width, height = 1920, 1080 # display with/height
Here you can set the 4 colors (currently set to tree like ones), the angle by which everything is turned and the screen-size.
# startpos = 100, height - 225
# startpos = 50, height / 2 - 50
startpos = width / 2 - 200, height / 2 +30
# startpos = 100, height / 2
# startpos = 10,10
Last one, here you can set the offset on the display
-
3Step 3
You have to play with all that settings to get the best result. Also try different production rules. If you have/find some interestiong ones, share them please :)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.