POV-Ray : Newsgroups : povray.general : Using a function in a height_field declaration : Re: Using a function in a height_field declaration Server Time
15 May 2024 04:57:39 EDT (-0400)
  Re: Using a function in a height_field declaration  
From: yesbird
Date: 15 Feb 2023 18:00:00
Message: <web.63ed62a543a1dd8868fd655b10800fb2@news.povray.org>
Interesting !

In combination with colormaps very attractive effect achieved. I will put it in
macro, with parameters.

---------------------------------------------------------
#include "playground.inc"
#include "colormaps.inc"

// Axis
axis (1.2,0.8,1.2,0.01)

// Cameras
// camo (5,5,5,0,0,0,45)
camp (2,2,2,0,-0.25,0,45)

//
// Prepare colormaps of desired transparency
//
#declare _f = 0;
#declare _t = 0;
#declare jet    = make_colormap (jet_arr,    _f, _t);
#declare spring = make_colormap (spring_arr, _f, _t);
#declare hot    = make_colormap (hot_arr,    _f, _t);
#declare winter = make_colormap (winter_arr, _f, _t);
#declare hsv    = make_colormap (hsv_arr,    _f, _t);
#declare autumn = make_colormap (autumn_arr, _f, _t);
#declare parula = make_colormap (parula_arr, _f, _t);
#declare summer = make_colormap (summer_arr, _f, _t);
#declare turbo  = make_colormap (turbo_arr,  _f, _t);
#declare cool   = make_colormap (cool_arr,   _f, _t);

//
// Object
//
intersection{
  box{0.01, 0.99

  pigment {  gradient y
               color_map {hsv}
               translate -y*0.1
               scale 0.6 }
  }

  height_field{
    function 500,500 { pattern { bozo scale 0.08 } }

    smooth
    pigment {  gradient y
               color_map {hsv}
               translate -y*0.81
               scale 0.8 }

    scale <1,0.4,1>
    }
  scale 1.0
}
---------------------------------------------------------
YB


Post a reply to this message


Attachments:
Download 'height_field_int_cmap.png' (211 KB)

Preview of image 'height_field_int_cmap.png'
height_field_int_cmap.png


 

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