POV-Ray : Newsgroups : povray.windows : how to run povray from command line Server Time
23 Nov 2024 19:02:01 EST (-0500)
  how to run povray from command line (Message 1 to 5 of 5)  
From: nomail
Subject: how to run povray from command line
Date: 4 Jun 2004 16:15:00
Message: <web.40c0d730d244b69bb40afbf0@news.povray.org>
I want to make a matlab program that creates a povray file for a face mesh
and then renders it. To do this , I need to able to run povray from the
command line (not the GUI command line but DOS command line). The
documentation example says: POVRAY +Isimple.pov +V +W80 +H60, but when I
try this on dos, I get:
'povray' is not recognized as an internal or external command,
operable program or batch file.

I searched for povray.exe, but it doesn't exist anywhere. I will appreciate
if someone could tell me the way to do this.
thanks,
Ankur


Post a reply to this message

From: ingo
Subject: Re: how to run povray from command line
Date: 4 Jun 2004 17:42:47
Message: <Xns94FEF13AF15EEseed7@news.povray.org>
in news:web.40c0d730d244b69bb40afbf0@news.povray.org  wrote:

> I searched for povray.exe, but it doesn't exist anywhere.

search for pvengine.exe

Ingo


Post a reply to this message

From: Stephen McAvoy
Subject: Re: how to run povray from command line
Date: 4 Jun 2004 17:59:33
Message: <s5s1c0hoev5pq0309htp2b115mvucrtgq9@4ax.com>
On 4 Jun 2004 17:42:47 -0400, ingo <ing### [at] tagpovrayorg> wrote:

>search for pvengine.exe

and put it in your path. Or type something like:
C:\Graphics\POV-Ray for Windows v3.5\bin\ POVRAY +I
C:\Graphics\POV-Ray for Windows v3.5\MYDIRECTORY\simple.pov +V +W80
+H60

Regards
        Stephen


Post a reply to this message

From: andrel
Subject: Re: how to run povray from command line
Date: 5 Jun 2004 12:12:30
Message: <40C1F0FB.3090608@hotmail.com>
If you have found your pvengine.exe you can wrap the
pov call in a script file, like the one below.
(I think I am not allowed to use an attachment here,
so I split a couple of the lines to fit in a
reasonable width).

You can call this function as:
povray(filename)
or with name-value pairs
povray(filename,'Width',320,'Height',240,'Options','+V')

you can use any number of name-value pairs. I have defined
only three, but you can easily add your own.

Note: this assumes that you have set your inifile in povray
and that you have selected
'Render/On Completion .../Exit POV-Ray for Windows'
from the menu.
There must be a way to specify the inifile you want to use
and that you want to exit after completion from the command
line, but I can not find how.

Actually, your mail prompted me to investigate some more.
After writing the above I found that I can specify the
inifile. There are still a number of problems however,
so I can not give a working version of the matlabscript
that includes the inifile yet.
- You have to specify the complete path for the inifile
- The commandline parser does not parse quotes. You can
  therefore not use a long filename that includes spaces
  and put "" around them. In fact you have to use the
  DOSfilename. In my case "c:\progra~1\pov-ra~1.5\" etc
