POV-Ray : Newsgroups : povray.binaries.scene-files : AT Devil Plate Server Time
29 Apr 2025 03:19:01 EDT (-0400)
  AT Devil Plate (Message 1 to 7 of 7)  
From: Droj
Subject: AT Devil Plate
Date: 4 Apr 2025 10:50:00
Message: <web.67eff108fc8a612c763e4a273b2af915@news.povray.org>
Hi,

Again I found an other interesting isosurface in Abderrahman Taha's MathMod
which he called Devil Plate (see his functions at the beginning of the attached
pov-file).

But this time I am stuck.

I am posting the pov-file which renders OK although it takes a 'couple
of minutes'. The result is close to the original but

what I could not find out is how to apply thickness

ThickIsoExterior=(Iso(x,y,z,1)*Iso(x,y,z,-1))

and how to apply this condition

F(x,y,z,t) = if(y<(44/10)&y>-(24/10),ThickIsoExterior((10*x/15),y,z,t),1)

Can someone help?

Regards
Droj


Post a reply to this message


Attachments:
Download 'iso_devil_plate.pov.txt' (3 KB)

From: Bald Eagle
Subject: Re: AT Devil Plate
Date: 4 Apr 2025 11:45:00
Message: <web.67effe60d1f5ea8e25b4de9225979125@news.povray.org>
"Droj" <803### [at] drojde> wrote:

> what I could not find out is how to apply thickness
>
> ThickIsoExterior=(Iso(x,y,z,1)*Iso(x,y,z,-1))


That's just a function - like any other.
You might have discontinuities, which would drive the gradient through the roof.

> and how to apply this condition
>
> F(x,y,z,t) = if(y<(44/10)&y>-(24/10),ThickIsoExterior((10*x/15),y,z,t),1)

There are likely several ways to go about this.
Enclosing the inequalities in parentheses evaluates them as a Boolean.
If you multiply them, if either one is false, then the product is zero.
If they are both true, then you get 1 * 1 = 1;
so you could try:

F(x,y,z,t) =
select ( (y<(44/10)) * (y>-(24/10)),
0, 1, ThickIsoExterior((10*x/15),y,z,t)
)

A zero gets added in to use the "4-parameter version" of select, and then since
false = 0, the 1 is the next parameter, and true = 1, so ThickIsoExterior is the
last parameter.

Hope that makes sense.

- BW

select(A, B, C [,D])
It can be used with three or four parameters Select compares the first argument
with zero, depending on the outcome it will return B, C or D. A,B,C,D can be
floats or funtions.

When used with three parameters, if A < 0 it will return B, else C (A >= 0).

When used with four parameters, if A < 0 it will return B. If A = 0 it will
return C. Else it will return D (A > 0).


Post a reply to this message

From: Droj
Subject: Re: AT Devil Plate
Date: 5 Apr 2025 08:25:00
Message: <web.67f1205ad1f5ea8e4e78ec763b2af915@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> >
> > F(x,y,z,t) = if(y<(44/10)&y>-(24/10),ThickIsoExterior((10*x/15),y,z,t),1)
>
> There are likely several ways to go about this.
> Enclosing the inequalities in parentheses evaluates them as a Boolean.
> If you multiply them, if either one is false, then the product is zero.
> If they are both true, then you get 1 * 1 = 1;
> so you could try:
>
> F(x,y,z,t) =
> select ( (y<(44/10)) * (y>-(24/10)),
> 0, 1, ThickIsoExterior((10*x/15),y,z,t)
> )
>
> A zero gets added in to use the "4-parameter version" of select, and then since
> false = 0, the 1 is the next parameter, and true = 1, so ThickIsoExterior is the
> last parameter.
>
> Hope that makes sense.
>
> - BW
>
> select(A, B, C [,D])
> It can be used with three or four parameters Select compares the first argument
> with zero, depending on the outcome it will return B, C or D. A,B,C,D can be
> floats or funtions.
>
> When used with three parameters, if A < 0 it will return B, else C (A >= 0).
>
> When used with four parameters, if A < 0 it will return B. If A = 0 it will
> return C. Else it will return D (A > 0).

