POV-Ray : Newsgroups : povray.binaries.images : Simple fractal resursion problem probably solved Server Time
16 Aug 2024 04:13:28 EDT (-0400)
  Simple fractal resursion problem probably solved (Message 1 to 3 of 3)  
From: Yadgar
Subject: Simple fractal resursion problem probably solved
Date: 31 Mar 2002 11:32:49
Message: <3CA73A99.9189EC05@tiscalinet.de>
Hi tracers!

(excuse me for the large PNG file - but I thought JPG would have harmed
the scene too much...)

Perhaps you remember my posting from last week where I complained about
a mysterious error message indicating "too
many nested objects". Obviously, the reason for this was that in my old
scene, there were too many objects within objects
and again within objects.

Meanwhile, I rendered a new scene (attached here), and though it
contains no less than 346,201 spheres, I essentially had no
problems to get it calculated (except for I had to change to Linux as
Windows occupied too much RAM). Still there are quite
a lot of spheres rendered unnecessarily twice, but since they are
coincident, not nested objects, it nevertheless worked fine.

Each sphere is surrounded by three rings of smaller spheres along the
x-y, x-z and y-z plane, each ring contains 8 spheres,
but I didn't program exceptions for those spheres at the intersections
of the rings, so around each larger sphere, 6 spheres
were rendered twice. With #if ... #end statements sorting them out, I
could reduce the overall number of spheres to be
rendered dramatically from
1+24+24^2+24^3+24^4=346,201 down to 1+18+18^2+18^3+18^4=111,151!
Also, this should substantially decrease the rendering time - which now
was around 16 hours on an AMD K6-II at 380 MHz
with 256 megs (yes, I know, hilarious antediluvian scrap...), I didn't
keep accurate records...

And then I also will re-try my old cube fractal scene, probably refining
it by adding subtractions in the centers of each cube
side... until I arrive at something like a Sierpinsky box!

Onward to more and more sophisticated 3d fractals - any suggestions
where to look for general introductions into fractal
mathematics and modelling?

See you in Khyberspace!

Yadgar

Now playing: Earthrise (Steve Hillage)


Post a reply to this message

From: Alastair Murray
Subject: Re: Simple fractal resursion problem probably solved
Date: 31 Mar 2002 15:39:24
Message: <3ca773fc@news.povray.org>
I'm doing a fractal with transparant spheres inside transparent spheres ( a
transmit of 0.98 ) - 350000 of them.  add in reflections and specular
reflections and I can't get away with anything less than a max_trace_level
of 25.

Took 10 hours to do 48% of a test render on an Athlon XP 1700+ win 512Meg
RAM at 1024*768.   Youch.



"Yadgar" <yad### [at] tiscalinetde> wrote in message
news:3CA73A99.9189EC05@tiscalinet.de...
> Hi tracers!
>
> (excuse me for the large PNG file - but I thought JPG would have harmed
> the scene too much...)
>
> Perhaps you remember my posting from last week where I complained about
> a mysterious error message indicating "too
> many nested objects". Obviously, the reason for this was that in my old
> scene, there were too many objects within objects
> and again within objects.
>
> Meanwhile, I rendered a new scene (attached here), and though it
> contains no less than 346,201 spheres, I essentially had no
> problems to get it calculated (except for I had to change to Linux as
> Windows occupied too much RAM). Still there are quite
> a lot of spheres rendered unnecessarily twice, but since they are
> coincident, not nested objects, it nevertheless worked fine.
>
> Each sphere is surrounded by three rings of smaller spheres along the
> x-y, x-z and y-z plane, each ring contains 8 spheres,
> but I didn't program exceptions for those spheres at the intersections
> of the rings, so around each larger sphere, 6 spheres
> were rendered twice. With #if ... #end statements sorting them out, I
> could reduce the overall number of spheres to be
> rendered dramatically from
> 1+24+24^2+24^3+24^4=346,201 down to 1+18+18^2+18^3+18^4=111,151!
> Also, this should substantially decrease the rendering time - which now
> was around 16 hours on an AMD K6-II at 380 MHz
> with 256 megs (yes, I know, hilarious antediluvian scrap...), I didn't
> keep accurate records...
>
> And then I also will re-try my old cube fractal scene, probably refining
> it by adding subtractions in the centers of each cube
> side... until I arrive at something like a Sierpinsky box!
>
> Onward to more and more sophisticated 3d fractals - any suggestions
> where to look for general introductions into fractal
> mathematics and modelling?
>
> See you in Khyberspace!
>
> Yadgar
>
> Now playing: Earthrise (Steve Hillage)
>
>
>
>
>
>


Post a reply to this message

From: Ian Shumsky
Subject: Re: Simple fractal resursion problem probably solved
Date: 3 Apr 2002 18:03:55
Message: <3cab8a5b@news.povray.org>
Hi Yagar,

Reminds me of something I did quite a while ago:

http://www.outerarm.demon.co.uk/graphics/fractal_sphere_640x480.jpg

The code is a pretty simple recursive macro, but I never quite bothered to
sort out if I was going back on myself, so the code drew far more spheres
than it needed. Code attached...

Cheers,
Ian.

http://www.outerarm.demon.co.uk/graphics/graphics.html


#version 3.1;

#include "colors.inc"
#include "textures.inc"
#include "metals.inc"
#include "stones.inc"


#macro draw_next (your_centre, your_size, your_dir, my_dir, iterations)
//        #if (my_dir != (your_dir * <-1, -1, -1>))
                #local my_size = your_size / 2;
                #local temp = my_size + your_size;
                #local my_centre = your_centre + (<temp,temp,temp> *
my_dir);
                #local next_iterations = iterations - 1;

                sphere {my_centre, my_size pigment {P_Chrome3} finish
{F_MetalC}}

                #if (next_iterations > 0)
                        draw_next (my_centre, my_size, my_dir,  x,
next_iterations)
                        draw_next (my_centre, my_size, my_dir, -x,
next_iterations)
                        draw_next (my_centre, my_size, my_dir,  y,
next_iterations)
                        draw_next (my_centre, my_size, my_dir, -y,
next_iterations)
                        draw_next (my_centre, my_size, my_dir,  z,
next_iterations)
                        draw_next (my_centre, my_size, my_dir, -z,
next_iterations)
                #end
//        #end
#end


camera
{
 location  <3.8, 3.8, -3.8>
 look_at   <0,0,0>
}

sky_sphere
{
 pigment
 {
  gradient y
  color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
 }
}

background {Black}

light_source
{
 <0, 5, -10>
 color rgb 1.0
// area_light
// <1, 0, 0> <0, 0, 1>
// 7, 7
// jitter
}

plane
{
 y, -2
 texture
 {
  checker texture {T_Stone31 finish {reflection .3}},
   texture {T_Stone15 finish {reflection .3}}

  scale 3 //rotate y*45
 }
}

//draw_next (0, 2, y,  0, 7)
draw_next (0, 2, y,  0, 2)


Post a reply to this message

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