POV-Ray : Newsgroups : povray.newusers : Problem with the EXTRUDE : Problem with the EXTRUDE Server Time
29 Jul 2024 18:21:08 EDT (-0400)
  Problem with the EXTRUDE  
From: Ziyan
Date: 25 Apr 2005 22:35:00
Message: <web.426da894f3d9b99a1362b3f50@news.povray.org>
My program is below, but something wrong happens when I replace the A(...)
with object{A(...)} as I want to translate the object {A(...)}and it shows
"Prase Error: No matching } in 'object', box found instead."  Could someone
here hele me solve the problem?(Without object{} but just with A(...) it
runs smoothly and I guess I could invoke the macro with ".inc" but don't
know how to invoke it.)

#include "colors.inc"
#include "textures.inc"
#include "metals.inc"

camera{
       location <0,10,-20>
       direction <0,0,1>
       up <0,1,0>
       right <4/3,0,0>
       look_at <0,0,0>
      }

background {color rgb <0.5,0.5,0.5>}

object {light_source {<20,100,-200> colour White}}

#macro A(Angle,Radius,y_rotate,A_rotate)

#local Index=0;
#while (Index<=y_rotate/Angle)
 #local x_delta_move=-Radius*(1-cos(Angle*Index));
 #local z_delta_move=-Radius*sin(Angle*Index);
 #local y_delta_rotate=Index*Angle;
 box{<-0.4,-0.4,-0.4>,<0.4,0.4,0.4>
     translate <x_delta_move,0,z_delta_move>
     rotate y_delta_rotate*y
     pigment{colour White}
     rotate A_rotate*y
     scale 0.2}
 #local Index=Index+1;
#end
#end

object{A (0.01*3.14/180,100,26*3.14/180,180)}
object{A (0.01*3.14/180,100,26*3.14/180,0)}


Post a reply to this message

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