POV-Ray : Newsgroups : povray.binaries.images : Not a Sphere (91K) : Re: Not a Sphere (91K) Server Time
17 Aug 2024 18:26:31 EDT (-0400)
  Re: Not a Sphere (91K)  
From: Tor Olav Kristensen
Date: 14 Oct 2001 18:33:46
Message: <3BCA125F.CABCEAD8@hotmail.com>
Tor Olav Kristensen wrote:
>...
> #declare Step = 360/60;
> 
> #declare Cx = 0;
> #while(Cx < 180)
>   sphere {
>     <0, 1, 0>, 0.06
>     rotate Cx*x
>     texture { T_Gold_3C }
>   }
>   #declare Cx = Cx + Step;
> #end // while
>...

I just also wanted to mention
that the code below does the same
as the above code.


#declare MySphere =
sphere {
  <0, 0, 0>, 0.06
  texture { T_Gold_3C }
}

#declare Cx = 0;
#while(Cx < 180)
  object {
    MySphere
    translate y
    rotate Cx*x
  }
  #declare Cx = Cx + 6;
#end // while


If you like, you can write
rotate <Cx, 0, 0> instead of
rotate Cx*x
 
(Note that when using other
textures, that are not the same
at every point in 3D-space, the
result from the two examples
above will become different.)


Tor Olav


Post a reply to this message

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