POV-Ray : Newsgroups : povray.binaries.images : Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB) Server Time
15 Aug 2024 18:20:12 EDT (-0400)
  Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB) (Message 1 to 9 of 9)  
From: Yadgar
Subject: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 20 May 2002 13:39:39
Message: <3CE93452.5EF5F5E2@tiscalinet.de>
High!

Several weeks ago, I posted here on a problem with primitive fractal
scenes. Back then, I used to build them by nesting
loops corresponding to their tree-like structure. But (at least with the
cube fractal) whenever I did this more than 4 iterations
deep, I got that nasty "Too many nested objects" error.

Then the ominous K appeared on the scene... he posted an alternative
solution in p.b.s-f capitalizing on PoV-Ray's implicit
creation of objects:

#declare cubes=
union
{
   object { cube}
   object { cube ...}
   object  { cube ... }
}

#declare cubes=
union
{
    object { cube }
    object { cubes ... }
    object { cubes ... }
}

and so on... each definition of "cubes" is scaled and translated in the
following re-definition.

I then started to use this technique, it worked very well, but of course
there is the problem, that, unlike with nested loops, I'll
never be able to modify each single cube individually, for example by
using rand(). Nevertheless, K's method yielded some
very interesting results, which I would like to show here.

But as realistic trees need branches and twigs which are individually
modifyable, I still asked myself if there are other ways to
get rid of the "too many nested objects" error - I just can't imagine
that all the many more or less sophisticated tree macros
use not more than 4 iterations! One way I myself found indeed - to put
the whole nested loop structure together in a merge
statement instead of a union - but then calculation becomes dead slow,
around 1 line every 10 minutes or so, not to mention
radiosity...

A propos radiosity: can anyone give me a hint how to avoid those ugly
blotchy artifacts?

See you in Khyberspace!

Yadgar

Now playing: Out of World (Feltman Trommelt)


Post a reply to this message


Attachments:
Download 'boxes0027.jpg' (39 KB) Download 'boxes0021.jpg' (31 KB) Download 'boxes0022a.jpg' (44 KB) Download 'boxes0023.jpg' (42 KB) Download 'boxes0024a.jpg' (42 KB) Download 'boxes0025.jpg' (39 KB) Download 'boxes0026a.jpg' (44 KB) Download 'boxes0020.jpg' (28 KB)

Preview of image 'boxes0027.jpg'
boxes0027.jpg

Preview of image 'boxes0021.jpg'
boxes0021.jpg

Preview of image 'boxes0022a.jpg'
boxes0022a.jpg

Preview of image 'boxes0023.jpg'
boxes0023.jpg

Preview of image 'boxes0024a.jpg'
boxes0024a.jpg

Preview of image 'boxes0025.jpg'
boxes0025.jpg

Preview of image 'boxes0026a.jpg'
boxes0026a.jpg

Preview of image 'boxes0020.jpg'
boxes0020.jpg


 

From: Tim Nikias
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 20 May 2002 14:21:16
Message: <3CE93E77.5BD31E8A@gmx.de>
Nice and interesting images.

Your nesting problem... I don't get the problem.

I did something similiar to this a while ago, I've attached the outcome...

All I did was to write a macro, which divides a cube into a 3x3 Grid.
It places a superellipsoid in the corners and then calls itself
again with the middle-section as new cubes.
So, recursively, the cube is divided, superellipsoids are placed, and
we move in further and further.
It's a pretty simple macro, but I guess something like that, along with
some more #if-#else-#end, would do the job. Random-Stream may be
used freely etc, just the implementation requires a little thought.

I'm not sure how you did your images, what you are actually willing
to achieve, so maybe my approach is not suitable to your project.

Just my 2 cents worth...

Yadgar wrote:

