does anyone have or know were i can get some coding for a fractual curve any curve that is or may be a Dragon Curve.


google is your friend http://commons.wikimedia.org/wiki/File:Dragon_curve.png

Wow. I love that db replaced the text within that hyperlink with a smiley. I'm sorry this post isn't on topic but I just wanted to get that out there.

Hey, and the link still works!

kette = chain
laenge = length
zeichne = draw
* Courtesy Google Translate

thanks for the info do you know how i can paste the code in python and see it in action

thanks for the info do you know how i can paste the code in python and see it in action

Select the code from webpage -> Ctrl + C
Open your favorite code/text editor -> Ctrl + V
Save As.... <File_name>.py

For your own sanity's sake you should replace the tabs with spaces... also make sure you have the modules required for xturtle

anyone know any other fractual curves code apart from the dragon curve which is a bit more easy and simple something like Torn Square fractal

You can play with this:

# draw a dragon curve fractal using Tinter's turtle
# dense version using recursion
# modified from: http://www.rosettacode.org/wiki/Dragon_curve

from turtle import *

def dragon(step, length, zig=right, zag=left):
    if step <= 0:
    step -= 1
    length /= 1.41421
    dragon(step, length, right, left)
    dragon(step, length, left, right)

# set to False to speed things up (default is True)

# draw in this color

# turtle by default starts at (x=0, y=0) center of display
# lift pen up to move to the left by 130 units and up 70 units
# then drop the pen down to start drawing
goto(-130, 70)

# experiment with step and length
step = 12
length = 300
dragon(step, length)

# gives some viewing time ...
import time

sneekula u da man thank alot that make alot more sense than the wikipedia one