POV-Ray : Newsgroups : povray.binaries.scene-files : Spiral image macro : Re: Spiral image macro Server Time
23 Apr 2024 07:44:46 EDT (-0400)
  Re: Spiral image macro  
From: m@b
Date: 4 Feb 2022 02:53:19
Message: <61fcdb6f$1@news.povray.org>
On 04/02/2022 8:49 am, Cousin Ricky wrote:
> I don't know how Matthew did his, 


Here are the bones of it:


// Starting points
#declare X0 = 0.001;
#declare Y0 = 0.001;

// Loop
#for(i, 0, 150, 0.01)

     // Displacement - how fast the spiral expands
     #declare D = i*0.003;

     // Angle between steps
     #declare A = i*100;

     // Calculate position on the input image
     #declare X = D*cosd(A);
     #declare Y = D*sind(A);

     // Get value from image
     Colour_test()

     // Draw a cylinder from previous point to current point
     cylinder{<X0,Y0,0><X,Y,0>, 0.005*Brightness}

     // Save current point for next iteration
     #declare X0 = X;
     #declare Y0 = Y;
#end


Post a reply to this message

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