POV-Ray : Newsgroups : povray.general : Double Helix : Re: Double Helix Server Time
9 Aug 2024 23:23:39 EDT (-0400)
  Re: Double Helix  
From: Chris Huff
Date: 26 Apr 2000 09:26:16
Message: <chrishuff_99-6B2616.08291626042000@news.povray.org>
In article <3906DDC6.6A137E88@erols.com>, Rik Kline <rik### [at] erolscom> 
wrote:

> Does any one have any code or know of any for a double helix object?

Try something like this(untested!):
#macro DoubleHelix(Num, Twists, Height, Radius, MinorRadius, Offset)
    union {
        #local J=0;
        #while(J<Num)
            sphere {< Radius, Height*J/(Num-1), 0>, MinorRadius
                rotate y*360*Twists*J/(Num-1)
            }
            sphere {< Radius, Height*J/(Num-1), 0>, MinorRadius
                rotate y*360*Twists*J/(Num-1) + y*Offset
            }
            #local J=J+1;
        #end
    }
#end

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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