> High!
>
> Several weeks ago, I posted here on a problem with primitive fractal
> scenes. Back then, I used to build them by nesting
> loops corresponding to their tree-like structure. But (at least with the
> cube fractal) whenever I did this more than 4 iterations
> deep, I got that nasty "Too many nested objects" error.
>
> Then the ominous K appeared on the scene... he posted an alternative
> solution in p.b.s-f capitalizing on PoV-Ray's implicit
> creation of objects:
>
> #declare cubes=
> union
> {
>    object { cube}
>    object { cube ...}
>    object  { cube ... }
> }
>
> #declare cubes=
> union
> {
>     object { cube }
>     object { cubes ... }
>     object { cubes ... }
> }
>
> and so on... each definition of "cubes" is scaled and translated in the
> following re-definition.
>
> I then started to use this technique, it worked very well, but of course
> there is the problem, that, unlike with nested loops, I'll
> never be able to modify each single cube individually, for example by
> using rand(). Nevertheless, K's method yielded some
> very interesting results, which I would like to show here.
>
> But as realistic trees need branches and twigs which are individually
> modifyable, I still asked myself if there are other ways to
> get rid of the "too many nested objects" error - I just can't imagine
> that all the many more or less sophisticated tree macros
> use not more than 4 iterations! One way I myself found indeed - to put
> the whole nested loop structure together in a merge
> statement instead of a union - but then calculation becomes dead slow,
> around 1 line every 10 minutes or so, not to mention
> radiosity...
>
> A propos radiosity: can anyone give me a hint how to avoid those ugly
> blotchy artifacts?
>
> See you in Khyberspace!
>
> Yadgar
>
> Now playing: Out of World (Feltman Trommelt)
>
>   ------------------------------------------------------------------------
>  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message


Attachments:
Download 'recurse3.jpg' (79 KB)

Preview of image 'recurse3.jpg'
recurse3.jpg


 

From: Sir Charles W  Shults III
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 20 May 2002 14:22:04
Message: <3ce93ecc$1@news.povray.org>
Thanks for an informative and useful posting.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip


Post a reply to this message

From: Samuel Benge
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 20 May 2002 14:28:25
Message: <3CE69E4A.B8F58D3D@caltel.com>
Cool stuff! May I suggest you try your hand at a programming language to
output to pov files? I think you could save some rendering time if everthing
is calculated beforehand.

Yadgar wrote:

> High!
>
> Several weeks ago, I posted here on a problem with primitive fractal
> scenes. Back then, I used to build them by nesting
> loops corresponding to their tree-like structure. But (at least with the
> cube fractal) whenever I did this more than 4 iterations
> deep, I got that nasty "Too many nested objects" error.
>
> Then the ominous K appeared on the scene... he posted an alternative
> solution in p.b.s-f capitalizing on PoV-Ray's implicit
> creation of objects:
>
> #declare cubes=
> union
> {
>    object { cube}
>    object { cube ...}
>    object  { cube ... }
> }
>
> #declare cubes=
> union
> {
>     object { cube }
>     object { cubes ... }
>     object { cubes ... }
> }
>
> and so on... each definition of "cubes" is scaled and translated in the
> following re-definition.
>
> I then started to use this technique, it worked very well, but of course
> there is the problem, that, unlike with nested loops, I'll
> never be able to modify each single cube individually, for example by
> using rand(). Nevertheless, K's method yielded some
> very interesting results, which I would like to show here.
>
> But as realistic trees need branches and twigs which are individually
> modifyable, I still asked myself if there are other ways to
> get rid of the "too many nested objects" error - I just can't imagine
> that all the many more or less sophisticated tree macros
> use not more than 4 iterations! One way I myself found indeed - to put
> the whole nested loop structure together in a merge
> statement instead of a union - but then calculation becomes dead slow,
> around 1 line every 10 minutes or so, not to mention
> radiosity...
>
> A propos radiosity: can anyone give me a hint how to avoid those ugly
> blotchy artifacts?
>
> See you in Khyberspace!
>
> Yadgar
>
> Now playing: Out of World (Feltman Trommelt)
>
>   ------------------------------------------------------------------------
>  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]

--
~ Samuel Benge

sbe### [at] caltelcom


Post a reply to this message

From: Samuel Benge
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 20 May 2002 21:41:29
Message: <3CE703CB.F286299D@caltel.com>
Hm, neat. It's like the Borg have developed a better hierarchy

Tim Nikias wrote:

