POV-Ray : Newsgroups : povray.beta-test : parametric loses bounding? Something I'm unsure of : Re: waveforms whole scene, try this one please Server Time
29 Jul 2024 02:21:07 EDT (-0400)
  Re: waveforms whole scene, try this one please  
From: Bob Hughes
Date: 7 May 2005 05:00:57
Message: <427c83c9$1@news.povray.org>
/* here's a whole renderable scene */
// waveforms graphic

// command line suggested in the attributes.pov, so you can use that.
//cmd: -w120 -h48 +a0.1 +am2 -j +r3

global_settings {
  assumed_gamma 1
  max_trace_level 5
}

light_source {
  <1.5, 2.5, 2.5>*10000
  color rgb 1.0
}

camera {
    location    <0, 20, 7.5>*4      // waveform
  direction   y
  sky         z
  up          z
  right       (120/48)*x
  look_at     <0, 0, -0.1>
  angle       7
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [1.0 rgb <0.2,0.2,0.8>]
    }
  }
}

plane
{
  z, -1
  texture
  {
    pigment { color rgb 1 }
    finish {
      diffuse 0.7
      specular 0.4
      roughness 0.01

      reflection { 0.5 , 1.0
        fresnel on
        metallic 0.8
      }
      conserve_energy
    }
  }
}

#declare Cnt=0;

#while (Cnt < 5)

 #local fn_grad=
 function {
   pigment {
     gradient x
     color_map { [0 rgb 0][1 rgb 1] }
     #switch (Cnt)
       #case (1)
         triangle_wave
         #break
       #case (2)
         scallop_wave
         #break
       #case (3)
         sine_wave
         #break
       #case (4)
         poly_wave 2
         #break
       #else
         ramp_wave
     #end

     scale 1.2

   }
 }

 #declare Tex1=
 texture {
   pigment {
     function { fn_grad(x, y, z).gray }
     color_map { [0 rgb 0][1 rgb 1] }
   }
   finish { ambient 0.2 specular 0.4 }
 }

 object {
   isosurface {
     function { z-fn_grad(x, y, 0).gray*0.5 }

     max_gradient
     #switch (Cnt)
       #case (0) 1000 #break
       #case (1) 0.4 #break
       #case (2) 0.4 #break
       #case (3) 0.4 #break
       #case (4) 975 #break
     #end
     accuracy 0.001
     contained_by { box { <-0.8, -1.2, -1.2> <0.8, 1.2, 1.2> } }
   }

   texture { Tex1 }
   no_shadow
   translate <-4.0+Cnt*2, 0, 0>
 }

 #undef fn_grad

 #declare Cnt=Cnt+1;
#end


Post a reply to this message

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