Hide
Siafoo – the intersection of pastebin, help desk, version control, and social networking Join Siafoo Now or Learn More

Nodebox Strings Tutorial, Randomized Zapfino Characters Atom Feed 2

In Brief An example from the Nodebox Strings tutorial section, showing what good times can be had by tossing a jumble of randomly selected characters onto a canvas.... more
# 's
 1#Zapfun
2
3size(400,400)
4
5fill(0.2)
6rect(0,0,WIDTH,HEIGHT)
7
8fill(1)
9stroke(0.2)
10strokewidth(1)
11font('Zapfino')
12
13for i in range(80):
14
15 fontsize(random(400))
16 rotate(random(360))
17
18 chars = 'absdefghijklmnopqrstuvwxyz'
19 p = textpath(choice(chars),
20 random(WIDTH),
21 random(HEIGHT))
22 drawpath(p)

An example from the Nodebox Strings tutorial section, showing what good times can be had by tossing a jumble of randomly selected characters onto a canvas.

Due to the stochastic component in this code, your output will most likely vary from the example shown here.

http://www.siafoo.net/image/87

Comments

over 7 years ago (14 Jan 2009 at 09:59 PM) by Stou S.
Wow this is so cool. It looks like graffiti