POV-Ray : Newsgroups : povray.binaries.images : Nov 29 2020 povr doodle : Re: Nov 29 2020 povr doodle Server Time
26 Apr 2024 00:47:33 EDT (-0400)
  Re: Nov 29 2020 povr doodle  
From: William F Pokorny
Date: 30 Nov 2020 05:28:44
Message: <5fc4c95c$1@news.povray.org>
On 11/30/20 2:28 AM, Thomas de Groot wrote:
> Op 29/11/2020 om 13:51 schreef William F Pokorny:
>> A doodle using povr tweaks on top of v3.8.
>>
>> Bill P.
> 
> Intriguing... Basically, a sphere_sweep?
> 
One could get the same (or better) "loose ball of wires" with a 
spheresweep, but here it's an isosurface.

//--- code below written for povr branch of POV-Ray.
#declare Fn00 = function (x,y,z,xn,zn) {
    f_planar(
        f_sphere(x+f_noise3d(xn+pi,y-pi,zn,2)*0.3,
                 y,
                 z+f_noise3d(xn,y+pi,zn-pi,2)*0.3,0.7),
        0.002,1
    )
}
#declare Fn01 = function { f_planar(f_ph(x,abs(y),z)/pi-0.2,0.002,1) }
#declare Fn02 = function { f_planar(f_ph(x,abs(y),z)/pi-0.4,0.002,1) }
#declare Fn03 = function { min(Fn01(x,y,z),Fn02(x,y,z)) }
#declare Fn04 = function { min(Fn03(x,y,z),Fn03(y,x,z),Fn03(x,z,y)) }
#declare Fn98 = function { max(Fn04(x,y,z),Fn00(x,y,z,x*4,z*4)) }

#declare Iso99 = isosurface {
     function { Fn98(x,y,z) }
...
     jitter on
...
}

---
Let's see. In povr:

f_planar is an inbuilt function with an "f_shell" functionality. If the 
value argument is x,y,z or any f_gradient() instead of f_sphere(), or 
whatever, it's very similar to the planar pattern in result excepting 
for not being clamped to a 0-1 value range - so I kept the naming.

f_noise3d has an extra parameter for the noise generator as do all 
in-built functions using noise generators directly. In POV-Ray you 
always get generator 2 excepting for one special noise function allowing 
the selection (I cannot recall the name - it's unnecessary and gone in 
povr).

In the isosurface itself, I used povr's "jitter on."

In this case, used mode 2 AA with "bigger (+j7)" truly random jitter and 
the +a0.0 internal optimizations avoiding the internal AA gamma 
calculations and color channel difference calculations. The truly random 
jitter is better at picking up the small wires (with the shadow of the 
wires more of a resolution problem). In the end, I increased the wire 
size to something less a hint of something - which was my original aim. 
The povr AA changes probably not strictly needed for the image as posted.

Bill P.


Post a reply to this message

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