POV-Ray : Newsgroups : povray.newusers : Which is he best way to model the sun? : Re: Which is he best way to model the sun? Server Time
2 Nov 2024 15:24:14 EDT (-0400)
  Re: Which is he best way to model the sun?  
From: Dan P
Date: 25 Jan 2004 23:53:43
Message: <40149d57@news.povray.org>
I know this isn't specifically what he's asking, yet I thought I'd share my
little Sun1 Macro:

// a is angle across the sky.
#macro sun (a)

 light_source
 {
  <0, 0, 1000>
  color rgb <1, 1, 0.97>
  parallel

  area_light
  <40, 0, 0> <0, 0, 40>
  4, 4
  adaptive 0
  jitter
  circular
  orient

  looks_like
  {
   union
   {
    sphere
    {
     <0, 0, 0>, 1
     hollow

     pigment { color rgbft <1, 1, 1, 1, 0> }

     interior
     {
      media
      {
       emission 0.05

       density
       {
        spherical
        poly_wave

        density_map
        {
         [ 0  rgbt <0, 0, 0, 0> ]
         [ 30 rgbt <1, 1, 1, 0> ]
         [ 60  rgbt <1, 1, 1, 0> ]
        }
       }
      }
     }

     scale <200, 200, 200>
    }
   }
  }

  rotate -a*x
 }

#end


Post a reply to this message

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