Thanks, B.E.
Now it's clearer what select() is good for.
I have to chew on that for a while.


Post a reply to this message

From: Droj
Subject: Re: AT Devil Plate
Date: 26 Apr 2025 16:25:00
Message: <web.680d4033d1f5ea8e7633bf863b2af915@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

>
> F(x,y,z,t) =
> select ( (y<(44/10)) * (y>-(24/10)),
> 0, 1, ThickIsoExterior((10*x/15),y,z,t)
> )
>
> Hope that makes sense.

Hi BE,
I followed your advice with respect to select() and added the appropriate code
using the boolean & instead of multiply.

And it works - well, not the way it should.
I believe there is something wrong in my Povray code which is hard for me to
find out.

I added AT's equations as comment above the Povray code.

Meanwhile I read the threads initiated by klp in Povray's advanced users
<6752dcbc@news.povray.org>
in Dec 2024 about the topic but I could not find the solution there.

The interesting thing about my misinterpretation of AT's equations is:

 (1) setting threshold 1 and accuracy 0.01 (max_gradient 2352446)
 ==> Povray renders something solid (not the object I was expecting)
 ==> Trace Time: 1h 38 min using 16 threads
 (2) setting threshold 0 and accuracy 0.01 (max_gradient 2352446)
 ==> Povray renders something invisible
 ==> Trace Time: about the same as above
 (3) setting threshold 0.01 and accuracy 0.1 (max_gradient 2352446)
 ==> Povray renders an object that looks like being peeled
 ==> Trace Time: 0h 39 min using 16 threads
 And no, Povray doesn't complain about gaps in the object!

I will post an image of (1) and (3) in p.b.i

Thanks for your patience

Droj


Post a reply to this message


Attachments:
Download 'iso_devil_plate_test.pov.txt' (4 KB)

From: Bald Eagle
Subject: Re: AT Devil Plate
Date: 27 Apr 2025 08:15:00
Message: <web.680e1f13d1f5ea8e1f9dae3025979125@news.povray.org>
I don't know what your ultimate goal is, but when I just evaluated the
isosurface for

function {DevilFn2(x,y,z)

I get the following render (Cam and lights adjusted, white sky_sphere)

- BW


Post a reply to this message


Attachments:
Download 'iso_devil_plate_test.png' (39 KB)

Preview of image 'iso_devil_plate_test.png'
iso_devil_plate_test.png


 

From: Droj
Subject: Re: AT Devil Plate
Date: 28 Apr 2025 14:00:00
Message: <web.680fc0ecd1f5ea8e397fdce03b2af915@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I don't know what your ultimate goal is, but when I just evaluated the
> isosurface for
>
> function {DevilFn2(x,y,z)
>
> I get the following render (Cam and lights adjusted, white sky_sphere)
>
> - BW

When you render the function #declare Iso = function(x,y,z) {
you get the image attached.

The next 2 functions should add thickness to the shape (you see the rim of the
'plate' is thin like an eggshell).

And this is where the flaw is.

Droj


Post a reply to this message


Attachments:
Download 'iso_devil_plate.png' (77 KB)

Preview of image 'iso_devil_plate.png'
iso_devil_plate.png


 

From: Bald Eagle
Subject: Re: AT Devil Plate
Date: 28 Apr 2025 14:30:00
Message: <web.680fc86bd1f5ea8eb00a87a025979125@news.povray.org>
Try Mike Williams' isosurface thickening trick:

Thickening
If we have a function F(x,y,z) we can turn it into two parallel surfaces by
using abs(F(x,y,z))-C where C is some
small value. The original function should be one that works with zero threshold.
The two resulting surfaces are
what you would get by rendering the original function with threshold +C and -C,
but combined into a single
image. The space between the two surfaces becomes the "inside" of the object. In
this way we can construct
things like glasses and cups that have walls of non-zero thickness.
#declare F = function {y + f_noise3d (x*2, 0, z*2)}
isosurface {
function {abs (F(x, y, z))-0.1}
....


Post a reply to this message

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