POV-Ray : Newsgroups : povray.general : ?how to make spirals? : Re: Simple: Server Time
8 Aug 2024 08:12:25 EDT (-0400)
  Re: Simple:  
From: Eitan Tal
Date: 23 Jan 2001 14:54:54
Message: <3A6DE144.4B4514A2@netvision.net.il>
This should look like a spring.
for a spiral, change RadiusAdder to something positive;
and change ProgressPace to 0.

#declare Radius= 3
#declare CurrentAngle= 0
#declare SpinCount= 4
#declare ProgressPace= 15
#declare RadiusAdder= 0.001

#while (CurrentAngle < SpinCount*360)
  sphere {
    0,0.5
    translate Radius*y
    rotate CurrentAngle*z
    translate ProgressPace*(CurrentAngle / 360)*z
    pigment {color rgb CurrentAngle/(360*SpinCount)}
  }
  #declare CurrentAngle = CurrentAngle + 1
  #declare Radius = Radius + RadiusAdder
#end

This should work out pretty well.
play with the values for a desired result.
hope I helped you out! :-)

RWard wrote:

> Any have a formula for constructing spirals......I am, unfortunately
> mathematically challenged!!
>
> thanks in advance...


Post a reply to this message

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