|
![](/i/fill.gif) |
darnold wrote:
> All,
>
> I'd like to execute povray from the command line, but that does not appear to be
> an option with the current windows version.
>
> What I want to do is produce a sequence of images, each of which depends upon
> two parameters, phi and theta. The values of phi and theta are generated in
> Matlab and saved to a text file.
>
> A former student of mine wrote a script on a unix box to accomplish the task:
>
> cat defs.ini | sed s / var1 /$THETA/ | sed s / var2 /$PHI/>newdefs.ini ;
> povray -W640 -H480 +Oanim-$TIME.png anim.pov ;
> done ;
>
> But I don't seem to have access to the "povray" command in a DOS box to mimic
> this approach.
>
> Is there a suggested alternative?
>
You can call povray directly from matlab. The executable is called
pvengine.exe .
The key lines in my povray.m files are:
function povray(povfile,varargin)
[parsing name-value pairs in varargin]
POVpath='c:\program files\pov-ray for windows v3.6';
POVpath='c:\progra~1\pov-ra~1.6'; %DOS version without spaces
s=sprintf('!"%s\\bin\\pvengine.exe" +I%s',POVpath,povfile);
and then after possibly adding /EXIT (and other parameters) to the
string I call
eval(s);
I hope that helps. I could also give you my povray.m but it depends on
some other script to parse the name-value pairs. And I don't want to
write documentation for that (it is fully documented but not in the
matlab script itself)
Post a reply to this message
|
![](/i/fill.gif) |