Page 1 of 1

a little help ...

Posted: Sat Nov 04, 2006 12:07 pm
by Blu3
here is the code that I was fiddling with:

Code: Select all

startshape foo

rule foo {
		SQUARE { }
		foo {y -1 s .999 r -.1}
}
..it gave me a curved line, but when I changed the size to 1 ...

Code: Select all

startshape foo

rule foo {
		SQUARE { }
		foo {y -1 s 1 r -.1}
}
it gave me a circle. why? And if I tell it not to rotate:

Code: Select all

startshape foo

rule foo {
		SQUARE { }
		foo {y -1 s 1}
}
it creates a line & then disappears. can someone explain to me what's going on?

Posted: Sat Nov 04, 2006 6:43 pm
by mtnviewmark
The first code is actually drawing part of a spiral. Change the size value to 0.99995 to see this. What is happening is each recursion of foo is drawn a little smaller, and so the distance ("y 1") on each recursion is a little less each time. As it curves, as it is going less each time, the curve makes an inward spiral.

The second example makes a circle as the size stays constant each recursion. So, the example draws a many many sided regular polygon. The example, as you no doubt know, recurses forever.

The last example draws an infinte line. Each recursion draws a square just south of the last. This keeps going forever. As the drawing progresses, you see the line get thinner and thinner as the camera "pulls back" to show you the ever expanding line. Eventually, the line is so thin there is nothing to draw. It is all less than 1/3 of a pixel. Hence, you don't see anything.

Posted: Sun Nov 05, 2006 10:10 am
by MtnViewJohn
Blu3, is your avatar created in Context Free? It looks cool.

Posted: Sun Nov 05, 2006 9:06 pm
by Blu3
Ok thanks, I thought I was doing something wrong.

I did create my avatar in Context Free, color & all ... I only wish that I could've made it bigger so you can see it a little better.

This program is great! :D

btw I have version 2.0beta v9, is that the latest version for windows?

Posted: Sun Nov 05, 2006 10:52 pm
by MtnViewJohn
You should register on the cfdg gallery site and post your avatar design there.

2.0beta v9 is old. The latest release version is 2.0 v12. The latest beta version is 2.1beta. 2.1beta adds a tiling capability that allows you to create repeating cfdg images for desktop or web backgrounds of 3D object textures.