> Nice and interesting images.
>
> Your nesting problem... I don't get the problem.
>
> I did something similiar to this a while ago, I've attached the outcome...
>
> All I did was to write a macro, which divides a cube into a 3x3 Grid.
> It places a superellipsoid in the corners and then calls itself
> again with the middle-section as new cubes.
> So, recursively, the cube is divided, superellipsoids are placed, and
> we move in further and further.
> It's a pretty simple macro, but I guess something like that, along with
> some more #if-#else-#end, would do the job. Random-Stream may be
> used freely etc, just the implementation requires a little thought.
>
> I'm not sure how you did your images, what you are actually willing
> to achieve, so maybe my approach is not suitable to your project.
>
> Just my 2 cents worth...
>
> Yadgar wrote:
>
> > High!
> >
> > Several weeks ago, I posted here on a problem with primitive fractal
> > scenes. Back then, I used to build them by nesting
> > loops corresponding to their tree-like structure. But (at least with the
> > cube fractal) whenever I did this more than 4 iterations
> > deep, I got that nasty "Too many nested objects" error.
> >
> > Then the ominous K appeared on the scene... he posted an alternative
> > solution in p.b.s-f capitalizing on PoV-Ray's implicit
> > creation of objects:
> >
> > #declare cubes=
> > union
> > {
> >    object { cube}
> >    object { cube ...}
> >    object  { cube ... }
> > }
> >
> > #declare cubes=
> > union
> > {
> >     object { cube }
> >     object { cubes ... }
> >     object { cubes ... }
> > }
> >
> > and so on... each definition of "cubes" is scaled and translated in the
> > following re-definition.
> >
> > I then started to use this technique, it worked very well, but of course
> > there is the problem, that, unlike with nested loops, I'll
> > never be able to modify each single cube individually, for example by
> > using rand(). Nevertheless, K's method yielded some
> > very interesting results, which I would like to show here.
> >
> > But as realistic trees need branches and twigs which are individually
> > modifyable, I still asked myself if there are other ways to
> > get rid of the "too many nested objects" error - I just can't imagine
> > that all the many more or less sophisticated tree macros
> > use not more than 4 iterations! One way I myself found indeed - to put
> > the whole nested loop structure together in a merge
> > statement instead of a union - but then calculation becomes dead slow,
> > around 1 line every 10 minutes or so, not to mention
> > radiosity...
> >
> > A propos radiosity: can anyone give me a hint how to avoid those ugly
> > blotchy artifacts?
> >
> > See you in Khyberspace!
> >
> > Yadgar
> >
> > Now playing: Out of World (Feltman Trommelt)
> >
> >   ------------------------------------------------------------------------
> >  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmxde
>
>   ------------------------------------------------------------------------
>  [Image]

--
~ Samuel Benge

sbe### [at] caltelcom


Post a reply to this message

From: GrimDude
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 20 May 2002 22:52:05
Message: <3ce9b655@news.povray.org>
The fifth iteration will create a huge hit on parse time, and render
time ten times that.

Applying textures to individual elements will slow it down even more.

Grim
"Yadgar" <yad### [at] tiscalinetde> wrote in message
news:3CE93452.5EF5F5E2@tiscalinet.de...
> High!
>
> Several weeks ago, I posted here on a problem with primitive fractal
> scenes. Back then, I used to build them by nesting
> loops corresponding to their tree-like structure. But (at least with
the
> cube fractal) whenever I did this more than 4 iterations
> deep, I got that nasty "Too many nested objects" error.
>
> Then the ominous K appeared on the scene... he posted an alternative
> solution in p.b.s-f capitalizing on PoV-Ray's implicit
> creation of objects:
>
> #declare cubes=
> union
> {
>    object { cube}
>    object { cube ...}
>    object  { cube ... }
> }
>
> #declare cubes=
> union
> {
>     object { cube }
>     object { cubes ... }
>     object { cubes ... }
> }
>
> and so on... each definition of "cubes" is scaled and translated in
the
> following re-definition.
>
> I then started to use this technique, it worked very well, but of
course
> there is the problem, that, unlike with nested loops, I'll
> never be able to modify each single cube individually, for example by
> using rand(). Nevertheless, K's method yielded some
> very interesting results, which I would like to show here.
>
> But as realistic trees need branches and twigs which are individually
> modifyable, I still asked myself if there are other ways to
> get rid of the "too many nested objects" error - I just can't imagine
> that all the many more or less sophisticated tree macros
> use not more than 4 iterations! One way I myself found indeed - to put
> the whole nested loop structure together in a merge
> statement instead of a union - but then calculation becomes dead slow,
> around 1 line every 10 minutes or so, not to mention
> radiosity...
>
> A propos radiosity: can anyone give me a hint how to avoid those ugly
> blotchy artifacts?
>
> See you in Khyberspace!
>
> Yadgar
>
> Now playing: Out of World (Feltman Trommelt)
>


