POV-Ray : Newsgroups : povray.animations : HELP! problem with CSG syntax : Re: HELP! problem with CSG syntax Server Time
23 Apr 2024 20:05:39 EDT (-0400)
  Re: HELP! problem with CSG syntax  
From: Cousin Ricky
Date: 12 May 2020 01:15:00
Message: <web.5eba309a515d007f60e0cc3d0@news.povray.org>
"Constantin" <con### [at] mcgillca> wrote:
> I consider myself an advanced POV user but this one is mystifies me. I am trying
> a simple model of a butterfly wing movement in a sort (12 frames, 3/4 sec)
> animation. This is my code:

You are missing the 'object' keyword:

> //rapid downstroke
> #declare startclock=0;
> #declare endclock =4;
> #declare localclock=clock-startclock;
> #if(clock>startclock & clock<=endclock) union { { Rightwing rotate
                                             here^
> <0,0,60-14*localclock>} {Leftwing rotate<0,0,-(60-14*localclock)>}
                 and here^
> rotate<-30,-30,0> translate <30,-(55-localclock), 50> }  #end
>
> //slower return up
> #declare startclock=endclock;
> #declare endcolck=startclock+8;
> #declare localclock=clock-startclock;
> #if( clock>startclock & clock <=endclock) union { { Rightwing rotate<
                                           and here^
> 0,0,7.5*localclock>} {Leftwing rotate<0,0,-7.5*localclock>}  rotate<-20,-35,0>
              and here^
> translate <10,-(54+0.5*localclock), 100>  }  #end
>
> Povray refuses to accept the first #if statement: "No matching } in 'union', {
> found instead" What is wrong with the union syntax?
>
> More puzzling, if I comment out the first #if statement, it accepts the second
> one and proceeds to rendering, even though the union syntax is EXACTLY the same.

The second #if is never satisfied, so POV-Ray never gets to flag it as a syntax
error.


Post a reply to this message

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