POV-Ray : Newsgroups : povray.animations : sunpos.inc and sunrise, sunset : Re: sunpos.inc and sunrise, sunset Server Time
8 Jul 2024 16:25:36 EDT (-0400)
  Re: sunpos.inc and sunrise, sunset  
From: davidafisher
Date: 8 Nov 2002 11:35:05
Message: <web.3dcbe728dccea13167ebf1b60@news.povray.org>
davidafisher wrote:
>OK,
>   this is driving me nuts.
>
>I eliminated the plane, didnt help for, as soon as the light source
>developed a negative y value with my camera on the positive side I lose it
>anyway.
>
>So I did this
>
>#local discRad =
>((r/100)*sin(radians(angsize)))/sin(radians((180-angsize)/2));    //disc
>is nearer so angular size needs adjusting using Sine Law and distance r
>
>#declare Sun =  disc {<0,0,r/600>  //adjust for 10^7 distance limitation
>                      0,0,1>       // z as normal before rotation
>                     discRad       // the compensated Sun size
>                     pigment {Yellow}
>                     finish {Luminous}
>                     no_shadow
>                     rotate <Al, Az, 0>  // need rotation to keep disc
>facing us
>              }
>Sun
>
>// now distribute a light every 10 degrees around the outer edge of the disc
>called Sun
>
>#local distrib_count = 0;
>#while (distrib_count <36)
>  light_source { <0,0,r/600>
>                 color White*0.027778     // 1/36th intensity
>                 rotate <-Al, Az, 0>
>                 translate y*discRad      // move it to the edge of Sun
>                 Rotate_Around_Trans(10*distrib_count, Sun)
>                }
>        #local distrib_count = distrib_count+1;
>#end
>
>
>But any way I try I can't get the vector values of the object defined as
>Sun!
>
>
>What next??
>

Using the disc and light approach addresses my original problem so maybe
this should be in another section other than animation, but my problem
now seems to be more of referencing the vectors of a declared object - in
this case the Sun.   The macro Rotate_Around_Trans dies with a "this is not
a numeric expression - object identifier found instead" and if I try other
combinations of macros or direct reference to say Sun.x I get the same
error. I thought it might be because its a disc but changing it to a sphere
has the same result.

So what am I missing about reference the vectors of a declared object?


Post a reply to this message

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