step mode

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
andyroberts

step mode

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

nd

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

Xhargh

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

interiot
Posts: 4
Joined: Wed Jul 06, 2005 11:59 am

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

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

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

User avatar
lagroue
Posts: 114
Joined: Wed Jul 06, 2005 11:33 pm
Location: Paris, France
Contact:

Post by lagroue »

Let me recommend you the Game of Life program named LifeLab. Their Control menu is very well designed.

Guest

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

Guest

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

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

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

Post Reply