POV-Ray : Newsgroups : povray.programming : Re: Pains in rendering complex polygons : Re: Pains in rendering complex polygons Server Time
5 Jul 2024 15:18:59 EDT (-0400)
  Re: Pains in rendering complex polygons  
From: Jake McDowell
Date: 28 Jul 2003 02:19:47
Message: <3F24C082.6090807@Techie.com>
Mike Williams wrote:
> Wasn't it Warp who wrote:
> 
>>Jake McDowell <McN### [at] techiecom> wrote:
>>
>>>    dSpline(blah),
>>
>> You don't need a comma there.
> 
> 
> Alternatively you could move the comma so that it comes before the
> dSpline(blah) and remove the hard-coded one after the 80.
> 
> polygon {
>   80
>   #declare blah=80;
>   #while(blah>0)
>     ,dSpline(blah)
>     #declare blah = blah-1;
>   #end
> }
> 
> 
> There are some situations where commas are required and that trick
> doesn't work (I can't think of a situation off hand, but I've met one in
> the past). In such a case you could process the first or last item
> outside the loop
> 
> polygon {
>   80,
>   dSpline(80)           // out of loop, no comma
>   #declare blah=79;
>   #while(blah>0)
>     ,dSpline(blah)
>     #declare blah = blah-1;
>   #end
> }
> 
> or put an #if statement round the comma.
> 
> polygon {
>   80,
>   #declare blah=80;
>   #while(blah>0)
>     dSpline(blah)
>     #if (blah > 1) , #end
>     #declare blah = blah-1;
>   #end
> }
> 
w00t !!!  yes !  you rock... can you tell i'm not quite used to the 
povray way of doing things ?  :]

thank you a load... your information/help here is tremendously valuable 
to me... i knew there was a simple way of doing this !

:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]:]


Post a reply to this message

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