POV-Ray : Newsgroups : povray.newusers : halo command error : Re: halo command error Server Time
28 Jul 2024 22:29:33 EDT (-0400)
  Re: halo command error  
From: Tim Attwood
Date: 17 May 2008 22:38:49
Message: <482f96b9@news.povray.org>
> scaling an object doesn't reduce its density. Eight thousand times a piece 
> of steel is a piece of steel, not a piece of super-sparse steel.

Yeah, the density isn't dependent on scale, I forgot that.
This should work with diferent radius planets.

#declare PlanetRadius = 50;

#declare PlanetAtmosphere = sphere { <0,0,0>, 1
   hollow
   material {
      texture {
         pigment { rgbt <1,1,1,1> }
      }
      interior {
         media {
            emission <0,0,2>
            density {
               spherical
               color_map {
                  [0 rgb 0]
                  [0.05 rgb 1/PlanetRadius]
                  [0.05 rgb 0]
                  [1 rgb 0]
               }
            }
         }
         media {
            emission <2,2,0>
            density {
               spherical
               color_map {
                  [0 rgb 0]
                  [0.05 rgb 0.25/PlanetRadius]
                  [0.05 rgb 0]
                  [1 rgb 0]
               }
            }
         }
      }
   }
   scale 1.05
}

#declare PlanetSurface = sphere { <0,0,0>, 1
   pigment {
      image_map {
         jpeg "earth02.jpg"
         map_type 1
      }
      rotate <0,-150,0>
   }
};

#declare Planet = union {
   object {PlanetAtmosphere}
   object {PlanetSurface}
   scale PlanetRadius
};

object {
   Planet
   translate <-PlanetRadius,0,0>
}


Post a reply to this message

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