POV-Ray : Newsgroups : povray.general : Double loop using rotation Server Time
23 Dec 2024 22:42:25 EST (-0500)
  Double loop using rotation (Message 1 to 4 of 4)  
From: pierre
Subject: Double loop using rotation
Date: 17 Oct 2006 04:35:01
Message: <web.453494c25cefbf5ad334ed60@news.povray.org>
Hi everybody,

I use the rotation illumination to create from a same scene different image
with the code:
rotate clock*360*x (to make a rotation around the x axis)

Now I also want to move the camera position (also in a circle).
My wish it is, for example, to define 5 camera position and for each of them
create 60 images by rotating the illumination. Is it possible to do that
automatically (without create 5 scene)?

How can I implement this in povray?

Thanks for your supports
Pierre


Post a reply to this message

From: Warp
Subject: Re: Double loop using rotation
Date: 17 Oct 2006 05:01:32
Message: <45349bec@news.povray.org>
pierre <pie### [at] efpginpgfr> wrote:
> How can I implement this in povray?

  The documentation is full of useful info for this. More specifically,
have a look at: http://povray.org/documentation/view/3.6.1/241/

  What you want to do can probably be done easiest with #switch/#range

-- 
                                                          - Warp


Post a reply to this message

From: pierre
Subject: Re: Double loop using rotation
Date: 17 Oct 2006 07:15:01
Message: <web.4534ba9cb13fd848ad334ed60@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> pierre <pie### [at] efpginpgfr> wrote:
> > How can I implement this in povray?
>
>   The documentation is full of useful info for this. More specifically,
> have a look at: http://povray.org/documentation/view/3.6.1/241/
>
>   What you want to do can probably be done easiest with #switch/#range
>
> --
>                                                           - Warp

Thanks Warp,
I already read this section and tried to implment my code with the function
#while:



  #declare Count=1;
  #while (Count<10)

camera {
      location <0, -3*cos(10*Count), -3*sin(Count*10)>
  look_at <0, 0, 0>
}

{
MY object
}

light_source {
  <0,0,-3>
  color White
  rotate clock*360*x
}

       # declare Count=Count+1;
        #end

But povray think there is many cameras on the same scene and just run for
the first camera position!
I am not really familiar with the computer programation and i don't know how
to solve this problem.

Pierre


Post a reply to this message

From: Warp
Subject: Re: Double loop using rotation
Date: 17 Oct 2006 08:09:55
Message: <4534c813@news.povray.org>
No, you don't want to create several cameras. What you want is to place
the camera in a location chosen depending on the 'clock' value. That's
where the #switch/#range kicks in.

-- 
                                                          - Warp


Post a reply to this message

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