POV-Ray : Newsgroups : povray.text.scene-files : landscape scene isosurface function Server Time
31 Oct 2024 21:23:43 EDT (-0400)
  landscape scene isosurface function (Message 1 to 1 of 1)  
From: Christoph Hormann
Subject: landscape scene isosurface function
Date: 6 Oct 2003 12:22:01
Message: <a2h851-r0b.ln1@triton.schunter.etc.tu-bs.de>
Here is a somewhat condensed version of the isosurface function used for 
the foreground in the landscape scene posted recently in p.b.i.  I only 
left out the very fine structure since it does not actually show any 
interesting technique, it is just anyother function added.

Remarks:

- i am not sure if it is of any use.  For a beginner the tutorial scenes 
mentioned in p.b.i. are surely much more helpful.
- it is meant for studying and enjoyment, please don't just use it in 
your scenes.
- please don't ask "what does this x or this number actually do".  I 
probably don't know myself any more.
- it is very slow and surely not very efficient.

Apart from that have fun rendering and studying.

Christoph


#declare fn_R1=
   function {
     pattern {
       granite
       poly_wave 3
       warp { turbulence 0.8 octaves 6 omega 0.6 lambda 2.2 }
       scale <3, 2, 0.5>*25
       rotate <20, 40, -70>
     }
   }

#declare fn_R2=
   function {
     pattern {
       bozo
       warp { turbulence 0.7 octaves 6 lambda 2.5 omega 0.52 }
       scale <1, 1.2, 0.3>
       rotate <1, 0.5, 70>
     }
   }

#declare fn_R3=
   function {
     pattern {
       bozo
       poly_wave 5
       warp { turbulence 0.8 octaves 6 omega 0.6 lambda 2.2 }
       scale <3, 2, 1.5>*3
       rotate <20, 40, -70>
     }
   }

#declare fn_spline=
function {
   spline {
     cubic_spline
     -100, <-100, -1>,
     -2, <-2, -0.8>,
     -0.7, <-0.7, 0.0>,
     -0.3, <-0.3, 0.28>,
     0.3, < 0.3, 0.7>,
     0.75, < 0.75, 0.9>,
     2, < 2, 1.0>,
     100, < 100, 1.0>
   }
}

#declare fn_C=
     function {
       fn_spline(
         16
         + 0.002*y*y
         - 0.0016*y*y*y
         + 1.2*x
         - 46*f_noise3d(0.32*x, 0.2+0.3*y, -8.88+1.9*z)
       ).y*4.5

       *(0.4+fn_R1(x/3, y/3, 5-z/5)*0.8)

     }

#declare fn_Terrain=
   function {
     z-
       (
         fn_C(x, y, 0)

         +(fn_spline(
            20
            -2*y
          ).y+1.35)*(1/2.35)
          *
          (
            fn_R3(x, y, z+0.01)*4.6
            +fn_R2(x, y, z)*1.7
          )

         - 1.17
       )
   }


-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 2 Sep. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

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