POV-Ray : Newsgroups : povray.animations : sunpos.inc and sunrise, sunset : Re: sunpos.inc and sunrise, sunset Server Time
8 Jul 2024 17:04:19 EDT (-0400)
  Re: sunpos.inc and sunrise, sunset  
From: davidafisher
Date: 7 Nov 2002 14:55:05
Message: <web.3dcac283dccea13167ebf1b60@news.povray.org>
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??


Post a reply to this message

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