POV-Ray : Newsgroups : povray.binaries.images : yet another mengersponge... Server Time
19 Aug 2024 00:29:05 EDT (-0400)
  yet another mengersponge... (Message 11 to 20 of 36)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Gilles Tran
Subject: Re: yet another mengersponge...
Date: 9 Mar 2001 12:31:53
Message: <3AA913EC.2DC3A191@inapg.inra.fr>
Bonsai wrote:

> But when I want to do the cut away with a sphere it goes back to the 1 or 2


What about cutting away the (correctly positioned) individual parts first ? It
should render faster than making the union first and cutting the union after.

One fun thing would be to make the sponge out of triangles... I would render
very quickly I guess.

G.

--

**********************
http://www.oyonale.com
**********************
Graphic experiments
Pov-ray gallery


Post a reply to this message

From: Bonsai
Subject: Re: yet another mengersponge...
Date: 9 Mar 2001 13:18:18
Message: <3AA91E79.770A2F54@b0n541.net>
Gilles Tran schrieb:
> 
> What about cutting away the (correctly positioned) individual parts first ? It
> should render faster than making the union first and cutting the union after.



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

Thanks for the hints again,

Bonsai


Post a reply to this message

From: Margus Ramst
Subject: Re: yet another mengersponge...
Date: 9 Mar 2001 16:16:54
Message: <3AA9494D.58AF9116@peak.edu.ee>
Bonsai wrote:
> 
> I wanted to do the sponge in pure csg. So I did a lot of differences, that
> resulted in this long rendertime.
> 

Why differences? You should get *much* faster rendering if you created the
sponge as an union, i.e. stack a lot of little blocks to make up the sponge
structure, instead of progressively cutting holes out of one big block.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

From: Chris Huff
Subject: Re: yet another mengersponge...
Date: 10 Mar 2001 07:17:32
Message: <chrishuff-3098F7.07134510032001@news.povray.org>
In article <3aa8d2db@news.povray.org>, "Bonsai" <bon### [at] b0n541net> 
wrote:

> I never wanted to let it look like cheese. I use the yellow color 
> only for modelling and testing a new object or shape, because for me 


It was supposed to be a joke...I just forgot the smiley. But I do think 
the smaller piece would look at home on a mouse trap...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Chris Huff
Subject: Re: yet another mengersponge...
Date: 10 Mar 2001 07:27:23
Message: <chrishuff-641476.07233610032001@news.povray.org>
In article <3AA8E44A.6218AF06@stress.uio.no>, Simen Kvaal 
<sim### [at] stressuiono> wrote:

> Consider rendering a compact subset of R^3 (that is closed and 
> bounded) which has zero volume but infinite surface area. Thus, it 
> will require infinitely many recursion levels to trace one single ray 
> accurately through it.

Of course, I meant an *approximation* of a Menger sponge...rendering a 
real one would literally take forever, and probably not be that 
interesting.


> And it would definetely not be transparent, or even semitransparent.
> 
> 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.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Simen Kvaal
Subject: Re: yet another mengersponge...
Date: 11 Mar 2001 11:11:25
Message: <3aaba3ad$1@news.povray.org>
>
> 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.

:)

~simenkv.


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: yet another mengersponge...
Date: 12 Mar 2001 05:34:32
Message: <3aaca638@news.povray.org>
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

From: Vahur Krouverk
Subject: Re: yet another mengersponge...
Date: 12 Mar 2001 11:38:58
Message: <3AACFBC6.4DAD69C2@aetec.ee>
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


 

From: Bill DeWitt
Subject: Re: yet another mengersponge...
Date: 12 Mar 2001 13:25:00
Message: <3aad147c$1@news.povray.org>
"Vahur Krouverk" <vah### [at] aetecee> 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

From: Vahur Krouverk
Subject: Re: yet another mengersponge...
Date: 12 Mar 2001 13:42:22
Message: <3AAD18B2.5A8A84C@aetec.ee>
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

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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