POV-Ray : Newsgroups : povray.newusers : read df3 in a loop Server Time
30 Jul 2024 18:14:20 EDT (-0400)
  read df3 in a loop (Message 1 to 2 of 2)  
From: Wolfgang Kapferer
Subject: read df3 in a loop
Date: 29 Sep 2003 11:40:01
Message: <web.3f7851f2317d154499cf94980@news.povray.org>
Hello

I have a Problem reading some density files in a while loop.

The povray script should do following:

1. read a density file (e.g. tempn1.df3) and render a pictures, which is
stored as a tga or so.
2. read the next density file (e.g. tempn2.df3) adn do the same as before

3. loop it

I don't know how you can give a loopvariable in while for a filename.
....
density {
         density_file df3 "test1.df3"
   interpolate 1
   color_map {
      [0.00 rgb <0,0,0>]
   [0.40 rgb <0 0 1>]
      [0.50 rgb <0,1,0>]
   [0.60 rgb <1,0,0>]
      [1.00 rgb <1,0,0>]
   }
  }
....

How can I make test1.df3 to testx.df3, whereas x means x=1...n

Thank you very much for Your apprecaited help.

Wolfgang


Post a reply to this message

From: Warp
Subject: Re: read df3 in a loop
Date: 29 Sep 2003 14:33:07
Message: <3f787ae3@news.povray.org>
Wolfgang Kapferer <wolfgang.e.kapferer.uibk.ac.at> wrote:
> I have a Problem reading some density files in a while loop.

> 1. read a density file (e.g. tempn1.df3) and render a pictures, which is
> stored as a tga or so.

  You can't render pictures in a while-loop. You use POV-Ray's animation
rendering options and use the 'clock' or 'frame_number' variables (in your
case the latter is probably easier) to do the job.

density {
         density_file df3 concat("test", std(frame_number, 0, 0), ".df3")

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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