POV-Ray : Newsgroups : povray.binaries.scene-files : isosurface <> height_field : isosurface <> height_field Server Time
1 Sep 2024 14:27:01 EDT (-0400)
  isosurface <> height_field  
From: Thomas de Groot
Date: 1 Mar 2006 09:26:13
Message: <4405af05@news.povray.org>
This is the code for the question asked in p.b.i.


//---------start of code:
#include "functions.inc"

#declare Xscale = 3;
#declare Zscale = 3;

#declare Landtex =
pigment {
  gradient y
  pigment_map {
    [0 rgb 0.3]
    [1 rgb 0.8]
  }
}

#declare P = function {f_ridged_mf(x, y, z, 0.8, 4, 10, 0.7, 1, 2) }

isosurface {
  function {y - P(x, 0, 1-z)}
  contained_by {box {<-Xscale, -1, -Zscale>, <Xscale, 2, Zscale>}}
  max_gradient 5
  translate <-0.5, 0, -0.5>
  pigment {Landtex}
  translate -Xscale*x
}

height_field{
  function 500, 500 {P( (x-0.5)*Xscale*2, 0, (y-0.5)*Zscale*2)}
  translate <-0.5, 0, -0.5>
  scale <Xscale*2, 1, Zscale*2>
  pigment {Landtex}
  translate Xscale*x
}

camera {
  location  <0, 10, -Zscale>
  look_at   <0, 0, 0>
  right     x*image_width/image_height
  angle     65
}

light_source {<-1000,2000,-1000> colour rgb 1*1.5}
light_source {<1000,2000,1000> colour rgb 1 shadowless}

//-----------------end of code


Post a reply to this message

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