POV-Ray : Newsgroups : povray.binaries.images : Sky : Sky Server Time
14 Nov 2024 20:29:08 EST (-0500)
  Sky  
From: Dave VanHorn
Date: 1 May 2004 01:30:47
Message: <40933607$1@news.povray.org>
How can I get a decent looking sky, given that I'm actually modeling the
surface of a planet, with light coming from a sun at scale distance?

I haven't been able to make top lit clouds work at all..


IOW:

#declare Inch    = 1;
#declare Foot    = (Inch * 12);
#declare Yard    = (Foot * 3);
#declare CM      = (Inch / 2.54);
#declare MM      = (CM / 10);
#declare Meter   = (CM * 100);
#declare kM      = (Meter * 1000);
#declare Mile    = (Foot * 5280);

//El Sol
#declare Solar_Radius = (696000 * kM);
#declare Hours        = 12;
#declare Minutes      = 35;
#declare Seconds      = 00;
#declare Latitude     = 40;

#declare Time = (360 / (24 * 60 *60)) * ((Hours * 60 * 60) + (Minutes * 60)
+ Seconds);

//For animating the sun, use this
//#declare Time = ((360 / (24 * 60 * 60)) * ((clock + .25) * 60 * 60 * 24))

#declare Ceiling   = (25000 * Foot) / (2 * pi);
#declare Sun_Dist  = (93000000 * Mile);
#declare Sun_Rad   = sin(radians(0.5))*Sun_Dist;
#declare Sun_Pos   = <0, 1, 0>; //y+z+x
#declare Sun_Pos   = vnormalize ( vrotate ( Sun_Pos, 0*x )) * Sun_Dist;
#declare Sun_Paint = texture { pigment {White * 1} finish {Dull} };

//This model assumes the sun orbits 0.0.0, and that the planet is a sphere,
translated to put
//the interesting part of the surface at 0.0.0
//Not exactly accurate, but close enough.
//It's also northern-hemispheric.
light_source { 0*x color White * 1.1 * (Sun_Dist * Sun_Dist) // Follows
inverse square law
               media_attenuation on
               translate Sun_Pos
               fade_distance 1
               fade_power 2
               rotate <-Latitude, 0, (180 + Time)>
               looks_like { sphere {<0,0,0> Solar_Radius texture {
Sun_Paint }}}
               media_attenuation on
               }


-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?


Post a reply to this message

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