CF::MaxNatural doesn't seem to be working in Windows CLI

Here you can discuss and share functionality improvements and helper programs to make Context Free better.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
flembobs
Posts: 47
Joined: Tue Oct 09, 2012 3:00 pm

CF::MaxNatural doesn't seem to be working in Windows CLI

Post by flembobs »

When I try to render this image:

http://contextfreeart.org/gallery/view.php?id=3206

With the Windows CLI for Context Free the drawing does not complete properly.

E.g. http://imgur.com/1j89RdK

I can recreate this behaviour by commenting out the CF::MaxNatural line in the Context Free GUI so I believe there is an issue with this directive in the CLI version.

Using Windows 8.1 if that's any help.

I tried using a lower value for the CF::MaxNatural in my Context Free file but that doesn't seem to have helped.

Cheers!

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: CF::MaxNatural doesn't seem to be working in Windows CLI

Post by MtnViewJohn »

When I comment out the CF::MaxNaturals line I get an error message because next+curr exceeded the default maximum natural number magnitude. I think that is a red herring.

The reason that the SPIRAL shape stops early sometimes is because it is unstable with respect to the small shape culling mechanism in the Context Free renderer. A typical design starts big and branches out to an infinite number of smaller and smaller shapes. Context Free culls shapes when they are subpixel in size. This allows CF to find a finite number of shapes that produces the same output bitmap as the theoretical infinite number of shapes.

Your Fibonacci Flower design is triggering small shape culling even though its shape count is finite and deterministic. I can produce the same output that you uploaded to imgur.com on Windows, Mac, and Linux if I ask for a 500x500 pixel output and set the minimum shape size to 0.3 pixels, which is the default for the Windows CLI build.

The solution is to disable small shape culling. You can do this by setting the minimum shape size to very, very, very small in the cfdg file:

Code: Select all

CF::MinimumSize = 0.0000001

flembobs
Posts: 47
Joined: Tue Oct 09, 2012 3:00 pm

Re: CF::MaxNatural doesn't seem to be working in Windows CLI

Post by flembobs »

That got it working, thanks. I overlooked CF::MinimumSize because it was working ok for me in the GUI, which I suppose would have a higher resolution.

Thanks for your help.

Here is the animated version of the design I was working on: http://gfycat.com/NecessaryNaturalFowl

Post Reply