POV-Ray : Newsgroups : povray.general : #while loop problem : Re: #while loop problem Server Time
10 Aug 2024 01:21:07 EDT (-0400)
  Re: #while loop problem  
From: Thorsten Froehlich
Date: 29 Mar 2000 01:00:06
Message: <38e19be6$1@news.povray.org>
In article <Pin### [at] graftsalleyorg> , 
crewman <cre### [at] graftsalleyorg>  wrote:

> #declare Count1=0;
> #while (Count1 < 6)
>
> //This is the torus I want to make 6 (well 5 copies of)
> #declare spinner2 =
> torus { 1.0, 0.8
> scale <1,0.1,1>
> translate <0,0,0.5>
> texture {T13} // A nice gold texture in metals.inc
> }
>
>
> difference {
> //the sphere I want to "etch"
> sphere {<0,0,0.5> 1.4
> texture {T13}
>
> object {spinner2 rotate <0,0,60*Count1>}
>
> #declare Count1=Count1+1;
> #end

You need to use only one difference statement. Currently you create six
spheres and out of each of them you cut out one torus. Try this:

difference {
    //the sphere I want to "etch"
    sphere {<0,0,0.5> 1.4}

    #declare Count1=0;
    #while (Count1 < 6)

        //This is the torus I want to make 6 (well 5 copies of)
        torus {
            1.0, 0.8
            scale <1,0.1,1>
            translate <0,0,0.5>
            rotate <0,0,60*Count1>
        }

    #declare Count1=Count1+1;
    #end

    texture {T13} // A nice gold texture in metals.inc
}



     Thorsten


Post a reply to this message

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