Fractal Snowflake Holiday Cards
Ever since I got out of college, I've sent out holiday cards. Originally, I'd just buy a nice set of cards, sign them, and send them out. Last year, however, my inner Martha Stewart caught hold. I wanted something clever that stood out amongst the generic store-bought cards, so I drew my own.
They were well received, so I'd like to make an annual tradition of self-made cards. And in keeping with that tradition, I made the second annual holiday card.
I had been mulling a couple of clever ideas over the last year, most of them involving photography around San Francisco. Unfortunately, San Francisco weather was cold and rainy the last few weeks before traveling home, so I put together a quick plan B -- a card with a picture not taken or drawn by me, but by the computer.
With the Koch snowflake as inspiration, I wrote a quick script that would draw a fractal snowflake. I wanted something small and elegant that made a complex and detailed drawing.

Of course, the source was printed on the inside.
They were well received, so I'd like to make an annual tradition of self-made cards. And in keeping with that tradition, I made the second annual holiday card.
I had been mulling a couple of clever ideas over the last year, most of them involving photography around San Francisco. Unfortunately, San Francisco weather was cold and rainy the last few weeks before traveling home, so I put together a quick plan B -- a card with a picture not taken or drawn by me, but by the computer.
With the Koch snowflake as inspiration, I wrote a quick script that would draw a fractal snowflake. I wanted something small and elegant that made a complex and detailed drawing.
#/usr/bin/python2.5Which made this snowflake, which I put on the cover of the card (with the invocation call,
import turtle
turtle.delay(0)
turtle.tracer(False)
def draw_line(len, rec=0, stay=False, turn=0):
pos, heading = turtle.position(), turtle.heading()
turtle.right(turn)
if (rec is 0):
turtle.forward(len)
else:
rec = rec - 1
step = len / 2
draw_line(step, rec, True)
draw_line(step * .75, rec, turn=60)
draw_line(step * .75, rec, turn=-60)
draw_line(step, rec , True)
if not stay:
turtle.goto(pos)
turtle.setheading(heading)
def draw_flake(rec):
turtle.setheading(90)
for turn in xrange(6):
draw_line(400, rec)
turtle.right(60)
turtle.done()
draw_flake(6)):
Of course, the source was printed on the inside.