POV-Ray : Newsgroups : povray.general : cos & sin functions : Re: cos & sin functions Server Time
2 Aug 2024 00:20:10 EDT (-0400)
  Re: cos & sin functions  
From: Bob Hughes
Date: 19 Feb 2005 16:25:33
Message: <4217aecd$1@news.povray.org>
"B. Gimeno" <nos### [at] yacom> wrote in message 
news:4217a9ae$1@news.povray.org...
> take in count that pov rotates objects en degrees, but count sin and cos
> functions in radians, then
> instead
> object {XX rotate x*cos(30),
> use a conversion inside de cos function
> object {XX rotate x*cos(radians(30))}
> --
> B Gimeno

Yes, the following rotates the wood beam in a complete circle:

camera {location -100*z up y right image_width/image_height*x look_at 50*y}

light_source {<100,100,-100>,1}

#include "colors.inc"
#include "woods.inc"

declare beam = box {
 <0,0,0><1,1,1>
texture {T_Wood20}
}

#declare ANGLE = radians(clock*360);

object {
 beam
 scale <1.9,35.56,1.27>
 translate <cos(ANGLE)*-22.86,43+sin(ANGLE)*-22.86,2.54>
}


Post a reply to this message

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