POV-Ray : Newsgroups : povray.binaries.images : universal fractal macro (followed by 9 images) Server Time
18 Aug 2024 12:19:22 EDT (-0400)
  universal fractal macro (followed by 9 images) (Message 8 to 17 of 17)  
<<< Previous 7 Messages Goto Initial 10 Messages
From: Wlodzimierz ABX Skiba
Subject: Re: universal fractal macro (followed by 9 images) #7
Date: 24 May 2001 11:50:56
Message: <3b0d2de0@news.povray.org>


Post a reply to this message


Attachments:
Download 'sample7.jpg' (71 KB)

Preview of image 'sample7.jpg'
sample7.jpg


 

From: Wlodzimierz ABX Skiba
Subject: Re: universal fractal macro (followed by 9 images) #8
Date: 24 May 2001 11:51:00
Message: <3b0d2de4@news.povray.org>


Post a reply to this message


Attachments:
Download 'sample8.jpg' (26 KB)

Preview of image 'sample8.jpg'
sample8.jpg


 

From: Wlodzimierz ABX Skiba
Subject: Re: universal fractal macro (followed by 9 images) #9
Date: 24 May 2001 11:56:29
Message: <3b0d2f2d@news.povray.org>


Post a reply to this message


Attachments:
Download 'sample9.jpg' (100 KB)

Preview of image 'sample9.jpg'
sample9.jpg


 

From: Nekar Xenos
Subject: Re: universal fractal macro (followed by 9 images) #8
Date: 25 May 2001 02:21:30
Message: <3b0df9ea@news.povray.org>
I like this one a lot. I hope I'll be able to figure out how to use this one. I
think it would help a lot to make fractal  lightning.

--
/* Nekar Xenos */#local N=<-20,40,100>;#local K=<20,-40,100>;#local R=seed(0);
blob{#while((K-N).x>0)#local X=N;#local N=N+<rand(R),rand(R),1>/3;#local N=(
vlength(N-K)<vlength(X-K)?N:2*X-N);sphere{<N.y,-N.x,N.z>,1,1 scale .02}sphere{N
,1,1 scale.02}sphere{<-N.x-40,N.y,N.z>1,1 scale.01}sphere{<N.x+40,-N.y,N.z>1,1
scale.01 }#end pigment{rgbt 1}interior{media{emission <2,4,5>*5}}hollow}
"Wlodzimierz ABX Skiba" <abx### [at] abxartpl> wrote in message
news:3b0d2de4@news.povray.org...
>
>
>
>


Post a reply to this message

From: Warp
Subject: Re: universal fractal macro (followed by 9 images)
Date: 25 May 2001 08:43:43
Message: <3b0e537f@news.povray.org>
Wlodzimierz ABX Skiba <abx### [at] abxartpl> wrote:
: I've started with refer{} patch

  What does it do?

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: universal fractal macro (followed by 9 images)
Date: 25 May 2001 09:01:40
Message: <3b0e57b4@news.povray.org>
Warp wrote in message <3b0e537f@news.povray.org>...
> Wlodzimierz ABX Skiba <abx### [at] abxartpl> wrote:
> : I've started with refer{} patch
> What does it do?


You are talking in thread about it in p.u-p and you ask ? It will use pointers
to object instead of copying object. Mainly to 'copy' CSG (meshes have this type
of optimization) with memory saving (and time of parsing).

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Christoph Hormann
Subject: Re: universal fractal macro (followed by 9 images)
Date: 25 May 2001 09:04:59
Message: <3B0E58B1.6DC6A1A1@gmx.de>
Wlodzimierz ABX Skiba wrote:
> 
> I've started with refer{} patch inspired by some posts from p.u-p but at first I
> had to proof to me that it is necessary and need something to testing. This way
> I've created universal macro for creating the most popular fractals. I think it
> is good to share. Macro after moment at p.b.s-f but here are sample files
> generated with it.
> 

These all look nice, this is exactly the type of scene i think a reference
patch could be useful for.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Warp
Subject: Re: universal fractal macro (followed by 9 images)
Date: 25 May 2001 13:26:50
Message: <3b0e95da@news.povray.org>
This kind of behaviour disallows transformation optimizations (even
a simple translate has to be stored as a transformation matrix). I wonder
how much impact this has in rendering speed of objects which are copied
many times (by just translating the copies or doing other optimizable
transformations).
  I wouldn't even be surprised if the speed penalty was minimal.

  Can you try with something like:

camera { location <100,100,-50> look_at 0 }
light_source { <1000,2000,-500>, 1 }

#declare Obj =
  union { sphere { -x,2 } sphere { x,2 } pigment { rgb x } }

#declare IndY = 0;
#while(IndY < 10)
  #declare IndX = -50;
  #while(IndX <= 50)
    #declare IndZ = -50;
    #while(IndZ <= 50)
      object { Obj translate <IndX,IndY*4,IndZ> }
      #declare IndZ = IndZ+2;
    #end
    #declare IndX = IndX+4;
  #end
  #declare IndY = IndY+1;
#end


-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: universal fractal macro (followed by 9 images)
Date: 25 May 2001 14:23:35
Message: <3b0ea327@news.povray.org>
Warp wrote in message <3b0e95da@news.povray.org>...
> This kind of behaviour disallows transformation optimizations (even
> a simple translate has to be stored as a transformation matrix). I wonder
> how much impact this has in rendering speed of objects which are copied
> many times (by just translating the copies or doing other optimizable
> transformations).
> I wouldn't even be surprised if the speed penalty was minimal.

The speed should be achived not by faster rendering but memory menagement. When
you use small part of memory you ommit swaping of memory. When you create one
tree it uses sizeof(TreeObject). When you create N copies of this tree now it
uses N*sizeof(TreeObject). When you use refer{} it uses only
N*(sizeof(pointer)+sizeof(matrix)). For small N perhaps your scene could fit
into cache of processor. For large N you don't need swaping. This is
speed-optimization. Not as algorithm. I know that transformation use time. But
sometimes it is faster than swaping of large scene. Also this could be faster
for parsing becouse when you copy traditional there is CopyObject runed which
copies all childrens of current object. When you use refferencing it only store
transformation and pointer (with bbox calculation etc.).

> Can you try with something like:
>#declare IndY = 0;#while(IndY < 10)
>  #declare IndX = -50;#while(IndX <= 50)
>    #declare IndZ = -50;#while(IndZ <= 50)
>      object { Obj translate <IndX,IndY*4,IndZ> }
>      #declare IndZ = IndZ+2;
>    #end
>    #declare IndX = IndX+4;
>  #end
>  #declare IndY = IndY+1;
>#end


I don't want built it into object{} statement. I prefer new refer{} statement
with integer referencing counter field within basic object's fields.
In your example there is only (10/1)*(100/4)*(100/2)=12500 and it should fit
into many RAMs. But imagine scene with CSG of 1000 objects copied 1.000.000
times ? Such scenes were inspiration.
And I'm sorry - I leave internet for 10 days and I can't answer next questions.
Best regards for whole week.

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: David Fontaine
Subject: Re: universal fractal macro (followed by 9 images)
Date: 28 May 2001 02:43:56
Message: <3B11F172.D46EA6F@faricy.net>
Wlodzimierz ABX Skiba wrote:
> 
> You are talking in thread about it in p.u-p and you ask ? It will use pointers
> to object instead of copying object. Mainly to 'copy' CSG (meshes have this type
> of optimization) with memory saving (and time of parsing).

Ooh, sounds delicious!  Fractally stuff takes way too much memory.  Now
I can go to iteration 6...

-- 
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

<<< Previous 7 Messages Goto Initial 10 Messages

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