Title: Line Fractals Post by: kronikel on April 14, 2011, 07:53:03 AM I was messing around with making fractals out of line segments and got this-
http://s200.photobucket.com/albums/aa143/kronikel/Fractals/ Not very fancy at all but I'm seeing some interesting patterns. The method is draw a line and then pick any point on that line. Connect that point to another random point that isn't on the first line. So you have 2 lines, the original line and the "first generation" line, which are connected at one point. Determine the 3 "rules" that tell you how make this "first generation" line. 1. The angle between the parent line and the new line 2. Where the new line branches off of the parent line 2. How long the new line is compared to the original line Apply these 3 rules to every line made to make a new line. You can also make more than one line off of the original line, and a set of "rules" for each of these first generation lines you make. You can come up with some pretty wild pictures. I only saved a couple but they can vary greatly. Title: Re: Line Fractals Post by: Tglad on April 14, 2011, 08:05:40 AM Yes, L systems www.google.com/images?q=L+systems (http://www.google.com/images?q=L+systems)
Title: Re: Line Fractals Post by: kronikel on April 14, 2011, 08:10:33 AM It's a lot less exciting now =P
But these are still lots of fun =) So I'm wondering, is the method I'm using exactly the same as an "L System" or just roughly? Title: Re: Line Fractals Post by: Tglad on April 14, 2011, 09:31:28 AM :)
I think it is exactly the same. One day everything we ever think up will be already invented and on the internet :) Here are some animated ones: http://www.fractalforums.com/ifs-iterated-function-systems/fractally-animating-fractals/msg27773/#msg27773 (http://www.fractalforums.com/ifs-iterated-function-systems/fractally-animating-fractals/msg27773/#msg27773) Title: Re: Line Fractals Post by: DarkBeam on April 14, 2011, 11:35:35 AM I used to play with l-systems back in the 1997 ;D
Title: Re: Line Fractals Post by: kronikel on April 14, 2011, 06:17:07 PM I'm a bit new to fractals, and barely old enough to count in 1997 :D
But since the only things I've posted on here were asking for help I figured I'd post this to make myself feel less like a leach. Since these seem to be so widely known I did have some questions. I read that it can be done with simple math like most fractals, adding subtracting dividing etc. But how can you find angles and add angles together like that? I'm using lots of trig to do it. Getting an angle - Angle = (ArcTan2(y2 - y, x2 - x) * (180 / Pi)) + 90; Creating the new line - NewX = Sin(Angle * Pi / 180) * Dist + ParentX; NewY = Cos(Angle * Pi / 180) * -Dist + ParentY; It has to be more simple right? Title: Re: Line Fractals Post by: DarkBeam on April 14, 2011, 07:30:27 PM I only know that sin(a) = sqrt(1-cos(a)^2) but don't know many more :embarrass:
http://en.wikipedia.org/wiki/List_of_trigonometric_identities Maybe if you read here? ^-^ Title: Re: Line Fractals Post by: kronikel on April 14, 2011, 07:43:27 PM I've already got the trigonometric rules for creating L systems figured out, I'm just wondering how it could be done without them.
Title: Re: Line Fractals Post by: DarkBeam on April 14, 2011, 08:12:29 PM I've already got the trigonometric rules for creating L systems figured out, I'm just wondering how it could be done without them. Sure? Already looked at: "Compositions of trig and inverse trig functions" ^-^ (http://upload.wikimedia.org/math/e/7/b/e7b8c103e90d3201a10be0ddfe90a2cb.png) |