|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello everybody.
I'm using rand to generate image with different random sizes, i have to draw
wires and i choose randomly start and end points.
I want to draw different multiple images in "automatic" way.
For example if a want to draw 100 images i wuold like to know if it is possibile
to iterate in my script 100 times and save from code the different 100 generated
images in the script.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 10/23/19 9:53 AM, ale### [at] gmailcom wrote:
> Hello everybody.
> I'm using rand to generate image with different random sizes, i have to draw
> wires and i choose randomly start and end points.
> I want to draw different multiple images in "automatic" way.
> For example if a want to draw 100 images i wuold like to know if it is possibile
> to iterate in my script 100 times and save from code the different 100 generated
> images in the script.
>
>
>
You could do it as an animation. All of the images would have to be the
same size, but they could each have completely different content.
commandline: +sf1 +ef100 +ff100
code:
#switch(frame_number)
#case(1)
// build picture 1
#break
#case(2)
// build picture 2
#break
#end
--
dik
Rendered 15941836800 of 40928716800 pixels (38%)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dick Balaska <dic### [at] buckosoftcom> wrote:
> On 10/23/19 9:53 AM, ale### [at] gmailcom wrote:
> > Hello everybody.
> > I'm using rand to generate image with different random sizes, i have to draw
> > wires and i choose randomly start and end points.
> > I want to draw different multiple images in "automatic" way.
> > For example if a want to draw 100 images i wuold like to know if it is possibile
> > to iterate in my script 100 times and save from code the different 100 generated
> > images in the script.
> >
> >
> >
>
> You could do it as an animation. All of the images would have to be the
> same size, but they could each have completely different content.
>
> commandline: +sf1 +ef100 +ff100
>
> code:
> #switch(frame_number)
> #case(1)
> // build picture 1
> #break
> #case(2)
> // build picture 2
> #break
> #end
>
> --
> dik
> Rendered 15941836800 of 40928716800 pixels (38%)
My problem is i don't know how to code "build picture".
Is it possibile to use a for statement insted of a switch to build multiple
picture?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 10/24/19 4:35 AM, ale### [at] gmailcom wrote:
>
> My problem is i don't know how to code "build picture".
> Is it possibile to use a for statement insted of a switch to build multiple
> picture?
>
>
The output of povray is a graphics file which is the result of its
calculations. The input is a script of POV-Ray SDL (Scene Description
Language).
That is it.
Now, POV-Ray can be coerced to into outputting several graphics file.
This is accomplished by basically POV-Ray calling itself once for each
frame, or graphics file outputted.
It starts over at the beginning of your SDL script for each and every
frame output.
A for loop is the wrong paradigm (the SDL does not control which
graphics files are output).
If you are using POV-Ray for Windows or qtpovray, the include menu
contains two samples under the Animation sub-menu which will build
complete scenes. Start with "animation 1".
--
dik
Rendered 17306265600 of 40928716800 pixels (42%)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2019-10-23 à 09:53, ale### [at] gmailcom a écrit :
> Hello everybody.
> I'm using rand to generate image with different random sizes, i have to draw
> wires and i choose randomly start and end points.
> I want to draw different multiple images in "automatic" way.
> For example if a want to draw 100 images i wuold like to know if it is possibile
> to iterate in my script 100 times and save from code the different 100 generated
> images in the script.
>
>
>
Use the animation feature.
You can use frame_mumber to seed your random stream :
#declare R= seed(frame_number);
You also can use the clock variable :
#declare R= seed(clock*1000);
In both cases, you can add some constant. You can combine both :
#declare R= seed(frame_number*2+12 + clock*100+3);
Use rand(R) in your scene.
Then, place +kff100 on the command line.
For the Windows version, the command line is the text box just to the
right from the resolution selector.
Hit the Run button and you'll get 100 uniquely numbered images. The
number is frame_number.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |