1startshapenautilus

2background{b-1}

3rulenautilus{

4 shell{r-20hue360sat1b1}

5 septa{r-20hue220sat1b1}

6}

7

8ruleshell{

9CIRCLE{}

10 shell{r0.50x0.25size0.9985}

11}

12

13rulesepta{

14 divider{r30}

15 septa{r50.5size0.859x20.7y9.3}

16}

17

18ruledivider{

19 485*{r0.15x0.05size0.9999}

20CIRCLE{size.2}

21}

And here is the result which is quite satisfying, with the width of the shell increasing in a natural way (except the way cfdg works it is decreasing in a natural way, infinite recursion is terminated when the size of an element (circle here) falls below a certain value), something that my 'processing' version did not do, I might take a look at that code to and see what I can do there. Also for once there is a bonus in my jedit highlighting mode being unable to differentiate between a size directive and a size as in scale, the blue highlighting makes it really stand out!!!

I experimented with these rules by first removing the rotation from the shell rule, what this does is to essentially unwind the shell spiral. So the size adjustment doesn't seem so be so important (other than to kill the infinite recursion), however on further experimentation using a constant size CIRCLE you only get a circle not the spiral, so you do need all three adjustments:-

1startshapenautilus

2background{b-1}

3rulenautilus{

4 shell{r-20hue360sat1b1}

5 septa{r-20hue220sat1b1}

6}

7

8ruleshell{

9CIRCLE{}

10 shell{x0.25size0.9985}

11}

12

13rulesepta{

14 divider{r30}

15 septa{r50.5size0.859x20.7y9.3}

16}

17

18ruledivider{

19 485*{r0.15x0.05size0.9999}

20CIRCLE{size.2}

21}

Rule modified to give constant shell thickness (with low probability rule to prevent inifinite recursion

1startshapenautilus

2background{b-1}

3rulenautilus{

4 shell{r-20hue360sat1b1}

5 septa{r-20hue220sat1b1}

6}

7

8ruleshell 0.001{}// empty rule to prevent infinite recursion

9

10ruleshell{

11CIRCLE{}

12 shell{r0.5x0.25}

13}

14

15rulesepta{

16 divider{r30}

17 septa{r50.5size0.859x20.7y9.3}

18}

19

20ruledivider{

21 485*{r0.15x0.05size0.9999}

22CIRCLE{size.2}

23}

That is lovely!

ReplyDeleteGlad you like it, I can't take much credit for it though, plenty more impressive stuff to be found over at the context free gallery.

ReplyDelete