- it still complains that "never found section '' in file..."
  This is where I give up :(

	Andrel

nomail@nomail wrote:
> I want to make a matlab program that creates a povray file for a face mesh
> and then renders it. To do this , I need to able to run povray from the
> command line (not the GUI command line but DOS command line). The
> documentation example says: POVRAY +Isimple.pov +V +W80 +H60, but when I
> try this on dos, I get:
> 'povray' is not recognized as an internal or external command,
> operable program or batch file.
> 
> I searched for povray.exe, but it doesn't exist anywhere. I will appreciate
> if someone could tell me the way to do this.
> thanks,
> Ankur
> 


---
function povray(povfile,varargin)
oldwho = [];
oldwho = who; % remember existing variables
% enter modifiable arguments below
Width=320;
Height= 240;
Options =[];
% end of modifiable arguments
ModVars   =   setdiff(who,oldwho);
clear oldwho
for k  = 1 :2: length(varargin)
    if ~isempty(strmatch(varargin{k},ModVars,'exact'))
       eval(sprintf('%s=varargin{k+1};',varargin{k}));
    else
       disp(sprintf('valid variables for %s:',mfilename));
       disp(ModVars)
       error(sprintf('Illegal argument :%s for %s.',...
          varargin{k},mfilename));
    end
end

eval(sprintf(['!"c:\\program files\\'...
    'pov-ray for windows v3.5\\bin\\pvengine.exe"'...
	' +W%d +H%d +I%s %s'],...
	Width,Height,povfile,Options));


Post a reply to this message

From: Harold
Subject: Re: how to run povray from command line
Date: 29 Jun 2004 19:35:51
Message: <40e1fcd7$1@news.povray.org>
I'm doing a similar thing with the R statistics programming
environment. The R code writes an include file with the
statistics that I want rendered, then at the end it calls
(executes) pov SDL that generates a pretty graph.

Here is what I use in R:

(beware if this wraps)
system('C:\\progra~1\\pov-ra~1.5\\bin\\pvengine.exe C:\\Rpovray.ini
C:\\Rpovray.pov')

The location is standard for a Windows installation.
The double "\\" is because R uses "\" as a control character.

Harolddd


"andrel" <a_l### [at] hotmailcom> wrote in message
news:40C### [at] hotmailcom...
> If you have found your pvengine.exe you can wrap the
> pov call in a script file, like the one below.
> (I think I am not allowed to use an attachment here,
> so I split a couple of the lines to fit in a
> reasonable width).
>
> You can call this function as:
> povray(filename)
> or with name-value pairs
> povray(filename,'Width',320,'Height',240,'Options','+V')
>
> you can use any number of name-value pairs. I have defined
> only three, but you can easily add your own.
>
> Note: this assumes that you have set your inifile in povray
> and that you have selected
> 'Render/On Completion .../Exit POV-Ray for Windows'
> from the menu.
> There must be a way to specify the inifile you want to use
> and that you want to exit after completion from the command
> line, but I can not find how.
>
> Actually, your mail prompted me to investigate some more.
> After writing the above I found that I can specify the
> inifile. There are still a number of problems however,
> so I can not give a working version of the matlabscript
> that includes the inifile yet.
> - You have to specify the complete path for the inifile
> - The commandline parser does not parse quotes. You can
>   therefore not use a long filename that includes spaces
>   and put "" around them. In fact you have to use the
>   DOSfilename. In my case "c:\progra~1\pov-ra~1.5\" etc
> - it still complains that "never found section '' in file..."
>   This is where I give up :(
>
> Andrel
>
> nomail@nomail wrote:
> > I want to make a matlab program that creates a povray file for a face
mesh
> > and then renders it. To do this , I need to able to run povray from the
> > command line (not the GUI command line but DOS command line). The
> > documentation example says: POVRAY +Isimple.pov +V +W80 +H60, but when I
> > try this on dos, I get:
> > 'povray' is not recognized as an internal or external command,
> > operable program or batch file.
> >
> > I searched for povray.exe, but it doesn't exist anywhere. I will
appreciate
> > if someone could tell me the way to do this.
> > thanks,
> > Ankur
> >
>
>
> ---
> function povray(povfile,varargin)
> oldwho = [];
> oldwho = who; % remember existing variables
> % enter modifiable arguments below
> Width=320;
> Height= 240;
> Options =[];
> % end of modifiable arguments
> ModVars   =   setdiff(who,oldwho);
> clear oldwho
> for k  = 1 :2: length(varargin)
>     if ~isempty(strmatch(varargin{k},ModVars,'exact'))
>        eval(sprintf('%s=varargin{k+1};',varargin{k}));
>     else
>        disp(sprintf('valid variables for %s:',mfilename));
>        disp(ModVars)
>        error(sprintf('Illegal argument :%s for %s.',...
>           varargin{k},mfilename));
>     end
> end
>
> eval(sprintf(['!"c:\\program files\\'...
>     'pov-ray for windows v3.5\\bin\\pvengine.exe"'...
> ' +W%d +H%d +I%s %s'],...
> Width,Height,povfile,Options));
>


Post a reply to this message

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