Logo by reallybigname - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. November 30, 2025, 10:44:14 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: having troubles with 3D IFS  (Read 2036 times)
Description: :)
0 Members and 1 Guest are viewing this topic.
yoniHorn
Guest
« on: July 05, 2010, 05:28:10 PM »

so i want to build a 3D IFS simulator.
i've already built an 2D ifs, and it's works great(download here: http://sites.google.com/site/yonisprogs/programs/IFS.rar)
and the 3D system is all set up , after i've built my 3D Function Drawer (download here: http://sites.google.com/site/yonisprogs/programs/3DFunctionDrawer.rar )

for those who are not new in IFS, i think i'll mange to produce a 3D IFS but for some reasons after some time of searching i can't find even 1 example of it! (I'm not talking about an image I'm talking about the functions!)
I'm looking for the Affine Transformations.

In 2D the Affine of the famous fern is:

w   a   b   c   d   e   f   p
ƒ1   0   0   0   0.16   0   0   0.01
ƒ2   0.85   0.04   −0.04   0.85   0   1.6   0.85
ƒ3   0.2   −0.26   0.23   0.22   0   1.6   0.07
ƒ4   −0.15   0.28   0.26   0.24   0   0.44   0.07

(source: http://en.wikipedia.org/wiki/Barnsley_fern)


I just need an example so i can start generation the IFSs.
thank you very much, Yoni.
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #1 on: July 05, 2010, 06:00:10 PM »

Ahh, cool! I didn't read your source code, but I'm guessing you've only implemented affine transformations...  From what I know, I guess these follow something like

xNew=a*x+b*y+c*z+d;
yNew=e*x+f*y+g*z+h;
zNew=i*x+j*y+k*z+l;

Maybe something like Sierpinksi pyramid/tetrahedron would be good... I think that would be

w   a   b    c   d    e    f    g   h    i    j    k    l    p
f1 0.5 0.5 0.5  0  0.5 0.5 0.5  0  0.5 0.5 0.5  0 0.25
f2 0.5 0.5 0.5 .5  0.5 0.5 0.5  0  0.5 0.5 0.5  0 0.25
f3 0.5 0.5 0.5  0  0.5 0.5 0.5 .5  0.5 0.5 0.5  0 0.25
f4 0.5 0.5 0.5  0  0.5 0.5 0.5  0  0.5 0.5 0.5 .5 0.25

Note that this won't give you an *equliateral* Sierpinksi pyramid, more a sort of right-angled sierpinksi pyramid. Another simple formula. to make a Menger sponge:

w      a     b      c    d      e      f     g     h       i      j      k    l       p
f1   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f2   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33 0.33 0.05
f3   0.33 0.33 0.33   0    0.33 0.33 0.33 0.33  0.33 0.33 0.33  0    0.05
f4   0.33 0.33 0.33 0.33  0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f5   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f6   0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f7   0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f8   0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05
f9   0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f10 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f11 0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33 0.05
f12 0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33 0.33 0.05
f13 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33 0.05
f14 0.33 0.33 0.33   0    0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66 0.05
f15 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66 0.05
f16 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33  0.33 0.33 0.33  0    0.05
f17 0.33 0.33 0.33 0.33  0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f18 0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f19 0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05
f20 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05

Uh, yeah. I think that's it. I haven't tested it though. Happy fractaling!
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #2 on: July 05, 2010, 06:33:02 PM »

lol, i hope you wrote that numbers directly from your mind cheesy
Logged

---

divide and conquer - iterate and rule - chaos is No random!
yoniHorn
Guest
« Reply #3 on: July 05, 2010, 07:31:21 PM »

Ahh, cool! I didn't read your source code, but I'm guessing you've only implemented affine transformations...  From what I know, I guess these follow something like

xNew=a*x+b*y+c*z+d;
yNew=e*x+f*y+g*z+h;
zNew=i*x+j*y+k*z+l;

Maybe something like Sierpinksi pyramid/tetrahedron would be good... I think that would be

w   a   b    c   d    e    f    g   h    i    j    k    l    p
f1 0.5 0.5 0.5  0  0.5 0.5 0.5  0  0.5 0.5 0.5  0 0.25
f2 0.5 0.5 0.5 .5  0.5 0.5 0.5  0  0.5 0.5 0.5  0 0.25
f3 0.5 0.5 0.5  0  0.5 0.5 0.5 .5  0.5 0.5 0.5  0 0.25
f4 0.5 0.5 0.5  0  0.5 0.5 0.5  0  0.5 0.5 0.5 .5 0.25

Note that this won't give you an *equliateral* Sierpinksi pyramid, more a sort of right-angled sierpinksi pyramid. Another simple formula. to make a Menger sponge:

w      a     b      c    d      e      f     g     h       i      j      k    l       p
f1   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f2   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33 0.33 0.05
f3   0.33 0.33 0.33   0    0.33 0.33 0.33 0.33  0.33 0.33 0.33  0    0.05
f4   0.33 0.33 0.33 0.33  0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f5   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f6   0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f7   0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f8   0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05
f9   0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f10 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f11 0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33 0.05
f12 0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33 0.33 0.05
f13 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33 0.05
f14 0.33 0.33 0.33   0    0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66 0.05
f15 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66 0.05
f16 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33  0.33 0.33 0.33  0    0.05
f17 0.33 0.33 0.33 0.33  0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f18 0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f19 0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05
f20 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05

Uh, yeah. I think that's it. I haven't tested it though. Happy fractaling!

wow thank you!
i'll work on that formulas that you gave me.

From where you get those? from your mind??
may you send me the source please? smiley

and again thank you
« Last Edit: July 05, 2010, 08:14:52 PM by yoniHorn » Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #4 on: July 06, 2010, 10:18:08 AM »

Sure thing. Yeah, I got them from my mind. It's just one transform for each of the 20 smaller cubes the make up the Menger sponge; most of the variables are 0.33 because the cube is 1/3 the size; the other three just move the cube to each of the 20 positions.
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
yoniHorn
Guest
« Reply #5 on: July 06, 2010, 11:55:56 AM »

Ahh, cool! I didn't read your source code, but I'm guessing you've only implemented affine transformations...  From what I know, I guess these follow something like

xNew=a*x+b*y+c*z+d;
yNew=e*x+f*y+g*z+h;
zNew=i*x+j*y+k*z+l;

Maybe something like Sierpinksi pyramid/tetrahedron would be good... I think that would be

w   a   b    c   d    e    f    g   h    i    j    k    l    p
f1 0.5 0.5 0.5  0  0.5 0.5 0.5  0  0.5 0.5 0.5  0 0.25
f2 0.5 0.5 0.5 .5  0.5 0.5 0.5  0  0.5 0.5 0.5  0 0.25
f3 0.5 0.5 0.5  0  0.5 0.5 0.5 .5  0.5 0.5 0.5  0 0.25
f4 0.5 0.5 0.5  0  0.5 0.5 0.5  0  0.5 0.5 0.5 .5 0.25

Note that this won't give you an *equliateral* Sierpinksi pyramid, more a sort of right-angled sierpinksi pyramid. Another simple formula. to make a Menger sponge:

w      a     b      c    d      e      f     g     h       i      j      k    l       p
f1   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f2   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33 0.33 0.05
f3   0.33 0.33 0.33   0    0.33 0.33 0.33 0.33  0.33 0.33 0.33  0    0.05
f4   0.33 0.33 0.33 0.33  0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f5   0.33 0.33 0.33   0    0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f6   0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f7   0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33  0    0.05
f8   0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05
f9   0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f10 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f11 0.33 0.33 0.33   0    0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33 0.05
f12 0.33 0.33 0.33 0.66  0.33 0.33 0.33   0    0.33 0.33 0.33 0.33 0.05
f13 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33 0.05
f14 0.33 0.33 0.33   0    0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66 0.05
f15 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66 0.05
f16 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.33  0.33 0.33 0.33  0    0.05
f17 0.33 0.33 0.33 0.33  0.33 0.33 0.33   0    0.33 0.33 0.33 0.66 0.05
f18 0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66  0.33 0.33 0.33  0    0.05
f19 0.33 0.33 0.33 0.33  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05
f20 0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66  0.33 0.33 0.33 0.66 0.05

Uh, yeah. I think that's it. I haven't tested it though. Happy fractaling!

sorry but I think that the first formulas are not correct..
when i place the point's in the formula they keep going to infinity instead of staying in the same range..
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #6 on: July 06, 2010, 02:02:25 PM »

hi yoniHorn,

you can simply initialise a random one smiley

the iterated transformation T should be contractive on average; so what you do is choose 3 random basis vectors u, v, w with average magnitude <= 1, then you choose a random offset in some range, maybe +/- 4 even. this can be as big as you like, because the overall contractive factor will pull the points towards the origin.
Logged

yoniHorn
Guest
« Reply #7 on: July 06, 2010, 04:23:10 PM »

hi yoniHorn,

you can simply initialise a random one smiley

the iterated transformation T should be contractive on average; so what you do is choose 3 random basis vectors u, v, w with average magnitude <= 1, then you choose a random offset in some range, maybe +/- 4 even. this can be as big as you like, because the overall contractive factor will pull the points towards the origin.
alright I think I understand it now..
can you please show me how you build this king of transformation?
i got the idea but not how to apply it..


BTW the Sierpinksi pyramid is working Great!!
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #8 on: July 06, 2010, 04:43:22 PM »

you form (4d) vectors to fill variables a,b,c,d e,f g,h i, j,k,l


xNew=a*x+b*y+c*z+d;
yNew=e*x+f*y+g*z+h;
zNew=i*x+j*y+k*z+l;

just make sure the magnitudes of the vectors are smaller than 1 to achieve a contractive transformation...
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Troubles with Apophysis 7X installation Help & Support chaos_crystal 6 847 Last post April 04, 2013, 12:25:25 AM
by chaos_crystal

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.189 seconds with 24 queries. (Pretty URLs adds 0.007s, 2q)