POV-Ray : Newsgroups : povray.binaries.programming : Matlab Server Time
28 Mar 2024 19:03:04 EDT (-0400)
  Matlab (Message 1 to 5 of 5)  
From: maesla
Subject: Matlab
Date: 14 May 2007 11:10:02
Message: <web.46487b4bdc9cb9f1560844e20@news.povray.org>
Hi!
I'm doing my final project to ends the carrer and I use in it povray.
The program is done in matlab, but there is a part in that I say << Please
run povray and execute X.ini. When it finish, press Enter>>
My question is if is there some way to run povray without to have to open
povray, open the file, and press the button run of the interface of the
povray.
I would like to have in matlab code something like run('povray x.ini');

In working in windows by the way.
I trieded to write povray in ms-dos console of the windows, but nothing.
Maybe in c is possible??
Thank you very much.

P.D:this is not important, but maybe is useful, who knows:
In matlab I calculate the coordinates of a robot walking in a labyrinth.I
write the coordinates in a file. Then I read the file in povray and I draw
what the robot would see (Its like to take real snapshot).


Post a reply to this message

From: triple r
Subject: Re: Matlab
Date: 14 May 2007 12:30:02
Message: <web.46488da3fe719493401324710@news.povray.org>
Perhaps a better group to ask this in?  Doesn't bother me though...

No direct link, but type 'system' into the search box and hit OK:

http://www.mathworks.com/access/helpdesk/help/techdoc/index.html

This is very similar to the c system() call, as far as I know.  I'm not a
windows user, but something like system('povray x.ini'); seems to be what
you are describing.  I don't know exactly how to invoke POV-Ray from the
console, but maybe you just need the path name, e.g.
system('C:folderpovray').  Not sure.  Of course, you could also run Matlab
in batch mode:

http://www.ciser.cornell.edu/CRADC/consulting/batchmatlab.shtml

Then you would write a script to run a matlab job in batch mode (no user
interface, just runs silently and quits) and then immediately starts up the
command-line version of POV-Ray.  Again, not sure exactly how to do this in
Windows, but the principle should be the same, just a matter of figuring
out how to run all the commands from a command line.

 - Ricky


Post a reply to this message

From: Arno
Subject: Re: Matlab
Date: 17 May 2007 05:45:01
Message: <web.464c2340fe7194937875dea70@news.povray.org>
Look here:

http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_env/f0-12994.html
&#f0-38522


Post a reply to this message

From: maesla
Subject: Re: Matlab
Date: 17 May 2007 11:55:02
Message: <web.464c7ab2fe719493fbdb934e0@news.povray.org>
I found what I want.
It's the megapov. With this you can render povray file from the command
lines.
And I found that the fuction to run function from the matlab is
system('...')
But know i hace problems with the megapov. Maybe someone can help me.
Imagine:
The path of the megapov is:
C:Documents and SettingsadminDesktopmegapov-1.2.1-windowsbin
The path of the file I want to render is :
d:Documents and SettingsadminMy DocumentsproyectopovrayrobotSimulator
The name of the file I want to render is:
robot_movement_eyefish.ini
The files I have to include are in the path:
d:Documents and SettingsadminMy DocumentsproyectopovrayrobotSimulator
The files .inc that megapov needs like colors.inc are in
C:Program FilesPOV-Ray for Windows v3.6include
The picture of the video I need to make i need to save in
d:Documents and SettingsadminMy Documentsproyectointerface
And I need the pictures in bmp

I tried this:
system('"C:Documents and
SettingsadminDesktopmegapov-1.2.1-windowsbinmegapov.exe"   +HI"d:Documents
and SettingsadminMy DocumentsproyectopovrayrobotSimulator" +L"c:Program
FilesPOV-Ray for Windows v3.6renderer" +I"d:Documents and SettingsadminMy
DocumentsproyectopovrayrobotSimulatormovimiento_robot.pov"')

With this result:

Cannot open INI file 'FilesPOV-Ray'.
Cannot process command-line due to a parse error.
This is not a valid command-line. Check the command-line for syntax errors,
correct them, and try again!
Valid command-line switches are explained in detail in the reference part of
the documentation.
To get a short list of command-line switches, use either the '-h', '-?',
'-help' or '--help' switch.
Failed to render file due to error(s)!

ans =

    -8


documentation

Thank you


Post a reply to this message

From: Jim Holsenback
Subject: Re: Matlab
Date: 19 May 2007 19:50:24
Message: <464f8d40@news.povray.org>
"maesla" <nomail@nomail> wrote in message 
news:web.464c7ab2fe719493fbdb934e0@news.povray.org...
> I tried this:
> system('"C:Documents and
> SettingsadminDesktopmegapov-1.2.1-windowsbinmegapov.exe"   +HI"d:Documents
> and SettingsadminMy DocumentsproyectopovrayrobotSimulator" +L"c:Program
> FilesPOV-Ray for Windows v3.6renderer" +I"d:Documents and SettingsadminMy
> DocumentsproyectopovrayrobotSimulatormovimiento_robot.pov"')

could it be that you are missing the baclkslash character altogeather in 
MANY places?

try something like this:   system('"C:\Documents and 
Settings\admin\Desktop\megapov-1.2.1-windows\bin\megapov.exe" 
+HI"d:\Documents and Settings\admin\My 
Documents\proyectopovrayrobot\Simulator" +L"c:\Program Files\POV-Ray for 
Windows v3.6\renderer" +I"d:\Documents and Settings\admin\My 
Documents\proyectopovrayrobot\Simulatormovimiento_robot.pov"')

by the way some of those path names look a little fishy to me, but hope you 
see what I mean by the missing backslash character as you transition to a 
new directory.

Jim


Post a reply to this message

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