POV-Ray : Newsgroups : povray.unofficial.patches : Scripting Problems in MegaPov Server Time
2 Sep 2024 10:13:18 EDT (-0400)
  Scripting Problems in MegaPov (Message 1 to 2 of 2)  
From: Chris S 
Subject: Scripting Problems in MegaPov
Date: 16 Apr 2000 14:53:02
Message: <38fa0c0e@news.povray.org>
I'm not sure if this is MP specific but I've never had this problem before.
Maybe I'm just insane but whenever I use cylinders or cones in  #while loops
within MP the parsing time is incredible.  I've checked the loops to death,
making sure the script counts the way it's supposed to, increments the right
way, etc.  Everything looks right, and the same exact loop works for torii
and spheres...

Anyway, here's the code.  It "should" rotate cylinders around a cone and
declare it as object "Tower1."

#declare NT1 = 360;
#declare Tower1 = union {
  cone{0*z, .75, 3.25*z, .25 material {GlassTex1}}
  #while (360 > 0)
     cylinder{<0,0,0>,<0,0,3.288>, .25 rotate -8.75*y translate -.75*x
rotate NT1*z texture{DarkMetal1}}
    #declare NT1 = NT1 - 30;
  #end
}

Any help would be appreciated.

Thanks,
-Chris-


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Scripting Problems in MegaPov
Date: 16 Apr 2000 16:08:59
Message: <38fa1ddb@news.povray.org>
In article <38fa0c0e@news.povray.org> , "Chris S." <chr### [at] bluelectrodecom>
wrote:

> #declare NT1 = 360;
> #declare Tower1 = union {
>   cone{0*z, .75, 3.25*z, .25 material {GlassTex1}}
>   #while (360 > 0)
>      cylinder{<0,0,0>,<0,0,3.288>, .25 rotate -8.75*y translate -.75*x
> rotate NT1*z texture{DarkMetal1}}
>     #declare NT1 = NT1 - 30;
>   #end
> }


Your loop says "#while (360 > 0)" which is always true, so the loop can
never end. This should work:

#declare NT1 = 360;
#declare Tower1 = union {
  cone {
    0*z, .75, 3.25*z, .25
    material {GlassTex1}
  }
  #while (NT1 > 0)  // <= CHANGE
    cylinder {
      <0,0,0>,<0,0,3.288>, .25
      rotate -8.75*y
      translate -.75*x
      rotate NT1*z
      texture{DarkMetal1}
    }
    #declare NT1 = NT1 - 30;
  #end
}



     Thorsten


Post a reply to this message

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