POV-Ray : Newsgroups : povray.advanced-users : Re: Align objects ton spline ? : Re: Align objects ton spline ? Server Time
28 Jul 2024 20:21:38 EDT (-0400)
  Re: Align objects ton spline ?  
From: Jim Charter
Date: 28 Jan 2004 18:57:03
Message: <40184c4f$1@news.povray.org>
LightBeam wrote:


> 
> #declare ctr = 0.003;
> #declare Spacing = 0.01;
> #while (ctr < 0.7)
>         cylinder {<0.0, 0.0, -0.02><0.0, 0.0, 0.02>0.07
>         translate Spline(ctr)
>         pigment {rgb 0.3}
>         }
>   #declare ctr = ctr + Spacing;
> #end
>
As a rough and ready answer I sometimes do this:

#local B=0; #while ( B+1 < 50    )
      #local Pt = SplineA( B/50 );
      #local Pt2 = SplineA( (B+1)/50 );
      cylinder { Pt, Pt2, .0055 pigment { rgb < 0, 1, 0 > } }
 
    #local B=B+1;#end


Post a reply to this message

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