LOGO-L> fractal 
Author Message
 LOGO-L> fractal

I have a fifth grader who has read about the Sierpinski triangle and Koch's
snowflake.  He has constructed equilateral triangles and made both by hand.
Now he is using logowriter and writing a program to draw them.  He has been
successful, but the programs are very long.  He is looking for repeated
commands in order to consolidate his program.

Question is - I remember that the Sierpinski could be drawn with a very
brief program, but have no idea how to go about it.  Can anyone give us a
hint?  Of course I would love a program to copy, but even better would be
some suggestions of what to look up or try out so we can maybe figure it
out.  Does it involve using :something?  I hate admitting ignorance here,
but honesty is, well, you know!

Vasha

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





Sun, 08 Aug 1999 03:00:00 GMT  
 LOGO-L> fractal

Quote:

> Question is - I remember that the Sierpinski could be drawn with a very
> brief program, but have no idea how to go about it. Can anyone give us a
> hint?
> Vasha

Hello Vasha,

I believe that you mean the attached figure.

The following program uses almost the full size of my screen. You might
need to change the size if your Logo uses less of a screen.

==============================
to main
 clearscreen hideturtle
 penup setxy -220 -172 pendown
 setheading 30
 do 430 6
end

to do :size :level
 if :level=0[stop]
 repeat 3[draw right 120]
 fillit
end

to draw
 do :size/2 :level-1
 setpencolor 1
 forward :size
end

to fillit
 setpencolor 7-:level
 right 30 pu forward .6*:size
 fill
 back .6*:size pd left 30
end
==============================

  zmani.gif
< 1K Download


Mon, 09 Aug 1999 03:00:00 GMT  
 
 [ 3 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