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

Wednesday, 5 August 2009

CFDG Size Directive

Over on the context free gallery clarknova published Nebula.cfdg, which looks pretty damn good, whilst you are there should take a look at the surreal meccano world. Anyway I thought I would like to see a bit more nebula and less space, so I tried adding the size directive as previously but again I did not get what I expected (even smaller nebula with size {s 300 300 x 0 y 0}).
Ever the pragmatist I tried a fractional value size {s 0.5 0.5 x 0 y 0}, processing this rule started promisingly, however in my gentoo environment with only 6 Gb free disk space I was soon running out of room. I settled for a smaller image with size{s 0.8 0.8 x 0 y 0} and got more or less what I was after. (NB if you do abort the program early do remember clear out your /tmp files, I use Conky to monitor resources on my gentoo box)

   1 startshape nebula
2 background {b -1}
3
4 size {s 0.8 0.8 x 0 y 0}
5 rule nebula {
6 5*{r 72} dust{a -0.995 sat 1 b 1 }
7 }
8
9 rule dust {
10 TRIANGLE{}
11 3*{r 120}dust{s 0.2 y .5 }
12 dust{ s 0.9 y 0.15 r 7.5 h 13}
13 }
14
15 rule dust {
16 SQUARE{}
17 4*{r 90}dust{s 0.2 y .5 }
18 dust{ s 0.9 y 0.25 r -15 h 13 sat .1}
19 }
20
21 rule dust {
22 CIRCLE{}
23 5*{r 72}dust{s 0.2 y .5 }
24 dust{ s 0.9 y 0.15 r -2.5 h 13 sat .1}
25 }
26
27 rule dust 0.0005 {
28 100*{s .99 a .001 sat -0.015}star{}
29 5*{r 72} dust{s 0.2 y .5 }
30 dust{ s 0.9 y 0.15 r -2.5 h 13}
31 }
32
33 rule dust{ dust{flip 180} }
34
35 rule star {
36 CIRCLE{s 0.75}
37 CIRCLE{s 0.1 3}
38 CIRCLE{s 3 0.1}
39 }


1 comment:

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