You should be automatically redirected . If not, visit
http://newlisper.wordpress.com
and update your bookmarks.

18/10/2006

Noodling around

Just noodling around today. Then I shall be away for a few weeks. But all I have to say is: noodles.

Would you like some source with that, sir?


#!/usr/bin/newlisp

(set 'buffer "")
(define (ps str)
 (write-line str buffer))
(define (render)
 (write-file 
  (string (env "HOME") "/Desktop/noname.ps")
   (append [text]%!PS-Adobe-3.1
%%Creator: newLISP
[/text] buffer "showpage" "\r\n"))
 (exec (string "open "(env "HOME") "/Desktop/noname.ps")))

(seed (date-value)) ; randomnessity

(ps (format {gsave 0.7 setgray /Eurostile findfont 
   600 scalefont setfont 
   30 20 moveto (Q) show 
   grestore}))

(ps (format {1 setlinecap 
   10 setlinewidth 
   %f %f %f setrgbcolor} 0.6 0.6 0.8))

(for (c 1 70)
 (map set '(x1 y1 x2 y2) (random (random 50 30) 300 4)) ; start and end
 (map set '(b1x b1y b2x b2y) 
  (random (random 40 120) (random 60 350) 4)) ; bulgy
 (ps { newpath })
 (ps (format {1 setlinecap 
  11 setlinewidth 
  %f %f %f setrgbcolor} 0.7 0.7 (random 0.6 0.1))) ; back
 (ps (format {%f %f moveto} x1 y1))
 (ps (format {%f %f %f %f %f %f curveto stroke} b1x b1y b2x b2y x2 y2))
 (ps (format {1 setlinecap 9 setlinewidth %f %f %f  setrgbcolor} 
  0.8 0.8 0.5)) ; middle
 (ps (format {%f %f moveto} x1 y1))
 (ps (format {%f %f %f %f %f %f curveto stroke} 
  b1x b1y b2x b2y x2 y2))
 (ps (format {1 setlinecap 
  8 setlinewidth %f %f %f setrgbcolor} 0.95 0.95 
   (random 0.8 0.1))) ; front
 (ps (format {%f %f moveto} x1 y1))
 (ps (format {%f %f %f %f %f %f curveto stroke} 
  b1x b1y b2x b2y x2 y2)))
(render)
(exit)

3 Comments:

At 16:06, Blogger don Lucio said...

Delicous, can't wait to make my own dish.

ps: where is the tomato sauce?

 
At 21:53, Anonymous Bob said...

Ah.. don Lucio, this dish seems to be based on buttery alfredo sauce!

Yum!

 
At 09:49, Anonymous Anonymous said...

Daaaaamn, nicca.

 

Post a Comment

Links to this post:

Create a Link

<< Home