Features coming Real Soon Now

Let the developers know what you think of the software and what can be done to either improve the CFDG language or the Context Free program.

Moderators: MtnViewJohn, chris, mtnviewmark

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

Features coming Real Soon Now

Post 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.

project_

Post 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!

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

Recursion Limits Considered Harmful

Post 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 }
}

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

Status so far...

Post 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.

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

Post 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.

Guest

Post by Guest »

yeehaa...
Cant wait for animation...
Feels like Christmas :D

User avatar
mtnviewmark
Site Admin
Posts: 81
Joined: Wed May 04, 2005 12:46 pm
Location: Mountain View, CA
Contact:

Post 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!
I'm the "m" in "mtree.cfdg"

Seth

animation sounds great

Post 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

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

Post 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.

shevegen
Posts: 57
Joined: Wed Jul 06, 2005 5:38 am

Post 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?

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

Post by MtnViewJohn »

Firefox displays SVG output out of the box.

Music2000
Posts: 26
Joined: Mon Oct 10, 2005 3:38 pm
Location: London

Post by Music2000 »

Cool Animation, thats great :o Will there be a new gallery for animated CFDG files?

robo git
Posts: 47
Joined: Sat Jul 09, 2005 11:36 pm
Location: looking for his marbles
Contact:

Post 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.

Post Reply