POV-Ray : Newsgroups : povray.binaries.images : Yet another lighthouse (111kB) : Re: Yet another lighthouse (111kB) Server Time
3 Aug 2024 02:21:33 EDT (-0400)
  Re: Yet another lighthouse (111kB)  
From: Kyle
Date: 19 Apr 2007 22:07:18
Message: <tv7g23dgjfqipp8fob3s3fnd5fckupc4sd@4ax.com>
On Wed, 18 Apr 2007 14:13:16 -0700, William Tracy <wtr### [at] calpolyedu> wrote:

>> Your rocks look like pillow lava, though, is it a granite pattern? Why not 
>> wrinkles?
>
>Yeah, the rock looks funky... but I really like that water! :-)

Thanks!  

Here's the code for the island and the water.  The island could use some work.  Maybe
I'll work on
it for my next "final" version.


>>> snip >>>

/******************** Ocean *********************/

#if ( draw_ocean = 1 )



isosurface {
  function { 
    y
    - (f_bozo(x,0,z)-0.5)*2         
    - (f_bozo(x/4,0,z/4)-0.5)
    - (f_ridged_mf(x, 0, z, 0.9, 3, 6, 0.9, 10, 1)-0.5)*0.75     
  }
  contained_by { box { <-10, 2, 0>, <10, -2, 100> } }
  max_gradient /*6.5*/ 19.5
  scale <100, 5, 100>
//  pigment { rgb <0.2, 0.3, 0.5> }
  #if ( fancy_water = 1 )
    material {
      texture {
        pigment {
          color rgbt 1
        }
        finish {
          ambient 0
          diffuse 0
          #if (reflections = 1)
            reflection {
              0.0, 1.0
              fresnel on
            }
          #end
          conserve_energy
          specular 0.4
          roughness 0.003
        }
      }
      interior {
        ior 1.34
        dispersion 1.01
        fade_distance 1
        fade_power 1003
        fade_color rgb <0.97, 0.98, 0.99> /*<0.1113, 0.231, 0.2632>*3.5*/
      }
    }
  #else
    pigment { rgb 0.5 }
  #end  // fancy_water
}

#end // draw_ocean

/******************** Island *********************/

#if ( draw_island = 1 )

#declare f_p_LighthouseIsland = 
  function { 
    pigment { 
      average
      pigment_map {
        [1 wrinkles]
        [1 granite]
      }
    } 
  }

#declare f_LighthouseIsland = 
  function { 
    f_sphere(x/2.5, select(y-1/4, y, (y-1/8)*2), z/2.5, 1/4)
    - f_p_LighthouseIsland(x,y,z).gray/10
  }

#declare t_Rock =
  texture {
    pigment { 
      granite
      pigment_map {
        [0.00 rgb 0.10]
        [1.00 rgb 0.30] 
      }
      scale 0.2
    }
    //finish { ambient 0 }
  }
                   
#declare p_Grass1 =
  //AdjustPigmentGamma(
    pigment {
      image_map {
        jpeg "heathsgrass.jpg"
        interpolate 2
      }
    }
  //, 2.2)
                   
#declare p_Grass2 =
  //AdjustPigmentGamma(
    pigment {
      image_map {
        jpeg "dirt11.jpg"
        interpolate 2
      }
      scale 0.01
    }
  //, 2.2)

#declare t_Grass =
  texture {
    pigment {
      granite
      pigment_map {
        [0.00 p_Grass1]
        [0.20 p_Grass1]
        [0.80 p_Grass2]
        [1.00 p_Grass2]
      }
    rotate x*90
    }
    //finish { ambient 0 }
  }
                   
#declare t_GrassRock =
  texture {
    slope { <-0.25, 1, 0> }
    texture_map {
      [0.60 t_Rock]
      [1.00 t_Grass]
    }
  }

#declare t_Island =
  texture {
    gradient y
    texture_map {
      [0.00 t_Rock]
      [0.02 t_Rock]
      [0.05 t_GrassRock]
      [1.00 t_GrassRock]
    }
  }

#declare o_LighthouseIsland =
  isosurface {
    function { f_LighthouseIsland(x,y,z) }
    contained_by { box { <-0.8, -0.001, -0.8>, <0.8, 0.26, 0.8> } }
    max_gradient 3
    texture { t_Island }
    scale 100
  }

#end // draw_island

>>> snip >>>


Post a reply to this message

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