- 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.
Features coming Real Soon Now
Moderators: MtnViewJohn, chris, mtnviewmark
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Features coming Real Soon Now
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:
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Recursion Limits Considered Harmful
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: you would instead write
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 }
}
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 }
}
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Status so far...
- 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.
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
We realized that the syntax for replacement loops makes more sense if the '*' and the loop count were swapped:
Also, we are dropping the debug feature (that nobody actually requested) because it is antagonistic to the animation feature that many people have requested.
Code: Select all
rule daisy {
CIRCLE { s 1.1 sat 1 hue 60 b 1 z 1}
8 * [r 45] petal [ y 0.5 ]
}
- mtnviewmark
- Site Admin
- Posts: 81
- Joined: Wed May 04, 2005 12:46 pm
- Location: Mountain View, CA
- Contact:
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!
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!
I'm the "m" in "mtree.cfdg"
animation sounds great
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
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
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
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.
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.
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
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.
Homepage: http://www.tinman.net.nz/