------------------------------------------------------------------------
--------






------------------------------------------------------------------------
--------






------------------------------------------------------------------------
--------






------------------------------------------------------------------------
--------






------------------------------------------------------------------------
--------






------------------------------------------------------------------------
--------






------------------------------------------------------------------------
--------






------------------------------------------------------------------------
--------


Post a reply to this message

From: Michael Goldshteyn
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 21 May 2002 10:05:33
Message: <3cea542d$1@news.povray.org>
Wow, it looks really cool, could you post the source please?

Thanks,

Mike

"Tim Nikias" <tim### [at] gmxde> wrote in message
news:3CE93E77.5BD31E8A@gmx.de...
> Nice and interesting images.
>
> Your nesting problem... I don't get the problem.
>
> I did something similiar to this a while ago, I've attached the outcome...
>
> All I did was to write a macro, which divides a cube into a 3x3 Grid.
> It places a superellipsoid in the corners and then calls itself
> again with the middle-section as new cubes.
> So, recursively, the cube is divided, superellipsoids are placed, and
> we move in further and further.
> It's a pretty simple macro, but I guess something like that, along with
> some more #if-#else-#end, would do the job. Random-Stream may be
> used freely etc, just the implementation requires a little thought.
>
> I'm not sure how you did your images, what you are actually willing
> to achieve, so maybe my approach is not suitable to your project.
>
> Just my 2 cents worth...
>
> Yadgar wrote:
>
> > High!
> >
> > Several weeks ago, I posted here on a problem with primitive fractal
> > scenes. Back then, I used to build them by nesting
> > loops corresponding to their tree-like structure. But (at least with the
> > cube fractal) whenever I did this more than 4 iterations
> > deep, I got that nasty "Too many nested objects" error.
> >
> > Then the ominous K appeared on the scene... he posted an alternative
> > solution in p.b.s-f capitalizing on PoV-Ray's implicit
> > creation of objects:
> >
> > #declare cubes=
> > union
> > {
> >    object { cube}
> >    object { cube ...}
> >    object  { cube ... }
> > }
> >
> > #declare cubes=
> > union
> > {
> >     object { cube }
> >     object { cubes ... }
> >     object { cubes ... }
> > }
> >
> > and so on... each definition of "cubes" is scaled and translated in the
> > following re-definition.
> >
> > I then started to use this technique, it worked very well, but of course
> > there is the problem, that, unlike with nested loops, I'll
> > never be able to modify each single cube individually, for example by
> > using rand(). Nevertheless, K's method yielded some
> > very interesting results, which I would like to show here.
> >
> > But as realistic trees need branches and twigs which are individually
> > modifyable, I still asked myself if there are other ways to
> > get rid of the "too many nested objects" error - I just can't imagine
> > that all the many more or less sophisticated tree macros
> > use not more than 4 iterations! One way I myself found indeed - to put
> > the whole nested loop structure together in a merge
> > statement instead of a union - but then calculation becomes dead slow,
> > around 1 line every 10 minutes or so, not to mention
> > radiosity...
> >
> > A propos radiosity: can anyone give me a hint how to avoid those ugly
> > blotchy artifacts?
> >
> > See you in Khyberspace!
> >
> > Yadgar
> >
> > Now playing: Out of World (Feltman Trommelt)
> >
>
  ------------------------------------------------------------------------
> >  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]  [Image]
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmxde
>
>


