LOGO-L> Re: Re; What is fractal? 
Author Message
 LOGO-L> Re: Re; What is fractal?


[...]

Quote:

>Wow, Olga, what a program!!!

>I tryed to figure out how many recursive calls you have there, but got
>confused during the counting.

>Regards...

>[[Yehuda]]

Dear Yehuda,

On the site I've addressed you to
( http://www.*-*-*.com/ ~mconnors/fractal/fractal.htm) there is a
link to the page Investigations or, on the site you came to
( http://www.*-*-*.com/ )  this page is
called Self-Similarity and Dimension. On this page Mary Ann Connors
suggested to explore several sets of fractal initiator/generator. If I
understand things correctly, it's easy to generate a fractal curve with
the use of these sets. One should just describe the generator in the
therms of forward, right, left instructions and then replace "forward"
(which results in "initiator" in these cases) with recursive call. I'm
not sure I'm making any sense here, but, I hope, the examples will
clarify my clumsy words.

Example #1.
 Description for generator of Koch flake:
          fd :a/3 lt 60
          fd :a/3 rt 120
          fd :a/3 lt 60
          fd :a/3

Description for fractal curve:

to fract.koch.flake.bok :st :dl
 if :st=0 [fd :dl  stop]
 fract.koch.flake.bok :st-1 :dl/3  lt 60
 fract.koch.flake.bok :st-1 :dl/3  rt 120
 fract.koch.flake.bok :st-1 :dl/3  lt 60
 fract.koch.flake.bok :st-1 :dl/3
end

Example #2. What I've posted recently.
 Description for generator:

   fd :length/6 lt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6 rt 90
   fd :length/6 lt 90
   fd :length/6 lt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6 rt 90
   fd :length/6 lt 90
   fd :length/6 lt 90
   fd :length/6
   fd :length/6 lt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6

Description for the fractal curve

to fract.flake1.step :level :length
   if :level<0 [fd :length  stop]
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6
end

(Don't tell me, that you haven't modified it yet to make it more elegant
:-))

I have tried some other generators, one of which has resulted in rather
amusing "cross-stitch"-like curve. I hope, you'll enjoy it.
First, run it as it is, for generator could be clearly seen, and then
replace "repeat 1" with "repeat 4".

All the best,
Olga.

---------------------
"Cross-stich"

to fract3.main  
; Fractal "Cross-stitch"
   cs
   pu setxy -100 200 pd
   seth 90 setpc [255 0 0]
   repeat 1[fract3.step 2 200 rt 90]
   pu setxy -100 200 pd
   seth 90 setpc [0 0 255]
   repeat 1[fract3.step 1 200 rt 90]
   pu setxy -100 200 pd
   seth 90 setpc [255 0 255]
   repeat 1[fract3.step 0 200 rt 90]
end

to fract3.step  :level :length
   if :level<0 [fd :length  stop]
repeat 2 [  
   fract3.step :level-1 :length/5 lt 90
   fract3.step :level-1 :length/5 rt 90
   ]
repeat 2 [  
   fract3.step :level-1 :length/5 rt 90
   fract3.step :level-1 :length/5 lt 90
   ]
   fract3.step :level-1 :length/5
end
-------------------------------------

______________________________________________________
Get Your Private, Free Email at http://www.*-*-*.com/
---------------------------------------------------------------





Thu, 25 May 2000 03:00:00 GMT  
 LOGO-L> Re: Re; What is fractal?


[...]

Quote:

>Wow, Olga, what a program!!!

>I tryed to figure out how many recursive calls you have there, but got
>confused during the counting.

>Regards...

>[[Yehuda]]

Dear Yehuda,

On the site I've addressed you to
(http://www.math.umass.edu/~mconnors/fractal/fractal.htm) there is a
link to the page Investigations or, on the site you came to
(http://thomson.com/pws/math/modules/cases/fractal/ )  this page is
called Self-Similarity and Dimension. On this page Mary Ann Connors
suggested to explore several sets of fractal initiator/generator. If I
understand things correctly, it's easy to generate a fractal curve with
the use of these sets. One should just describe the generator in the
therms of forward, right, left instructions and then replace "forward"
(which results in "initiator" in these cases) with recursive call. I'm
not sure I'm making any sense here, but, I hope, the examples will
clarify my clumsy words.

Example #1.
 Description for generator of Koch flake:
          fd :a/3 lt 60
          fd :a/3 rt 120
          fd :a/3 lt 60
          fd :a/3

Description for fractal curve:

to fract.koch.flake.bok :st :dl
 if :st=0 [fd :dl  stop]
 fract.koch.flake.bok :st-1 :dl/3  lt 60
 fract.koch.flake.bok :st-1 :dl/3  rt 120
 fract.koch.flake.bok :st-1 :dl/3  lt 60
 fract.koch.flake.bok :st-1 :dl/3
end

Example #2. What I've posted recently.
 Description for generator:

   fd :length/6 lt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6 rt 90
   fd :length/6 lt 90
   fd :length/6 lt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6 rt 90
   fd :length/6 lt 90
   fd :length/6 lt 90
   fd :length/6
   fd :length/6 lt 90
   fd :length/6
   fd :length/6 rt 90
   fd :length/6

Description for the fractal curve

to fract.flake1.step :level :length
   if :level<0 [fd :length  stop]
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 lt 90
   fract.flake1.step  :level-1 :length/6
   fract.flake1.step  :level-1 :length/6 rt 90
   fract.flake1.step  :level-1 :length/6
end

(Don't tell me, that you haven't modified it yet to make it more elegant
:-))

I have tried some other generators, one of which has resulted in rather
amusing "cross-stitch"-like curve. I hope, you'll enjoy it.
First, run it as it is, for generator could be clearly seen, and then
replace "repeat 1" with "repeat 4".

All the best,
Olga.

---------------------
"Cross-stich"

to fract3.main  
; Fractal "Cross-stitch"
   cs
   pu setxy -100 200 pd
   seth 90 setpc [255 0 0]
   repeat 1[fract3.step 2 200 rt 90]
   pu setxy -100 200 pd
   seth 90 setpc [0 0 255]
   repeat 1[fract3.step 1 200 rt 90]
   pu setxy -100 200 pd
   seth 90 setpc [255 0 255]
   repeat 1[fract3.step 0 200 rt 90]
end

to fract3.step  :level :length
   if :level<0 [fd :length  stop]
repeat 2 [  
   fract3.step :level-1 :length/5 lt 90
   fract3.step :level-1 :length/5 rt 90
   ]
repeat 2 [  
   fract3.step :level-1 :length/5 rt 90
   fract3.step :level-1 :length/5 lt 90
   ]
   fract3.step :level-1 :length/5
end
-------------------------------------

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
---------------------------------------------------------------





Thu, 25 May 2000 03:00:00 GMT  
 LOGO-L> Re: Re; What is fractal?

Quote:

> Dear Yehuda,

> On the site I've addressed you to
> (http://www.math.umass.edu/~mconnors/fractal/fractal.htm) there is a
> link to the page Investigations or, on the site you came to
> (http://thomson.com/pws/math/modules/cases/fractal/ )  this page is
> called Self-Similarity and Dimension. On this page Mary Ann Connors
> suggested to explore several sets of fractal initiator/generator. If I
> understand things correctly, it's easy to generate a fractal curve with
> the use of these sets. One should just describe the generator in the
> therms of forward, right, left instructions and then replace "forward"
> (which results in "initiator" in these cases) with recursive call. I'm
> not sure I'm making any sense here, but, I hope, the examples will
> clarify my clumsy words.

Olga,

No, you words are cristal clear. That's EXACTLY what I do with my
students in the Recursive Graphics course, for a whole semester...

[[Yehuda]]

---------------------------------------------------------------





Thu, 25 May 2000 03:00:00 GMT  
 LOGO-L> Re: Re; What is fractal?

Quote:

> to fract3.main
> ; Fractal "Cross-stitch"
>    cs
>    pu setxy -100 200 pd
>    seth 90 setpc [255 0 0]
>    repeat 1[fract3.step 2 200 rt 90]
>    pu setxy -100 200 pd
>    seth 90 setpc [0 0 255]
>    repeat 1[fract3.step 1 200 rt 90]
>    pu setxy -100 200 pd
>    seth 90 setpc [255 0 255]
>    repeat 1[fract3.step 0 200 rt 90]
> end

> to fract3.step  :level :length
>    if :level<0 [fd :length  stop]
> repeat 2 [
>    fract3.step :level-1 :length/5 lt 90
>    fract3.step :level-1 :length/5 rt 90
>    ]
> repeat 2 [
>    fract3.step :level-1 :length/5 rt 90
>    fract3.step :level-1 :length/5 lt 90
>    ]
>    fract3.step :level-1 :length/5
> end

Olga Dear,

Your above code can be somewhat simplified. Don't forget that MSWLogo
6.2b supports single-index colors, which are very convenient here:

===================================
to main  
cs ht setsc 0
for[i 1 3][
   pu setxy -200 -80 pd
   seth 90 setpc :i
   do 400 :i]
end

to do :size :level
if :level<1[fd :size stop]
repeat 2[do :size/5 :level-1 lt 90
         do :size/5 :level-1 rt 90]
repeat 2[do :size/5 :level-1 rt 90
         do :size/5 :level-1 lt 90]
do :size/5 :level-1
end
===================================

We, at Beit Berl, are studying such fractals, but the other way round: I
provide the final image, and the students have to discover the fractal
generator, and then write the Logo code. Sometimes it's easy, but other
times it might be extremely difficult.

Bye,

[[Yehuda]]

---------------------------------------------------------------





Thu, 25 May 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. LOGO-L> Logo fractal 3: flower

2. LOGO-L> logo fractal 2: snowflake

3. LOGO-L> logo fractal

4. LOGO-L> What is a Fractal

5. LOGO-L> Dragon Fractal

6. LOGO-L> animated fractal gifs

7. LOGO-L> octastar fractal

8. LOGO-L> Animated Koch's Fractal

9. LOGO-L> Shortest Fractal

10. LOGO-L> random based hexa fractal

11. LOGO-L> random generated penta fractal

12. LOGO-L> fractal

 

 
Powered by phpBB® Forum Software