POV-Ray : Newsgroups : povray.unofficial.patches : Spiral pattern with uniform angular density : Re: Spiral pattern with uniform angular density Server Time
2 Nov 2024 15:24:16 EDT (-0400)
  Re: Spiral pattern with uniform angular density  
From: Nieminen Mika
Date: 22 Jul 1999 03:47:59
Message: <3796ccaf@news.povray.org>
Yes, it isn't a spiral, but it works fine. I made this from your code:

#declare Spread = .1;
#declare mintheta = 0;
#declare maxtheta = pi/3;

camera { location <-4,1,-6>*.5 look_at 0 angle 35 }
light_source { <50,100,-200> 1 }

cylinder { 0,z,.02 pigment { rgb x+y } finish { specular .5 } }
cylinder
{ 0,z,.02 rotate x*degrees(maxtheta)
  pigment { rgb y+z } finish { specular .5 }
}

#declare dtheta = atan2(Spread,1);

#declare R=seed(0);
#declare theta=mintheta;
#while(theta<maxtheta)
  #if(theta=0)
    #declare dphi=2*pi;
  #else
    #declare dphi=dtheta/sin(theta);
  #end
  #declare minphi= -pi + dphi*rand(R)*.5;
  #declare maxphi= pi - dphi/2 + (minphi+pi);
  #declare phi=minphi;
  #while(phi<maxphi)
    sphere
    { z,.05
      rotate x*degrees(theta)
      rotate z*degrees(phi)
      pigment { rgb x } finish { specular .5 }
    }
    #declare phi=phi+dphi;
  #end
  #declare theta=theta+dtheta;
#end


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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