POV-Ray : Newsgroups : povray.general : Q: Sine Wave : Re: Q: Sine Wave Server Time
12 Aug 2024 13:23:50 EDT (-0400)
  Re: Q: Sine Wave  
From: Marc Schimmler
Date: 2 Feb 1999 02:43:54
Message: <36B6ACB0.1393FF2@ica.uni-stuttgart.de>
Ken wrote:
> 
> Greetings !
> 
> Could someone please provide me an example of how to create
> a sine wave using a while loop to translate/rotate(?) a sphere.
> 
> Example:
> 
>       --         --         --
>     /    \     /    \     /    \
> ___/      \___/      \___/      \___
> 
> Appreciate any help and thanks !
> 
> --
> Ken Tyler
> 
> tyl### [at] pacbellnet

I tried this one in v3.02

-------

camera {
 rotate <0,180,0>
 location <45,0,-40>
 look_at  <45,0,0>
 angle 60
}

#declare i=0;

#while (i<90)
 sphere {0,1 
         pigment {rgb <1,0,0>}
         finish {ambient 1.0}
		 translate <i,10*sin(i*pi/30),0>}
 #declare i = i + 1;
#end;

-----


Marc
-- 
Marc Schimmler


Post a reply to this message

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