POV-Ray : Newsgroups : povray.pov4.discussion.general : Playing with suggested v4.0 f_boxb and three cos function. : Re: Playing with suggested v4.0 f_boxb and three cos function. Server Time 5 Aug 2024 22:01:06 EDT (-0400)
 Re: Playing with suggested v4.0 f_boxb and three cos function.
 From: William F Pokorny Date: 20 Feb 2023 08:50:49 Message: <63f37ab9\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#63f37ab9%241%40news.povray.org",
"headline": "Re: Playing with suggested v4.0 f_boxb and three cos function.",
"dateCreated": "2023-02-20T13:50:49+00:00",
"datePublished": "2023-02-20T13:50:49+00:00",
"author": {
"@type": "Person",
"name": "William F Pokorny"
}
}
On 2/19/23 14:38, Bald Eagle wrote:
> That looks cool.

Thanks.

>
> Now all you need to do is interlace that function with some white ovoids with
> micronormals, and you sell those by the case for \$50+ each.

:-)

---

> Aside: The gradient of "cos(x) + cos(y) + cos(z)" is relatively high
> as isosurface functions go.

Aside to my aside... We can lower the gradient in the above case. By
noticing the function values swing between -3 and 3 in a symmetrical
way, we can code:

#declare Fn03 = function (x,y,z) {
(cos(x) + cos(y) + cos(z))*(1/3)
}

Which re-maps the values to -1 to 1. Why not *1/9 you ask for an even
lower gradient? Well, you can, but it gets to be a gradient game with
isosurfaces after some point. It tends' to help to get everything into a
more common value space - and I aim for -1 to 1 as a rule - as in that
space functions tend to play better together.

Bill P.
```