GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How would you go about generating a fractal based on something similar to these rules?
1. Start with a vertical line segment of length x
2. Construct a line segment of length nine tenths x starting two thirds of the way up the first line segment at a 15 degree angle to the first line segment.
3. Repeat
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Here's a little python script to produce the fractal. It works under Linux and Windows 7 so should under Vista. Obviously you'll need to install Python on Vista but this shouldn't be a problem. This is very simple and only produces 70 iterations but you can easily tune it.
Code:
#!/bin/python
import turtle
turtle.reset()
len=300
loops=70
turtle.setup(width=.60,height=.90)
turtle.up()
turtle.sety((-turtle.window_height()/2)+10)
turtle.setx((turtle.window_width()/2)-10)
turtle.down()
turtle.speed("fastest")
turtle.setheading(90)
for i in range(loops):
turtle.forward(len)
turtle.backward(len/3)
len*=(9.0/10)
turtle.left(15)
raw_input("Strike a key to continue")
It may be easier just playing with the settings in the script rather than programming a Matlab plot or similar.
The fractal that you're describing lies in a class of fractals called 'IFS', short for 'Iterated Fractal Systems'. Try googling for 'IFS' and 'windows' and I'd bet that you'd find something that would work for you... or you could install python ;-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.