POV-Ray : Newsgroups : povray.binaries.images : Sea Scene WIP : Re: Sea Scene WIP Server Time
1 Aug 2024 08:19:19 EDT (-0400)
  Re: Sea Scene WIP  
From: Thomas de Groot
Date: 3 Oct 2008 09:49:30
Message: <48e622ea$1@news.povray.org>
I was sure I had it somewhere!
I remember I asked about this some years ago. Jim Charter provided the 
following piece of code:

/**********************************************************************************
 Persistence of Vision Ray Tracer Scene Description File
 File name   :      .pov
 Version     : 3.6 / MegaPOV 1.0
 Description : Quick stab at placing concentric ripples w objects.

 Date        : July 2005
 Author      : Jim Charter
 E-mail      : p.b.i. and p.b.s-f, 05-07-2005

**********************************************************************************/

        #include "colors.inc"
        sky_sphere {
          pigment {
            gradient y
            color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] }
          }
        }

        light_source {    0
                color rgb 1
                translate vrotate ( <0,0,-100 >, <80, 90, 0> )
        }
        camera {
                location vrotate ( <0,0,-20 >, <10, 0, 0> )
                look_at <0,0,0>
                angle 25
        }

        #local S = seed(1);
        #local Number = 2;
        #local RandomLocation = array[Number];
        #local I = 0;

        #while (I < Number)
          #local RandomLocation[I] =  < 5-10*rand(S), 0, 5-10*rand(S) > ;
          #local I = I + 1;
        #end

        plane { y, -10 pigment { rgb 0 }}

        plane { y, 0
          hollow
          interior { ior 1.5 }
          pigment { rgb 0 }
          finish { ambient 0 reflection { 1 fresnel on } }
          normal {
            average
            normal_map {
              #local I = 0;
              #while (I < dimension_size(RandomLocation,1))
                [1   pigment_pattern {
                       cylindrical
                       scale 5
                       poly_wave 1.5
                       pigment_map {
                         [0  rgb 1 ]
                         [1  wood
                             rotate x*90
                             cubic_wave
                             scale .1
                             pigment_map {
                               [0 rgb .5]
                               [.45 rgb .3 ]
                               [.55 rgb .7]
                               [1 rgb .5]
                             }
                         ]
                       }
                       translate RandomLocation[I]
                     }
                ]
                #local I = I + 1;
              #end
            }
          }
        }

        #local I = 0;
        #while (I < dimension_size(RandomLocation,1))
          sphere { 0, .5
            pigment { rgb Yellow }
            translate RandomLocation[I] + <0,.25,0>
          }
          #local I = I + 1;
        #end


Post a reply to this message

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