POV-Ray : Newsgroups : povray.general : Using a function in a height_field declaration : Re: Using a function in a height_field declaration Server Time
29 Feb 2024 04:33:57 EST (-0500)
  Re: Using a function in a height_field declaration  
From: Bald Eagle
Date: 13 Feb 2023 19:10:00
Message: <web.63ead0ea43a1dd881f9dae3025979125@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> Very interesting !
> Could you share the scene, please ? May be I will use this trick in my POV-Lab
> ....

#version 3.8;
global_settings {assumed_gamma 1}
#declare E = 0.00001;



camera {
 orthographic
 location <image_width/2, image_height/2,  -image_width*2>
 right x*image_width
 up y*image_height
 //sky y
 look_at <image_width/2, image_height/2, 0>
 rotate y*0
}

light_source {<image_width/2, image_height/2, -image_width*4> rgb 1 shadowless}


#declare BWCM = color_map {
 [0 rgb 0]
 [1 rgb 1]
}

#declare RGCM = color_map {
 [0.0 rgb x]
 [0.54 rgb x+y]
 [0.54 rgb 0] // black elevation line
 [0.55 rgb 0]
 [0.55 rgb x+y]
 [1.0 rgb y]
}

height_field {
 function 500 500 {pigment {bozo scale 0.1 color_map {BWCM} }}
 smooth
 pigment {gradient y color_map {RGCM} scale 0.9}
 scale image_height/2
 translate <image_width/3, image_height/4, 0> rotate -x*80
}


Post a reply to this message

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