Title: [ASK]IFS Calculation Post by: maknyosss on July 02, 2009, 10:11:52 AM hi,
currently i making a program to implement IFS function in java applet... anyone know how to create pine image like source below using ifs? source: http://www.worldofstock.com/closeups/NPF2748.php what i know is about constructing Barnsley's Fern. that can be specified as a series of 28 numbers to feed into the calculation process. like : 0 0 0 .16 0 0 .01 .85 .04 -.04 .85 0 1.6 .85 .2 -.26 .23 .22 0 1.6 .07 -.15 .28 .26 .24 0 .44 .07 the calculation process i pick from : source :http://www.home.aone.net.au/~byzantium/ferns/fractal.html so, my really question are : 1. how to create calculation process to build pine structure? anyone have a solution? 2. is about 2d became 3d, as we know Barnsley's Fern is 2dimensional leaf, in other hand pine is 3dimensional.. are there any algorithm to solve that? thanks a lot ;D Title: Re: [ASK]IFS Calculation Post by: lycium on July 02, 2009, 11:34:19 AM hi, welcome to the forum O0
1. how to create calculation process to build pine structure? anyone have a solution? those numbers you specified are linear transformations (2x2 matrix with offset vector) and their probabilities for the "chaos game".the xforms are the key: they take the unit square and shape it into a part of the fern. so to design a different "shape" (attractor), you would change the xforms to create the desired shape (people use this technique to design words made of the word itself, etc). 2. is about 2d became 3d, as we know Barnsley's Fern is 2dimensional leaf, in other hand pine is 3dimensional.. same process, except in 3d you take the unit cube and transform it into parts of the shape you want. there will be several of these, and their probabilities, well... start with a uniform distribution (1/N each for N xforms) and do a lot of tweaking ;) are there any algorithm to solve that? there is something called the "collage theorem" devised by barnsley, used in fractal image compression. that's pretty advanced stuff though i think, at least i've never seen a good description of how it's done.here are some good links i found on the subject: http://www.cut-the-knot.org/ctk/ifs.shtml http://www.math.okstate.edu/mathdept/dynamics/lecnotes/node47.html hmmm they do a much better job than my explanation! :P Title: Re: [ASK]IFS Calculation Post by: maknyosss on July 03, 2009, 10:14:13 PM lycium thanks for your replied, your links help me a lot for understanding the college theorem.
but i still dont get enough idea for making 3d pine leaf using xforms, maybe i used to read more about that.. anyway, i get another question in my mind, what is probability used for? haha.. im very noob in this things.... thanks a lot.. Title: Re: [ASK]IFS Calculation Post by: David Makin on July 04, 2009, 02:15:44 PM anyway, i get another question in my mind, what is probability used for? haha.. im very noob in this things.... The probabilities thenselves are only required/used when rendering using the chaos game and they are used on each iteration to decide which transform to use next, the probabilities should sum to 1 - here's a little pseudo-code. iteration loop: Generate random ( 0 to 1 ) i = 0 repeat if (random=random-probability(i))<=0 break endif until (i=i+1)>=numtransforms-1 now apply transform i to the point etc. Of course the above assumes there are at least 2 transforms :) Title: Re: [ASK]IFS Calculation Post by: maknyosss on July 05, 2009, 11:21:28 PM Thanks a lot david :D i got the idea for that.. phew... this thesis confusing me a lot,but its very grateful to learn more about fractal..
Title: Re: [ASK]IFS Calculation Post by: lycium on July 09, 2009, 12:06:20 AM seems like this paper might be useful: http://graphics.cs.uiuc.edu/~jch/papers/jifs.pdf |