POV-Ray : Newsgroups : povray.binaries.images : Looking for a height field : Re: Looking for a height field Server Time
2 Nov 2024 04:24:41 EDT (-0400)
  Re: Looking for a height field  
From: Bill Pragnell
Date: 18 Aug 2011 16:15:00
Message: <web.4e4d71fd2d6aad8f47febf00@news.povray.org>
Jim Holsenback <nom### [at] nomailcom> wrote:
> I'm looking for a royalty free height field to use with this latest
> version. Since I added the pool I thought more water was kind of
> redundant. The height field should mostly be flat-ish with gradual hills
> at the edges. Comments/contributions appreciated!

How about this? I knocked it up recently for some lego rendering, adapt as you
see fit if it's useful :)

#declare RingRadius = 2;
#declare MountainSize = 1;
#declare MountainHeight = 2;
#declare FieldSize = 8;
#declare FieldRes = 250;

#declare Ring_fn = function {
 select( sqrt(x*x + y*y + z*z)-RingRadius, 0, pow(sin((1/RingRadius)*(sqrt(x*x +
y*y + z*z)-RingRadius)), 2))
}

#declare Mountain_fn = function {
  pigment {
   bozo turbulence 0.1
   color_map { [0 rgb 0] [1 rgb 1] }
   scale MountainSize }
}

#declare MountainRing = height_field {
 function 750, 750 {
  Ring_fn(FieldSize*(x-0.5), FieldSize*(y-0.5), 0) *
  Mountain_fn(FieldSize*x,FieldSize*y,0).x }
 smooth
 translate <-0.5, 0, -0.5>
 scale <FieldSize, 1, FieldSize>
 scale <1, MountainHeight, 1>
}

---
Bill


Post a reply to this message

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