POV-Ray : Newsgroups : povray.newusers : using a helix_1 as a coil or helical spring, what is the Parameter P1 : Re: using a helix_1 as a coil or helical spring, what is the Parameter P1 Server Time
30 Jul 2024 16:24:33 EDT (-0400)
  Re: using a helix_1 as a coil or helical spring, what is the Parameter P1  
From: Stephen McAvoy
Date: 7 Jan 2004 14:40:33
Message: <s4oovvkcpdt3hchg3u5c23vaobh10cjhlv@4ax.com>
On Wed,  7 Jan 2004 12:16:57 EST, "rossy" <nomail@nomail> wrote:

>hopefully someone is able to help me, its very urgent!!



look under Spring is sprung. Tue, 23 Sep 2003.

#declare SpringHeight = 6;
#declare SpringMajorRadius = 1;
#declare SpringMinorRadius = .1;
#declare SpringRevolutions = 10;
#declare SpringSegments = 1000;

union
{
  #declare Ind = 0;
  #while(Ind <= SpringSegments)
    #declare Pos2 =
      vrotate(<SpringMajorRadius, SpringHeight*Ind/SpringSegments, 0>,
              y*360*SpringRevolutions*Ind/SpringSegments);
    #if(Ind > 0)
      cylinder { Pos1, Pos2, SpringMinorRadius }
      sphere { Pos2, SpringMinorRadius }
    #end
    #declare Pos1 = Pos2;
    #declare Ind = Ind+1;
  #end

  pigment { rgb 1 } finish { specular .5 }
  translate -y*4
}



Regards
        Stephen


Post a reply to this message

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