----------------------------------------------------------------------------
----


Post a reply to this message

From: Yadgar
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 24 May 2002 15:53:41
Message: <3CEE9A5B.9E04DA73@tiscalinet.de>
High!

Tim Nikias schrieb:

> Nice and interesting images.
>
> Your nesting problem... I don't get the problem.

See the posted code for both algorithms in p.b.s-f. ...

>
>
> I did something similiar to this a while ago, I've attached the outcome...
>
> All I did was to write a macro, which divides a cube into a 3x3 Grid.
> It places a superellipsoid in the corners and then calls itself
> again with the middle-section as new cubes.
> So, recursively, the cube is divided, superellipsoids are placed, and
> we move in further and further.
> It's a pretty simple macro, but I guess something like that, along with
> some more #if-#else-#end, would do the job. Random-Stream may be
> used freely etc, just the implementation requires a little thought.
>
> I'm not sure how you did your images, what you are actually willing
> to achieve, so maybe my approach is not suitable to your project.

No, it isn't... as your superellipsoids don't intersect anywhere, unlike in my
scene, where always one out of eight cubes is
hidden inside the cube of the previous iteration! But on the other hand, even
when I programmed an exeption for this one
cube (i. e. not to render it at all), I still got this mean "Too many nested
objects" when trying to render more than four
iterations deep!

I also programmed a scene with spheres who did not intersect at all - and then
it was no problem to render, let's say five
iterations...

>   ------------------------------------------------------------------------
>  [Image]

You clearly ran me out... this cries for revenge!

See you in Khyberspace!

Now playing: I love the Night [The Ecstasy of Flight] (Chris de Burgh)


Post a reply to this message

From: K
Subject: Re: Cube fractals again: traditional method vs. K's union method (8 x JPG 800 x 600, 304 KB)
Date: 8 Jul 2002 00:11:32
Message: <3d2910f4@news.povray.org>
Hey Yadgar
I adapted Tim Nikias' macro to your fractal, and it worked for every level i
tried it for.
I then ran a few timed tests just to see which method worked the best.
It turns out that all 3 ran for the same length of time.
The only glitch was the too many nested objects problem with your method.
Of all 3 methods, Tim's is by far the easiest to read write and maintain.

Thanks to you both, this has been quite enlightening.

K
PS
sorry for the reply to your email (oops)

"Yadgar" <yad### [at] tiscalinetde> wrote in message
news:3CEE9A5B.9E04DA73@tiscalinet.de...
> High!
>
> Tim Nikias schrieb:
>
> > Nice and interesting images.
> >
> > Your nesting problem... I don't get the problem.
>
> See the posted code for both algorithms in p.b.s-f. ...
>
> >
> >
> > I did something similiar to this a while ago, I've attached the
outcome...
> >
> > All I did was to write a macro, which divides a cube into a 3x3 Grid.
> > It places a superellipsoid in the corners and then calls itself
> > again with the middle-section as new cubes.
> > So, recursively, the cube is divided, superellipsoids are placed, and
> > we move in further and further.
> > It's a pretty simple macro, but I guess something like that, along with
> > some more #if-#else-#end, would do the job. Random-Stream may be
> > used freely etc, just the implementation requires a little thought.
> >
> > I'm not sure how you did your images, what you are actually willing
> > to achieve, so maybe my approach is not suitable to your project.
>
> No, it isn't... as your superellipsoids don't intersect anywhere, unlike
in my
> scene, where always one out of eight cubes is
> hidden inside the cube of the previous iteration! But on the other hand,
even
> when I programmed an exeption for this one
> cube (i. e. not to render it at all), I still got this mean "Too many
nested
> objects" when trying to render more than four
> iterations deep!
>
> I also programmed a scene with spheres who did not intersect at all - and
then
> it was no problem to render, let's say five
> iterations...
>
>
  ------------------------------------------------------------------------
> >  [Image]
>
> You clearly ran me out... this cries for revenge!
>
> See you in Khyberspace!
>
> Now playing: I love the Night [The Ecstasy of Flight] (Chris de Burgh)
>


Post a reply to this message

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