Skip to content

Instantly share code, notes, and snippets.

@k16shikano
Last active June 6, 2018 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k16shikano/9b09c54e0d6490b82625fdef2ea212dd to your computer and use it in GitHub Desktop.
Save k16shikano/9b09c54e0d6490b82625fdef2ea212dd to your computer and use it in GitHub Desktop.
%!
<< /PageSize [520 520] >> setpagedevice
/setrandcolor {
/m exch .1 add def
/r1 {rand 5 mod 1 div m add} def
/r2 {rand 3 mod 3 div m add} def
/r3 {rand 3 mod 3 div m add} def
r1 r2 r3 setrgbcolor
} def
/f {% def
dup dup dup dup dup
6 mod 0 eq {(ゆ) 6 1 roll -1 0 rmoveto} if
6 mod 1 eq {(き) 5 1 roll -4 0 rmoveto} if
6 mod 2 eq {(だ) 4 1 roll -4 0 rmoveto} if
6 mod 3 eq {(る) 3 1 roll -4 0 rmoveto} if
6 mod 4 eq {(ま) 2 1 roll -4 0 rmoveto} if
6 mod 5 eq {(☃) -6 0 rmoveto} if
} def
/screw { % def
6 1 120 { % for
/i exch def
/v { i i mul i mul 0.0003 mul } def
/w { i 3 add 2.8 div } def
/d { -360 w mul 2 3.1415 mul 45 mul div } def % -360w/(2pi*50)
d rotate
/HiraKakuPro-W3-UniJIS-UTF8-H findfont
2 w mul scalefont setfont
v 0 rmoveto
0.001 setrandcolor
i f show
} for
} def
200 200 translate
135 rotate
0 0 moveto
screw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment