POV-Ray : Newsgroups : povray.general : Columns : Re: Columns Server Time
10 Aug 2024 21:03:15 EDT (-0400)
  Re: Columns  
From: Chris Huff
Date: 23 Oct 1999 22:22:29
Message: <38126DF0.C0ABD51F@yahoo.com>
Sounds like a sign your loop isn't looping. Try something like this:
#macro Column(colHeight, colRadius, colRidges)
    difference {
        cylinder {<0,0,0>, <0,colHeight,0>, colRadius}

        #local k=0;//the loop counter
        #while(k<colRidges)
            cylinder {<0,-0.1,0>, <0,colHeight + 0.1,0>,
(colRadius*pi)/colRidges
                translate x*colRadius rotate k*y*(360/colRidges)
            }
            #local k=k+1;
        #end
    }
#end
Rounding off the sharp edges will take a bit more work, but it shouldn't
be too hard. I will work on that. This is how the macro is used:
object {Column(1, 1, 17)
    pigment {color White}
}


Post a reply to this message

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