POV-Ray : Newsgroups : povray.macintosh : Batch processing on Mac OS X Server Time
16 Sep 2021 07:09:12 EDT (-0400)
  Batch processing on Mac OS X (Message 1 to 1 of 1)  
From: David
Subject: Batch processing on Mac OS X
Date: 16 Aug 2007 04:20:01
Message: <web.46c407746b1fa07b1b13c5c0@news.povray.org>
All,

I have some data generated by the ODE solvers from Matlab stored in a file
named odeoutput.txt, the last few lines of which look like:

bame $ tail odeoutput.txt
0.993566 0.394262 61.187156
0.994448 0.409454 61.278525
0.995562 0.430981 61.384690
0.996677 0.454422 61.480981
0.997791 0.479111 61.568231
0.998905 0.504504 61.647431
0.999179 0.510797 61.665778
0.999453 0.517097 61.683718
0.999726 0.523398 61.701265
1.000000 0.529694 61.718432

The first column contains time, the second values of theta, the third values
of phi.

I have a little ini file, defs.ini, in the same directory, that looks like:

bame $ cat defs.ini
#declare theta=var1;
#declare phi=var2;

I have a script file that will sketch the scene for each line of data in
odeoutput.txt.

bame $ cat generate_data
#! /bin/bash

for a in `cat odeoutput.txt|sed "s/ /_/g"`; do
        TIME=`echo $a|cut -d'_' -f1`;
        THETA=`echo $a|cut -d'_' -f2`;
        PHI=`echo $a|cut -c'_' -f3`;
        cat defs.ini|sed s/var1/$theta/|sec s/var2/$PHI/>newdefs.ini;
        povray -W640 -H480 +Oanim-$TIME.png anim.pov;
done;

At each step of the way, newdefs.ini will look something like this:

bame $ cat newdefs.ini
#declare theta=1.25;
#declare phi=3.18;

My question is how to do this on the Mac OS X version of Povray? Possible
somehow?


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.