Nodebox Strings Tutorial, Randomized Zapfino Characters
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
Language
Nodebox Python
# '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.
Included in this Library
Lines
18
Viewable by Everyone
Sponsored Links
Add a Comment