|
|
On 2/13/23 19:45, Cousin Ricky wrote:
> #declare MyFunction = function (x, y)
> { (2 - cos (x * 2*pi) - cos (y * 2*pi)) / 4
> }
>
> height_field
> { function 20, 20 { MyFunction (x, y) }
> smooth
Good example. I always get tripped up when I come back to height_fields
because the function variables used are x and y (to match image based
height_fields I guess) while the generated height field sits atop the
x,z plane with y being the height. I too often first code my function
using x and z!
Bill P.
---
Another quick example.
#declare Fn02 = function { pattern { granite scale 0.5 } }
#declare Orange = srgb <1,0.50196,0>;
#declare HF00 = height_field {
function 800, 800 { Fn02(x,y,z) }
smooth
pigment { color Orange }
translate <-0.5,0,-0.5>
scale <2,0.05,2>
}
Post a reply to this message
|
|