 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Droj" <803### [at] droj de> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> 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)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> 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'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |