Page 1 of 1

Features coming Real Soon Now

Posted: Tue Jan 24, 2006 12:29 am
by MtnViewJohn
Well I already to you all that animation is coming, and it really is, but I thought I would list some other features that I want to add:
  • Vector support. I know that in the past I said that most images have too many shapes to be stored in vector form. I still think that this is true. But if you are designing for vector output then you can keep the shape count within reason. The actual vector output will be SVG files. You should be able to create vinyl signs and sand-blasted images on glass.
  • Z-ordering for shapes. You will be able to control which shapes get drawn on top and which go on bottom. It will simply be a z parameter, just like x and y. I can't decide whether the z parameter should be a float, like x and y, or if it should be an integer. If it is a float then you would be able to scale it using the size parameter.
  • Recursion limiting: this feature. You can control how many levels deep a recursive rule will go. Basically this lets you implement simple loops.
  • Breakpoints: in a debug mode you will be able to single-step or draw n shapes and stop. There will also be a primitive shape called BREAKPOINT that also stops the render process.

Posted: Tue Jan 31, 2006 10:32 pm
by project_
awesome. looking forward to playing with any and all new features and getting you some feedback -- especially like the idea of using limited recursion + SVG output to make cute scalable graphics for design work!

Recursion Limits Considered Harmful

Posted: Sun Feb 12, 2006 4:13 pm
by MtnViewJohn
After much debate, Mark and I decided that the recursion limit proposal was a bad idea. It would create new state that is very different from all the other state kept on Context Free/CFDG. It would violate the spirit of Context Free, as set down by Chris.

But the reason why we were considering recursion limits was to create looping constructs without having to add a ton of new syntax or significantly change the execution model. So instead we came up with a loop syntax that fits well with the way Context Free/CFDG currently works.

For example, if you wanted to create an eight-petal daisy like so:

Code: Select all

startshape daisy

background { sat 1 hue 120 b -0.5 }

rule daisy {
	CIRCLE { s 1.1 sat 1 hue 60 b 1 z 1 }
	petal [ r   0 y 0.5 ]
	petal [ r  45 y 0.5 ]
	petal [ r  90 y 0.5 ]
	petal [ r 135 y 0.5 ]
	petal [ r 180 y 0.5 ]
	petal [ r 225 y 0.5 ]
	petal [ r 270 y 0.5 ]
	petal [ r 315 y 0.5 ]
}

rule petal {
	CIRCLE { y 1.5 s 1.2 3 b 1 }
	CIRCLE { y 1.5 s 0.8 3 b 0.75 }
	petal { s 0.6 1 }
}
you would instead write

Code: Select all

startshape daisy

background { sat 1 hue 120 b -0.5 }

rule daisy {
	CIRCLE { s 1.1 sat 1 hue 60 b 1 z 1}
	*8 [r 45] petal [ y 0.5 ]
}

rule petal {
	CIRCLE { y 1.5 s 1.2 3 b 1 }
	CIRCLE { y 1.5 s 0.8 3 b 0.75 }
	petal { s 0.6 1 }
}

Status so far...

Posted: Sun Feb 12, 2006 4:19 pm
by MtnViewJohn
  • Animation is about half done.
  • SVG vector output is done.
  • The non-CF limit feature is dropped and replaced by a CF loop syntax, which is done.
  • Z-ordering is almost done. If we spill shapes to temp files then we need to Z-sort them on reload.
  • Breakpoints are about half done.
  • We are changing the rendering algorithm to keep the shape expansions sorted by size so that the largest expansion is always expanded next. The old algorithm tried to do this but it only sorted the expansions every once in a while.

Posted: Thu Feb 16, 2006 10:43 am
by MtnViewJohn
We realized that the syntax for replacement loops makes more sense if the '*' and the loop count were swapped:

Code: Select all

rule daisy {
   CIRCLE { s 1.1 sat 1 hue 60 b 1 z 1}
   8 * [r 45] petal [ y 0.5 ]
}
Also, we are dropping the debug feature (that nobody actually requested) because it is antagonistic to the animation feature that many people have requested.

Posted: Wed Mar 01, 2006 7:16 pm
by Guest
yeehaa...
Cant wait for animation...
Feels like Christmas :D

Posted: Tue Mar 07, 2006 2:40 pm
by mtnviewmark
Just so you all know.... Animation is now about 90% done, and I just have the other 90% to do!

Output will be to QuickTime movies on Mac and Windows, and a directory of PNG files on Posix/Unix. For QuickTime movies, you'll be able to set the framerate and compressor details via the normal QuickTime dialogs.

Also in the works, a UniversalBuild version for Macintosh: John and I are enjoying our new intel based MacBook Pros!

animation sounds great

Posted: Fri Mar 10, 2006 5:09 pm
by Seth
Hi,
I've been building a lot of interesting drawings using perl, and context free and would love to see them become short films.

Mark, is it possible to write a drawing and then install it as a runtime so it goes full screen using the context free engine? I've written a perl script that generates context free grammers on the fly from narrative structures - so I'd like to build an app that could update a context free drawing by loading a new context free file every once in a while and rebuilding it.

Thanks,
Seth

Posted: Fri Mar 10, 2006 9:45 pm
by MtnViewJohn
I created something like that a few months back. I used the command-line version, cfdg, to produce PNG files for each generated cfdg file and then used Quicktime to turn them into a movie. You could run cfdg and then use some other program to display the resulting PNG file full-screen.

After we finish the current release we are going to work on a kiosk mode for use at a San Jose digital art conference. We could add command-line options for full-screen display to the Mac and Windows clients as part of this effort.

Ultimately what would be nice is if the Windows or Mac client could accept cfdg files piped in on standard input and generate frames for a Quicktime animation.

Posted: Mon Apr 03, 2006 6:08 pm
by shevegen
"SVG vector output is done."

Does anyone know if Firefox can display SVG files?
And if not "out of the box" if its possible to "add on" something to Firefox so
that it can display SVG files?

Posted: Mon Apr 03, 2006 10:41 pm
by MtnViewJohn
Firefox displays SVG output out of the box.

Posted: Tue Apr 25, 2006 8:01 am
by Music2000
Cool Animation, thats great :o Will there be a new gallery for animated CFDG files?

Posted: Tue Apr 25, 2006 7:19 pm
by robo git
Uh... Just use the current one? Animations take up a LOT of disk-space; would be easier to just host the .CFDG files and a .jpg of the final.