POV-Ray : Newsgroups : povray.general : Using a function in a height_field declaration : Re: Using a function in a height_field declaration Server Time
30 Apr 2024 08:06:11 EDT (-0400)
  Re: Using a function in a height_field declaration  
From: yesbird
Date: 14 Feb 2023 12:35:00
Message: <web.63ebc50343a1dd8868fd655b10800fb2@news.povray.org>
Thanks, Kenneth.

Of сourse I've tried to play with arguments scaling , but problem in shifting
from origin (please look at attachment). Still can't figure out how it work.

----------------------------------------------------
#version 3.8;
global_settings { assumed_gamma 1 }

camera
{ location <1,1,1> * 2
  look_at <0,-0.5,0>
  angle 50
}

light_source { <10,10,10>, rgb <1,1,1> }

#declare somb = function (x,y) { sin (sqrt (x*x + y*y)) / sqrt (x*x + y*y) };

height_field
{
  function 500, 500 { somb(x*10, y*10) }

  smooth
  scale <1, 0.3, 1>
  pigment { green 0.8 }
}
----------------------------------------------------
YB


Post a reply to this message


Attachments:
Download 'height_field.png' (34 KB)

Preview of image 'height_field.png'
height_field.png


 

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