![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Wlodzimierz ABX Skiba
Subject: Re: yet another mengersponge...
Date: 12 Mar 2001 05:34:32
Message: <3aaca638@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Bonsai wrote in message <3AA91E79.770A2F54@b0n541.net>...
> Gilles Tran schrieb:
> > One fun thing would be to make the sponge out of triangles... I would render
> > very quickly I guess.
>
> with them. But I want to do some csg-ing with this little sponge thing after I
> can create it fast enough.
such object as mesh should be extremly fast
and you don't need CSG - just clippped_by
remember that copy of mesh not waste memory !
and you can balance between memory and speed by spliting object to smaller cubes
(you must find level) and below size create triangles and above size create
copies of meshes with clipping only some of them
ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Simen Kvaal wrote:
>
> >
> > Um, with better approximations, the volume the ray passes through will
> > decrease, and the sponge will become more and more *transparent*. You
> > will get a fainter and fainter image of the sponge, until it is
> > invisible. But as I said above, I'm only interested in an approximation,
> > maybe 3-5 levels...a real sponge would be impossible.
> >
>
> Interesting thought!
>
> I think you're right; it should be invisible.
>
I tried menger with different level of recursion. Iso-surface
calculation precision may affect results, so they are not definite, but
using recursion level of 40 made sponge disappear completely, level 30
showed only some very faint parts of it. Sponge with level 20 looks like
this:
(sorry about incomplete sponge: I left it on table for overnight and
mice thought that it was cheese and eat some of it. Next time I'll put
in place, where they can not access it! ;o)
Seems like sponge with levels up to 6-8 is acceptable, after this sponge
gets too blurry and loses its beauty.
Post a reply to this message
Attachments:
Download 'menger20.jpg' (20 KB)
Preview of image 'menger20.jpg'
![menger20.jpg](/povray.binaries.images/attachment/%3C3AACFBC6.4DAD69C2%40aetec.ee%3E/menger20.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Vahur Krouverk" <vah### [at] aetec ee> wrote :
>
> I tried menger with different level of recursion. Iso-surface
> calculation precision may affect results, so they are not definite, but
> using recursion level of 40 made sponge disappear completely, level 30
> showed only some very faint parts of it.
Are you saying that this is an isosurface? I have been expecting to see
a fractal isosurface soon but I didn't know one had been made.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Bill DeWitt wrote:
>
> Are you saying that this is an isosurface? I have been expecting to see
> a fractal isosurface soon but I didn't know one had been made.
No, I wrote that! :-) Yes, it is isosurface, like this (POVMan 0.7 is
required for running it, more complete example comes with
documentation):
#declare xyf=function{
shader{
shader_file "menger.slp"
"rec_depth" 20
}
}
isosurface {
function {
xyf
}
contained_by { box { -1.0,1.0 } }
all_intersections
max_gradient 100
accuracy 0.001
texture {
...
}
scale 2
}
shader file is as follows:
iso_function menge(float rec_depth = 8){
float testfirst(output float mx, mn){
float rv = -1;
mx *= 3;
mn *= 3;
float i;
extern float rec_depth;
for (i=0; i<rec_depth;i+=1){
if(mx<=1 && mn <= 1){
rv = 1;
break;
}
else{
mx = abs(mod(mx*3+1, 6) -1);
mn = abs(mod(mn*3+1, 6) -1);
}
}
return rv;
}
float retv = -1;
if (testfirst(abs(xcomp(P)),abs(ycomp(P))) == 1 ||
testfirst(abs(xcomp(P)),abs(zcomp(P))) == 1 ||
testfirst(abs(zcomp(P)),abs(ycomp(P))) == 1)
retv = 1;
return retv;
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Vahur Krouverk" <vah### [at] aetec ee> wrote :L
>
> No, I wrote that! :-) Yes, it is isosurface, like this (POVMan 0.7 is
> required for running it, more complete example comes with
> documentation):
>
> #declare xyf=function{
> shader{
> shader_file "menger.slp"
> "rec_depth" 20
> }
> }
> isosurface {
> function {
> xyf
> }
> contained_by { box { -1.0,1.0 } }
But is it a fractal isosurface or a fractal shader? Seems like a shader
to me, not knowing anything about shaders.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Bill DeWitt wrote:
>
> But is it a fractal isosurface or a fractal shader? Seems like a shader
> to me, not knowing anything about shaders.
Shader is probably not the best word for describing this. In version 0.7
I add feature, which allows to use shading language constructs and
virtual machine (which was created for shader byte-code execution) for
computing potential values for isosurfaces. So basically one can write
iso functions in C-like syntax, byte-compile them and use in iso-surface
calculation. As it appears, this works generally faster (2-5 times,
depending from complexity), than functions, which are written directly
in POV-Ray "language". And one can use more advanced features, such as
loops, temporary variables, etc.
Of course shader functions are slower, than built-in (i.e. hard-coded in
source code) iso-functions, about the same margin (2-5 times).
More about this is again in POVMan documentation.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> > Thus, better and better approximations would tend to a more and more
> > opaque object which take longer and longer to render. I'd say; skip
> > the transparency. :)
>
> Um, with better approximations, the volume the ray passes through will
> decrease, and the sponge will become more and more *transparent*. You
> will get a fainter and fainter image of the sponge, until it is
> invisible. But as I said above, I'm only interested in an approximation,
> maybe 3-5 levels...a real sponge would be impossible.
I'd have thought that would depend on the material being used to make
said sponge? With a transparent but reflective material, surely internal
reflections would build up to the point where they would overpower and
obscure any view through the sponge?
I could be wrong though...
Bye for now,
Jamie.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Vahur Krouverk" <vah### [at] aetec ee> wrote :
>
> So basically one can write
> iso functions in C-like syntax, byte-compile them and use in iso-surface
> calculation.
Ah, now I see. Thanks
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <MPG.1517399eed9bd1a989897@news.povray.org>,
jam### [at] ntlworld com (Jamie Davison) wrote:
> I'd have thought that would depend on the material being used to make
> said sponge? With a transparent but reflective material, surely internal
> reflections would build up to the point where they would overpower and
> obscure any view through the sponge?
Well, I was specifically talking about transparent sponges, but I think
that the cross-section area of the sponge will tend toward 0 as the
surface area tends toward infinity, so a ray (or in the real world, a
photon) wouldn't be able to hit a perfect sponge, and would just pass
through it.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3aad1a13@news.povray.org>, "Bill DeWitt"
<bde### [at] cfl rr com> wrote:
> But is it a fractal isosurface or a fractal shader? Seems like a
> shader to me, not knowing anything about shaders.
It's a fractal isosurface using a fractal shader as a function. It's no
more a shader than an isosurface that uses a pigment function is a
pigment. The object is an isosurface, defined as all points where a
function is equal to a threshold value...the way the function is
generated doesn't matter.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |