Recently I've been looking at Povray, pyprocessing, and cfdg (version 3.0) as tools for creating digital images. I have branched two separate blogs where I mainly explore jruby + processing and processing.py

Monday, 16 August 2010

Triple Spiral Another Ypsilon Scheme Context Free Sketch

Another example by Sordina translated to Ypsilon Scheme context free DSL.
   1 ;triple_spiral.sps
   2 ;After Triple Spiral
   3 ;By Sordina
   4 ;
   5 
   6 (import (rnrs)
   7         (psilab cfdg core)
   8         (psilab cfdg rule))
   9 
  10 (rule triple
  11    (1 (spirals 
  12       (brightness 1)
  13       )
  14    )
  15 )
  16 
  17 (rule spirals
  18    (1 (spiral)
  19       (spiral 
  20       (x 5)
  21       )
  22       (spiral 
  23       (y (* (sin 45) 5))
  24       (x (* (cos 45) 5))
  25       )
  26     )
  27 )
  28 
  29 (rule spiral
  30    (1 (circle)
  31       (spiral       
  32       (scale 0.99999)
  33       (y 0.1)
  34       (rotate 0.1) 
  35       (brightness -0.00005)
  36       )
  37    )
  38 )
  39 
  40 (init-cfdg)
  41 
  42 (background (brightness 1)) 
  43 
  44 (bounds -117 3 -60 60)
  45 
  46 (start-shape triple) 
























Here's a little bash script I created to simplify the input, and to automate the displaying of the image:-
   1 #!/usr/bin/env bash
   2 SPS=sps
   3 PNG=png
   4 LIMIT=256
   5 filename=$1
   6 outfile=${filename%.$SPS}.$PNG
   7 /usr/local/bin/ypsilon --heap-limit $LIMIT $filename --out-file $outfile
   8 feh $outfile

Interestingly I've used 45 in place of 60 degree angle in Sordina cfdg version, yet the result is more similar to the cfdg art, than when I used 60 degrees.

1 comment:

  1. Hi monkstone.

    I'm Sordina. I made this to explore the idea of using graphical artifacts creatively.

    I was wondering if you had seen http://worrydream.com/LadderOfAbstraction/ or any of the other presentations by Bret Victor. I feel that having this kind of interactive abstracted parametisation available during development would be very beneficial for finding artistically interesting constants. Unfortunately I haven't seen anything that can accomplish this that is quick to get up and running, cross-platform, and flexible.

    I love the blog. A total treasure-trove.

    ReplyDelete

Followers

Blog Archive

About Me

My photo
Pembrokeshire, United Kingdom
I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2