POV-Ray : Newsgroups : povray.text.scene-files : A moon Server Time
1 Jun 2024 21:31:32 EDT (-0400)
  A moon (Message 1 to 1 of 1)  
From: sap
Subject: A moon
Date: 1 Nov 2004 14:22:51
Message: <41868d0b@news.povray.org>
#include "colors.inc"
#include "functions.inc"

background{rgb 0}
default{pigment{White}}

// ----------------------------------------

camera {

  location  <10, 10, -10>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0,0,0>
}

light_source{< 1000, 500,-1000> color White*2}
light_source{<-1000, 1000,-1000> color White*2}


#declare fx_leo=
function{
 pigment{
  leopard
  turbulence 0.2
  color_map{
   [0 color rgb 0]
   [0.5 color rgb 0]
   [1 color rgb -1]        //keep the negative value to make holes in the 
moon
  }
 scale 0.5
 rotate y*-30
 }
}

#declare fx_wrin=
function{
 pigment{
  wrinkles
  warp{turbulence<0.2,0.2,0.2>}
  color_map{
   [0 color rgb 0]
   [1 color rgb 1]
  }
 }
}

#declare fx_granite=
function{
 pigment{
  granite
  turbulence 1
  color_map{
   [0 color rgb 0]
   [1 color rgb 1]
  }
 }
}

#declare pig=
pigment{
 average
 pigment_map{
  [1 wrinkles
  warp{turbulence<0.2,0.2,0.2>}
  color_map{
   [0 color rgb 0]
   [1 color rgb 1]
  }
  ]
  [1 granite
  turbulence 1
  color_map{
   [0 color rgb 0]
   [1 color rgb 1]
  }
  ]
  [1 leopard
  turbulence 0.2
  color_map{
   [0 color rgbft <0,0,0,1,1>]
   [0.5 color rgbft <0,0,0,1,1>]
   [1 color rgb 1]
  }
  scale 0.5
  rotate y*-30
  ]
  [1 leopard
  turbulence 0.2
  color_map{
   [0 color rgbft <0,0,0,1,1>]
   [0.5 color rgbft <0,0,0,1,1>]
   [1 color rgb 0.8]
  }
  scale 0.5
  scale 1/2
  rotate y*-30
  ]
 }
}


isosurface{
 function{
  f_sphere(x,y,z,5)-
  (fx_wrin(x,y,z).gray*0.05
  - fx_granite(x/10,y/10,z/10).gray*0.05)
  - fx_leo(x,y,z).gray*0.1
  - fx_leo(x*2,y*2,z*2).gray*0.05
 }
 accuracy 0.001
 max_gradient 1.518
 contained_by{sphere{0,5.2}}
pigment{pig}
finish{specular 0.25 ambient 0.6}
}


Post a reply to this message

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