Page 1 of 1

step mode

Posted: Sun May 22, 2005 8:34 am
by andyroberts
As a new user, I thought a useful feature to help understanding what's happening in a model would be a "step" mode where each click would perform one level of expansion and a redraw. Another useful feature to accompany this would be to turn on/off a box outlining the translated/rotated/scaled frame of reference for that expansion. The user could then walk through a redraw step-by-step to get a clear understanding of the overall behavior.

Posted: Fri Jun 24, 2005 8:33 am
by nd
Yes, step mode would be very useful. I would like to create animations by saving every step as an image. It's a pity that only the final picture can be saved now.
So keep developing. :)

Posted: Wed Jul 06, 2005 12:20 pm
by Xhargh
It is possible (sort of) to do that using the unix (posix) version. In for example bash there is a for command which can be used to change the maximum number of shapes in a picture.

Code: Select all

for a in 10000 20000 30000 40000 50000 60000 70000 80000 ; do cfdg -m $a -s 500 anim.cfdg -v FOR anim$a.png ; done
This is however not for the beginner...

Posted: Wed Jul 06, 2005 1:23 pm
by interiot
It wouldn't be that hard to change the code to be able to set the initial value for the m_maxReplacements value from the command-line, would it?

Posted: Wed Jul 06, 2005 10:13 pm
by MtnViewJohn
But is that really what you want? The major shapes would all appear instantly in the first frame and towards the end you wouldn't see very much changes between frames. You might get better results by using a logarithmic scale for determining when to spit out a new frame. The Posix version should have different exit codes to indicate whether it hit the maximum shape count. I think a better way to go would be to keep a running sum of the areas of primitives (circles, squares, and triangles (in the next version)) as they are drawn and spit out a new frame when some threshold is exceeded.

We can debate the technical issues for animation all we want but there is a large logistical problem that needs to be solved: what open-source tool can we use to produce the end result. What animation file format is best for Context Free animations, is available as open-source, and is available on many platforms.

Posted: Fri Jul 08, 2005 7:34 am
by lagroue
Let me recommend you the Game of Life program named LifeLab. Their Control menu is very well designed.

Posted: Sat Jul 09, 2005 7:16 am
by Guest
MtnViewJohn wrote:We can debate the technical issues for animation all we want but there is a large logistical problem that needs to be solved: what open-source tool can we use to produce the end result. What animation file format is best for Context Free animations, is available as open-source, and is available on many platforms.
ImageMagick ( http://imagemagick.org/ ) is free software, runs on most platforms, and can export to .avi and .mpeg, among others.

Integrating it would be nontrivial, of course.

Posted: Tue Sep 20, 2005 4:55 am
by Guest
MtnViewJohn wrote:But is that really what you want? The major shapes would all appear instantly in the first frame and towards the end you wouldn't see very much changes between frames. You might get better results by using a logarithmic scale for determining when to spit out a new frame. The Posix version should have different exit codes to indicate whether it hit the maximum shape count. I think a better way to go would be to keep a running sum of the areas of primitives (circles, squares, and triangles (in the next version)) as they are drawn and spit out a new frame when some threshold is exceeded.

We can debate the technical issues for animation all we want but there is a large logistical problem that needs to be solved: what open-source tool can we use to produce the end result. What animation file format is best for Context Free animations, is available as open-source, and is available on many platforms.
You have a point about the esthetics of all the major shapes appearing at once.

I don't doubt that the people who suggest an animation feature would get exactly what they were looking for. However, based on the amount of creativity and ability to work with restrictions demonstrated by all the people on this forum I also don't doubt that some amaizing animations could eventually be created.

I don't see any reason to bother with animation/video file formats. Nor do I see the need to complicate the program by integrating a open source tool. I believe that all that is needed for animation would be the ability to render each step of the image frame by frame as an image sequence. Let the would be animator compile the image sequence with a separate program.

Posted: Tue Sep 20, 2005 8:43 am
by MtnViewJohn
In that case we we could do this fairly easily. The Posix version, CFDG, could have a video switch which causes it to accept shape counts and output file names from standard input. It would render up to the provided shape count and then output to the specified file name. A Perl or Python script would drive CFDG and direct some other application to create the animation file from the frames. I actually did something like this a while back, where the Perl script actually modified a parameterized CFDG file.

Perhaps the Windows and Mac clients could have a similar mode based on a file of shape counts and file names. Maybe they could have a modeless dialog for stepping through a cfdg file, for debugging. Once we have this we can have a primitive shape that doesn't draw anything, but it functions as a break-point in this step mode.

If I made the changes to CFDG/Context Free would someone sign up for the Perl or Python scripts?