Skip to content

Instantly share code, notes, and snippets.

@RobotGyal
Created May 3, 2020 15:08
Show Gist options
  • Save RobotGyal/bf3c3c0edf86b27b94aa261a1480f28d to your computer and use it in GitHub Desktop.
Save RobotGyal/bf3c3c0edf86b27b94aa261a1480f28d to your computer and use it in GitHub Desktop.
Cantor Fractal code for Processing.py
def setup():
size(500,500)
cantor(10, 20, width-20);
def cantor(x, y, len):
strokeWeight(3)
if len >=1:
line(x, y, x+len, y)
y+=20
cantor(x, y, len/3)
cantor(x+len*2/3, y, len/3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment