POV-Ray : Newsgroups : povray.general : passing custom parameter : Re: passing custom parameter Server Time
29 Jul 2024 04:23:53 EDT (-0400)
  Re: passing custom parameter  
From: Le Forgeron
Date: 2 Jan 2013 09:13:09
Message: <50e44075$1@news.povray.org>
Le 02/01/2013 13:31, bhupesh nous fit lire :
> Hi,
> 
> I want to render a scene multiple times with different rotation on each
> rendering, and I want to execute my pov script from my website (java), so I want
> to call same script with a custom parameter, and use that parameter for rotation
> angle value in the script.
> 
> I also tried to use +O (output) parameter, as we can use similar value for both,
> say on first term we can pass 1, which will create 1.png with 1*X rotation, term
> 2 will create 2.png with 2*X rotation and so on.
> 
> However I am not getting, how to do that in Pov-Ray, any help would be greatly
> appropriated.
> 
> Thanks in advance.

You would need to build on the fly the INI file, to use the
"Define=foo=44" capability (not available from the command line) to set
the value of variable foo to 44. (should work with 3.7 version, at least)

Either that, or you create also on the fly some file that get #include
by your main script. Content of such file could be "#define foo=44;"

Now, if all you have to set is just one single parameter (and not a
collection of them), you can instead use the animation sub-system to set
the clock value,
look at +K, +KI, +KF, +KFI, +KFF, +SF, +EF, +KC vs -KC

> http://wiki.povray.org/content/Documentation:Animation_Options


Post a reply to this message

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