POV-Ray : Newsgroups : povray.advanced-users : Question about scale & translation : Re: Question about scale & translation Server Time
28 Jul 2024 22:31:28 EDT (-0400)
  Re: Question about scale & translation  
From: Steve Shelby
Date: 2 Aug 2003 14:36:10
Message: <3f2c049a@news.povray.org>
Andrew,
Thanks for your reply. I copied and pasted your suggested code, and it
rendered fine. Would you mind explaining how it works? What if the scale
change between objects was not such a simple number, for instance, 1.04,
1.08, 1.12, 1.16... how would the script read then?
Steve

> Your question is essentially "Does povray have scripting capability?",
> so perhaps belongs in povray.newusers...
>
> Anyway:
>
> #declare loop = 0; //counter
> #declare shift = 0; //cumulative size
>
> #while (loop < 100)
>
>  #declare shift = shift + (((loop-1)+1)/2);
>
>     cylinder {<0,0,0>,<0,1,0>,0.2 scale (loop+1)/2 translate <0,shift,0>
> pigment {color rgb 0.8}}
>
>     #declare loop = loop + 1;
>     #end
>
>


Post a reply to this message

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